AmAudioMixIn Class Reference

AmAudio to mix in every n seconds a file More...

#include <AmAudioMixIn.h>

Inheritance diagram for AmAudioMixIn:

AmAudio

Public Member Functions

 AmAudioMixIn (AmAudio *A, AmAudioFile *B, unsigned int s, double l, bool finish_b_while_mixing=false)

Protected Member Functions

int read (unsigned int user_ts, unsigned int size)
int write (unsigned int user_ts, unsigned int size)
int get (unsigned int user_ts, unsigned char *buffer, unsigned int nb_samples)
int put (unsigned int user_ts, unsigned char *buffer, unsigned int size)

Detailed Description

AmAudio to mix in every n seconds a file

AmAudio that plays Audio A and every s seconds mixes in AudioFile B with level l. If l == 0, playback of A is not continued when playing B, which means that it continues right where it was before playback of B started.


Member Function Documentation

int AmAudioMixIn::read ( unsigned int  user_ts,
unsigned int  size 
) [inline, protected, virtual]

Gets 'size' bytes directly from stream (Read,Pull).

Implements AmAudio.

int AmAudioMixIn::write ( unsigned int  user_ts,
unsigned int  size 
) [inline, protected, virtual]

Puts 'size' bytes directly from stream (Write,Push).

Implements AmAudio.

int AmAudioMixIn::get ( unsigned int  user_ts,
unsigned char *  buffer,
unsigned int  nb_samples 
) [protected, virtual]

Get some samples from input stream.

Warning:
For packet based payloads / file formats, use:
           nb_sample = input buffer size / sample size of the reference format
 
whereby the format with/from which the codec works is the reference one.
Returns:
# bytes read, else -1 if error (0 is OK)

Reimplemented from AmAudio.

int AmAudioMixIn::put ( unsigned int  user_ts,
unsigned char *  buffer,
unsigned int  size 
) [protected, virtual]

Put some samples to the output stream.

Warning:
For packet based payloads / file formats, use:
           nb_sample = input buffer size / sample size of the reference format
 
whereby the format with/from which the codec works is the reference one.
Returns:
# bytes written, else -1 if error (0 is OK)

Reimplemented from AmAudio.


The documentation for this class was generated from the following files:
Generated on Fri May 16 12:02:06 2008 for SEMS by  doxygen 1.5.1
Home |  Recent changes |  Search |  Glossary |  Sitemap |  Login