Hi all. I've got the following code below but I'm very new to audio programming. What is the simplest way to playback the frames that I saved from the default input device? I've seen several demos on the internet such as an echo client but they create the audio themselves instead of reading from an input queue.
p.s. I know that using std::string is a bad idea, this is just a prototype.
Thanks
J
void audio_stream2::do_output()
{
while (m_direction == direction_out)
{
boost::recursive_mutex::scoped_lock l(recursive_mutex_);
if (!input_frames_.empty())
{
/**
* Get the next frame.
*/
const std::string & frame = input_frames_.front();
// playback the frame
input_frames_.pop();
}
else
{
usleep(10000);
}
}
}