Gnash  0.8.10
Public Member Functions | Public Attributes
gnash::sound::NullSoundHandler Class Reference

Null sound_handler, for testing or manual fetching of samples. More...

#include <NullSoundHandler.h>

Inheritance diagram for gnash::sound::NullSoundHandler:
gnash::sound::sound_handler

List of all members.

Public Member Functions

 NullSoundHandler (media::MediaHandler *m, sound_handler *mixer=0)
void mix (boost::int16_t *outSamples, boost::int16_t *inSamples, unsigned int nSamples, float volume)
 Mix nSamples from inSamples to outSamples, with given volume.

Public Attributes

sound_handler_mixer

Detailed Description

Null sound_handler, for testing or manual fetching of samples.


Constructor & Destructor Documentation

gnash::sound::NullSoundHandler::NullSoundHandler ( media::MediaHandler m,
sound_handler mixer = 0 
) [inline]

Member Function Documentation

void gnash::sound::NullSoundHandler::mix ( boost::int16_t *  outSamples,
boost::int16_t *  inSamples,
unsigned int  nSamples,
float  volume 
) [inline, virtual]

Mix nSamples from inSamples to outSamples, with given volume.

Parameters:
outSamplesThe output samples buffer, to mix to. Must be big enough to contain nSamples. Can be larger.
inSamplesThe input samples buffer, to mix in. It is non-const as this method *is* allowed to mess with content, for example to apply volume. TODO: why not applying volume upstream ?!
nSamplesThe amount of samples to mix in.
volumeThe volume to apply to input samples, as a fraction (0..1)

TODO: this interface says nothing about how many channels we're going to mix. It should, to be a sane interface. Maybe, a Mixer instance should be created, initialized with number of channels, at each fetching.

Implements gnash::sound::sound_handler.

References gnash::sound::sound_handler::mix().


Member Data Documentation


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