Module rg3d_sound::buffer [−][src]
This module provides all needed types and methods to create/load sound buffers from different sources.
Overview
Buffer is data source for sound sources in the engine. Each sound sound will fetch samples it needs
from a buffer, process them and send to output device. Buffer can be shared across multiple sources,
this is why each instance wrapped into Arc<Mutex<>>
. Why not just load a buffer per source? This
is just inefficient memory-wise. Sound samples are very heavy: for example a mono sound that lasts
just 1 second will take ~172 Kb of memory (with 44100 Hz sampling rate and float sample representation).
Modules
generic | Generic buffer module. |
streaming | Streaming buffer. |
Enums
DataSource | Data source enumeration. Provides unified way of selecting data source for sound buffers. It can be either a file or memory block. |
SoundBuffer | Sound buffer is a data source for sound sources. See module documentation for more info. |