man YPlayAudioCDTrack (Fonctions bibliothèques) - Audio CD track playing

NAME

YPlayAudioCDTrack - Audio CD track playing

SYNTAX

#include <Y2/Y.h>

#include <Y2/Ylib.h>

int YPlayAudioCDTrack(

YConnection *con,

int track_number )

ARGUMENTS

connection
Specifies the connection to the Y server, obtained by a call to YOpenConnection.
track_number
Specifies the track number to play. Track numbers start from 1. To get a list of audio CD tracks use YGetAudioCDTracks.

DESCRIPTION

The YPlayAudioCDTrack function plays the track specified by track_number on the audio CD.

This function will generate a YAudioCD event with minor op code YAudioCDPlayTrack that will be sent to all clients.

RETURN VALUE

The YPlayAudioCDTrack function returns -1 on error, 0 on success. 0 can also be returned even if no audio CD is present.

EXAMPLE

#include <stdio.h>

#include <Y2/Y.h>

#include <Y2/Ylib.h>

int main(int argc, char *argv[])

{

YConnection *con = YOpenConnection(

"/usr/sbin/starty",

"127.0.0.1:9433"

);

if(con == NULL)

return(1);

/* Play audio CD track 1. */

YPlayAudioCDTrack(con, 1);

YCloseConnection(con, False);

return(0);

}

SEE ALSO