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

#include <AuxStream.h>

Inheritance diagram for gnash::sound::AuxStream:
gnash::sound::InputStream

Public Member Functions

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

Constructor & Destructor Documentation

§ AuxStream()

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

Member Function Documentation

§ eof()

bool gnash::sound::AuxStream::eof ( ) const
inlinevirtual

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

Implements gnash::sound::InputStream.

§ fetchSamples()

unsigned int gnash::sound::AuxStream::fetchSamples ( std::int16_t *  to,
unsigned int  nSamples 
)
inlinevirtual

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

Parameters
toOutput buffer, must be at least nSamples*bytes. (or nSamples items sized, being a container of 16bit values).
nSamplesNumber 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
aSoundException (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.

§ samplesFetched()

unsigned int gnash::sound::AuxStream::samplesFetched ( ) const
inlinevirtual

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: