Gnash  0.8.11dev
Public Member Functions | List of all members
gnash::sound::StreamingSound Class Reference

Instance of a defined sound (StreamingSoundData) More...

#include <StreamingSound.h>

Inheritance diagram for gnash::sound::StreamingSound:
gnash::sound::LiveSound gnash::sound::InputStream

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
 
- Public Member Functions inherited from gnash::sound::InputStream
virtual ~InputStream ()
 

Additional Inherited Members

- Protected Member Functions inherited from gnash::sound::LiveSound
 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::AudioDecoderdecoder () const
 
void appendDecodedData (std::uint8_t *data, unsigned int size)
 
unsigned int decodedSamplesAhead () const
 

Detailed Description

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.

Constructor & Destructor Documentation

§ StreamingSound()

gnash::sound::StreamingSound::StreamingSound ( StreamingSoundData def,
media::MediaHandler mh,
sound_handler::StreamBlockId  blockId 
)

Create an embedded sound instance.

Parameters
defThe sound data for this sound
mhThe MediaHandler to use for on-demand decoding
blockIdIdentifier of the encoded block to start decoding from.
See also
gnash::swf::StreamSoundBlockTag

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.

§ ~StreamingSound()

gnash::sound::StreamingSound::~StreamingSound ( )

Unregister self from the associated StreamingSoundData.

WARNING: must be thread-safe!

References gnash::sound::StreamingSoundData::eraseActiveSound().

Member Function Documentation

§ currentBlock()

size_t gnash::sound::StreamingSound::currentBlock ( ) const
inline

§ eof()

bool gnash::sound::StreamingSound::eof ( ) const
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().


The documentation for this class was generated from the following files: