Skip to content

Commit

Permalink
Make asset loaders public in prelude
Browse files Browse the repository at this point in the history
  • Loading branch information
mgi388 committed Jun 28, 2024
1 parent 02dc1f4 commit a36d252
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 1 deletion.
17 changes: 16 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,21 @@ pub mod prelude {
#[doc(hidden)]
pub use crate::instance::{AudioCommandError, AudioInstance, AudioInstanceAssetsExt};
#[doc(hidden)]
#[cfg(feature = "flac")]
pub use crate::source::flac_loader::*;
#[doc(hidden)]
#[cfg(feature = "mp3")]
pub use crate::source::mp3_loader::*;
#[doc(hidden)]
#[cfg(feature = "ogg")]
pub use crate::source::ogg_loader::*;
#[doc(hidden)]
#[cfg(feature = "settings_loader")]
pub use crate::source::settings_loader::*;
#[doc(hidden)]
#[cfg(feature = "wav")]
pub use crate::source::wav_loader::*;
#[doc(hidden)]
pub use crate::source::AudioSource;
#[doc(hidden)]
pub use crate::spatial::{AudioEmitter, AudioReceiver, SpatialAudio};
Expand All @@ -80,7 +95,7 @@ pub mod prelude {
dsp::Frame,
sound::{
static_sound::{StaticSoundData, StaticSoundSettings},
Sound, SoundData,
FromFileError, Sound, SoundData,
},
Volume,
};
Expand Down
1 change: 1 addition & 0 deletions src/source/flac_loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ pub enum FlacLoaderError {
FileError(#[from] FromFileError),
}

/// Asset loader for FLAC files.
#[derive(Default)]
pub struct FlacLoader;

Expand Down
1 change: 1 addition & 0 deletions src/source/mp3_loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ use thiserror::Error;

use crate::source::AudioSource;

/// Asset loader for MP3 files.
#[derive(Default)]
pub struct Mp3Loader;

Expand Down
1 change: 1 addition & 0 deletions src/source/settings_loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ use thiserror::Error;

use crate::AudioSource;

/// Asset loader for sound settings files.
#[derive(Default)]
pub struct SettingsLoader;

Expand Down
1 change: 1 addition & 0 deletions src/source/wav_loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ use thiserror::Error;

use crate::source::AudioSource;

/// Asset loader for WAV files.
#[derive(Default)]
pub struct WavLoader;

Expand Down

0 comments on commit a36d252

Please sign in to comment.