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

Stop doesn't work if the audioDescription preferred sampleRate is different than detected #255

Open
cerupcat opened this issue Oct 22, 2016 · 0 comments

Comments

@cerupcat
Copy link

cerupcat commented Oct 22, 2016

I'm setting up a audioDescription with 44100, but connecting to a bluetooth speaker with a sampleRate of 8800. When I try stopping the audio engine, audioUnitStreamFormatChanged gets called (not sure why) which then calls updateSampleRate causing the session to be rebuilt due to a change in sampleRate and audio starts again.

Adding if ( !_started) return; to the top of updateSampleRate fixes this, but I'm not sure it's the ideal location for the check as I'm not sure why updateSampleRate is being called on stop to begin with.

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

No branches or pull requests

1 participant