Main Page | Modules | Data Structures | File List | Data Fields | Globals | Examples

The track playback (listening) API


Functions

int NJB_Play_Track (njb_t *njb, u_int32_t trackid)
int NJB_Queue_Track (njb_t *njb, u_int32_t trackid)
int NJB_Stop_Play (njb_t *njb)
int NJB_Pause_Play (njb_t *njb)
int NJB_Resume_Play (njb_t *njb)
int NJB_Seek_Track (njb_t *njb, u_int32_t position)
int NJB_Elapsed_Time (njb_t *njb, u_int16_t *elapsed, int *change)

Function Documentation

int NJB_Elapsed_Time njb_t njb,
u_int16_t *  elapsed,
int *  change
 

This function returns the elapsed time for the currently playing track on the device. Additionally, it signals if the track has changed, e.g. if the device has skipped to the next track in the queue.

Parameters:
njb a pointer to the jukebox object that the track is playing on.
elapsed a pointer to a variable that will hold the number of elapsed seconds after the call to this function.
change a pointer to a variable that will hold 0 if the track has not changed, and something different from 0 if the track has changed.
Returns:
0 on success, -1 on failure.
Examples:
cursesplay.c, and play.c.

int NJB_Pause_Play njb_t njb  ) 
 

This pauses the current playback of a track on the device.

Parameters:
njb a pointer to the jukebox object to play the track on.
Returns:
0 on success, -1 on failure.
See also:
NJB_Resume_Play()

NJB_Stop_Play()

Examples:
cursesplay.c.

int NJB_Play_Track njb_t njb,
u_int32_t  trackid
 

This starts playing a certain track on the device.

Parameters:
njb a pointer to the jukebox object to play the track on.
trackid the track to play.
Returns:
0 on success, -1 on failure.
See also:
NJB_Queue_Track()

NJB_Stop_Play()

NJB_Pause_Play()

NJB_Seek_Track()

NJB_Elapsed_Time()

Examples:
cursesplay.c, and play.c.

int NJB_Queue_Track njb_t njb,
u_int32_t  trackid
 

This adds a track to the play queue of a device.

Parameters:
njb a pointer to the jukebox object to play the track on.
trackid the track to add to the queue.
Returns:
0 on success, -1 on failure.
Examples:
cursesplay.c, and play.c.

int NJB_Resume_Play njb_t njb  ) 
 

This resumes play of a track on the device after pause.

Parameters:
njb a pointer to the jukebox object to resume the track on.
Returns:
0 on success, -1 on failure.
See also:
NJB_Pause_Play()
Examples:
cursesplay.c.

int NJB_Seek_Track njb_t njb,
u_int32_t  position
 

This seeks into an offset of the currenly playing track on the device. You can skip to an offset forward/backward in the currently playing file, given as milliseconds.

Parameters:
njb a pointer to the jukebox object to stop the current playing track on.
position the position in the track file given as milliseconds. Offsets larger than the file length should not be used.
Returns:
0 on success, -1 on failure.
Examples:
cursesplay.c.

int NJB_Stop_Play njb_t njb  ) 
 

This stops playback of a track on the device.

Parameters:
njb a pointer to the jukebox object to stop the current playing track on.
Returns:
0 on success, -1 on failure.
See also:
NJB_Pause_Play()
Examples:
cursesplay.c, and play.c.


Generated on Mon Aug 1 17:28:24 2005 for libnjb by  doxygen 1.3.9.1