Beispiel #1
0
static void
bt_cmd_pattern_dispose (GObject * const object)
{
  const BtCmdPattern *const self = BT_CMD_PATTERN (object);

  return_if_disposed ();
  self->priv->dispose_has_run = TRUE;

  g_object_try_weak_unref (self->priv->machine);
  g_object_try_weak_unref (self->priv->song);

  G_OBJECT_CLASS (bt_cmd_pattern_parent_class)->dispose (object);
}
Beispiel #2
0
static void
bt_wavelevel_dispose (GObject * const object)
{
  const BtWavelevel *const self = BT_WAVELEVEL (object);

  return_if_disposed ();
  self->priv->dispose_has_run = TRUE;

  GST_DEBUG ("!!!! self=%p", self);

  g_object_try_weak_unref (self->priv->song);
  g_object_try_weak_unref (self->priv->wave);

  G_OBJECT_CLASS (bt_wavelevel_parent_class)->dispose (object);
}
static void
bt_playback_controller_socket_dispose (GObject * object)
{
  BtPlaybackControllerSocket *self = BT_PLAYBACK_CONTROLLER_SOCKET (object);

  return_if_disposed ();
  self->priv->dispose_has_run = TRUE;

  GST_DEBUG ("!!!! self=%p", self);
  g_object_try_weak_unref (self->priv->gain);
  g_object_try_weak_unref (self->priv->sequence);
  g_object_try_weak_unref (self->priv->song_info);
  g_object_try_weak_unref (self->priv->app);

  master_connection_close (self);

  G_OBJECT_CLASS (bt_playback_controller_socket_parent_class)->dispose (object);
}
static void
on_song_changed (const BtEditApplication * app, GParamSpec * arg,
    gpointer user_data)
{
  BtPlaybackControllerSocket *self = BT_PLAYBACK_CONTROLLER_SOCKET (user_data);
  BtSong *song;
  BtSinkMachine *master;
  gulong msec, sec, min;

  GST_INFO ("song has changed : app=%p, toolbar=%p", app, user_data);

  g_object_get (self->priv->app, "song", &song, NULL);
  if (!song)
    return;

  self->priv->cur_pos = 0;
  client_write (self, "flush");
  g_signal_connect (song, "notify::is-playing",
      G_CALLBACK (on_song_is_playing_notify), (gpointer) self);

  g_object_try_weak_unref (self->priv->sequence);
  g_object_try_weak_unref (self->priv->song_info);
  g_object_get (song, "sequence", &self->priv->sequence, "song-info",
      &self->priv->song_info, "master", &master, NULL);
  g_object_try_weak_ref (self->priv->sequence);
  g_object_try_weak_ref (self->priv->song_info);
  g_object_unref (self->priv->sequence);
  g_object_unref (self->priv->song_info);

  g_object_try_weak_unref (self->priv->gain);
  g_object_get (master, "input-gain", &self->priv->gain, NULL);
  g_object_try_weak_ref (self->priv->gain);
  g_object_unref (self->priv->gain);

  // calculate length
  g_free (self->priv->length_str);
  bt_song_info_tick_to_m_s_ms (self->priv->song_info,
      bt_sequence_get_loop_length (self->priv->sequence), &min, &sec, &msec);
  self->priv->length_str =
      g_strdup_printf ("0:%02lu:%02lu.%03lu", min, sec, msec);

  g_object_unref (master);
  g_object_unref (song);
}
Beispiel #5
0
static void
bt_song_info_dispose (GObject * const object)
{
  const BtSongInfo *const self = BT_SONG_INFO (object);

  return_if_disposed ();
  self->priv->dispose_has_run = TRUE;

  GST_DEBUG ("!!!! self=%p", self);
  g_object_try_weak_unref (self->priv->song);
  gst_tag_list_unref (self->priv->taglist);

  G_OBJECT_CLASS (bt_song_info_parent_class)->dispose (object);
}
Beispiel #6
0
static void
btic_control_dispose (GObject * const object)
{
  const BtIcControl *const self = BTIC_CONTROL (object);

  return_if_disposed ();
  self->priv->dispose_has_run = TRUE;

  GST_DEBUG ("!!!! self=%p", self);

  g_object_try_weak_unref (self->priv->device);

  GST_DEBUG ("  chaining up");
  G_OBJECT_CLASS (btic_control_parent_class)->dispose (object);
  GST_DEBUG ("  done");
}
Beispiel #7
0
static void
bt_wavetable_dispose (GObject * const object)
{
  const BtWavetable *const self = BT_WAVETABLE (object);
  GList *node;

  return_if_disposed ();
  self->priv->dispose_has_run = TRUE;

  GST_DEBUG ("!!!! self=%p", self);

  g_object_try_weak_unref (self->priv->song);
  // unref list of waves
  if (self->priv->waves) {
    for (node = self->priv->waves; node; node = g_list_next (node)) {
      GST_DEBUG ("  free wave : %" G_OBJECT_REF_COUNT_FMT,
          G_OBJECT_LOG_REF_COUNT (node->data));
      g_object_try_unref (node->data);
      node->data = NULL;
    }
  }

  G_OBJECT_CLASS (bt_wavetable_parent_class)->dispose (object);
}