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

aur: a mutex for aubuf allocation #2867

Merged
merged 1 commit into from
Jan 9, 2024
Merged

Conversation

cspiel1
Copy link
Collaborator

@cspiel1 cspiel1 commented Jan 9, 2024

The aubuf is created when the first audio frame is pushed. It can't be created during initialization because e.g. srate and channels may be changed in the filters.

Since the auplay thread (often) is started before the first audio frame is decoded, it has to check if the aubuf was already created.
Thus a mutex is needed.

@sreimers
Copy link
Member

sreimers commented Jan 9, 2024

Nice, thanks!

@sreimers sreimers merged commit 880e405 into baresip:main Jan 9, 2024
16 checks passed
@cspiel1 cspiel1 deleted the aur_aubuf_mtx branch January 9, 2024 12:14
@cspiel1
Copy link
Collaborator Author

cspiel1 commented Jan 9, 2024

You're welcome!

@cspiel1 cspiel1 mentioned this pull request Jan 9, 2024
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

2 participants