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

Check for audioThreadTermReq in movie audio thread #152

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

Eblo
Copy link

@Eblo Eblo commented Jan 14, 2024

If you try to terminate the program or use the skip function during playback of a movie with audio, it would hang with endless errors messages similar to the following:

[ALSOFT] (WW) Error generated on context 000001ec9422ee60, code 0xa001, "Invalid source ID 10"

This happens because the audio thread is stuck in a while loop and trying to read from an OpenAL source that no longer exists. This PR fixes that.

@Eblo
Copy link
Author

Eblo commented Jan 14, 2024

To test this, you'll want to set skippable to true just to ensure you cover both cases. You'll need a theora video that has audio. Make the following call somewhere in a project:

Graphics.play_movie('Movies/some_video_with_audio.ogv', 100, true)

Test both quitting the entire program, and skipping the playback. Without the fix, the application will hang and repeat some error similar to what's in the original post here. With the fix, it should close the program or skip the movie depending on what you did.

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.

None yet

1 participant