[beast] BSE: use faster size_t index for (de)interleaving in resampling datahandle
- From: Stefan Westerfeld <stw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [beast] BSE: use faster size_t index for (de)interleaving in resampling datahandle
- Date: Sun, 20 Feb 2011 20:34:22 +0000 (UTC)
commit 6f53dc255d4daea57f8bc7edae767559d2f5597b
Author: Stefan Westerfeld <stefan space twc de>
Date: Sun Feb 20 22:23:14 2011 +0100
BSE: use faster size_t index for (de)interleaving in resampling datahandle
This improves resample handle performance on 32-bit machines.
bse/bsedatahandle-resample.cc | 24 ++++++++++++------------
1 files changed, 12 insertions(+), 12 deletions(-)
---
diff --git a/bse/bsedatahandle-resample.cc b/bse/bsedatahandle-resample.cc
index 5194390..da09b1e 100644
--- a/bse/bsedatahandle-resample.cc
+++ b/bse/bsedatahandle-resample.cc
@@ -112,25 +112,25 @@ protected:
return n_values;
}
void
- deinterleave (float *src,
- float *dest,
- int64 n_values)
+ deinterleave (float *src,
+ float *dest,
+ size_t n_values)
{
- const int64 n_channels = m_dhandle.setup.n_channels;
+ const guint n_channels = m_dhandle.setup.n_channels;
- for (int64 ch = 0; ch < n_channels; ch++)
- for (int64 v = ch; v < n_values; v += n_channels)
+ for (guint ch = 0; ch < n_channels; ch++)
+ for (size_t v = ch; v < n_values; v += n_channels)
*dest++ = src[v];
}
void
- interleave (float *src,
- float *dest,
- int64 n_values)
+ interleave (float *src,
+ float *dest,
+ size_t n_values)
{
- const int64 n_channels = m_dhandle.setup.n_channels;
+ const guint n_channels = m_dhandle.setup.n_channels;
- for (int64 ch = 0; ch < n_channels; ch++)
- for (int64 v = ch; v < n_values; v += n_channels)
+ for (guint ch = 0; ch < n_channels; ch++)
+ for (size_t v = ch; v < n_values; v += n_channels)
dest[v] = *src++;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]