}
void
-AudioRingBuffers::put (shared_ptr<const AudioBuffers> data, DCPTime time)
+AudioRingBuffers::put (shared_ptr<const AudioBuffers> data)
{
boost::mutex::scoped_lock lm (_mutex);
}
_buffers.push_back (data);
- _latest = time;
}
-void
+/** @return true if there was an underrun, otherwise false */
+bool
AudioRingBuffers::get (float* out, int channels, int frames)
{
boost::mutex::scoped_lock lm (_mutex);
}
}
cout << "audio underrun; missing " << frames << "!\n";
- return;
+ return true;
}
shared_ptr<const AudioBuffers> front = _buffers.front ();
_used_in_head = 0;
}
}
+
+ return false;
}
void
boost::mutex::scoped_lock lm (_mutex);
_buffers.clear ();
_used_in_head = 0;
- _latest = DCPTime ();
}
Frame
-AudioRingBuffers::size ()
+AudioRingBuffers::size () const
{
boost::mutex::scoped_lock lm (_mutex);
Frame s = 0;