YSetPlaySoundObjectValues - set playing sound object values
#include <Y2/Y.h>
#include <Y2/Ylib.h>
void YSetPlaySoundObjectValues(
YConnection *connection,
YID yid,
YEventSoundPlay *value
)
The YSetPlaySoundObjectValues changes 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.
On success a YSoundObjectPlayValues event will be generated.
#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"
);
/* Set up values that we want to modify. */
value.flags = (YPlayValuesFlagYID |
YPlayValuesFlagSampleRate);
value.yid = yid; /* Must set this. */
value.sample_rate = 22050; /* Speed up! */
/* Modify the playing sound object. */
YSetPlaySoundObjectValues(
con, yid, &value
);
sleep(3);
YDestroyPlaySoundObject(con, yid);
YCloseConnection(con, False);
YStartPlaySoundObject(3) YGetSoundObjectAttributes(3) YDestroyPlaySoundObject(3)