summaryrefslogtreecommitdiffstats
path: root/src/server/mix.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-07-31 15:12:38 +0000
committerDavid Robillard <d@drobilla.net>2012-07-31 15:12:38 +0000
commit8d559e4991a491b612e63d5a4deff0ab48a3d3dd (patch)
tree06da8b1d71f8068f12bc3f476b90734b67d9120c /src/server/mix.cpp
parenta41af6e41d60f8724809486b94ce1e6281c3bc31 (diff)
downloadingen-8d559e4991a491b612e63d5a4deff0ab48a3d3dd.tar.gz
ingen-8d559e4991a491b612e63d5a4deff0ab48a3d3dd.tar.bz2
ingen-8d559e4991a491b612e63d5a4deff0ab48a3d3dd.zip
Merge AudioBuffer into Buffer and avoid all the casting.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4584 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/server/mix.cpp')
-rw-r--r--src/server/mix.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/server/mix.cpp b/src/server/mix.cpp
index be1a9f9f..56cb4326 100644
--- a/src/server/mix.cpp
+++ b/src/server/mix.cpp
@@ -19,7 +19,6 @@
#include "ingen/URIs.hpp"
#include "raul/log.hpp"
-#include "AudioBuffer.hpp"
#include "Buffer.hpp"
#include "Context.hpp"
@@ -27,10 +26,10 @@ namespace Ingen {
namespace Server {
static inline void
-audio_accumulate(Context& context, AudioBuffer* dst, const AudioBuffer* src)
+audio_accumulate(Context& context, Buffer* dst, const Buffer* src)
{
- Sample* const dst_buf = dst->data();
- const Sample* const src_buf = src->data();
+ Sample* const dst_buf = dst->samples();
+ const Sample* const src_buf = src->samples();
if (dst->is_control()) {
if (src->is_control()) { // control => control
@@ -83,9 +82,7 @@ mix(Context& context,
// Mix in the rest
for (uint32_t i = 1; i < num_srcs; ++i) {
assert(is_audio(uris, srcs[i]->type()));
- audio_accumulate(context,
- (AudioBuffer*)dst,
- (const AudioBuffer*)srcs[i]);
+ audio_accumulate(context, dst, srcs[i]);
}
} else {
assert(dst->type() == uris.atom_Sequence);