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

Initialize with numChannels = 2 fails to start #7

Open
plavunov opened this issue May 22, 2022 · 3 comments
Open

Initialize with numChannels = 2 fails to start #7

plavunov opened this issue May 22, 2022 · 3 comments

Comments

@plavunov
Copy link

plavunov commented May 22, 2022

Hi,

With numChannels = 1 works properly, with 2 channels doesn't work (app force quits on start)

I'm using iOS

2022-05-22 17:10:04.362773+0300 Runner[81257:7424991] [avae] AVAEInternal.h:130 [AUInterface.mm:536:SetFormat: ([[busArray objectAtIndexedSubscript:(NSUInteger)element] setFormat:format error:&nsErr])] returned false, error Error Domain=NSOSStatusErrorDomain Code=-10868 "(null)"
2022-05-22 17:10:04.364648+0300 Runner[81257:7424991] *** Terminating app due to uncaught exception 'com.apple.coreaudio.avfaudio', reason: '[[busArray objectAtIndexedSubscript:(NSUInteger)element] setFormat:format error:&nsErr]: returned false, error Error Domain=NSOSStatusErrorDomain Code=-10868 "(null)"'

@wsievern
Copy link

wsievern commented Mar 27, 2023

Having the same problem @plavunov, did you ever find a solution?

@Yongle-Fu
Copy link

sample problem

@Yongle-Fu
Copy link

Yongle-Fu commented Apr 10, 2023

just simpley replace code follow may be works, or there may be some issues that haven't been encountered yet

outputFormat = audioEngine.outputNode.outputFormat(forBus: 0)

//        outputFormat = AVAudioFormat(
//            commonFormat: .pcmFormatFloat32,
//            sampleRate: Double(sampleRate),
//            channels: AVAudioChannelCount(nChannels), interleaved: true)!

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

3 participants