YDestroyPlaySoundObject(3) sound object stopping


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

void YDestroyPlaySoundObject(

        YConnection *connection,

        YID yid


Specifies the connection to the Y server, obtained by a call to YOpenConnection.
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.


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.


#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(




        if(con == NULL)


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


        YDestroyPlaySoundObject(con, yid);

        YCloseConnection(con, False);