XMMS/BMP InfoPipe sampling frequency of current tune
- infopipe_protocol
- XMMS/BMP InfoPipe protocol
-
-
infopipe_playlist_currtune
XMMS/BMP InfoPipe playlist index number of current tune
XMMS/BMP InfoPipe sampling frequency of current tune
.TP
-\fBinfopipe_protocol\fR
-XMMS/BMP InfoPipe protocol
-
-.TP
\fBinfopipe_playlist_currtune\fR
XMMS/BMP InfoPipe playlist index number of current tune
<varlistentry>
<term>
- <command><option>infopipe_protocol</option></command>
- </term>
- <listitem>
- XMMS/BMP InfoPipe protocol
- <para></para></listitem>
-</varlistentry>
-
-<varlistentry>
- <term>
<command><option>infopipe_playlist_currtune</option></command>
</term>
<listitem>
* -------------------------------------------------- */
void *infopipe_thread_func(void *pvoid)
{
- int i,fd,runnable;
+ int i,rc,fd,runnable;
fd_set readset;
struct timeval tm;
static char buf[2048]; /* should equal or exceed sizeof(infopipe_t) */
for a worker thread such as this. We don't want to slow down
user interface updates in the main thread as there is already
excess latency there. */
- if (select(fd+1,&readset,NULL,NULL,&tm) == 1) { /* something to read */
+ rc=select(fd+1,&readset,NULL,NULL,&tm);
+ if (rc == -1)
+ perror("infopipe select()");
+ else if (rc && FD_ISSET(fd,&readset)) {
if (read(fd,buf,sizeof(buf)) > 0) { /* buf has data */
for(i=0;i<14;i++)
printf("%s\n",items[i]);
*/
- }
+ }
}
+ else
+ printf("no infopipe data to read.\n");
- if (close(fd) < 0) {
- break;
- }
+ close(fd);
break;
}