[beast: 36/43] BSE: use assert_return() and Bse::warning() for runtime warnings
- From: Tim Janik <timj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [beast: 36/43] BSE: use assert_return() and Bse::warning() for runtime warnings
- Date: Mon, 26 Jun 2017 23:30:19 +0000 (UTC)
commit e1fdc4060733452d717012fd87e7e7242c845517
Author: Tim Janik <timj gnu org>
Date: Mon Jun 26 02:07:11 2017 +0200
BSE: use assert_return() and Bse::warning() for runtime warnings
Signed-off-by: Tim Janik <timj gnu org>
bse/bsebus.cc | 4 +-
bse/bsecategories.cc | 2 +-
bse/bsecontainer.cc | 13 ++----
bse/bsecontextmerger.cc | 4 +-
bse/bsecxxbase.cc | 2 +-
bse/bseengine.cc | 2 +-
bse/bseenginemaster.cc | 6 +-
bse/bseengineschedule.cc | 2 +-
bse/bseengineutils.cc | 8 ++--
bse/bseglue.cc | 20 +++++-----
bse/bseitem.cc | 44 +++++++++++-----------
bse/bsemididecoder.cc | 2 +-
bse/bsemididevice.cc | 4 +-
bse/bsemidifile.cc | 2 +-
bse/bsemidireceiver.cc | 40 ++++++++++----------
bse/bsemidivoice.cc | 6 +-
bse/bseobject.cc | 16 +++----
bse/bseparam.cc | 4 +-
bse/bsepart.cc | 2 +-
bse/bsepcmdevice.cc | 4 +-
bse/bsepcmwriter.cc | 2 +-
bse/bseplugin.cc | 12 +++---
bse/bseprocedure.cc | 92 +++++++++++++++++++++++-----------------------
bse/bseprocidl.cc | 4 +-
bse/bseproject.cc | 10 ++--
bse/bsesequencer.cc | 4 +-
bse/bseserver.cc | 6 +-
bse/bsesnet.cc | 18 ++++-----
bse/bsesoundfont.cc | 18 ++++-----
bse/bsesoundfontosc.cc | 12 +++---
bse/bsesoundfontrepo.cc | 12 ++---
bse/bsesource.cc | 56 ++++++++++++---------------
bse/bsestandardsynths.cc | 2 +-
bse/bsestorage.cc | 5 +-
bse/bsesubsynth.cc | 3 +-
bse/bsetrack.cc | 5 +-
bse/bseutils.cc | 2 +-
bse/bsewaverepo.cc | 6 +--
bse/gslfilehash.cc | 3 +-
bse/gslmagic.cc | 6 +-
40 files changed, 222 insertions(+), 243 deletions(-)
---
diff --git a/bse/bsebus.cc b/bse/bsebus.cc
index 557531d..540f780 100644
--- a/bse/bsebus.cc
+++ b/bse/bsebus.cc
@@ -174,7 +174,7 @@ bus_disconnect_outputs (BseBus *self)
{
Bse::Error error = bse_bus_disconnect (BSE_BUS (ring->data), BSE_ITEM (self));
if (error != 0)
- g_warning ("%s:%d: unexpected error: %s", __FILE__, __LINE__, bse_error_blurb (error));
+ Bse::warning ("%s:%d: unexpected error: %s", __FILE__, __LINE__, bse_error_blurb (error));
}
bse_source_clear_ochannels (BSE_SOURCE (self)); /* also disconnects master */
g_object_notify (G_OBJECT (self), "master-output"); /* master may have changed */
@@ -511,7 +511,7 @@ bse_bus_set_parent (BseItem *item,
/* there should be snet=NULL if we have not yet a parent, and
* snet should be set to NULL due to uncrossing before we are orphaned
*/
- g_warning ("Bus[%p] has snet[%p] in set-parent", self, BSE_SUB_SYNTH (self)->snet);
+ Bse::warning ("Bus[%p] has snet[%p] in set-parent", self, BSE_SUB_SYNTH (self)->snet);
}
}
diff --git a/bse/bsecategories.cc b/bse/bsecategories.cc
index 668139a..37a5d52 100644
--- a/bse/bsecategories.cc
+++ b/bse/bsecategories.cc
@@ -124,7 +124,7 @@ check_type (GType type)
G_CSET_A_2_Z G_CSET_a_2_z G_CSET_DIGITS "+",
'-');
if (strcmp (x, g_type_name (type)) != 0)
- g_warning ("type name with invalid characters: %s", g_type_name (type));
+ Bse::warning ("type name with invalid characters: %s", g_type_name (type));
g_free (x);
}
}
diff --git a/bse/bsecontainer.cc b/bse/bsecontainer.cc
index b669ac9..e815085 100644
--- a/bse/bsecontainer.cc
+++ b/bse/bsecontainer.cc
@@ -163,10 +163,7 @@ bse_container_finalize (GObject *gobject)
BseContainer *container = BSE_CONTAINER (gobject);
if (container->n_items)
- g_warning ("%s: finalize handlers missed to remove %u items from %s",
- G_STRLOC,
- container->n_items,
- BSE_OBJECT_TYPE_NAME (container));
+ Bse::warning ("%s: finalize handlers missed to remove %u items from %s", G_STRLOC, container->n_items,
BSE_OBJECT_TYPE_NAME (container));
/* chain parent class' finalize handler */
G_OBJECT_CLASS (parent_class)->finalize (gobject);
@@ -860,10 +857,10 @@ _bse_container_cross_unlink (BseContainer *container,
}
}
if (!found_one)
- g_warning ("no cross link from `%s' to `%s' on `%s' to remove",
- G_OBJECT_TYPE_NAME (owner),
- G_OBJECT_TYPE_NAME (link),
- G_OBJECT_TYPE_NAME (container));
+ Bse::warning ("no cross link from `%s' to `%s' on `%s' to remove",
+ G_OBJECT_TYPE_NAME (owner),
+ G_OBJECT_TYPE_NAME (link),
+ G_OBJECT_TYPE_NAME (container));
g_object_unref (link);
g_object_unref (owner);
diff --git a/bse/bsecontextmerger.cc b/bse/bsecontextmerger.cc
index 6c367d2..762cfc0 100644
--- a/bse/bsecontextmerger.cc
+++ b/bse/bsecontextmerger.cc
@@ -152,8 +152,8 @@ bse_context_merger_context_create (BseSource *source,
{
module = bse_source_get_context_imodule (source, self->merge_context);
if (!module)
- g_warning ("context merger: request to merge context (%u) with non existing context (%u)",
- context_handle, self->merge_context);
+ Bse::warning ("context merger: request to merge context (%u) with non existing context (%u)",
+ context_handle, self->merge_context);
else
{
ContextModuleData *cmdata = (ContextModuleData*) module->user_data;
diff --git a/bse/bsecxxbase.cc b/bse/bsecxxbase.cc
index e305d44..36a9835 100644
--- a/bse/bsecxxbase.cc
+++ b/bse/bsecxxbase.cc
@@ -106,7 +106,7 @@ CxxBase::connect (const gchar *signal,
if (sid == cid)
id = g_signal_connect_closure (gobject(), signal, gclosure, after != 0);
else
- g_warning ("%s: ignoring invalid signal connection (\"%s\" != \"%s\")", G_STRLOC, sid.c_str(),
cid.c_str());
+ Bse::warning ("%s: ignoring invalid signal connection (\"%s\" != \"%s\")", G_STRLOC, sid.c_str(),
cid.c_str());
g_closure_unref (gclosure);
return id;
}
diff --git a/bse/bseengine.cc b/bse/bseengine.cc
index 1d8eeee..359ea34 100644
--- a/bse/bseengine.cc
+++ b/bse/bseengine.cc
@@ -42,7 +42,7 @@ bse_module_new (const BseModuleClass *klass,
assert_return (klass->process != NULL || klass->process_defer != NULL, NULL);
if (klass->process_defer)
{
- g_warning ("%s: Delay cycle processing not yet implemented", G_STRLOC);
+ Bse::warning ("%s: Delay cycle processing not yet implemented", __func__);
return NULL;
}
diff --git a/bse/bseenginemaster.cc b/bse/bseenginemaster.cc
index 5be4b64..f0dbdf4 100644
--- a/bse/bseenginemaster.cc
+++ b/bse/bseenginemaster.cc
@@ -507,7 +507,7 @@ master_process_job (BseJob *job)
master_need_reflow |= TRUE;
}
else
- g_warning ("jdisconnect(dest:%p,%u,src:%p,%u): no such connection", node, jstream, src_node, ostream);
+ Bse::warning ("jdisconnect(dest:%p,%u,src:%p,%u): no such connection", node, jstream, src_node,
ostream);
break;
case ENGINE_JOB_FORCE_RESET:
node = job->data.node;
@@ -615,8 +615,8 @@ master_process_job (BseJob *job)
sfi_delete_struct (Poll, poll_last);
}
else
- g_warning (G_STRLOC ": failed to remove unknown poll function %p(%p)",
- job->poll.poll_func, job->poll.data);
+ Bse::warning ("%s: failed to remove unknown poll function %p(%p)",
+ __func__, job->poll.poll_func, job->poll.data);
break;
case ENGINE_JOB_ADD_TIMER:
JOB_DEBUG ("add timer %p(%p)", job->timer.timer_func, job->timer.data);
diff --git a/bse/bseengineschedule.cc b/bse/bseengineschedule.cc
index dba8424..27b0b4d 100644
--- a/bse/bseengineschedule.cc
+++ b/bse/bseengineschedule.cc
@@ -86,7 +86,7 @@ unschedule_cycle (EngineSchedule *sched,
{
EngineNode *node = (EngineNode*) walk->data;
if (!ENGINE_NODE_IS_SCHEDULED (node))
- g_warning ("node(%p) in schedule ring(%p) is untagged", node, ring);
+ Bse::warning ("%s: node(%p) in schedule ring(%p) is untagged", __func__, node, ring);
node->sched_leaf_level = 0;
node->sched_tag = FALSE;
if (node->flow_jobs)
diff --git a/bse/bseengineutils.cc b/bse/bseengineutils.cc
index 9bcae5b..1f585bf 100644
--- a/bse/bseengineutils.cc
+++ b/bse/bseengineutils.cc
@@ -59,7 +59,7 @@ bse_engine_free_timed_job (EngineTimedJob *tjob)
g_free (tjob);
break;
default:
- g_warning ("Engine: invalid user job type: %d", tjob->type);
+ Bse::warning ("Engine: invalid user job type: %d", tjob->type);
break;
}
}
@@ -429,7 +429,7 @@ _engine_set_schedule (EngineSchedule *sched)
if (UNLIKELY (pqueue_schedule != NULL))
{
pqueue_mutex.unlock();
- g_warning (G_STRLOC ": schedule already set");
+ Bse::warning ("%s: schedule already set", __func__);
return;
}
pqueue_schedule = sched;
@@ -445,11 +445,11 @@ _engine_unset_schedule (EngineSchedule *sched)
if (UNLIKELY (pqueue_schedule != sched))
{
pqueue_mutex.unlock();
- g_warning (G_STRLOC ": schedule(%p) not currently set", sched);
+ Bse::warning ("%s: schedule(%p) not currently set", __func__, sched);
return;
}
if (UNLIKELY (pqueue_n_nodes || pqueue_n_cycles))
- g_warning (G_STRLOC ": schedule(%p) still busy", sched);
+ Bse::warning ("%s: schedule(%p) still busy", __func__, sched);
sched->in_pqueue = FALSE;
pqueue_schedule = NULL;
/* see engine_fetch_process_queue_trash_jobs_U() on the limitations regarding pqueue trash jobs */
diff --git a/bse/bseglue.cc b/bse/bseglue.cc
index 4928b5a..8c5a0f3 100644
--- a/bse/bseglue.cc
+++ b/bse/bseglue.cc
@@ -288,9 +288,9 @@ bglue_value_from_serializable (const GValue *svalue,
g_type_name (G_VALUE_TYPE (svalue)),
g_type_name (dtype),
g_value_type_transformable (G_VALUE_TYPE (svalue), dtype));
- g_warning ("unable to convert to value type `%s' from serializable (`%s')",
- g_type_name (G_PARAM_SPEC_VALUE_TYPE (pspec)),
- g_type_name (stype));
+ Bse::warning ("unable to convert to value type `%s' from serializable (`%s')",
+ g_type_name (G_PARAM_SPEC_VALUE_TYPE (pspec)),
+ g_type_name (stype));
}
return value;
}
@@ -346,11 +346,11 @@ bglue_value_to_serializable (const GValue *svalue)
g_value_init (value, dtype);
}
if (!dtype)
- g_warning ("unable to convert value type `%s' to serializable type",
- g_type_name (vtype));
+ Bse::warning ("unable to convert value type `%s' to serializable type",
+ g_type_name (vtype));
else if (!sfi_value_transform (svalue, value))
- g_warning ("unable to convert value type `%s' to serializable (`%s')",
- g_type_name (vtype), g_type_name (dtype));
+ Bse::warning ("unable to convert value type `%s' to serializable (`%s')",
+ g_type_name (vtype), g_type_name (dtype));
return value;
}
@@ -394,7 +394,7 @@ bse_glue_boxed_to_value (GType boxed_type,
}
else /* urm, bad */
{
- g_warning ("unable to convert boxed type `%s' to record or sequence", g_type_name (boxed_type));
+ Bse::warning ("unable to convert boxed type `%s' to record or sequence", g_type_name (boxed_type));
value = NULL;
}
return value;
@@ -653,7 +653,7 @@ bglue_exec_proc (SfiGlueContext *context,
g_slist_free (clearlist);
if (error != 0)
- g_warning ("while executing \"%s\": %s", BSE_PROCEDURE_NAME (proc), bse_error_blurb (error));
+ Bse::warning ("while executing \"%s\": %s", BSE_PROCEDURE_NAME (proc), bse_error_blurb (error));
if (proc->n_out_pspecs)
retval = bglue_value_to_serializable (ovalues + 0);
for (i = 0; i < proc->n_out_pspecs; i++)
@@ -900,7 +900,7 @@ bglue_proxy_watch_release (SfiGlueContext *context,
if (!p)
return FALSE;
if (p->remote_watch)
- g_warning ("%s: redundant watch request on proxy (%lu)", bcontext->user, proxy);
+ Bse::warning ("%s: redundant watch request on proxy (%lu)", bcontext->user, proxy);
p->remote_watch = TRUE;
return TRUE;
}
diff --git a/bse/bseitem.cc b/bse/bseitem.cc
index 876fa34..f1ad65b 100644
--- a/bse/bseitem.cc
+++ b/bse/bseitem.cc
@@ -573,9 +573,9 @@ bse_item_cross_link (BseItem *owner,
if (container)
_bse_container_cross_link (BSE_CONTAINER (container), owner, link, uncross_func);
else
- g_warning ("%s: %s and %s have no common anchestor", G_STRLOC,
- bse_object_debug_name (owner),
- bse_object_debug_name (link));
+ Bse::warning ("%s: %s and %s have no common anchestor", G_STRLOC,
+ bse_object_debug_name (owner),
+ bse_object_debug_name (link));
}
/**
@@ -602,9 +602,9 @@ bse_item_cross_unlink (BseItem *owner,
if (container)
_bse_container_cross_unlink (BSE_CONTAINER (container), owner, link, uncross_func);
else
- g_warning ("%s: `%s' and `%s' have no common anchestor", G_STRLOC,
- BSE_OBJECT_TYPE_NAME (owner),
- BSE_OBJECT_TYPE_NAME (link));
+ Bse::warning ("%s: `%s' and `%s' have no common anchestor", G_STRLOC,
+ BSE_OBJECT_TYPE_NAME (owner),
+ BSE_OBJECT_TYPE_NAME (link));
}
/**
@@ -756,8 +756,8 @@ bse_item_execva_i (BseItem *item,
if (!proc_type)
{
- g_warning ("no such method \"%s\" of item %s",
- procedure, bse_object_debug_name (item));
+ Bse::warning ("no such method \"%s\" of item %s",
+ procedure, bse_object_debug_name (item));
return Bse::Error::INTERNAL;
}
@@ -900,8 +900,8 @@ undo_call_proc (BseUndoStep *ustep,
}
/* we're not tolerating any errors */
if (error != 0)
- g_warning ("while executing undo method \"%s\" of item %s: %s", BSE_PROCEDURE_NAME (proc),
- bse_object_debug_name (g_value_get_object (ivalues + 0)), bse_error_blurb (error));
+ Bse::warning ("while executing undo method \"%s\" of item %s: %s", BSE_PROCEDURE_NAME (proc),
+ bse_object_debug_name (g_value_get_object (ivalues + 0)), bse_error_blurb (error));
}
}
@@ -925,8 +925,8 @@ bse_item_push_undo_proc_valist (void *item,
}
if (!proc_type)
{
- g_warning ("no such method \"%s\" of item %s",
- procedure, bse_object_debug_name (item));
+ Bse::warning ("no such method \"%s\" of item %s",
+ procedure, bse_object_debug_name (item));
bse_item_undo_close (ustack);
return;
}
@@ -935,8 +935,8 @@ bse_item_push_undo_proc_valist (void *item,
/* we allow one return value */
if (proc->n_out_pspecs > 1)
{
- g_warning ("method \"%s\" of item %s called with more than one return value",
- procedure, bse_object_debug_name (item));
+ Bse::warning ("method \"%s\" of item %s called with more than one return value",
+ procedure, bse_object_debug_name (item));
g_type_class_unref (proc);
bse_item_undo_close (ustack);
return;
@@ -963,8 +963,8 @@ bse_item_push_undo_proc_valist (void *item,
}
else /* urg shouldn't happen */
{
- g_warning ("while collecting arguments for method \"%s\" of item %s: %s",
- procedure, bse_object_debug_name (item), bse_error_blurb (error));
+ Bse::warning ("while collecting arguments for method \"%s\" of item %s: %s",
+ procedure, bse_object_debug_name (item), bse_error_blurb (error));
for (i = 0; i < proc->n_in_pspecs; i++)
g_value_unset (ivalues + i);
g_free (ivalues);
@@ -1040,16 +1040,16 @@ bse_item_set_valist_undoable (void *object,
pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (self), name);
if (!pspec)
{
- g_warning ("item %s has no property named `%s'",
- bse_object_debug_name (self), name);
+ Bse::warning ("item %s has no property named `%s'",
+ bse_object_debug_name (self), name);
break;
}
g_value_init (&value, G_PARAM_SPEC_VALUE_TYPE (pspec));
G_VALUE_COLLECT (&value, var_args, 0, &error);
if (error)
{
- g_warning ("while setting property `%s' on %s: %s",
- name, bse_object_debug_name (self), error);
+ Bse::warning ("while setting property `%s' on %s: %s",
+ name, bse_object_debug_name (self), error);
g_free (error);
g_value_unset (&value);
break;
@@ -1307,8 +1307,8 @@ undo_lambda_call (BseUndoStep *ustep, BseUndoStack *ustack)
if (error != 0) // undo errors shouldn't happen
{
String *blurb = (String*) ustep->data[2].v_pointer;
- g_warning ("error during undo '%s' of item %s: %s", blurb->c_str(),
- self.debug_name().c_str(), bse_error_blurb (error));
+ Bse::warning ("error during undo '%s' of item %s: %s", blurb->c_str(),
+ self.debug_name().c_str(), bse_error_blurb (error));
}
}
diff --git a/bse/bsemididecoder.cc b/bse/bsemididecoder.cc
index f1cd0d0..88bdf5e 100644
--- a/bse/bsemididecoder.cc
+++ b/bse/bsemididecoder.cc
@@ -92,7 +92,7 @@ midi_decoder_advance_state (BseMidiDecoder *self)
/* keep running_mode and zchannel */
assert_return (self->left_bytes == 0);
if (self->n_bytes)
- g_warning ("leaking %d bytes of midi data", self->n_bytes);
+ Bse::warning ("leaking %d bytes of midi data", self->n_bytes);
self->n_bytes = 0;
}
self->state = next_state;
diff --git a/bse/bsemididevice.cc b/bse/bsemididevice.cc
index 9efd1f9..6364127 100644
--- a/bse/bsemididevice.cc
+++ b/bse/bsemididevice.cc
@@ -25,11 +25,11 @@ bse_midi_device_dispose (GObject *object)
if (BSE_DEVICE_OPEN (self))
{
- g_warning ("%s: midi device still opened", G_STRLOC);
+ Bse::warning ("%s: midi device still opened", G_STRLOC);
bse_device_close (BSE_DEVICE (self));
}
if (self->handle)
- g_warning (G_STRLOC ": midi device with stale midi handle");
+ Bse::warning (G_STRLOC ": midi device with stale midi handle");
/* chain parent class' handler */
G_OBJECT_CLASS (parent_class)->dispose (object);
diff --git a/bse/bsemidifile.cc b/bse/bsemidifile.cc
index a6e3cfa..091689a 100644
--- a/bse/bsemidifile.cc
+++ b/bse/bsemidifile.cc
@@ -336,7 +336,7 @@ bse_midi_file_setup_song (BseMidiFile *smf,
BseTrack *btrack = track->as<BseTrack*>();
Bse::Error error = track->ensure_output();
if (error != 0)
- g_warning ("%s:%d: unexpected error: %s", __FILE__, __LINE__, bse_error_blurb (error));
+ Bse::warning ("%s:%d: unexpected error: %s", __FILE__, __LINE__, bse_error_blurb (error));
bse_item_set_undoable (btrack, "n-voices", 24, NULL);
Bse::PartIfaceP part_iface = song.create_part();
BsePart *bpart = part_iface->as<BsePart*>();
diff --git a/bse/bsemidireceiver.cc b/bse/bsemidireceiver.cc
index 1f590ae..02577c2 100644
--- a/bse/bsemidireceiver.cc
+++ b/bse/bsemidireceiver.cc
@@ -134,7 +134,7 @@ struct ControlHandler {
modules.erase (it);
return;
}
- g_warning ("%s: no such module: %p", G_STRLOC, module);
+ Bse::warning ("%s: no such module: %p", G_STRLOC, module);
}
~ControlHandler()
{
@@ -281,7 +281,7 @@ struct MidiChannel {
remove_event_handler (const EventHandler& handler)
{
vector<EventHandler>::iterator hi = find (event_handlers.begin(), event_handlers.end(), handler);
- g_return_if_fail (hi != event_handlers.end());
+ assert_return (hi != event_handlers.end());
event_handlers.erase (hi);
}
bool
@@ -290,10 +290,10 @@ struct MidiChannel {
~MidiChannel()
{
if (vinput)
- g_warning ("destroying MIDI channel (%u) with active mono synth", midi_channel);
+ Bse::warning ("destroying MIDI channel (%u) with active mono synth", midi_channel);
for (guint j = 0; j < n_voices; j++)
if (voices[j])
- g_warning ("destroying MIDI channel (%u) with active voices", midi_channel);
+ Bse::warning ("destroying MIDI channel (%u) with active voices", midi_channel);
g_free (voices);
}
void start_note (guint64 tick_stamp,
@@ -364,7 +364,7 @@ public:
if (notifier)
g_object_unref (notifier);
if (n_cmodules)
- g_warning ("destroying MIDI receiver (%p) with active control modules (%u)", this, n_cmodules);
+ Bse::warning ("destroying MIDI receiver (%p) with active control modules (%u)", this, n_cmodules);
g_free (cmodules);
}
MidiChannel*
@@ -748,7 +748,7 @@ voice_input_module_access_U (BseModule *module,
{
case VOICE_ON:
if (vinput->vstate == VSTATE_BUSY && /*LOCK()*/ vinput->table /*UNLOCK()*/)
- g_warning ("%s: VOICE_ON: vinput->vstate == VSTATE_BUSY", G_STRLOC);
+ Bse::warning ("%s: VOICE_ON: vinput->vstate == VSTATE_BUSY", G_STRLOC);
vinput->vstate = VSTATE_BUSY;
vinput->freq_value = mdata->freq_value;
vinput->gate = 1.0;
@@ -798,7 +798,7 @@ change_voice_input_L (VoiceInput *vinput,
{
case VOICE_ON:
if (vinput->queue_state == VSTATE_BUSY && vinput->table)
- g_warning ("%s: VOICE_ON: vinput->queue_state == VSTATE_BUSY", G_STRLOC);
+ Bse::warning ("%s: VOICE_ON: vinput->queue_state == VSTATE_BUSY", G_STRLOC);
if (vinput->table)
{
assert_return (vinput->iter == vinput->table->end());
@@ -1112,7 +1112,7 @@ MidiChannel::call_event_handlers (BseMidiEvent *event,
}
}
if (!(activated <= 1))
- g_warning (G_STRLOC ": midi event handling: assertion (activated <= 1) failed, activated = %d",
activated);
+ Bse::warning (G_STRLOC ": midi event handling: assertion (activated <= 1) failed, activated = %d",
activated);
hi->handler_func (hi->handler_data, hi->module, event, trans);
success = true;
}
@@ -1527,7 +1527,7 @@ bse_midi_receiver_discard_control_module (BseMidiReceiver *self,
}
}
BSE_MIDI_RECEIVER_UNLOCK ();
- g_warning ("no such control module: %p", module);
+ Bse::warning ("no such control module: %p", module);
}
gboolean
@@ -1592,10 +1592,10 @@ bse_midi_receiver_add_event_handler (BseMidiReceiver *self,
gpointer handler_data,
BseModule *module)
{
- g_return_if_fail (self != NULL);
- g_return_if_fail (midi_channel > 0);
- g_return_if_fail (handler_func != NULL);
- g_return_if_fail (module != NULL);
+ assert_return (self != NULL);
+ assert_return (midi_channel > 0);
+ assert_return (handler_func != NULL);
+ assert_return (module != NULL);
BSE_MIDI_RECEIVER_LOCK ();
self->add_event_handler (midi_channel, handler_func, handler_data, module);
@@ -1609,10 +1609,10 @@ bse_midi_receiver_remove_event_handler (BseMidiReceiver *self,
gpointer handler_data,
BseModule *module)
{
- g_return_if_fail (self != NULL);
- g_return_if_fail (midi_channel > 0);
- g_return_if_fail (handler_func != NULL);
- g_return_if_fail (module != NULL);
+ assert_return (self != NULL);
+ assert_return (midi_channel > 0);
+ assert_return (handler_func != NULL);
+ assert_return (module != NULL);
BSE_MIDI_RECEIVER_LOCK ();
self->remove_event_handler (midi_channel, handler_func, handler_data, module);
@@ -1690,7 +1690,7 @@ bse_midi_receiver_discard_mono_voice (BseMidiReceiver *self,
return;
}
BSE_MIDI_RECEIVER_UNLOCK ();
- g_warning ("no such mono synth module: %p", fmodule);
+ Bse::warning ("no such mono synth module: %p", fmodule);
}
guint
@@ -1751,7 +1751,7 @@ bse_midi_receiver_discard_poly_voice (BseMidiReceiver *self,
}
BSE_MIDI_RECEIVER_UNLOCK ();
if (!vswitch)
- g_warning ("MIDI channel %u has no voice %u", midi_channel, voice_id + 1);
+ Bse::warning ("MIDI channel %u has no voice %u", midi_channel, voice_id + 1);
}
BseModule*
@@ -1877,7 +1877,7 @@ bse_midi_receiver_discard_sub_voice (BseMidiReceiver *self,
if (need_unref)
bse_midi_receiver_discard_poly_voice (self, midi_channel, voice_id + 1, trans);
if (fmodule)
- g_warning ("MIDI channel %u, poly voice %u, no such sub voice: %p", midi_channel, voice_id, fmodule);
+ Bse::warning ("MIDI channel %u, poly voice %u, no such sub voice: %p", midi_channel, voice_id, fmodule);
}
gboolean
diff --git a/bse/bsemidivoice.cc b/bse/bsemidivoice.cc
index 010c263..a580abf 100644
--- a/bse/bsemidivoice.cc
+++ b/bse/bsemidivoice.cc
@@ -172,7 +172,7 @@ bse_midi_voice_switch_dispose (GObject *object)
BseMidiVoiceSwitch *self = BSE_MIDI_VOICE_SWITCH (object);
if (self->midi_voices)
- g_warning ("disposing voice-switch with active midi voices");
+ Bse::warning ("disposing voice-switch with active midi voices");
/* chain parent class' handler */
G_OBJECT_CLASS (voice_switch_parent_class)->dispose (object);
@@ -363,8 +363,8 @@ bse_midi_voice_switch_unref_poly_voice (BseMidiVoiceSwitch *self,
break;
}
if (!slist)
- g_warning ("module %s has no midi voice for context %u",
- bse_object_debug_name (self), context_handle);
+ Bse::warning ("module %s has no midi voice for context %u",
+ bse_object_debug_name (self), context_handle);
else
{
mvoice->ref_count--;
diff --git a/bse/bseobject.cc b/bse/bseobject.cc
index 7775167..712f5bd 100644
--- a/bse/bseobject.cc
+++ b/bse/bseobject.cc
@@ -197,7 +197,7 @@ bse_object_do_dispose (GObject *gobject)
BSE_OBJECT_SET_FLAGS (object, BSE_OBJECT_FLAG_DISPOSING);
if (BSE_OBJECT_IN_RESTORE (object))
- g_warning ("%s: object in restore state while disposing: %s", G_STRLOC, bse_object_debug_name (object));
+ Bse::warning ("%s: object in restore state while disposing: %s", G_STRLOC, bse_object_debug_name
(object));
/* perform release notification */
g_signal_emit (object, object_signals[SIGNAL_RELEASE], 0);
@@ -741,7 +741,7 @@ bse_object_reemit_signal (gpointer src_object,
g_object_class_find_property (G_OBJECT_GET_CLASS (dest_object),
g_quark_to_string (key.dest_detail))))))
{
- g_warning ("%s: invalid signal for reemission: \"%s\"", G_STRLOC, dest_signal);
+ Bse::warning ("%s: invalid signal for reemission: \"%s\"", G_STRLOC, dest_signal);
return;
}
e = (EClosure*) g_closure_new_simple (sizeof (EClosure), dest_object);
@@ -764,8 +764,7 @@ bse_object_reemit_signal (gpointer src_object,
e->erefs++;
}
else
- g_warning ("%s: invalid signal specs: \"%s\", \"%s\"",
- G_STRLOC, src_signal, dest_signal);
+ Bse::warning ("%s: invalid signal specs: \"%s\", \"%s\"", G_STRLOC, src_signal, dest_signal);
}
void
@@ -801,13 +800,12 @@ bse_object_remove_reemit (gpointer src_object,
}
}
else
- g_warning ("%s: no reemission for object %s signal \"%s\" to object %s signal \"%s\"",
- G_STRLOC, bse_object_debug_name (src_object), src_signal,
- bse_object_debug_name (dest_object), dest_signal);
+ Bse::warning ("%s: no reemission for object %s signal \"%s\" to object %s signal \"%s\"", G_STRLOC,
+ bse_object_debug_name (src_object), src_signal,
+ bse_object_debug_name (dest_object), dest_signal);
}
else
- g_warning ("%s: invalid signal specs: \"%s\", \"%s\"",
- G_STRLOC, src_signal, dest_signal);
+ Bse::warning ("%s: invalid signal specs: \"%s\", \"%s\"", G_STRLOC, src_signal, dest_signal);
}
static void
diff --git a/bse/bseparam.cc b/bse/bseparam.cc
index c349f7c..155b102 100644
--- a/bse/bseparam.cc
+++ b/bse/bseparam.cc
@@ -88,7 +88,7 @@ bse_param_spec_boxed (const gchar *name,
sfi_pspec_set_options (pspec, hints);
}
else
- g_warning ("boxed parameter \"%s\" of type `%s' can't be converted to record or sequence",
- name, g_type_name (boxed_type));
+ Bse::warning ("boxed parameter \"%s\" of type `%s' can't be converted to record or sequence",
+ name, g_type_name (boxed_type));
return pspec;
}
diff --git a/bse/bsepart.cc b/bse/bsepart.cc
index e7bfe85..d48197b 100644
--- a/bse/bsepart.cc
+++ b/bse/bsepart.cc
@@ -1796,7 +1796,7 @@ bse_part_controls_remove (BsePartControls *self,
break;
}
if (!cev)
- g_warning ("%s: failed to remove event at tick=%u", __func__, tick);
+ Bse::warning ("%s: failed to remove event at tick=%u", __func__, tick);
else if (!node->events)
{
/* remove node */
diff --git a/bse/bsepcmdevice.cc b/bse/bsepcmdevice.cc
index ee370f7..b20e040 100644
--- a/bse/bsepcmdevice.cc
+++ b/bse/bsepcmdevice.cc
@@ -45,11 +45,11 @@ bse_pcm_device_dispose (GObject *object)
if (BSE_DEVICE_OPEN (pdev))
{
- g_warning (G_STRLOC ": pcm device still opened");
+ Bse::warning (G_STRLOC ": pcm device still opened");
bse_device_close (BSE_DEVICE (pdev));
}
if (pdev->handle)
- g_warning (G_STRLOC ": pcm device with stale pcm handle");
+ Bse::warning (G_STRLOC ": pcm device with stale pcm handle");
/* chain parent class' handler */
G_OBJECT_CLASS (parent_class)->dispose (object);
}
diff --git a/bse/bsepcmwriter.cc b/bse/bsepcmwriter.cc
index d8467ab..fbc9d24 100644
--- a/bse/bsepcmwriter.cc
+++ b/bse/bsepcmwriter.cc
@@ -57,7 +57,7 @@ bse_pcm_writer_finalize (GObject *object)
BsePcmWriter *self = BSE_PCM_WRITER (object);
if (self->open)
{
- g_warning ("%s: pcm writer still opened", G_STRLOC);
+ Bse::warning ("%s: pcm writer still opened", G_STRLOC);
bse_pcm_writer_close (self);
}
/* chain parent class' handler */
diff --git a/bse/bseplugin.cc b/bse/bseplugin.cc
index 5bb11ca..8280a6d 100644
--- a/bse/bseplugin.cc
+++ b/bse/bseplugin.cc
@@ -72,7 +72,7 @@ bse_plugin_dispose (GObject *object)
BsePlugin *plugin = BSE_PLUGIN (object);
if (plugin->gmodule || plugin->use_count || plugin->n_types)
- g_warning ("%s: plugin partially initialized during destruciton", __func__);
+ Bse::warning ("%s: plugin partially initialized during destruciton", __func__);
/* chain parent class handler */
G_OBJECT_CLASS (g_type_class_peek_parent (BSE_PLUGIN_GET_CLASS (plugin)))->dispose (object);
@@ -84,7 +84,7 @@ bse_plugin_finalize (GObject *object)
BsePlugin *plugin = BSE_PLUGIN (object);
if (plugin->gmodule || plugin->use_count || plugin->n_types)
- g_warning ("%s: plugin partially initialized during destruciton", __func__);
+ Bse::warning ("%s: plugin partially initialized during destruciton", __func__);
/* chain parent class handler */
G_OBJECT_CLASS (g_type_class_peek_parent (BSE_PLUGIN_GET_CLASS (plugin)))->finalize (object);
@@ -281,7 +281,7 @@ bse_exports__del_node (BsePlugin *plugin,
{
if (!plugin || !enode)
{
- g_warning ("%s: invalid plugin shutdown", __func__);
+ Bse::warning ("%s: invalid plugin shutdown", __func__);
return;
}
BseExportNode *last = NULL, *link;
@@ -294,7 +294,7 @@ bse_exports__del_node (BsePlugin *plugin,
plugin->chain = link->next;
return;
}
- g_warning ("%s: plugin attempt to unregister invalid export node: %s", plugin->fname, enode->name);
+ Bse::warning ("%s: plugin attempt to unregister invalid export node: %s", plugin->fname, enode->name);
}
static void
bse_plugin_unload (BsePlugin *plugin)
@@ -322,7 +322,7 @@ bse_plugin_unuse (GTypePlugin *gplugin)
bse_plugin_unload (plugin);
else
{
- g_warning ("%s: attempt to unload builtin plugin due to use_count==0", G_STRLOC);
+ Bse::warning ("%s: attempt to unload builtin plugin due to use_count==0", G_STRLOC);
plugin->use_count = 1;
}
}
@@ -434,7 +434,7 @@ bse_plugin_reinit_types (BsePlugin *plugin)
}
}
while (n--)
- g_warning ("%s: plugin failed to reregister type: %s", plugin->fname, g_type_name (types[n]));
+ Bse::warning ("%s: plugin failed to reregister type: %s", plugin->fname, g_type_name (types[n]));
g_free (types);
}
diff --git a/bse/bseprocedure.cc b/bse/bseprocedure.cc
index 223411a..3f6e1fb 100644
--- a/bse/bseprocedure.cc
+++ b/bse/bseprocedure.cc
@@ -82,7 +82,7 @@ bse_procedure_init (BseProcedureClass *proc,
proc->n_out_pspecs = 0;
proc->out_pspecs = NULL;
proc->execute = NULL;
- g_warning ("procedure \"%s\" messes with reserved class members", BSE_PROCEDURE_NAME (proc));
+ Bse::warning ("procedure \"%s\" messes with reserved class members", BSE_PROCEDURE_NAME (proc));
}
/* check input parameters and setup specifications */
@@ -90,16 +90,16 @@ bse_procedure_init (BseProcedureClass *proc,
if (in_pspecs[i])
{
if ((in_pspecs[i]->flags & G_PARAM_READWRITE) != G_PARAM_READWRITE)
- g_warning ("procedure \"%s\": input parameter \"%s\" has invalid flags",
- BSE_PROCEDURE_NAME (proc), in_pspecs[i]->name);
+ Bse::warning ("procedure \"%s\": input parameter \"%s\" has invalid flags",
+ BSE_PROCEDURE_NAME (proc), in_pspecs[i]->name);
g_param_spec_ref (in_pspecs[i]);
g_param_spec_sink (in_pspecs[i]);
}
else
break;
if (i == BSE_PROCEDURE_MAX_IN_PARAMS && in_pspecs[i])
- g_warning ("procedure \"%s\" exceeds maximum number of input parameters (%u)",
- BSE_PROCEDURE_NAME (proc), BSE_PROCEDURE_MAX_IN_PARAMS);
+ Bse::warning ("procedure \"%s\" exceeds maximum number of input parameters (%u)",
+ BSE_PROCEDURE_NAME (proc), BSE_PROCEDURE_MAX_IN_PARAMS);
proc->n_in_pspecs = i;
proc->in_pspecs = g_new (GParamSpec*, proc->n_in_pspecs + 1);
memcpy (proc->in_pspecs, in_pspecs, sizeof (in_pspecs[0]) * proc->n_in_pspecs);
@@ -110,16 +110,16 @@ bse_procedure_init (BseProcedureClass *proc,
if (out_pspecs[i])
{
if ((out_pspecs[i]->flags & G_PARAM_READWRITE) != G_PARAM_READWRITE)
- g_warning ("procedure \"%s\": output parameter \"%s\" has invalid flags",
- BSE_PROCEDURE_NAME (proc), out_pspecs[i]->name);
+ Bse::warning ("procedure \"%s\": output parameter \"%s\" has invalid flags",
+ BSE_PROCEDURE_NAME (proc), out_pspecs[i]->name);
g_param_spec_ref (out_pspecs[i]);
g_param_spec_sink (out_pspecs[i]);
}
else
break;
if (i == BSE_PROCEDURE_MAX_OUT_PARAMS && out_pspecs[i])
- g_warning ("procedure \"%s\" exceeds maximum number of output parameters (%u)",
- BSE_PROCEDURE_NAME (proc), BSE_PROCEDURE_MAX_OUT_PARAMS);
+ Bse::warning ("procedure \"%s\" exceeds maximum number of output parameters (%u)",
+ BSE_PROCEDURE_NAME (proc), BSE_PROCEDURE_MAX_OUT_PARAMS);
proc->n_out_pspecs = i;
proc->out_pspecs = g_new (GParamSpec*, proc->n_out_pspecs + 1);
memcpy (proc->out_pspecs, out_pspecs, sizeof (out_pspecs[0]) * proc->n_out_pspecs);
@@ -230,9 +230,9 @@ bse_procedure_call (BseProcedureClass *proc,
if (g_param_value_validate (pspec, ivalues + i) && !(pspec->flags & G_PARAM_LAX_VALIDATION))
{
- g_warning ("%s: input arg `%s' contains invalid value",
- BSE_PROCEDURE_NAME (proc),
- pspec->name);
+ Bse::warning ("%s: input arg `%s' contains invalid value",
+ BSE_PROCEDURE_NAME (proc),
+ pspec->name);
bail_out = TRUE;
}
}
@@ -260,9 +260,9 @@ bse_procedure_call (BseProcedureClass *proc,
GParamSpec *pspec = proc->out_pspecs[i];
if (g_param_value_validate (pspec, ovalues + i) && !(pspec->flags & G_PARAM_LAX_VALIDATION))
- g_warning ("%s: internal procedure error: output arg `%s' had invalid value",
- BSE_PROCEDURE_NAME (proc),
- pspec->name);
+ Bse::warning ("%s: internal procedure error: output arg `%s' had invalid value",
+ BSE_PROCEDURE_NAME (proc),
+ pspec->name);
}
return error;
@@ -287,11 +287,11 @@ bse_procedure_marshal (GType proc_type,
g_value_init (tmp_ivalues + i, G_PARAM_SPEC_VALUE_TYPE (pspec));
if (!sfi_value_transform (ivalues + i, tmp_ivalues + i))
{
- g_warning ("%s: input arg `%s' has invalid type `%s' (expected `%s')",
- BSE_PROCEDURE_NAME (proc),
- pspec->name,
- G_VALUE_TYPE_NAME (ivalues + i),
- g_type_name (G_PARAM_SPEC_VALUE_TYPE (pspec)));
+ Bse::warning ("%s: input arg `%s' has invalid type `%s' (expected `%s')",
+ BSE_PROCEDURE_NAME (proc),
+ pspec->name,
+ G_VALUE_TYPE_NAME (ivalues + i),
+ g_type_name (G_PARAM_SPEC_VALUE_TYPE (pspec)));
bail_out = TRUE;
}
}
@@ -314,11 +314,11 @@ bse_procedure_marshal (GType proc_type,
GParamSpec *pspec = proc->out_pspecs[i];
if (!sfi_value_transform (tmp_ovalues + i, ovalues + i))
- g_warning ("%s: output arg `%s' of type `%s' cannot be converted into `%s'",
- BSE_PROCEDURE_NAME (proc),
- pspec->name,
- g_type_name (G_PARAM_SPEC_VALUE_TYPE (pspec)),
- G_VALUE_TYPE_NAME (ovalues + i));
+ Bse::warning ("%s: output arg `%s' of type `%s' cannot be converted into `%s'",
+ BSE_PROCEDURE_NAME (proc),
+ pspec->name,
+ g_type_name (G_PARAM_SPEC_VALUE_TYPE (pspec)),
+ G_VALUE_TYPE_NAME (ovalues + i));
g_value_unset (tmp_ovalues + i);
}
procedure_class_unref (proc);
@@ -344,8 +344,8 @@ bse_procedure_call_collect (BseProcedureClass *proc,
if (first_value && first_value != ivalues) /* may skip this since bse_procedure_call() does extra
validation */
{
if (proc->n_in_pspecs < 1)
- g_warning ("%s: input arg supplied for procedure taking `void'",
- BSE_PROCEDURE_NAME (proc));
+ Bse::warning ("%s: input arg supplied for procedure taking `void'",
+ BSE_PROCEDURE_NAME (proc));
else
{
GParamSpec *pspec = proc->in_pspecs[0];
@@ -353,11 +353,11 @@ bse_procedure_call_collect (BseProcedureClass *proc,
g_value_init (ivalues + 0, G_PARAM_SPEC_VALUE_TYPE (pspec));
if (!sfi_value_transform (first_value, ivalues + 0))
{
- g_warning ("%s: input arg `%s' has invalid type `%s' (expected `%s')",
- BSE_PROCEDURE_NAME (proc),
- pspec->name,
- G_VALUE_TYPE_NAME (first_value),
- g_type_name (G_PARAM_SPEC_VALUE_TYPE (pspec)));
+ Bse::warning ("%s: input arg `%s' has invalid type `%s' (expected `%s')",
+ BSE_PROCEDURE_NAME (proc),
+ pspec->name,
+ G_VALUE_TYPE_NAME (first_value),
+ g_type_name (G_PARAM_SPEC_VALUE_TYPE (pspec)));
bail_out = TRUE;
}
}
@@ -376,11 +376,11 @@ bse_procedure_call_collect (BseProcedureClass *proc,
G_VALUE_COLLECT (ivalues + i, var_args, 0, &error_msg);
if (error_msg)
{
- g_warning ("%s: failed to collect arg `%s' of type `%s': %s",
- BSE_PROCEDURE_NAME (proc),
- pspec->name,
- G_VALUE_TYPE_NAME (ivalues + i),
- error_msg);
+ Bse::warning ("%s: failed to collect arg `%s' of type `%s': %s",
+ BSE_PROCEDURE_NAME (proc),
+ pspec->name,
+ G_VALUE_TYPE_NAME (ivalues + i),
+ error_msg);
g_free (error_msg);
bail_out = TRUE;
}
@@ -418,11 +418,11 @@ bse_procedure_call_collect (BseProcedureClass *proc,
G_VALUE_LCOPY (ovalues + i, var_args, 0, &error_msg);
if (error_msg)
{
- g_warning ("%s: failed to return arg `%s' of type `%s': %s",
- BSE_PROCEDURE_NAME (proc),
- pspec->name,
- G_VALUE_TYPE_NAME (ovalues + i),
- error_msg);
+ Bse::warning ("%s: failed to return arg `%s' of type `%s': %s",
+ BSE_PROCEDURE_NAME (proc),
+ pspec->name,
+ G_VALUE_TYPE_NAME (ovalues + i),
+ error_msg);
g_free (error_msg);
skip_ovalues = TRUE;
}
@@ -508,7 +508,7 @@ bse_procedure_exec (const gchar *proc_name,
proc_type = bse_procedure_lookup (proc_name);
if (!proc_type)
{
- g_warning ("%s: no such procedure", proc_name);
+ Bse::warning ("%s: no such procedure", proc_name);
return Bse::Error::PROC_NOT_FOUND;
}
else
@@ -534,7 +534,7 @@ bse_procedure_exec_void (const gchar *proc_name,
proc_type = bse_procedure_lookup (proc_name);
if (!proc_type)
{
- g_warning ("%s: no such procedure", proc_name);
+ Bse::warning ("%s: no such procedure", proc_name);
return Bse::Error::PROC_NOT_FOUND;
}
else
@@ -568,14 +568,14 @@ bse_procedure_execvl (BseProcedureClass *proc,
memcpy (tmp_ivalues + i, slist->data, sizeof (tmp_ivalues[0]));
if (slist || i != proc->n_in_pspecs)
{
- g_warning ("%s: invalid number of arguments supplied to procedure \"%s\"", G_STRLOC,
BSE_PROCEDURE_NAME (proc));
+ Bse::warning ("%s: invalid number of arguments supplied to procedure \"%s\"", G_STRLOC,
BSE_PROCEDURE_NAME (proc));
return Bse::Error::PROC_PARAM_INVAL;
}
for (i = 0, slist = out_value_list; slist && i < proc->n_out_pspecs; i++, slist = slist->next)
memcpy (tmp_ovalues + i, slist->data, sizeof (tmp_ovalues[0]));
if (slist || i != proc->n_out_pspecs)
{
- g_warning ("%s: invalid number of arguments supplied to procedure \"%s\"", G_STRLOC,
BSE_PROCEDURE_NAME (proc));
+ Bse::warning ("%s: invalid number of arguments supplied to procedure \"%s\"", G_STRLOC,
BSE_PROCEDURE_NAME (proc));
return Bse::Error::PROC_PARAM_INVAL;
}
error = bse_procedure_marshal (BSE_PROCEDURE_TYPE (proc), tmp_ivalues, tmp_ovalues, marshal, marshal_data);
diff --git a/bse/bseprocidl.cc b/bse/bseprocidl.cc
index da6c593..bf56248 100644
--- a/bse/bseprocidl.cc
+++ b/bse/bseprocidl.cc
@@ -11,6 +11,8 @@
#pragma GCC diagnostic ignored "-Wmissing-declarations"
+#define app_error(...) do { g_printerr ("%s: ", g_get_prgname()); g_printerr (__VA_ARGS__); exit (-1); }
while (0)
+
std::set<std::string> needTypes;
std::set<std::string> needClasses;
std::set<std::string> excludeTypes;
@@ -166,7 +168,7 @@ std::string idlType (GType g)
return "FBlock";
else if (s == "SfiRec")
return "Rec";
- g_error ("bseprocidl: unsupported argument type: %s", s.c_str());
+ app_error ("bseprocidl: unsupported argument type: %s", s.c_str());
return "*ERROR*";
}
}
diff --git a/bse/bseproject.cc b/bse/bseproject.cc
index cf24691..d52df30 100644
--- a/bse/bseproject.cc
+++ b/bse/bseproject.cc
@@ -415,14 +415,14 @@ bse_project_retrieve_child (BseContainer *container,
for (slist = self->supers; slist; slist = slist->next)
if (g_type_is_a (G_OBJECT_TYPE (slist->data), BSE_TYPE_WAVE_REPO))
return (BseItem*) slist->data;
- g_warning ("%s: no wave-repo found in project\n", G_STRLOC);
+ Bse::warning ("%s: no wave-repo found in project\n", G_STRLOC);
return NULL; /* shouldn't happen */
}
else if (g_type_is_a (child_type, BSE_TYPE_SOUND_FONT_REPO)) /* and the same sound font repo */
{
BseSoundFontRepo *sfrepo = bse_project_get_sound_font_repo (self);
if (!sfrepo)
- g_warning ("%s: no sound-font-repo found in project\n", G_STRLOC);
+ Bse::warning ("%s: no sound-font-repo found in project\n", G_STRLOC);
return BSE_ITEM (sfrepo);
}
else
@@ -607,7 +607,7 @@ bse_project_get_wave_repo (BseProject *self)
BseSoundFontRepo*
bse_project_get_sound_font_repo (BseProject *self)
{
- g_return_val_if_fail (BSE_IS_PROJECT (self), NULL);
+ assert_return (BSE_IS_PROJECT (self), NULL);
GSList *slist;
for (slist = self->supers; slist; slist = slist->next)
if (BSE_IS_SOUND_FONT_REPO (slist->data))
@@ -673,8 +673,8 @@ bse_project_create_intern_synth (BseProject *self,
g_object_unref (storage);
g_free (bse_synth);
if (error != 0 || !strap.items)
- g_warning ("failed to create internal synth \"%s\": %s",
- synth_name, bse_error_blurb (error != 0 ? error : Bse::Error::NO_ENTRY));
+ Bse::warning ("failed to create internal synth \"%s\": %s",
+ synth_name, bse_error_blurb (error != 0 ? error : Bse::Error::NO_ENTRY));
else
synth = (BseItem*) strap.items->data;
g_slist_free (strap.items);
diff --git a/bse/bsesequencer.cc b/bse/bsesequencer.cc
index d8613f0..5c8b55c 100644
--- a/bse/bsesequencer.cc
+++ b/bse/bsesequencer.cc
@@ -188,7 +188,7 @@ Sequencer::remove_io_watch (BseIOWatch watch_func, void *watch_data)
}
BSE_SEQUENCER_UNLOCK();
if (!removal_success)
- g_warning ("%s: failed to remove %p(%p)", __func__, watch_func, watch_data);
+ Bse::warning ("%s: failed to remove %p(%p)", __func__, watch_func, watch_data);
}
bool
@@ -288,7 +288,7 @@ Sequencer::remove_song (BseSong *song)
song->sequencer_owns_refcount_SL = false;
BSE_SEQUENCER_UNLOCK();
if (!ring)
- g_warning ("%s: failed to find %s in sequencer", G_STRLOC, bse_object_debug_name (song));
+ Bse::warning ("%s: failed to find %s in sequencer", G_STRLOC, bse_object_debug_name (song));
if (need_unref)
g_object_unref (song);
}
diff --git a/bse/bseserver.cc b/bse/bseserver.cc
index 28eabf4..f9c7e8a 100644
--- a/bse/bseserver.cc
+++ b/bse/bseserver.cc
@@ -286,7 +286,7 @@ static void
bse_server_set_parent (BseItem *item,
BseItem *parent)
{
- g_warning ("%s: BseServer is a global singleton that cannot be added to a container", G_STRLOC);
+ Bse::warning ("%s: BseServer is a global singleton that cannot be added to a container", G_STRLOC);
}
static void
@@ -336,7 +336,7 @@ bse_server_release_children (BseContainer *container)
{
// BseServer *self = BSE_SERVER (container);
- g_warning ("release_children() should never be triggered on BseServer singleton");
+ Bse::warning ("release_children() should never be triggered on BseServer singleton");
/* chain parent class' handler */
BSE_CONTAINER_CLASS (parent_class)->release_children (container);
@@ -759,7 +759,7 @@ bse_server_remove_io_watch (BseServer *server,
assert_return (watch_func != NULL);
if (!iowatch_remove (server, watch_func, data))
- g_warning (G_STRLOC ": no such io watch installed %p(%p)", watch_func, data);
+ Bse::warning (G_STRLOC ": no such io watch installed %p(%p)", watch_func, data);
}
Bse::Error
diff --git a/bse/bsesnet.cc b/bse/bsesnet.cc
index 538415d..df99312 100644
--- a/bse/bsesnet.cc
+++ b/bse/bsesnet.cc
@@ -134,9 +134,9 @@ bse_snet_finalize (GObject *object)
snet->port_unregistered_id = 0;
}
if (snet->iport_names)
- g_warning ("%s: %s: leaking %cport \"%s\"", G_STRLOC, G_OBJECT_TYPE_NAME (snet), 'i', (gchar*)
snet->iport_names->data);
+ Bse::warning ("%s: %s: leaking %cport \"%s\"", G_STRLOC, G_OBJECT_TYPE_NAME (snet), 'i', (gchar*)
snet->iport_names->data);
if (snet->oport_names)
- g_warning ("%s: %s: leaking %cport \"%s\"", G_STRLOC, G_OBJECT_TYPE_NAME (snet), 'o', (gchar*)
snet->oport_names->data);
+ Bse::warning ("%s: %s: leaking %cport \"%s\"", G_STRLOC, G_OBJECT_TYPE_NAME (snet), 'o', (gchar*)
snet->oport_names->data);
/* chain parent class' handler */
G_OBJECT_CLASS (parent_class)->finalize (object);
@@ -173,8 +173,7 @@ bse_snet_add_item (BseContainer *container,
if (g_type_is_a (BSE_OBJECT_TYPE (item), BSE_TYPE_SOURCE))
snet->sources = sfi_ring_append (snet->sources, item);
else if (BSE_SNET_USER_SYNTH (snet))
- g_warning ("BseSNet: cannot hold non-source item type `%s'",
- BSE_OBJECT_TYPE_NAME (item));
+ Bse::warning ("BseSNet: cannot hold non-source item type `%s'", BSE_OBJECT_TYPE_NAME (item));
/* chain parent class' add_item handler */
BSE_CONTAINER_CLASS (parent_class)->add_item (container, item);
@@ -222,8 +221,7 @@ bse_snet_remove_item (BseContainer *container,
self->sources = sfi_ring_remove (self->sources, item);
}
else if (BSE_SNET_USER_SYNTH (self))
- g_warning ("BseSNet: cannot hold non-source item type `%s'",
- BSE_OBJECT_TYPE_NAME (item));
+ Bse::warning ("BseSNet: cannot hold non-source item type `%s'", BSE_OBJECT_TYPE_NAME (item));
/* chain parent class' remove_item handler */
BSE_CONTAINER_CLASS (parent_class)->remove_item (container, item);
@@ -696,7 +694,7 @@ bse_snet_context_clone_branch (BseSNet *self,
}
else
{
- g_warning ("%s: context merger forms a cycle with it's inputs", G_STRLOC);
+ Bse::warning ("%s: context merger forms a cycle with it's inputs", G_STRLOC);
bse_source_free_collection (ring);
}
@@ -781,9 +779,9 @@ bse_snet_reset (BseSource *source)
{
BseSNetPort *port = (BseSNetPort*) g_bsearch_array_get_nth (self->port_array, &port_array_config, 0);
- g_warning ("%s: %cport \"%s\" still active: context=%u src=%p dest=%p",
- G_STRLOC, port->input ? 'i' : 'o', port->name,
- port->context, port->src_omodule, port->dest_imodule);
+ Bse::warning ("%s: %cport \"%s\" still active: context=%u src=%p dest=%p", G_STRLOC,
+ port->input ? 'i' : 'o', port->name,
+ port->context, port->src_omodule, port->dest_imodule);
}
g_bsearch_array_free (self->port_array, &port_array_config);
self->port_array = NULL;
diff --git a/bse/bsesoundfont.cc b/bse/bsesoundfont.cc
index 8f7a5d1..27e1649 100644
--- a/bse/bsesoundfont.cc
+++ b/bse/bsesoundfont.cc
@@ -123,9 +123,9 @@ bse_sound_font_load_blob (BseSoundFont *self,
g_object_ref (sound_font_impl->sfrepo);
}
- g_return_val_if_fail (blob != NULL, Bse::Error::INTERNAL);
- g_return_val_if_fail (sound_font_impl->sfrepo != NULL, Bse::Error::INTERNAL);
- g_return_val_if_fail (sound_font_impl->sfont_id == -1, Bse::Error::INTERNAL);
+ assert_return (blob != NULL, Bse::Error::INTERNAL);
+ assert_return (sound_font_impl->sfrepo != NULL, Bse::Error::INTERNAL);
+ assert_return (sound_font_impl->sfont_id == -1, Bse::Error::INTERNAL);
std::lock_guard<Bse::Mutex> guard (bse_sound_font_repo_mutex (sound_font_impl->sfrepo));
fluid_synth_t *fluid_synth = bse_sound_font_repo_fluid_synth (sound_font_impl->sfrepo);
@@ -166,7 +166,7 @@ bse_sound_font_unload (BseSoundFont *sound_font)
{
Bse::SoundFontImpl *sound_font_impl = sound_font->as<Bse::SoundFontImpl *>();
- g_return_if_fail (sound_font_impl->sfrepo != NULL);
+ assert_return (sound_font_impl->sfrepo != NULL);
if (sound_font_impl->sfont_id != -1)
{
@@ -183,7 +183,7 @@ bse_sound_font_reload (BseSoundFont *sound_font)
{
Bse::SoundFontImpl *sound_font_impl = sound_font->as<Bse::SoundFontImpl *>();
- g_return_val_if_fail (sound_font_impl->sfont_id == -1, Bse::Error::INTERNAL);
+ assert_return (sound_font_impl->sfont_id == -1, Bse::Error::INTERNAL);
return bse_sound_font_load_blob (sound_font, sound_font_impl->blob, FALSE);
}
@@ -281,8 +281,7 @@ bse_sound_font_add_item (BseContainer *container,
sound_font_impl->presets.push_back (BSE_SOUND_FONT_PRESET (item));
}
else
- g_warning ("BseSoundFont: cannot hold non-sound-font-preset item type `%s'",
- BSE_OBJECT_TYPE_NAME (item));
+ Bse::warning ("BseSoundFont: cannot hold non-sound-font-preset item type `%s'", BSE_OBJECT_TYPE_NAME
(item));
/* chain parent class' add_item handler */
BSE_CONTAINER_CLASS (parent_class)->add_item (container, item);
@@ -322,8 +321,7 @@ bse_sound_font_remove_item (BseContainer *container,
}
}
else
- g_warning ("BseSoundFontRepo: cannot hold non-sound-font-preset item type `%s'",
- BSE_OBJECT_TYPE_NAME (item));
+ Bse::warning ("BseSoundFontRepo: cannot hold non-sound-font-preset item type `%s'", BSE_OBJECT_TYPE_NAME
(item));
/* chain parent class' remove_item handler */
BSE_CONTAINER_CLASS (parent_class)->remove_item (container, item);
@@ -418,7 +416,7 @@ SoundFontImpl::~SoundFontImpl ()
}
if (sfrepo != NULL || sfont_id != -1)
- g_warning (G_STRLOC ": some resources could not be freed.");
+ Bse::warning (G_STRLOC ": some resources could not be freed.");
}
} // Bse
diff --git a/bse/bsesoundfontosc.cc b/bse/bsesoundfontosc.cc
index 2d3eda0..2c5ffa8 100644
--- a/bse/bsesoundfontosc.cc
+++ b/bse/bsesoundfontosc.cc
@@ -174,11 +174,11 @@ bse_sound_font_osc_class_init (BseSoundFontOscClass *klass)
BSE_TYPE_SOUND_FONT_PRESET, SFI_PARAM_STANDARD));
ochannel = bse_source_class_add_ochannel (source_class, "left-out", _("Left Out"), _("Output of the fluid
synth soundfont synthesizer"));
- g_assert (ochannel == BSE_SOUND_FONT_OSC_OCHANNEL_LEFT_OUT);
+ assert_return (ochannel == BSE_SOUND_FONT_OSC_OCHANNEL_LEFT_OUT);
ochannel = bse_source_class_add_ochannel (source_class, "right-out", _("Right Out"), _("Output of the
fluid synth soundfont synthesizer"));
- g_assert (ochannel == BSE_SOUND_FONT_OSC_OCHANNEL_RIGHT_OUT);
+ assert_return (ochannel == BSE_SOUND_FONT_OSC_OCHANNEL_RIGHT_OUT);
ochannel = bse_source_class_add_ochannel (source_class, "done-out", _("Done Out"), _("Done Output"));
- g_assert (ochannel == BSE_SOUND_FONT_OSC_OCHANNEL_DONE_OUT);
+ assert_return (ochannel == BSE_SOUND_FONT_OSC_OCHANNEL_DONE_OUT);
}
static void
@@ -228,7 +228,7 @@ get_sfrepo (BseSoundFontOsc *self)
}
else
{
- g_warning ("BseSoundFontOsc: could not find sfrepo\n");
+ Bse::warning ("BseSoundFontOsc: could not find sfrepo\n");
self->config.sfrepo = NULL;
}
}
@@ -363,7 +363,7 @@ process_fluid_L (BseSoundFontRepo *sfrepo,
float null_fx[BSE_STREAM_MAX_VALUES];
float *channel_fx_null[2] = { null_fx, null_fx };
- g_return_if_fail (now_tick_stamp > sfrepo_impl->channel_values_tick_stamp);
+ assert_return (now_tick_stamp > sfrepo_impl->channel_values_tick_stamp);
sfrepo_impl->channel_values_tick_stamp = now_tick_stamp;
/* Sample precise timing: If events don't occur at block boundary, the block
@@ -465,7 +465,7 @@ sound_font_osc_process (BseModule *module,
}
else
{
- g_warning (G_STRLOC ": access past end of channel_values buffer");
+ Bse::warning (G_STRLOC ": access past end of channel_values buffer");
}
if (BSE_MODULE_OSTREAM (module, BSE_SOUND_FONT_OSC_OCHANNEL_DONE_OUT).connected)
{
diff --git a/bse/bsesoundfontrepo.cc b/bse/bsesoundfontrepo.cc
index bf97d9a..b8b510c 100644
--- a/bse/bsesoundfontrepo.cc
+++ b/bse/bsesoundfontrepo.cc
@@ -222,8 +222,7 @@ bse_sound_font_repo_add_item (BseContainer *container,
if (g_type_is_a (BSE_OBJECT_TYPE (item), BSE_TYPE_SOUND_FONT))
sfrepo_impl->sound_fonts.push_back (BSE_SOUND_FONT (item));
else
- g_warning ("BseSoundFontRepo: cannot hold non-sound-font item type `%s'",
- BSE_OBJECT_TYPE_NAME (item));
+ Bse::warning ("BseSoundFontRepo: cannot hold non-sound-font item type `%s'", BSE_OBJECT_TYPE_NAME
(item));
/* chain parent class' add_item handler */
BSE_CONTAINER_CLASS (parent_class)->add_item (container, item);
@@ -263,8 +262,7 @@ bse_sound_font_repo_remove_item (BseContainer *container,
}
}
else
- g_warning ("BseSoundFontRepo: cannot hold non-sound-font item type `%s'",
- BSE_OBJECT_TYPE_NAME (item));
+ Bse::warning ("BseSoundFontRepo: cannot hold non-sound-font item type `%s'", BSE_OBJECT_TYPE_NAME
(item));
/* chain parent class' remove_item handler */
BSE_CONTAINER_CLASS (parent_class)->remove_item (container, item);
@@ -280,7 +278,7 @@ gather_presets (BseItem *item,
else if (BSE_IS_SOUND_FONT_PRESET (item))
bse_it3m_seq_append (items, item);
else
- g_warning ("Searching for sound font presets, an unexpected `%s' item was found", BSE_OBJECT_TYPE_NAME
(item));
+ Bse::warning ("Searching for sound font presets, an unexpected `%s' item was found",
BSE_OBJECT_TYPE_NAME (item));
return TRUE;
}
@@ -328,7 +326,7 @@ bse_sound_font_repo_remove_osc (BseSoundFontRepo *sfrepo,
{
Bse::SoundFontRepoImpl *sfrepo_impl = sfrepo->as<Bse::SoundFontRepoImpl *>();
- g_return_if_fail (osc_id < sfrepo_impl->oscs.size());
+ assert_return (osc_id < sfrepo_impl->oscs.size());
sfrepo_impl->oscs[osc_id].osc = nullptr;
}
@@ -387,7 +385,7 @@ SoundFontRepoImpl::~SoundFontRepoImpl ()
n_fluid_channels = 0;
if (fluid_events != NULL)
- g_warning (G_STRLOC ": fluid event queue should be empty in SoundFontRepoImpl destructor");
+ Bse::warning (G_STRLOC ": fluid event queue should be empty in SoundFontRepoImpl destructor");
}
static Error
diff --git a/bse/bsesource.cc b/bse/bsesource.cc
index c71bd92..8a34eaa 100644
--- a/bse/bsesource.cc
+++ b/bse/bsesource.cc
@@ -130,7 +130,7 @@ bse_source_dispose (GObject *object)
bse_source_clear_ochannels (source);
if (BSE_SOURCE_PREPARED (source))
{
- g_warning (G_STRLOC ": source still prepared during destruction");
+ Bse::warning (G_STRLOC ": source still prepared during destruction");
bse_source_reset (source);
}
@@ -210,8 +210,8 @@ bse_source_class_add_ijchannel (BseSourceClass *source_class,
cname = channel_dup_canonify (ident);
if (bse_source_class_has_channel (source_class, cname))
{
- g_warning ("%s: attempt to reregister channel \"%s\" with source class `%s'",
- __func__, cname, G_OBJECT_CLASS_NAME (source_class));
+ Bse::warning ("%s: attempt to reregister channel \"%s\" with source class `%s'", __func__,
+ cname, G_OBJECT_CLASS_NAME (source_class));
g_free (cname);
return ~0;
}
@@ -286,8 +286,8 @@ bse_source_class_add_ochannel (BseSourceClass *source_class,
cname = channel_dup_canonify (ident);
if (bse_source_class_has_channel (source_class, cname))
{
- g_warning ("%s: attempt to reregister channel \"%s\" with source class `%s'",
- __func__, cname, G_OBJECT_CLASS_NAME (source_class));
+ Bse::warning ("%s: attempt to reregister channel \"%s\" with source class `%s'", __func__,
+ cname, G_OBJECT_CLASS_NAME (source_class));
g_free (cname);
return ~0;
}
@@ -352,8 +352,8 @@ source_class_collect_properties (BseSourceClass *klass)
{
BseSourceClass *source_class = (BseSourceClass*) g_type_class_ref (pspec->owner_type);
if (!source_class || !source_class->property_updated)
- g_warning ("%s: ignoring automation property \"%s\" without property_updated()
implementation",
- g_type_name (pspec->owner_type), pspec->name);
+ Bse::warning ("%s: ignoring automation property \"%s\" without property_updated()
implementation",
+ g_type_name (pspec->owner_type), pspec->name);
else
klass->automation_properties = sfi_ring_append (klass->automation_properties, pspec);
g_type_class_unref (source_class);
@@ -649,7 +649,7 @@ source_create_context (BseSource *source,
context = context_lookup (source, context_handle);
if (context)
{
- g_warning ("%s: context %u on %p exists already", str_loc, context->id, source);
+ Bse::warning ("%s: context %u on %p exists already", str_loc, context->id, source);
return;
}
@@ -662,13 +662,9 @@ source_create_context (BseSource *source,
context = context_lookup (source, context_handle);
assert_return (context != NULL);
if (BSE_SOURCE_N_ICHANNELS (source) && !context->u.mods.imodule)
- g_warning ("%s: source `%s' failed to create %s module",
- str_loc,
- G_OBJECT_TYPE_NAME (source), "input");
+ Bse::warning ("%s: source `%s' failed to create %s module", str_loc, G_OBJECT_TYPE_NAME (source),
"input");
if (BSE_SOURCE_N_OCHANNELS (source) && !context->u.mods.omodule)
- g_warning ("%s: source `%s' failed to create %s module",
- str_loc,
- G_OBJECT_TYPE_NAME (source), "output");
+ Bse::warning ("%s: source `%s' failed to create %s module", str_loc, G_OBJECT_TYPE_NAME (source),
"output");
g_object_unref (source);
}
@@ -782,7 +778,7 @@ bse_source_connect_context (BseSource *source,
g_object_unref (source);
}
else
- g_warning ("%s: no such context %u", G_STRLOC, context_handle);
+ Bse::warning ("%s: no such context %u", G_STRLOC, context_handle);
}
static void
@@ -827,13 +823,11 @@ bse_source_dismiss_context (BseSource *source,
context = context_lookup (source, context_handle);
assert_return (context != NULL);
if (BSE_SOURCE_N_ICHANNELS (source) && context->u.mods.imodule)
- g_warning ("%s: source `%s' failed to dismiss %s module",
- G_STRLOC,
- G_OBJECT_TYPE_NAME (source), "input");
+ Bse::warning ("%s: source `%s' failed to dismiss %s module", G_STRLOC,
+ G_OBJECT_TYPE_NAME (source), "input");
if (BSE_SOURCE_N_OCHANNELS (source) && context->u.mods.omodule)
- g_warning ("%s: source `%s' failed to dismiss %s module",
- G_STRLOC,
- G_OBJECT_TYPE_NAME (source), "output");
+ Bse::warning ("%s: source `%s' failed to dismiss %s module", G_STRLOC,
+ G_OBJECT_TYPE_NAME (source), "output");
if (BSE_SOURCE_N_OCHANNELS (source) == 0 &&
BSE_SOURCE_N_ICHANNELS (source) == 0)
{
@@ -849,7 +843,7 @@ bse_source_dismiss_context (BseSource *source,
g_object_unref (source);
}
else
- g_warning ("%s: no such context %u", G_STRLOC, context_handle);
+ Bse::warning ("%s: no such context %u", G_STRLOC, context_handle);
}
void
@@ -878,7 +872,7 @@ bse_source_set_context_imodule (BseSource *source,
context = context_lookup (source, context_handle);
if (!context)
{
- g_warning ("%s: no such context %u", G_STRLOC, context_handle);
+ Bse::warning ("%s: no such context %u", G_STRLOC, context_handle);
return;
}
if (imodule)
@@ -902,7 +896,7 @@ bse_source_get_context_imodule (BseSource *source,
context = context_lookup (source, context_handle);
if (!context)
{
- g_warning ("%s: no such context %u", G_STRLOC, context_handle);
+ Bse::warning ("%s: no such context %u", G_STRLOC, context_handle);
return NULL;
}
return context->u.mods.imodule;
@@ -925,7 +919,7 @@ bse_source_set_context_omodule (BseSource *source,
context = context_lookup (source, context_handle);
if (!context)
{
- g_warning ("%s: no such context %u", G_STRLOC, context_handle);
+ Bse::warning ("%s: no such context %u", G_STRLOC, context_handle);
return;
}
if (omodule)
@@ -966,7 +960,7 @@ bse_source_get_context_omodule (BseSource *source,
context = context_lookup (source, context_handle);
if (!context)
{
- g_warning ("%s: no such context %u", G_STRLOC, context_handle);
+ Bse::warning ("%s: no such context %u", G_STRLOC, context_handle);
return NULL;
}
return context->u.mods.omodule;
@@ -1010,7 +1004,7 @@ bse_source_flow_access_module (BseSource *source,
context = context_lookup (source, context_handle);
if (!context)
{
- g_warning ("%s: no such context %u", G_STRLOC, context_handle);
+ Bse::warning ("%s: no such context %u", G_STRLOC, context_handle);
return;
}
m1 = context->u.mods.imodule;
@@ -1429,10 +1423,10 @@ bse_source_must_set_input_loc (BseSource *source,
{
Bse::Error error = bse_source_set_input (source, ichannel, osource, ochannel);
if (error != 0)
- g_warning ("%s: failed to connect module %s channel %u to module %s channel %u: %s", strloc,
- bse_object_debug_name (source), ichannel,
- bse_object_debug_name (osource), ochannel,
- bse_error_blurb (error));
+ Bse::warning ("%s: failed to connect module %s channel %u to module %s channel %u: %s", strloc,
+ bse_object_debug_name (source), ichannel,
+ bse_object_debug_name (osource), ochannel,
+ bse_error_blurb (error));
}
static SfiRing*
diff --git a/bse/bsestandardsynths.cc b/bse/bsestandardsynths.cc
index 9ee05fd..cb4192a 100644
--- a/bse/bsestandardsynths.cc
+++ b/bse/bsestandardsynths.cc
@@ -22,6 +22,6 @@ bse_standard_synth_inflate (const gchar *synth_name,
result[blob.size()] = 0;
return result;
}
- g_warning ("unknown standard synth: %s", synth_name);
+ Bse::warning ("unknown standard synth: %s", synth_name);
return NULL;
}
diff --git a/bse/bsestorage.cc b/bse/bsestorage.cc
index 7a8362c..a9ff5e8 100644
--- a/bse/bsestorage.cc
+++ b/bse/bsestorage.cc
@@ -1210,8 +1210,7 @@ bse_item_store_property (BseItem *item,
bse_storage_putc (storage, ')');
}
else if (g_type_is_a (G_VALUE_TYPE (value), G_TYPE_OBJECT))
- g_warning ("%s: unable to store object property \"%s\" of type `%s'",
- G_STRLOC, pspec->name, g_type_name (G_PARAM_SPEC_VALUE_TYPE (pspec)));
+ Bse::warning ("%s: unable to store object property \"%s\" of type `%s'", G_STRLOC, pspec->name,
g_type_name (G_PARAM_SPEC_VALUE_TYPE (pspec)));
else
bse_storage_put_param (storage, value, pspec);
}
@@ -2032,7 +2031,7 @@ bse_storage_parse_blob (BseStorage *self,
}
if (!blob_out)
{
- g_warning ("failed to lookup storage blob with id=%ld\n", id);
+ Bse::warning ("failed to lookup storage blob with id=%ld\n", id);
goto return_with_error;
}
}
diff --git a/bse/bsesubsynth.cc b/bse/bsesubsynth.cc
index f5b9eb1..0a166d0 100644
--- a/bse/bsesubsynth.cc
+++ b/bse/bsesubsynth.cc
@@ -326,8 +326,7 @@ bse_sub_synth_context_create (BseSource *source,
/* create new context for foreign synth */
if (snet && g_slist_find (recursion_stack, source))
{
- g_warning ("%s: not creating modules for %s due to infinite recursion",
- bse_object_debug_name (self), bse_object_debug_name (snet));
+ Bse::warning ("%s: not creating modules for %s due to infinite recursion", bse_object_debug_name
(self), bse_object_debug_name (snet));
}
else if (snet)
{
diff --git a/bse/bsetrack.cc b/bse/bsetrack.cc
index c6dd1c1..23ecc7e 100644
--- a/bse/bsetrack.cc
+++ b/bse/bsetrack.cc
@@ -421,8 +421,7 @@ create_wnet (BseTrack *self,
}
else
{
- g_warning ("track: waves with the play-type \"%s\" are not supported by this version of beast\n",
- synthesis_network);
+ Bse::warning ("track: waves with the play-type \"%s\" are not supported by this version of beast\n",
synthesis_network);
}
}
@@ -431,7 +430,7 @@ static void
create_sound_font_net (BseTrack *self,
BseSoundFontPreset *preset)
{
- g_return_if_fail (self->sound_font_net == NULL);
+ assert_return (self->sound_font_net == NULL);
self->sound_font_net = bse_project_create_intern_synth (bse_item_get_project (BSE_ITEM (self)),
"sound-font-snet",
diff --git a/bse/bseutils.cc b/bse/bseutils.cc
index 0f60808..8c1b80d 100644
--- a/bse/bseutils.cc
+++ b/bse/bseutils.cc
@@ -254,7 +254,7 @@ bse_icon_from_pixdata (const BsePixdata *pixdata)
rle_buffer += length;
}
if (check_overrun)
- g_warning ("%s(): `pixdata' encoding screwed", RAPICORN_SIMPLE_FUNCTION);
+ Bse::warning ("%s(): `pixdata' encoding screwed", RAPICORN_SIMPLE_FUNCTION);
}
}
else
diff --git a/bse/bsewaverepo.cc b/bse/bsewaverepo.cc
index a27d74a..ab22a24 100644
--- a/bse/bsewaverepo.cc
+++ b/bse/bsewaverepo.cc
@@ -147,8 +147,7 @@ bse_wave_repo_add_item (BseContainer *container,
if (g_type_is_a (BSE_OBJECT_TYPE (item), BSE_TYPE_WAVE))
wrepo->waves = g_list_append (wrepo->waves, item);
else
- g_warning ("BseWaveRepo: cannot hold non-wave item type `%s'",
- BSE_OBJECT_TYPE_NAME (item));
+ Bse::warning ("BseWaveRepo: cannot hold non-wave item type `%s'", BSE_OBJECT_TYPE_NAME (item));
/* chain parent class' add_item handler */
BSE_CONTAINER_CLASS (parent_class)->add_item (container, item);
@@ -182,8 +181,7 @@ bse_wave_repo_remove_item (BseContainer *container,
if (g_type_is_a (BSE_OBJECT_TYPE (item), BSE_TYPE_WAVE))
wrepo->waves = g_list_remove (wrepo->waves, item);
else
- g_warning ("BseWaveRepo: cannot hold non-wave item type `%s'",
- BSE_OBJECT_TYPE_NAME (item));
+ Bse::warning ("BseWaveRepo: cannot hold non-wave item type `%s'", BSE_OBJECT_TYPE_NAME (item));
/* chain parent class' remove_item handler */
BSE_CONTAINER_CLASS (parent_class)->remove_item (container, item);
diff --git a/bse/gslfilehash.cc b/bse/gslfilehash.cc
index 9dc2658..8995cbd 100644
--- a/bse/gslfilehash.cc
+++ b/bse/gslfilehash.cc
@@ -133,8 +133,7 @@ gsl_hfile_close (GslHFile *hfile)
else
{
if (!g_hash_table_remove (hfile_ht, hfile))
- g_warning ("%s: failed to unlink hashed file (%p)",
- G_STRLOC, hfile);
+ Bse::warning ("%s: failed to unlink hashed file (%p)", __func__, hfile);
else
{
hfile->ocount = 0;
diff --git a/bse/gslmagic.cc b/bse/gslmagic.cc
index 0b5b6bc..8827538 100644
--- a/bse/gslmagic.cc
+++ b/bse/gslmagic.cc
@@ -472,14 +472,14 @@ magic_create (char *magic_string, const char *original)
SKIP_CLEAN (p);
if (!magic_parse_offset (magics, magic_string))
{
- g_warning ("unable to parse magic offset \"%s\" from \"%s\"", magic_string, original);
+ Bse::warning ("unable to parse magic offset \"%s\" from \"%s\"", magic_string, original);
return NULL;
}
magic_string = p;
SKIP_CLEAN (p);
if (!magic_parse_type (magics, magic_string))
{
- g_warning ("unable to parse magic type \"%s\" from \"%s\"", magic_string, original);
+ Bse::warning ("unable to parse magic type \"%s\" from \"%s\"", magic_string, original);
return NULL;
}
magic_string = p;
@@ -490,7 +490,7 @@ magic_create (char *magic_string, const char *original)
SKIP_CLEAN (p);
if (!magic_parse_test (magics, magic_string))
{
- g_warning ("unable to parse magic test \"%s\" from \"%s\"", magic_string, original);
+ Bse::warning ("unable to parse magic test \"%s\" from \"%s\"", magic_string, original);
return NULL;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]