#include <audio_chunk.h>

Public Member Functions | |
| audio_chunk_impl_t () | |
| audio_chunk_impl_t (const audio_sample *src, unsigned samples, unsigned nch, unsigned srate) | |
| audio_chunk_impl_t (const audio_chunk &p_source) | |
| audio_chunk_impl_t (const t_self &p_source) | |
| virtual audio_sample * | get_data () |
| virtual const audio_sample * | get_data () const |
| virtual t_size | get_data_size () const |
| Retrieves size of allocated buffer space, in audio_samples. | |
| virtual void | set_data_size (t_size new_size) |
| Resizes audio data buffer to specified size. Throws std::bad_alloc on failure. | |
| virtual unsigned | get_srate () const |
| Retrieves sample rate of contained audio data. | |
| virtual void | set_srate (unsigned val) |
| Sets sample rate of contained audio data. | |
| virtual unsigned | get_channels () const |
| Retrieves channel count of contained audio data. | |
| virtual unsigned | get_channel_config () const |
| Retrieves channel map of contained audio data. Conditions where number of channels specified by channel map don't match get_channels() return value should not be possible. | |
| virtual void | set_channels (unsigned val, unsigned setup) |
| Sets channel count / channel map. | |
| void | set_channels (unsigned val) |
| Helper; sets channel count to specified value and uses default channel map for this channel count. | |
| virtual t_size | get_sample_count () const |
| virtual void | set_sample_count (t_size val) |
| Sets number of valid samples in the buffer. WARNING: sample count * channel count should never be above allocated buffer size. | |
| const t_self & | operator= (const audio_chunk &p_source) |
| const t_self & | operator= (const t_self &p_source) |
| audio_chunk_impl_t< t_alloc >::audio_chunk_impl_t | ( | ) | [inline] |
| audio_chunk_impl_t< t_alloc >::audio_chunk_impl_t | ( | const audio_sample * | src, | |
| unsigned | samples, | |||
| unsigned | nch, | |||
| unsigned | srate | |||
| ) | [inline] |
| audio_chunk_impl_t< t_alloc >::audio_chunk_impl_t | ( | const audio_chunk & | p_source | ) | [inline] |
| audio_chunk_impl_t< t_alloc >::audio_chunk_impl_t | ( | const t_self & | p_source | ) | [inline] |
| virtual audio_sample* audio_chunk_impl_t< t_alloc >::get_data | ( | ) | [inline, virtual] |
Retrieves audio data buffer pointer (non-const version). Returned pointer is for temporary use only; it is valid until next set_data_size call, or until the object is destroyed.
Size of returned buffer is equal to get_data_size() return value (in audio_samples). Amount of actual data may be smaller, depending on sample count and channel count. Conditions where sample count * channel count are greater than data size should not be possible.
Implements audio_chunk.
| virtual const audio_sample* audio_chunk_impl_t< t_alloc >::get_data | ( | ) | const [inline, virtual] |
Retrieves audio data buffer pointer (const version). Returned pointer is for temporary use only; it is valid until next set_data_size call, or until the object is destroyed.
Size of returned buffer is equal to get_data_size() return value (in audio_samples). Amount of actual data may be smaller, depending on sample count and channel count. Conditions where sample count * channel count are greater than data size should not be possible.
Implements audio_chunk.
| virtual t_size audio_chunk_impl_t< t_alloc >::get_data_size | ( | ) | const [inline, virtual] |
| virtual void audio_chunk_impl_t< t_alloc >::set_data_size | ( | t_size | p_new_size | ) | [inline, virtual] |
Resizes audio data buffer to specified size. Throws std::bad_alloc on failure.
Implements audio_chunk.
| virtual unsigned audio_chunk_impl_t< t_alloc >::get_srate | ( | ) | const [inline, virtual] |
| virtual void audio_chunk_impl_t< t_alloc >::set_srate | ( | unsigned | val | ) | [inline, virtual] |
| virtual unsigned audio_chunk_impl_t< t_alloc >::get_channels | ( | ) | const [inline, virtual] |
| virtual unsigned audio_chunk_impl_t< t_alloc >::get_channel_config | ( | ) | const [inline, virtual] |
Retrieves channel map of contained audio data. Conditions where number of channels specified by channel map don't match get_channels() return value should not be possible.
Implements audio_chunk.
| virtual void audio_chunk_impl_t< t_alloc >::set_channels | ( | unsigned | p_count, | |
| unsigned | p_config | |||
| ) | [inline, virtual] |
| void audio_chunk_impl_t< t_alloc >::set_channels | ( | unsigned | val | ) | [inline] |
Helper; sets channel count to specified value and uses default channel map for this channel count.
Reimplemented from audio_chunk.
| virtual t_size audio_chunk_impl_t< t_alloc >::get_sample_count | ( | ) | const [inline, virtual] |
Retrieves number of valid samples in the buffer.
Note that a "sample" means a unit of interleaved PCM data representing states of each channel at given point of time, not a single PCM value.
For an example, duration of contained audio data is equal to sample count / sample rate, while actual size of contained data is equal to sample count * channel count.
Implements audio_chunk.
| virtual void audio_chunk_impl_t< t_alloc >::set_sample_count | ( | t_size | val | ) | [inline, virtual] |
Sets number of valid samples in the buffer. WARNING: sample count * channel count should never be above allocated buffer size.
Implements audio_chunk.
| const t_self& audio_chunk_impl_t< t_alloc >::operator= | ( | const audio_chunk & | p_source | ) | [inline] |
Reimplemented from audio_chunk.
| const t_self& audio_chunk_impl_t< t_alloc >::operator= | ( | const t_self & | p_source | ) | [inline] |
1.5.5