Hello everyone!
I am stuck on a strange problem -
code -
const int buf_size = ((aFormatCtx->bit_rate)*2);
for (;;)
{
static int16_t buffer_out[buf_size];
ring_buf->lockBuf();
ring_buf->read((unsigned char*)buffer_out, buf_size);
ring_buf->clearBuf();
ring_buf->unlockBuf();
pthread_mutex_lock(&play_mutex);
pthread_cond_signal(&play_cond);
pthread_mutex_unlock(&play_mutex);
ao_play(device, (char*)buffer_out, buf_size);
}
Now, I want the buffer_out array to be twice the size of stream bitrate. However g++ complains that "size of buffer_out is not constant". I need that buffer size. If I type some integer in it, it is ok. Please help!