chiark / gitweb /
Source code reorganization:
[disorder] / clients / playrtp-alsa.c
index ac8ef7e7734830226f4f3c8712f5bd2a7a07a06f..a3995e9e4eddd07b9a28ae4ff48e655f82ff962c 100644 (file)
  * wrapping OSS the whole of playrtp could probably be greatly simplified.
  */
 
-#include <config.h>
+#include "common.h"
 
 #if HAVE_ALSA_ASOUNDLIB_H 
-#include "types.h"
 
 #include <poll.h>
 #include <alsa/asoundlib.h>
-#include <assert.h>
 #include <pthread.h>
 #include <arpa/inet.h>
 
 static int playrtp_alsa_supply(void *dst,
                                unsigned supply_nsamples) {
   unsigned samples_available;
+  const struct packet *p;
 
   pthread_mutex_lock(&lock);
-  const struct packet *p = playrtp_next_packet();
+  p = playrtp_next_packet();
   if(p && contains(p, next_timestamp)) {
     /* This packet is ready to play */
     const uint32_t packet_end = p->timestamp + p->nsamples;