Public Member Functions

gnash::sound::AuxStream Class Reference

#include <AuxStream.h>

Inheritance diagram for gnash::sound::AuxStream:
Inheritance graph
[legend]
Collaboration diagram for gnash::sound::AuxStream:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 AuxStream (aux_streamer_ptr cb, void *arg)
unsigned int fetchSamples (boost::int16_t *to, unsigned int nSamples)
 Fetch the given amount of samples, non-blocking and thread-safe.
unsigned int samplesFetched () const
 Return number of samples fetched from this stream.
bool eof () const
 Return true if there'll be no more data to fetch.

Constructor & Destructor Documentation

gnash::sound::AuxStream::AuxStream ( aux_streamer_ptr  cb,
void *  arg 
) [inline]

Member Function Documentation

bool gnash::sound::AuxStream::eof (  )  const [inline, virtual]

Return true if there'll be no more data to fetch.

Implements gnash::sound::InputStream.

unsigned int gnash::sound::AuxStream::fetchSamples ( boost::int16_t *  to,
unsigned int  nSamples 
) [inline, virtual]

Fetch the given amount of samples, non-blocking and thread-safe.

Parameters:
to Output buffer, must be at least nSamples*bytes. (or nSamples items sized, being a container of 16bit values).
nSamples Number of samples to fetch. It is expected that the fetcher fetches samples in multiples of 2, being each couple composed by a sample for the left channel and a sample for the right channel, in that order.
Returns:
number of samples actually written to the output buffer. If < nSamples this InputStream ran out of data, either temporarly or permanently. Use eof() to tell.
Exceptions:
a SoundException (to be better defined a set of them) if unable to process this and further requests due to internal errors (not if it just happens to complete its source)

Implements gnash::sound::InputStream.

unsigned int gnash::sound::AuxStream::samplesFetched (  )  const [inline, virtual]

Return number of samples fetched from this stream.

It is expected for the return to be always a multiple of 2, being each stereo sample unit composed by a sample for the left channel and a sample for the right channel, in that order.

Implements gnash::sound::InputStream.


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