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

WAV writer class. More...

#include <WAVWriter.h>

Public Member Functions

 WAVWriter (const std::string &outfile)
 
 ~WAVWriter ()
 
void pushSamples (std::int16_t *from, unsigned int nSamples)
 Write samples to file. More...
 

Detailed Description

WAV writer class.

Constructor & Destructor Documentation

§ WAVWriter()

gnash::sound::WAVWriter::WAVWriter ( const std::string &  outfile)

References _, and gnash::log_debug().

§ ~WAVWriter()

gnash::sound::WAVWriter::~WAVWriter ( )

References gnash::log_error().

Member Function Documentation

§ pushSamples()

void gnash::sound::WAVWriter::pushSamples ( std::int16_t *  from,
unsigned int  nSamples 
)

Write samples to file.

Parameters
fromThe buffer to read samples from. Buffer must be big enough to hold nSamples samples.
nSamplesThe amount of samples to read. NOTE: this number currently refers to "mono" samples due to some bad design decision. It is so expected that the user fetches 44100 * 2 samples which has to be interpreted as series of left,right channel couples. TODO: use actual number of samples so that it's expected to fetch 44100 per second and let expose a function to give interpretation of what comes back (how many bytes per channel, which format).

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