Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow delayed execution of deallocation operations by waiting engine idle phase #180

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

igorski
Copy link
Owner

@igorski igorski commented Jan 9, 2024

To debug #179

@igorski igorski changed the title Extend example Activity with real life runtime event addition / removal events Allow delayed execution of deallocation operations by waiting engine idle phase Jan 13, 2024
@igorski igorski self-assigned this Jan 13, 2024
@@ -35,7 +35,8 @@ class BaseAudioEvent
BaseAudioEvent();
virtual ~BaseAudioEvent();

void dispose(); // invoke when removing the Event from the engine
void dispose(); // invoke when removing the Event from the engine, should be done when ENGINE_IDLE is broadcast!
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or when Sequencer isn't running

@@ -465,7 +489,18 @@ public static void handleBridgeConnected( int aSomething ) {
}

public static void handleNotification( int aNotificationId ) {
if ( INSTANCE != null && INSTANCE._observer != null ) INSTANCE._observer.handleNotification( aNotificationId );
if ( INSTANCE != null ) {
if ( ENGINE_IDLE_NOTIFICATION == aNotificationId && !INSTANCE._idleCallbacks.isEmpty() ) {
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

empty check us unnecessary as we can iterate safely over an empty list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant