AmPlaylist Class Reference

AmAudio component that plays entries serially. More...

#include <AmPlaylist.h>

Inheritance diagram for AmPlaylist:

AmAudio AmAudioFrontlist

Public Member Functions

 AmPlaylist (AmEventQueue *q)
bool isEmpty ()
void addToPlaylist (AmPlaylistItem *item)
void addToPlayListFront (AmPlaylistItem *item)
void close (bool notify=true)

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 component that plays entries serially.

This class can be plugged to the Input or Output of a session. Entries can be added or removed from the playlist, and the current entry is played until it is finished, then the next entry is played.


Member Function Documentation

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

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

Implements AmAudio.

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

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

Implements AmAudio.

int AmPlaylist::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.

Reimplemented in AmAudioFrontlist.

int AmPlaylist::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.

Reimplemented in AmAudioFrontlist.


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