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

Record the audio from Device itself #13

Open
rsZWang opened this issue Nov 22, 2019 · 0 comments
Open

Record the audio from Device itself #13

rsZWang opened this issue Nov 22, 2019 · 0 comments

Comments

@rsZWang
Copy link

rsZWang commented Nov 22, 2019

I need to analyze the audio played by device itself
That means I play and record simultaneously

So I set audioSession like this:
try audioSession.setCategory(.playAndRecord, mode: .videoChat, options: .defaultToSpeaker)

But there is always a warning from this:
assert(remainderf(sizeFloat, powf(2.0, lg2)) == 0, "size must be a power of 2")
It seems that the buffer will be effect when the audioSession set

I can modify the buffer size by try audioSession.setPreferredIOBufferDuration(0.1)
But the size always can not be power of 2

How can I fix this problem?
Thanks

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