audio
Generated Rust API reference for byte_engine.
Module audio
Audio playback, synthesis, and spatial emitter support.
Headed applications normally install audio_system::DefaultAudioSystem
through crate::application::graphics::setup_default_audio. Implement
generator::Generator for procedural or streamed audio, or
synthesizer::Synthesizer when producing samples from a synthesizer model.
Build an graph::AudioGraph and publish it through the default world's
audio graph factory when playback starts from a baked PCM resource.
emitter::Emitter connects generated sound to a position in the game world.
Quick Reference
| Item | Kind | Description |
|---|---|---|
graph | mod | Inline-authored audio processing graphs. |
AudioSamplePoolConfig | struct | |
DEFAULT_AUDIO_SAMPLE_POOL_BYTE_BUDGET | const |
Modules
graph— Inline-authored audio processing graphs.
Structs
AudioSamplePoolConfig
struct AudioSamplePoolConfig {
// [REDACTED: Private Fields]
}Defined in crates/byte-engine/src/audio/sample_loader/sample_pool.rs:34-36
The AudioSamplePoolConfig struct sets the decoded PCM memory available to
the global audio sample pool.
Implementations
-
const fn new(byte_budget: NonZeroUsize) -> SelfCreates a strict byte budget for decoded audio samples.
-
const fn byte_budget(self) -> usizeReturns the maximum decoded PCM bytes available to the sample pool.
Trait Implementations
impl ArchivePointee for AudioSamplePoolConfig
-
type ArchivedMetadata = () -
fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for AudioSamplePoolConfig
impl Clone for AudioSamplePoolConfig
-
fn clone(&self) -> AudioSamplePoolConfigRelated:
AudioSamplePoolConfig
impl Copy for AudioSamplePoolConfig
impl Debug for AudioSamplePoolConfig
-
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result
impl Default for AudioSamplePoolConfig
-
fn default() -> Self
impl Downcast for AudioSamplePoolConfig
-
fn into_any(self: Box<T>) -> Box<dyn Any> -
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any> -
fn as_any(&self) -> &dyn Any -
fn as_any_mut(&mut self) -> &mut dyn Any
impl DowncastSend for AudioSamplePoolConfig
-
fn into_any_send(self: Box<T>) -> Box<dyn Any + Send>
impl DowncastSync for AudioSamplePoolConfig
-
fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>
impl Eq for AudioSamplePoolConfig
impl<K> Equivalent for AudioSamplePoolConfig
-
fn equivalent(&self, key: &K) -> bool
impl Instrument for AudioSamplePoolConfig
impl LayoutRaw for AudioSamplePoolConfig
-
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for AudioSamplePoolConfig
-
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool -
fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl PartialEq for AudioSamplePoolConfig
-
fn eq(&self, other: &AudioSamplePoolConfig) -> boolRelated:
AudioSamplePoolConfig
impl Pointable for AudioSamplePoolConfig
-
const ALIGN: usize -
type Init = T -
unsafe fn init(init: <T as Pointable>::Init) -> usize -
unsafe fn deref<'a>(ptr: usize) -> &'a T -
unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T -
unsafe fn drop(ptr: usize)
impl Pointee for AudioSamplePoolConfig
-
type Metadata = ()
impl Read for AudioSamplePoolConfig
impl<R> ReadPrimitive for AudioSamplePoolConfig
impl StructuralPartialEq for AudioSamplePoolConfig
impl WithSubscriber for AudioSamplePoolConfig
Constants
DEFAULT_AUDIO_SAMPLE_POOL_BYTE_BUDGET
const DEFAULT_AUDIO_SAMPLE_POOL_BYTE_BUDGET: usize = 67_108_864usize;Defined in crates/byte-engine/src/audio/sample_loader/sample_pool.rs:29
The decoded PCM byte budget used by the default audio setup.