Struct alto::Buffer
[−]
[src]
pub struct Buffer<'d: 'c, 'c> { /* fields omitted */ }
A buffer containing audio data of any supported format.
Methods
impl<'d: 'c, 'c> Buffer<'d, 'c>
[src]
fn context(&self) -> &Context<'d>
Context from which this buffer was created.
fn raw_buffer(&self) -> ALuint
Raw handle as provided by OpenAL.
fn set_data<F: SampleFrame, R: AsBufferData<F>>(&mut self,
data: R,
freq: i32)
-> AltoResult<()>
data: R,
freq: i32)
-> AltoResult<()>
Upload sound data from a slice of sample frames.
fn frequency(&self) -> AltoResult<ALint>
Sample-rate of the audio in the buffer.
fn bits(&self) -> AltoResult<ALint>
Bit-depth of the audio in the buffer.
fn channels(&self) -> AltoResult<ALint>
Number of channels for the audio in the buffer.
fn size(&self) -> AltoResult<ALint>
Size in bytes of the audio in the buffer.
fn soft_loop_points(&self) -> AltoResult<(ALint, ALint)>
Loop points for the audio in the buffer, as a tuple of start and end samples.
Requires AL_SOFT_loop_points
.