42 static void xmms_visualization_destroy (
xmms_object_t *
object);
59 for (
id = 0;
id < vis->
clientc; ++id) {
82 if (id < 0 || id >= vis->
clientc) {
95 if (id < 0 || id >= vis->
clientc) {
176 g_io_channel_shutdown (vis->
socketio, FALSE, NULL);
203 if (!g_strcasecmp (key,
"type")) {
204 if (!g_strcasecmp (data,
"pcm")) {
206 }
else if (!g_strcasecmp (data,
"spectrum")) {
208 }
else if (!g_strcasecmp (data,
"peak")) {
213 }
else if (!g_strcasecmp (key,
"stereo")) {
214 p->
stereo = (atoi (data) > 0);
215 }
else if (!g_strcasecmp (key,
"pcm.hardwire")) {
218 }
else if (!g_strcasecmp (key,
"timeframe")) {
236 id = create_client ();
238 xmms_error_set (err,
XMMS_ERROR_OOM,
"could not allocate dataset");
244 properties_init (&c->
prop);
258 if (!property_set (&c->
prop, key, value)) {
274 const gchar *key, *valstr;
280 xmms_error_set (err,
XMMS_ERROR_INVAL,
"properties must be sent as a dict!");
286 xmms_error_set (err,
XMMS_ERROR_INVAL,
"key-value property pair could not be read!");
288 xmms_error_set (err,
XMMS_ERROR_INVAL,
"property value could not be read!");
289 }
else if (!property_set (&c->
prop, key, valstr)) {
309 if (sscanf (shmidstr,
"%d", &shmid) != 1) {
313 return init_shm (vis,
id, shmid, err);
332 package_write (
xmms_vis_client_t *c, int32_t
id,
struct timeval *time,
int channels,
int size,
short *buf)
357 gettimeofday (&time, NULL);
358 time.tv_sec += (latency / 1000);
359 time.tv_usec += (latency % 1000) * 1000;
360 if (time.tv_usec > 1000000) {
362 time.tv_usec -= 1000000;
366 for (i = 0; i < vis->
clientc; ++i) {
368 package_write (vis->
clientv[i], i, &time, channels, size, buf);