From bf7116520bc723980edb1120eaa66455a4c66ca5 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 14 May 2012 05:11:04 +0000 Subject: Tidy. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4410 a436a847-0d15-0410-975c-d299462d15a1 --- src/server/AudioBuffer.cpp | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'src/server/AudioBuffer.cpp') diff --git a/src/server/AudioBuffer.cpp b/src/server/AudioBuffer.cpp index 476bdf07..f08e0e45 100644 --- a/src/server/AudioBuffer.cpp +++ b/src/server/AudioBuffer.cpp @@ -145,25 +145,21 @@ AudioBuffer::copy(Context& context, const Buffer* src) return; } - // Control => Control if (src_abuf->is_control() == is_control()) { + // Control => Control Buffer::copy(context, src); - - // Audio => Audio } else if (!src_abuf->is_control() && !is_control()) { + // Audio => Audio copy(src_abuf->data(), - context.offset(), context.offset() + context.nframes() - 1); - - // Audio => Control + context.offset(), context.offset() + context.nframes() - 1); } else if (!src_abuf->is_control() && is_control()) { + // Audio => Control data()[0] = src_abuf->data()[context.offset()]; - - // Control => Audio } else if (src_abuf->is_control() && !is_control()) { + // Control => Audio data()[context.offset()] = src_abuf->data()[0]; - - // Control => Audio or Audio => Control } else { + // Control => Audio or Audio => Control set_block(src_abuf->data()[0], 0, nframes()); } } -- cgit v1.2.1