[beast: 18/22] PLUGINS: use Rapicorn's assert() instead of g_assert()
- From: Tim Janik <timj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [beast: 18/22] PLUGINS: use Rapicorn's assert() instead of g_assert()
- Date: Thu, 24 Sep 2015 20:10:28 +0000 (UTC)
commit ce782e181ae5bb627e11aea2fa3995d4665c4f2a
Author: Tim Janik <timj gnu org>
Date: Mon Sep 21 20:34:13 2015 +0200
PLUGINS: use Rapicorn's assert() instead of g_assert()
plugins/bseadder.cc | 6 +++---
plugins/bseatandistort.cc | 4 ++--
plugins/bseblockutils.cc | 6 +++---
plugins/bsefirfilter.c | 4 ++--
plugins/bseiirfilter.cc | 4 ++--
plugins/bsemixer.cc | 4 ++--
plugins/bsemult.cc | 10 +++++-----
plugins/bsesequencer.cc | 4 ++--
plugins/bsesimpleadsr.cc | 8 ++++----
plugins/davcanyondelay.cc | 8 ++++----
plugins/davguitar.c | 2 +-
plugins/davsyndrum.cc | 8 ++++----
plugins/davxtalstrings.cc | 6 +++---
plugins/standardsaturator.cc | 2 +-
14 files changed, 38 insertions(+), 38 deletions(-)
---
diff --git a/plugins/bseadder.cc b/plugins/bseadder.cc
index 68fe45a..ed23a2d 100644
--- a/plugins/bseadder.cc
+++ b/plugins/bseadder.cc
@@ -75,11 +75,11 @@ bse_adder_class_init (BseAdderClass *klass)
SFI_PARAM_STANDARD ":skip-default"));
channel = bse_source_class_add_jchannel (source_class, "audio-in1", _("Audio In1"), _("Audio Input 1"));
- g_assert (channel == BSE_ADDER_JCHANNEL_AUDIO1);
+ assert (channel == BSE_ADDER_JCHANNEL_AUDIO1);
channel = bse_source_class_add_jchannel (source_class, "audio-in2", _("Audio In2"), _("Audio Input 2"));
- g_assert (channel == BSE_ADDER_JCHANNEL_AUDIO2);
+ assert (channel == BSE_ADDER_JCHANNEL_AUDIO2);
channel = bse_source_class_add_ochannel (source_class, "audio-out", _("Audio Out"), _("Audio Output"));
- g_assert (channel == BSE_ADDER_OCHANNEL_AUDIO_OUT);
+ assert (channel == BSE_ADDER_OCHANNEL_AUDIO_OUT);
}
static void
diff --git a/plugins/bseatandistort.cc b/plugins/bseatandistort.cc
index 85d001d..3083eb7 100644
--- a/plugins/bseatandistort.cc
+++ b/plugins/bseatandistort.cc
@@ -67,9 +67,9 @@ bse_atan_distort_class_init (BseAtanDistortClass *klass)
SFI_PARAM_STANDARD ":f:scale"));
channel_id = bse_source_class_add_ichannel (source_class, "audio-in", _("Audio In"), _("Audio Input
Signal"));
- g_assert (channel_id == BSE_ATAN_DISTORT_ICHANNEL_MONO1);
+ assert (channel_id == BSE_ATAN_DISTORT_ICHANNEL_MONO1);
channel_id = bse_source_class_add_ochannel (source_class, "audio-out", _("Audio Out"), _("Distorted Audio
Output"));
- g_assert (channel_id == BSE_ATAN_DISTORT_OCHANNEL_MONO1);
+ assert (channel_id == BSE_ATAN_DISTORT_OCHANNEL_MONO1);
}
static void
diff --git a/plugins/bseblockutils.cc b/plugins/bseblockutils.cc
index 6911241..3d50b98 100644
--- a/plugins/bseblockutils.cc
+++ b/plugins/bseblockutils.cc
@@ -161,7 +161,7 @@ class BlockImpl : virtual public Bse::Block::Impl {
}
/* n_vectors must be >= 1 if n_values was > 8 */
n_vectors = (n_values - upos) / 4;
- g_assert (n_vectors > 0);
+ assert (n_vectors > 0);
/* loop while ivalues aligned */
const __m128 *ivalues_m = (const __m128*) &ivalues[upos];
__m128 min_m = ivalues_m[0];
@@ -213,7 +213,7 @@ class BlockImpl : virtual public Bse::Block::Impl {
square_sum += ivalues[upos] * ivalues[upos];
/* n_vectors must be >= 1 if n_values was > 8 */
n_vectors = (n_values - upos) / 4;
- g_assert (n_vectors > 0);
+ assert (n_vectors > 0);
/* loop while ivalues aligned */
const __m128 *ivalues_m = (const __m128*) &ivalues[upos];
__m128 square_sum_m = _mm_mul_ps (ivalues_m[0], ivalues_m[0]);
@@ -256,7 +256,7 @@ class BlockImpl : virtual public Bse::Block::Impl {
}
/* n_vectors must be >= 1 if n_values was > 8 */
n_vectors = (n_values - upos) / 4;
- g_assert (n_vectors > 0);
+ assert (n_vectors > 0);
/* loop while ivalues aligned */
const __m128 *ivalues_m = (const __m128*) &ivalues[upos];
n_vectors = (n_values - upos) / 4;
diff --git a/plugins/bsefirfilter.c b/plugins/bsefirfilter.c
index 03fe27d..d1b3a59 100644
--- a/plugins/bsefirfilter.c
+++ b/plugins/bsefirfilter.c
@@ -124,9 +124,9 @@ bse_fir_filter_class_init (BseFIRFilterClass *class)
BSE_PARAM_GUI));
ochannel_id = bse_source_class_add_ochannel (source_class, "mono_out", _("Mono Out"), _("Mono Filtered
Output"), 1);
- g_assert (ochannel_id == BSE_FIR_FILTER_OCHANNEL_MONO);
+ assert (ochannel_id == BSE_FIR_FILTER_OCHANNEL_MONO);
ichannel_id = bse_source_class_add_ichannel (source_class, "mono_in", _("Mono In"), _("Mono Signal
Input"), 1, 1);
- g_assert (ichannel_id == BSE_FIR_FILTER_ICHANNEL_MONO);
+ assert (ichannel_id == BSE_FIR_FILTER_ICHANNEL_MONO);
// BSE_SOURCE_CLASS_ICHANNEL_DEF (class, BSE_FIR_FILTER_ICHANNEL_MONO)->history = 2;
}
diff --git a/plugins/bseiirfilter.cc b/plugins/bseiirfilter.cc
index ffefe2e..a250475 100644
--- a/plugins/bseiirfilter.cc
+++ b/plugins/bseiirfilter.cc
@@ -114,9 +114,9 @@ bse_iir_filter_class_init (BseIIRFilterClass *klass)
SFI_PARAM_GUI));
ichannel_id = bse_source_class_add_ichannel (source_class, "audio-in", _("Audio In"), _("Unfiltered
Input"));
- g_assert (ichannel_id == BSE_IIR_FILTER_ICHANNEL_MONO);
+ assert (ichannel_id == BSE_IIR_FILTER_ICHANNEL_MONO);
ochannel_id = bse_source_class_add_ochannel (source_class, "audio-out", _("Audio Out"), _("Filtered
Output"));
- g_assert (ochannel_id == BSE_IIR_FILTER_OCHANNEL_MONO);
+ assert (ochannel_id == BSE_IIR_FILTER_OCHANNEL_MONO);
}
static void
diff --git a/plugins/bsemixer.cc b/plugins/bsemixer.cc
index 371e43a..616744c 100644
--- a/plugins/bsemixer.cc
+++ b/plugins/bsemixer.cc
@@ -89,7 +89,7 @@ bse_mixer_class_init (BseMixerClass *klass)
0, bse_db_to_factor (BSE_MAX_VOLUME_dB) * 100, 1,
SFI_PARAM_GUI ":dial"));
ochannel = bse_source_class_add_ochannel (source_class, "audio-out", _("Audio Out"), _("Sole Output"));
- g_assert (ochannel == BSE_MIXER_OCHANNEL_MONO);
+ assert (ochannel == BSE_MIXER_OCHANNEL_MONO);
for (i = 1; i <= BSE_MIXER_N_INPUTS; i++)
{
gchar *group, *ident, *label, *blurb;
@@ -131,7 +131,7 @@ bse_mixer_class_init (BseMixerClass *klass)
label = g_strdup_format (_("Audio In%u"), i);
blurb = g_strdup_format (_("Input Channel %u"), i);
ichannel = bse_source_class_add_ichannel (source_class, ident, label, blurb);
- g_assert (ichannel == i - 1);
+ assert (ichannel == i - 1);
g_free (blurb);
g_free (label);
g_free (ident);
diff --git a/plugins/bsemult.cc b/plugins/bsemult.cc
index ee4a793..27258f7 100644
--- a/plugins/bsemult.cc
+++ b/plugins/bsemult.cc
@@ -35,15 +35,15 @@ bse_mult_class_init (BseMultClass *klass)
source_class->context_create = bse_mult_context_create;
ichannel = bse_source_class_add_ichannel (source_class, "audio-in1", _("Audio In1"), _("Audio Input 1"));
- g_assert (ichannel == BSE_MULT_ICHANNEL_MONO1);
+ assert (ichannel == BSE_MULT_ICHANNEL_MONO1);
ichannel = bse_source_class_add_ichannel (source_class, "audio-in2", _("Audio In2"), _("Audio Input 2"));
- g_assert (ichannel == BSE_MULT_ICHANNEL_MONO2);
+ assert (ichannel == BSE_MULT_ICHANNEL_MONO2);
ichannel = bse_source_class_add_ichannel (source_class, "audio-in3", _("Audio In3"), _("Audio Input 3"));
- g_assert (ichannel == BSE_MULT_ICHANNEL_MONO3);
+ assert (ichannel == BSE_MULT_ICHANNEL_MONO3);
ichannel = bse_source_class_add_ichannel (source_class, "audio-in4", _("Audio In4"), _("Audio Input 4"));
- g_assert (ichannel == BSE_MULT_ICHANNEL_MONO4);
+ assert (ichannel == BSE_MULT_ICHANNEL_MONO4);
ochannel = bse_source_class_add_ochannel (source_class, "audio-out", _("Audio Out"), _("Audio Output"));
- g_assert (ochannel == BSE_MULT_OCHANNEL_MONO);
+ assert (ochannel == BSE_MULT_OCHANNEL_MONO);
}
static void
diff --git a/plugins/bsesequencer.cc b/plugins/bsesequencer.cc
index 18b61ee..1b1e467 100644
--- a/plugins/bsesequencer.cc
+++ b/plugins/bsesequencer.cc
@@ -84,9 +84,9 @@ bse_sequencer_class_init (BseSequencerClass *klass)
SFI_PARAM_STANDARD ":f:scale"));
ochannel = bse_source_class_add_ochannel (source_class, "freq-out", _("Freq Out"), _("Frequency Signal"));
- g_assert (ochannel == BSE_SEQUENCER_OCHANNEL_FREQ);
+ assert (ochannel == BSE_SEQUENCER_OCHANNEL_FREQ);
ochannel = bse_source_class_add_ochannel (source_class, "note-sync", _("Note Sync"), _("Note Sync
Signal"));
- g_assert (ochannel == BSE_SEQUENCER_OCHANNEL_NOTE_SYNC);
+ assert (ochannel == BSE_SEQUENCER_OCHANNEL_NOTE_SYNC);
}
static void
diff --git a/plugins/bsesimpleadsr.cc b/plugins/bsesimpleadsr.cc
index 3dccbc1..183f0ef 100644
--- a/plugins/bsesimpleadsr.cc
+++ b/plugins/bsesimpleadsr.cc
@@ -94,13 +94,13 @@ bse_simple_adsr_class_init (BseSimpleADSRClass *klass)
g_free (desc);
ichannel = bse_source_class_add_ichannel (source_class, "gate-in", _("Gate In"), _("Gate input
(activates/deactivates envelope)"));
- g_assert (ichannel == BSE_SIMPLE_ADSR_ICHANNEL_GATE);
+ assert (ichannel == BSE_SIMPLE_ADSR_ICHANNEL_GATE);
ichannel = bse_source_class_add_ichannel (source_class, "retrigger-in", _("Retrigger In"), _("Retrigger
input (raising edge retriggers envelope)"));
- g_assert (ichannel == BSE_SIMPLE_ADSR_ICHANNEL_RETRIGGER);
+ assert (ichannel == BSE_SIMPLE_ADSR_ICHANNEL_RETRIGGER);
ochannel = bse_source_class_add_ochannel (source_class, "ctrl-out", _("Ctrl Out"),
_("Attack-Decay-Sustain-Release envelope output"));
- g_assert (ochannel == BSE_SIMPLE_ADSR_OCHANNEL_OUT);
+ assert (ochannel == BSE_SIMPLE_ADSR_OCHANNEL_OUT);
ochannel = bse_source_class_add_ochannel (source_class, "done-out", _("Done Out"), _("This signal goes
high after the release phase has completed"));
- g_assert (ochannel == BSE_SIMPLE_ADSR_OCHANNEL_DONE);
+ assert (ochannel == BSE_SIMPLE_ADSR_OCHANNEL_DONE);
}
static void
diff --git a/plugins/davcanyondelay.cc b/plugins/davcanyondelay.cc
index 9f1abe5..3bf7aa5 100644
--- a/plugins/davcanyondelay.cc
+++ b/plugins/davcanyondelay.cc
@@ -97,13 +97,13 @@ dav_canyon_delay_class_init (DavCanyonDelayClass *klass)
SFI_PARAM_GUI));
channel = bse_source_class_add_ichannel (source_class, "left-in", _("Left In"), _("Left Audio Input"));
- g_assert (channel == DAV_CANYON_DELAY_ICHANNEL_LEFT);
+ assert (channel == DAV_CANYON_DELAY_ICHANNEL_LEFT);
channel = bse_source_class_add_ichannel (source_class, "right-in", _("Right In"), _("Right Audio Input"));
- g_assert (channel == DAV_CANYON_DELAY_ICHANNEL_RIGHT);
+ assert (channel == DAV_CANYON_DELAY_ICHANNEL_RIGHT);
channel = bse_source_class_add_ochannel (source_class, "left-out", _("Left Out"), _("Left Audio Output"));
- g_assert (channel == DAV_CANYON_DELAY_OCHANNEL_LEFT);
+ assert (channel == DAV_CANYON_DELAY_OCHANNEL_LEFT);
channel = bse_source_class_add_ochannel (source_class, "right-out", _("Right Out"), _("Right Audio
Output"));
- g_assert (channel == DAV_CANYON_DELAY_OCHANNEL_RIGHT);
+ assert (channel == DAV_CANYON_DELAY_OCHANNEL_RIGHT);
}
static void
diff --git a/plugins/davguitar.c b/plugins/davguitar.c
index bf90983..3637093 100644
--- a/plugins/davguitar.c
+++ b/plugins/davguitar.c
@@ -277,7 +277,7 @@ dav_guitar_class_init (DavGuitarClass *class)
BSE_PARAM_DEFAULT | BSE_PARAM_HINT_SCALE));
ochannel_id = bse_source_class_add_ochannel (source_class, "mono-out", _("Guitar Output"));
- g_assert (ochannel_id == DAV_GUITAR_OCHANNEL_MONO);
+ assert (ochannel_id == DAV_GUITAR_OCHANNEL_MONO);
}
static void
diff --git a/plugins/davsyndrum.cc b/plugins/davsyndrum.cc
index e76c2ed..65d9d9c 100644
--- a/plugins/davsyndrum.cc
+++ b/plugins/davsyndrum.cc
@@ -97,13 +97,13 @@ dav_syn_drum_class_init (DavSynDrumClass *klass)
SFI_PARAM_STANDARD ":scale"));
ichannel_id = bse_source_class_add_ichannel (source_class, "freq-in", _("Freq In"), _("Drum Frequency
Input"));
- g_assert (ichannel_id == DAV_SYN_DRUM_ICHANNEL_FREQ);
+ assert (ichannel_id == DAV_SYN_DRUM_ICHANNEL_FREQ);
ichannel_id = bse_source_class_add_ichannel (source_class, "ratio-in", _("Ratio In"), _("Frequency shift
ratio (assumed 1.0 if not connected)"));
- g_assert (ichannel_id == DAV_SYN_DRUM_ICHANNEL_RATIO);
+ assert (ichannel_id == DAV_SYN_DRUM_ICHANNEL_RATIO);
ichannel_id = bse_source_class_add_ichannel (source_class, "trigger-in", _("Trigger In"), _("Hit the drum
on raising edges"));
- g_assert (ichannel_id == DAV_SYN_DRUM_ICHANNEL_TRIGGER);
+ assert (ichannel_id == DAV_SYN_DRUM_ICHANNEL_TRIGGER);
ochannel_id = bse_source_class_add_ochannel (source_class, "audio-out", _("Audio Out"), _("SynDrum
Output"));
- g_assert (ochannel_id == DAV_SYN_DRUM_OCHANNEL_MONO);
+ assert (ochannel_id == DAV_SYN_DRUM_OCHANNEL_MONO);
}
static void
diff --git a/plugins/davxtalstrings.cc b/plugins/davxtalstrings.cc
index af2cc04..a8515b5 100644
--- a/plugins/davxtalstrings.cc
+++ b/plugins/davxtalstrings.cc
@@ -129,11 +129,11 @@ dav_xtal_strings_class_init (DavXtalStringsClass *klass)
SFI_PARAM_STANDARD ":scale"));
channel_id = bse_source_class_add_ichannel (source_class, "freq-in", _("Freq In"), _("Pluck frequency
input"));
- g_assert (channel_id == DAV_XTAL_STRINGS_ICHANNEL_FREQ);
+ assert (channel_id == DAV_XTAL_STRINGS_ICHANNEL_FREQ);
channel_id = bse_source_class_add_ichannel (source_class, "trigger-in", _("Trigger In"), _("Pluck strings
on raising edge"));
- g_assert (channel_id == DAV_XTAL_STRINGS_ICHANNEL_TRIGGER);
+ assert (channel_id == DAV_XTAL_STRINGS_ICHANNEL_TRIGGER);
channel_id = bse_source_class_add_ochannel (source_class, "audio-out", _("Audio Out"), _("XtalStrings
Output"));
- g_assert (channel_id == DAV_XTAL_STRINGS_OCHANNEL_MONO);
+ assert (channel_id == DAV_XTAL_STRINGS_OCHANNEL_MONO);
}
static void
diff --git a/plugins/standardsaturator.cc b/plugins/standardsaturator.cc
index ada31cc..1f6ed29 100644
--- a/plugins/standardsaturator.cc
+++ b/plugins/standardsaturator.cc
@@ -52,7 +52,7 @@ class Saturator : public SaturatorBase {
float *block = g_new0 (float, n * 2), *out = block + n;
for (double d = -25; d <= +25; d += 0.01)
block[i++] = d;
- g_assert (i < n);
+ assert (i < n);
double saved_olevel = olevel;
olevel = 1 / 1.0;
process_block (i, block, out, SaturateTanh (1.0));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]