Mediastreamer Reference Guide | |||
---|---|---|---|
<<< Previous Page | Home | Up |
#include <msringplayer.h> struct MSRingPlayer; MSFilter* ms_ring_player_new (char *name, gint seconds); void ms_ring_player_destroy (MSRingPlayer *obj); |
This filter plays a repeatly a sound followed by a period of silence. The sound is given as the path to a 16 bit raw audio file, and the interval is specified in number of seconds.
struct MSRingPlayer { /* the MSRingPlayer derivates from MSFilter, so the MSFilter object MUST be the first of the MSRingPlayer object in order to the object mechanism to work*/ MSFilter filter; MSFifo *foutputs[MS_RING_PLAYER_MAX_OUTPUTS]; MSQueue *qoutputs[MS_RING_PLAYER_MAX_OUTPUTS];\ MSSync *sync; gint fd; /* the file descriptor of the file being read*/ gint space; /*space in samples between each ring */ gint current_pos; }; |
MSFilter* ms_ring_player_new (char *name, gint seconds); |
Allocates a new MSRingPlayer object.
name : | The path to the 16-bit 8khz raw file to be played as a ring. |
seconds : | The number of seconds that separates two rings. |
Returns : | a pointer the the object, NULL if name could not be open. |
void ms_ring_player_destroy (MSRingPlayer *obj); |
Destroy a MSRingPlayer object.
obj : | A valid MSRingPlayer object. |