|
Gnash
0.8.10
|
Null sound_handler, for testing or manual fetching of samples. More...
#include <NullSoundHandler.h>
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 |
Null sound_handler, for testing or manual fetching of samples.
| gnash::sound::NullSoundHandler::NullSoundHandler | ( | media::MediaHandler * | m, |
| sound_handler * | mixer = 0 |
||
| ) | [inline] |
| 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.
| outSamples | The output samples buffer, to mix to. Must be big enough to contain nSamples. Can be larger. |
| inSamples | The 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 ?! |
| nSamples | The amount of samples to mix in. |
| volume | The 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().
1.7.6.1