newsAdvanced Gtk+ Sequencer - News: Refactoring ags_channel.c

 
 
Latest News
GSequencer version 3.10.5 released posted by jkraehemann, Sun 29 Aug 2021 07:41:14 AM UTC - 0 replies
implement VST3 C API Wrapper posted by jkraehemann, Tue 10 Aug 2021 12:53:03 PM UTC - 0 replies
refactored utility functions posted by jkraehemann, Tue 03 Aug 2021 06:26:38 AM UTC - 0 replies
GSequencer version 3.9.1 released posted by jkraehemann, Wed 30 Jun 2021 06:07:07 AM UTC - 0 replies
preparation for migration to Gtk4 posted by jkraehemann, Thu 18 Feb 2021 10:38:40 AM UTC - 0 replies
[Submit News]
[103 news in archive]

Refactoring ags_channel.c

Item posted by Joël Krähemann <jkraehemann> on Sat 23 Dec 2017 11:47:54 AM UTC.

Some key functions are going to be refactored, these are:

  • ags_channel_recursive_play_init()
  • ags_channel_recursive_play()
  • ags_channel_recursive_reset_recall_ids()
  • ags_channel_tillrecycling_cancel()

The problem with them is they are really old and don't do their job correct. They have redundant code and were never intended to run in a non thread-safe context. This issue is going to be targeted by the new functions:

  • ags_channel_get_level()
  • ags_channel_recursive_reset_recall_id()
  • ags_channel_recursive_init()
  • ags_channel_recursive_run()
  • ags_channel_recursive_cancel()

One more problem with the old code is the schema wasn't correct applied recursive. Causing some SIGSEGV, however the model is mature and it is possible to fix it.

AgsRecyclingContext thread-safe

The AgsRecyclingContext has got its very own mutex. Thought it is not provided by AgsMutexManager, you can access it by the structs field.

pthread_mutex_lock(recycling_context->mutex);

Sorry for screwing things

Running the user interface asynchronously is really tough. There had to be added many mutex locks. And I screwed things, sorry. But this is a great occasion to solve some really old problems the engine had.


by Joël

No messages in Refactoring ags_channel.c

 

Back to the top


Powered by Savane 3.7