Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make asset loaders public in prelude #125

Merged
merged 1 commit into from
Jun 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/ogg_loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ pub enum OggLoaderError {
FileError(#[from] FromFileError),
}

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

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
Loading