Gnash  0.8.11dev
Protected Member Functions
gnash::sound::LiveSound Class Reference

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

#include <LiveSound.h>

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

List of all members.

Protected Member Functions

 LiveSound (media::MediaHandler &mh, const media::SoundInfo &info, size_t inPoint)
 Create an embedded sound instance.
const boost::int16_t * getDecodedData (unsigned long int pos) const
virtual bool moreData ()=0
 Called when more decoded sound data is required.
virtual bool eof () const =0
 True if there is no more data ever.
void restart ()
 Start from the beginning again.
unsigned int samplesFetched () const
 How many samples have been fetched since the beginning.
size_t playbackPosition () const
media::AudioDecoderdecoder () const
void appendDecodedData (boost::uint8_t *data, unsigned int size)
unsigned int decodedSamplesAhead () const

Additional Inherited Members

- Public Member Functions inherited from gnash::sound::InputStream
virtual ~InputStream ()

Detailed Description

Instance of a defined sound (LiveSoundData)

This class contains a pointer to the LiveSoundData used for playing and a SimpleBuffer to use when decoding is needed.


Constructor & Destructor Documentation

gnash::sound::LiveSound::LiveSound ( media::MediaHandler mh,
const media::SoundInfo info,
size_t  inPoint 
)
protected

Create an embedded sound instance.

Parameters:
mhThe MediaHandler to use for on-demand decoding
inPointOffset in output samples this instance should start playing from. These are post-resampling samples (44100 for one second of samples).
infoThe media::SoundInfo for this sound.

Member Function Documentation

void gnash::sound::LiveSound::appendDecodedData ( boost::uint8_t *  data,
unsigned int  size 
)
inlineprotected
unsigned int gnash::sound::LiveSound::decodedSamplesAhead ( ) const
inlineprotected

Return number of already-decoded samples available from playback position on

References assert, and gnash::SimpleBuffer::size().

Referenced by gnash::sound::StreamingSound::eof(), and gnash::sound::EmbedSoundInst::eof().

media::AudioDecoder& gnash::sound::LiveSound::decoder ( ) const
inlineprotected
virtual bool gnash::sound::LiveSound::eof ( ) const
protectedpure virtual

True if there is no more data ever.

The InputStream will be disconnected when this is true.

Implements gnash::sound::InputStream.

Implemented in gnash::sound::EmbedSoundInst, and gnash::sound::StreamingSound.

const boost::int16_t* gnash::sound::LiveSound::getDecodedData ( unsigned long int  pos) const
inlineprotected
virtual bool gnash::sound::LiveSound::moreData ( )
protectedpure virtual

Called when more decoded sound data is required.

This will be called whenever no more decoded data is available but decoding is not complete.

size_t gnash::sound::LiveSound::playbackPosition ( ) const
inlineprotected
void gnash::sound::LiveSound::restart ( )
inlineprotected

Start from the beginning again.

unsigned int gnash::sound::LiveSound::samplesFetched ( ) const
inlineprotectedvirtual

How many samples have been fetched since the beginning.

Note that this is reset on each loop.

Implements gnash::sound::InputStream.


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