YGetPlaySoundObjectValues(3)

YGetPlaySoundObjectValues3

Get playing sound object values

Usage

#include <Y2/Y.h>
#include <Y2/Ylib.h>

int YGetPlaySoundObjectValues(

YConnection *connection,

YID yid,

YEventSoundPlay *value
)

Arguments

connection

Specifies the connection to the Y server, obtained by a call to YOpenConnection.

yid

Specifies the YID of the playing instance of the sound object that you want to stop. This value should have been previously returned by a call to YStartPlaySoundObject or YStartPlaySoundObjectSimple.

value

Specifies the buffer to store the values of the playing sound object. See YEventSoundPlay for more information about this structure.

Overview

The YGetPlaySoundObjectValues gets the play values of a sound object already playing. The value of yid must be that of one received from a call to YStartPlaySoundObject or YStartPlaySoundObjectSimple.

Return value

The YGetPlaySoundObjectValues returns 0 on success or non-zero on error.

Examples

#include <stdio.h>
#include <unistd.h>
#include <Y2/Y.h>
#include <Y2/Ylib.h>

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

YID yid;

YEventSoundPlay value;

YConnection *con = YOpenConnection(

"/usr/sbin/starty",

"127.0.0.1:9433"

);

if(con == NULL)

return(1);

/* Start playing a sound object. */

yid = YStartPlaySoundObjectSimple(
con, "/usr/share/sounds/info.wav"
);

/* Get values of the playing sound object. */

if(!YGetPlaySoundObjectValues(

con, yid, &value

))

{

/* Handle values here. */

}

sleep(3);

YDestroyPlaySoundObject(con, yid);

YCloseConnection(con, False);

return(0);
}

Releases

4 releases since Debian 3.1 (Sarge); the text changed 1 time.

  1. 3.1–5.0
  2. 6.0

From liby-dev 2.14.5-7 in Debian 6.0 (Squeeze). Parsed by carta from the page's man source.