YGetSoundObjectAttributes - Sound object attributes
#include <Y2/Y.h>
#include <Y2/Ylib.h>
int YGetSoundObjectAttributes(
YConnection *connection,
const char *path,
YEventSoundObjectAttributes *buf
)
The YGetSoundObjectAttributes function fetches the attributes for the sound object specified by path and stores the values in the buffer pointer to by buf.
The YGetSoundObjectAttributes function returns -1 if the sound object does not exist/is not accessible or 0 on success.
#include <stdio.h>
#include <Y2/Y.h>
#include <Y2/Ylib.h>
int main(int argc, char *argv[])
{
YEventSoundObjectAttributes buf;
YConnection *con = YOpenConnection(
"/usr/sbin/starty",
"127.0.0.1:9433"
);
if(con == NULL)
return(1);
if(YGetSoundObjectAttributes(
con, "/usr/share/sounds/info.wav", &buf
))
printf("Failed.\n");
else
printf("Success.\n");
YCloseConnection(con, False);
YStartPlaySoundObject(3) YDestroyPlaySoundObject(3)