flutter_sound icon indicating copy to clipboard operation
flutter_sound copied to clipboard

Fixes an issue in FlutterSoundPlayer -init:playerManager: where the …

Open timcschmidt opened this issue 1 year ago • 1 comments

…voiceProcessing argument is always evaluated as true.

timcschmidt avatar Dec 14 '23 01:12 timcschmidt

This prevents mere playback requesting microphone access on ios.

timcschmidt avatar Dec 14 '23 01:12 timcschmidt

Thank you @timcschmidt for your contribution. I really appreciate. There is clearly a bug there.

My problem is now that when I call

if (![outputNode setVoiceProcessingEnabled:YES error:&err])

then, later, when I call

[engine connect: playerNode to: outputNode format: outputFormat];

I get an exception "required condition is false: IsFormatSampleRateAndChannelCountValid(format)"

I am not sure that this is tied with your patch. But I do not really understand the iOS library. If you have an idea of what is happening I would be grateful.

Larpoux avatar Mar 01 '24 15:03 Larpoux

in another test when I call :

     AVAudioInputNode* inputNode = [engine inputNode];
     AVAudioFormat* inputFormat = [inputNode outputFormatForBus: 0];
     double sRate = [inputFormat sampleRate];

I get "sRate is 0" which is not correct.

Larpoux avatar Mar 01 '24 15:03 Larpoux

My feeling is that those two errors are not tied to your patch. But I do not think iOS library is very understandable . I am lost.

Larpoux avatar Mar 01 '24 16:03 Larpoux

Thank you again @timcschmidt for your contribution. Your patch seems correct and it is now merged into Flutter Sound 9.3.8, So I am closing your PR. If you can look to #1019 I would be grateful.

Larpoux avatar Mar 01 '24 23:03 Larpoux