|
|
|
|
|
|
|
|
#include "play_queue.h" |
|
|
#include "play_queue.h" |
|
|
#include "utility/dspinst.h" |
|
|
#include "utility/dspinst.h" |
|
|
|
|
|
|
|
|
|
|
|
bool AudioPlayQueue::available(void) |
|
|
|
|
|
{ |
|
|
|
|
|
if (userblock) return true; |
|
|
|
|
|
userblock = allocate(); |
|
|
|
|
|
if (userblock) return true; |
|
|
|
|
|
return false; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
int16_t * AudioPlayQueue::getBuffer(void) |
|
|
int16_t * AudioPlayQueue::getBuffer(void) |
|
|
{ |
|
|
{ |
|
|
|
|
|
if (userblock) return userblock->data; |
|
|
while (1) { |
|
|
while (1) { |
|
|
userblock = allocate(); |
|
|
userblock = allocate(); |
|
|
if (userblock) return userblock->data; |
|
|
if (userblock) return userblock->data; |