YDestroyPlaySoundObject(3)

YDestroyPlaySoundObject3

Sound object stopping

Usage

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

void YDestroyPlaySoundObject(

YConnection *connection,

YID yid
)

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 returned by a prior call to YStartPlaySoundObject or YStartPlaySoundObjectSimple.

Overview

The YDestroyPlaySoundObject function stops the playing instance of a sound object referanced by the specified yid.

The yid should have been obtained by a prior call to YStartPlaySoundObject or YStartPlaySoundObjectSimple If yid is YIDNULL or no longer existant then no operation will be performed.

A YSoundObjectKill event will be sent to the Y client if a sound object currently being played was killed.

Examples

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

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

YID yid;

YConnection *con = YOpenConnection(

"/usr/sbin/starty",

"127.0.0.1:9433"

);

if(con == NULL)

return(1);

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

sleep(3);

YDestroyPlaySoundObject(con, yid);

YCloseConnection(con, False);

return(0);
}

Releases

6 releases since Debian 2.2 (Potato); the text changed 2 times.

  1. 2.2
  2. 3.0
  3. 3.1–6.0

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