Inheritance diagram for pp::AudioBuffer:
Public Member Functions
AudioBuffer () | |
AudioBuffer (const AudioBuffer &other) | |
AudioBuffer (const Resource &resource) | |
AudioBuffer (PassRef, PP_Resource resource) | |
virtual | ~AudioBuffer () |
PP_TimeDelta | GetTimestamp () const |
void | SetTimestamp (PP_TimeDelta timestamp) |
PP_AudioBuffer_SampleRate | GetSampleRate () const |
PP_AudioBuffer_SampleSize | GetSampleSize () const |
uint32_t | GetNumberOfChannels () const |
uint32_t | GetNumberOfSamples () const |
void * | GetDataBuffer () |
uint32_t | GetDataBufferSize () const |
Constructor & Destructor Documentation
Default constructor for creating an is_null() AudioBuffer
object.
pp::AudioBuffer::AudioBuffer | ( | const AudioBuffer & | other | ) |
The copy constructor for AudioBuffer
.
- Parameters:
[in] other A reference to an AudioBuffer
.
pp::AudioBuffer::AudioBuffer | ( | const Resource & | resource | ) | [explicit] |
Constructs an AudioBuffer
from a Resource
.
- Parameters:
[in] resource A PPB_AudioBuffer
resource.
pp::AudioBuffer::AudioBuffer | ( | PassRef | , |
PP_Resource | resource | ||
) |
A constructor used when you have received a PP_Resource
as a return value that has had 1 ref added for you.
- Parameters:
[in] resource A PPB_AudioBuffer
resource.
virtual pp::AudioBuffer::~AudioBuffer | ( | ) | [virtual] |
Member Function Documentation
void* pp::AudioBuffer::GetDataBuffer | ( | ) |
Gets the data buffer containing the audio buffer samples.
- Returns:
- A pointer to the beginning of the data buffer.
uint32_t pp::AudioBuffer::GetDataBufferSize | ( | ) | const |
Gets the size of data buffer in bytes.
- Returns:
- The size of the data buffer in bytes.
uint32_t pp::AudioBuffer::GetNumberOfChannels | ( | ) | const |
Gets the number of channels in the audio buffer.
- Returns:
- The number of channels in the audio buffer.
uint32_t pp::AudioBuffer::GetNumberOfSamples | ( | ) | const |
Gets the number of samples in the audio buffer.
- Returns:
- The number of samples in the audio buffer. For example, at a sampling rate of 44,100 Hz in stereo audio, a buffer containing 4,410 * 2 samples would have a duration of 100 milliseconds.
PP_AudioBuffer_SampleRate pp::AudioBuffer::GetSampleRate | ( | ) | const |
Gets the sample rate of the audio buffer.
- Returns:
- The sample rate of the audio buffer.
PP_AudioBuffer_SampleSize pp::AudioBuffer::GetSampleSize | ( | ) | const |
Gets the sample size of the audio buffer in bytes.
- Returns:
- The sample size of the audio buffer in bytes.
PP_TimeDelta pp::AudioBuffer::GetTimestamp | ( | ) | const |
Gets the timestamp of the audio buffer.
- Returns:
- A
PP_TimeDelta
containing the timestamp of the audio buffer. Given in seconds since the start of the containing audio stream.
void pp::AudioBuffer::SetTimestamp | ( | PP_TimeDelta | timestamp | ) |
Sets the timestamp of the audio buffer.
- Parameters:
[in] timestamp A PP_TimeDelta
containing the timestamp of the audio buffer. Given in seconds since the start of the containing audio stream.
The documentation for this class was generated from the following file: