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

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

#include <EmbedSoundInst.h>

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

Public Member Functions

 EmbedSoundInst (EmbedSound &def, media::MediaHandler &mh, unsigned int inPoint, unsigned int outPoint, const SoundEnvelopes *envelopes, int loopCount)
 Create an embedded sound instance. More...
 
virtual bool eof () const
 True if there is no more data ever. More...
 
virtual ~EmbedSoundInst ()
 Unregister self from the associated EmbedSound. More...
 
- 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 (EmbedSound)

Constructor & Destructor Documentation

§ EmbedSoundInst()

gnash::sound::EmbedSoundInst::EmbedSoundInst ( EmbedSound def,
media::MediaHandler mh,
unsigned int  inPoint,
unsigned int  outPoint,
const SoundEnvelopes envelopes,
int  loopCount 
)

Create an embedded sound instance.

Parameters
defThe definition of this sound (the immutable data)
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).
outPointOffset in output samples this instance should stop playing at. These are post-resampling samples (44100 for one second of samples). Use numeric_limits<unsigned int>::max() for never
envelopesSoundEnvelopes to apply to this sound. May be 0 for none.
loopCountNumber of times this instance should loop over the defined sound. Note that every loop begins and ends at the range given by inPoint and outPoint.

References gnash::sound::adjustVolume(), gnash::sound::LiveSound::appendDecodedData(), gnash::sound::EmbedSound::data(), gnash::media::AudioDecoder::decode(), gnash::sound::LiveSound::decoder(), gnash::key::i, gnash::log_debug(), gnash::sound::LiveSound::playbackPosition(), gnash::sound::LiveSound::restart(), gnash::sound::EmbedSound::size(), and gnash::sound::EmbedSound::volume.

§ ~EmbedSoundInst()

gnash::sound::EmbedSoundInst::~EmbedSoundInst ( )
virtual

Unregister self from the associated EmbedSound.

WARNING: must be thread-safe!

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

Member Function Documentation

§ eof()

bool gnash::sound::EmbedSoundInst::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: