{{+bindTo:partials.standard_nacl_article}}

pp::AudioFrame Class Reference

{{- dummy div to appease doxygen -}}
Inheritance diagram for pp::AudioFrame:

List of all members.

Public Member Functions

 AudioFrame ()
 AudioFrame (const AudioFrame &other)
 AudioFrame (const Resource &resource)
 AudioFrame (PassRef, PP_Resource resource)
virtual ~AudioFrame ()
PP_TimeDelta GetTimestamp () const
void SetTimestamp (PP_TimeDelta timestamp)
uint32_t 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() AudioFrame object.

The copy constructor for AudioFrame.

Parameters:
[in]otherA reference to an AudioFrame.
pp::AudioFrame::AudioFrame ( const Resource resource) [explicit]

Constructs an AudioFrame from a Resource.

Parameters:
[in]resourceA PPB_AudioFrame resource.
pp::AudioFrame::AudioFrame ( 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]resourceA PPB_AudioFrame resource.
virtual pp::AudioFrame::~AudioFrame ( ) [virtual]

Member Function Documentation

Gets the data buffer containing the audio frame samples.

Returns:
A pointer to the beginning of the data buffer.

Gets the size of data buffer in bytes.

Returns:
The size of the data buffer in bytes.

Gets the number of channels in the audio frame.

Returns:
The number of channels in the audio frame.

Gets the number of samples in the audio frame.

Returns:
The number of samples in the audio frame. For example, at a sampling rate of 44,100 Hz in stereo audio, a frame containing 4,410 * 2 samples would have a duration of 100 milliseconds.
uint32_t pp::AudioFrame::GetSampleSize ( ) const

Gets the sample size of the audio frame in bytes.

Returns:
The sample size of the audio frame in bytes.
PP_TimeDelta pp::AudioFrame::GetTimestamp ( ) const

Gets the timestamp of the audio frame.

Returns:
A PP_TimeDelta containing the timestamp of the audio frame. Given in seconds since the start of the containing audio stream.
void pp::AudioFrame::SetTimestamp ( PP_TimeDelta  timestamp)

Sets the timestamp of the audio frame.

Parameters:
[in]timestampA PP_TimeDelta containing the timestamp of the audio frame. Given in seconds since the start of the containing audio stream.

The documentation for this class was generated from the following file:
{{/partials.standard_nacl_article}}