chiark / gitweb /
Separate notion of configured audio backend from Disobedience/playrtp
[disorder] / clients / playrtp-alsa.c
index ac8ef7e7734830226f4f3c8712f5bd2a7a07a06f..3c9b67f9d64e9ac536a8fd55fff79ac442d042f9 100644 (file)
 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;