Closed ITotalJustice closed 2 years ago
This is due to https://github.com/ITotalJustice/notorious_beeg/blob/master/src/core/scheduler.cpp#L156
Which only adds the event if it was previously enabled.
When audio is disabled, the sample event is removed, so it would not be re-enabled on state load, even if audio is now enabled.
This causes the sdl2 audio thread to loop until it has enough samples generated, but that will never be true.
To fix this, on state load, simply check the current state of audio and see if it is enabled or not, and add / remove the event accordingly.
This is due to https://github.com/ITotalJustice/notorious_beeg/blob/master/src/core/scheduler.cpp#L156
Which only adds the event if it was previously enabled.
When audio is disabled, the sample event is removed, so it would not be re-enabled on state load, even if audio is now enabled.
This causes the sdl2 audio thread to loop until it has enough samples generated, but that will never be true.
To fix this, on state load, simply check the current state of audio and see if it is enabled or not, and add / remove the event accordingly.