-Change: Move comment to more appropriate place.
git-svn-id: http://svn.fuzzle.org/mloop/trunk@35 ba049829-c6ef-42ef-81ac-908dd8d2e907master
parent
236f8fadce
commit
f6bfe60a78
|
@ -98,12 +98,6 @@ int Jack::ProcessCallback(jack_nframes_t nframes)
|
|||
m_notecache.HandleEvent(ev);
|
||||
|
||||
if (m_recording) {
|
||||
/* Don't add the event to the buffer if it will become full.
|
||||
* This includes the case where the event would actually fit,
|
||||
* but would cause the buffer to be full. This prevents the
|
||||
* need for extra logic to determine if the buffer is full
|
||||
* or empty.
|
||||
*/
|
||||
ev.time += m_recording_time;
|
||||
if (m_loop_buffer->PushEvent(ev)) {
|
||||
m_delay_record = false;
|
||||
|
|
|
@ -6,6 +6,12 @@
|
|||
|
||||
bool RingBuffer::PushEvent(const jack_midi_event_t &ev)
|
||||
{
|
||||
/* Don't add the event to the buffer if it will become full.
|
||||
* This includes the case where the event would actually fit,
|
||||
* but would cause the buffer to be full. This prevents the
|
||||
* need for extra logic to determine if the buffer is full
|
||||
* or empty.
|
||||
*/
|
||||
size_t f = jack_ringbuffer_write_space(m_buffer);
|
||||
if (f <= sizeof ev.time + sizeof ev.size + ev.size) return false;
|
||||
|
||||
|
|
Loading…
Reference in New Issue