--- a/sc2src/rcvqueue.h
+++ b/sc2src/rcvqueue.h
@@ -42,9 +42,13 @@
free(m_buf);
}
unsigned int samples() {
+ if (m_bits == 0)
+ return 0;
return m_bytes / (m_bits/8);
}
unsigned int frames() {
+ if (m_chans == 0)
+ return 0;
return samples() / m_chans;
}
// Convert frame count into byte count
@@ -100,8 +104,11 @@
unsigned int pktcounter{0};
};
+extern bool needswap(AudioEater::BOrder order);
extern void copyswap(unsigned char *dest, const unsigned char *src,
unsigned int bytes, unsigned int bits);
+
+extern WorkQueue<AudioMessage*> audioqueue;
extern AudioEater httpAudioEater;
extern AudioEater alsaAudioEater;