Gnash
0.8.11dev
|
Instance of a defined sound (StreamingSoundData) More...
#include <StreamingSound.h>
Public Member Functions | |
StreamingSound (StreamingSoundData &def, media::MediaHandler &mh, sound_handler::StreamBlockId blockId) | |
Create an embedded sound instance. More... | |
virtual bool | eof () const |
True if there is no more data ever. More... | |
~StreamingSound () | |
Unregister self from the associated StreamingSoundData. More... | |
size_t | currentBlock () const |
![]() | |
virtual | ~InputStream () |
Additional Inherited Members | |
![]() | |
LiveSound (media::MediaHandler &mh, const media::SoundInfo &info, size_t inPoint) | |
Create an embedded sound instance. More... | |
const std::int16_t * | getDecodedData (unsigned long int pos) const |
void | restart () |
Start from the beginning again. More... | |
unsigned int | samplesFetched () const |
How many samples have been fetched since the beginning. More... | |
size_t | playbackPosition () const |
media::AudioDecoder & | decoder () const |
void | appendDecodedData (std::uint8_t *data, unsigned int size) |
unsigned int | decodedSamplesAhead () const |
Instance of a defined sound (StreamingSoundData)
This class contains a pointer to the StreamingSoundData used for playing and a SimpleBuffer to use when decoding is needed.
gnash::sound::StreamingSound::StreamingSound | ( | StreamingSoundData & | def, |
media::MediaHandler & | mh, | ||
sound_handler::StreamBlockId | blockId | ||
) |
Create an embedded sound instance.
def | The sound data for this sound |
mh | The MediaHandler to use for on-demand decoding |
blockId | Identifier of the encoded block to start decoding from. |
References gnash::sound::adjustVolume(), gnash::sound::LiveSound::appendDecodedData(), gnash::SimpleBuffer::data(), gnash::media::AudioDecoder::decode(), gnash::sound::LiveSound::decoder(), gnash::sound::StreamingSoundData::getBlock(), gnash::SimpleBuffer::size(), and gnash::sound::StreamingSoundData::volume.
gnash::sound::StreamingSound::~StreamingSound | ( | ) |
Unregister self from the associated StreamingSoundData.
WARNING: must be thread-safe!
References gnash::sound::StreamingSoundData::eraseActiveSound().
|
inline |
|
virtual |
True if there is no more data ever.
The InputStream will be disconnected when this is true.
Implements gnash::sound::LiveSound.
References gnash::sound::LiveSound::decodedSamplesAhead().