Gnash
0.8.10
|
Class containing information about an embedded sound definition. More...
#include <SoundInfo.h>
Public Member Functions | |
SoundInfo (audioCodecType format, bool stereo, boost::uint32_t sampleRate, boost::uint32_t sampleCount, bool is16bit, boost::int16_t delaySeek=0) | |
Constructor. | |
audioCodecType | getFormat () const |
Returns the format of the sound. | |
bool | isStereo () const |
Returns the stereo status of the sound. | |
unsigned long | getSampleRate () const |
Returns the samplerate of the sound. | |
unsigned long | getSampleCount () const |
Returns the samplecount of the sound. | |
boost::int16_t | getDelaySeek () const |
Return the number of samples to seek forward or delay. | |
bool | is16bit () const |
Returns the 16bit status of the sound. |
Class containing information about an embedded sound definition.
Is created by the parser while parsing, and ownership is then transfered to EmbeddedSound. When the parser is parsing streams, it will ask the soundhandler for this to know what properties the stream has.
gnash::media::SoundInfo::SoundInfo | ( | audioCodecType | format, |
bool | stereo, | ||
boost::uint32_t | sampleRate, | ||
boost::uint32_t | sampleCount, | ||
bool | is16bit, | ||
boost::int16_t | delaySeek = 0 |
||
) | [inline] |
Constructor.
format | The encoding/format of this sound. |
stereo | Defines whether the sound is in stereo. |
sampleRate | The sample rate of the sound. |
sampleCount | The sample count in the sound. In soundstreams this is an average for each frame. |
is16bit | If true, the sound is in 16bit format (samplesize == 2) else it is 8bit (samplesize == 1). Used for streams when decoding adpcm. |
delaySeek | Number of samples to seek forward or delay. If this value is positive, the player seeks this number of samples into the sound block before the sound is played. If this value is negative the player plays this number of silent samples before playing the sound block NOTE that this value refers to input samples, so must be multiplied by OUTPUT_SAMPLE_RATE/getSampleRate() and by 2 (two channels) to find number of output samples to skip or fill. |
boost::int16_t gnash::media::SoundInfo::getDelaySeek | ( | ) | const [inline] |
Return the number of samples to seek forward or delay.
The number is to be considered in pre-resampling units.
Referenced by gnash::sound::sound_handler::startSound().
audioCodecType gnash::media::SoundInfo::getFormat | ( | ) | const [inline] |
Returns the format of the sound.
Referenced by gnash::sound::sound_handler::startSound(), and gnash::SWF::StreamSoundBlockTag::loader().
unsigned long gnash::media::SoundInfo::getSampleCount | ( | ) | const [inline] |
Returns the samplecount of the sound.
This is the amount of samples you'd get after successfully decoding the sound.
Referenced by gnash::sound::sound_handler::get_duration(), and gnash::SWF::StreamSoundBlockTag::loader().
unsigned long gnash::media::SoundInfo::getSampleRate | ( | ) | const [inline] |
Returns the samplerate of the sound.
Referenced by gnash::media::gst::AudioDecoderGst::AudioDecoderGst(), gnash::sound::sound_handler::get_duration(), and gnash::sound::swfToOutSamples().
bool gnash::media::SoundInfo::is16bit | ( | ) | const [inline] |
Returns the 16bit status of the sound.
bool gnash::media::SoundInfo::isStereo | ( | ) | const [inline] |
Returns the stereo status of the sound.
Referenced by gnash::media::gst::AudioDecoderGst::AudioDecoderGst().