Canardoux / flutter_sound

Flutter plugin for sound. Audio recorder and player.
Mozilla Public License 2.0
850 stars 553 forks source link

[BUG]: Play From Mic on iOS #1010

Open Larpoux opened 4 months ago

Larpoux commented 4 months ago

Flutter Sound Version :

├── flutter_sound 9.3.6 │ ├── flutter_sound_platform_interface... │ ├── flutter_sound_web... ├── flutter_sound_platform_interface 9.3.6 ├── flutter_sound_web 9.3.6 │ ├── flutter_sound_platform_interface...


Severity


Platforms you faced the error


Describe the bug A clear and concise description of what the bug is.

iOS returns :
Thread 1: "required condition is false: IsFormatSampleRateAndChannelCountValid(hwFormat)"

To Reproduce Steps to reproduce the behavior: Run Example "Play from Mic"


Logs!!!!

flutter: ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── flutter: │ #0 FlutterSoundPlayer._startPlayerFromMic (package:flutter_sound/public/flutter_sound_player.dart:874:13) flutter: │ #1 FlutterSoundPlayer.startPlayerFromMic. (package:flutter_sound/public/flutter_sound_player.dart:862:13) flutter: ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄ flutter: │ 🐛 FS:---> startPlayerFromMic flutter: └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── flutter: ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── flutter: │ #0 FlutterSoundPlayer._stop (package:flutter_sound/public/flutter_sound_player.dart:1099:13) flutter: │ #1 FlutterSoundPlayer._startPlayerFromMic (package:flutter_sound/public/flutter_sound_player.dart:880:11) flutter: ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄ flutter: │ 🐛 FS:---> _stop flutter: └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── flutter: ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── flutter: │ #0 FlutterSoundPlayer.stopPlayerCompleted (package:flutter_sound/public/flutter_sound_player.dart:296:13) flutter: │ #1 MethodChannelFlutterSoundPlayer.channelMethodCallHandler (package:flutter_sound_platform_interface/method_channel_flutter_sound_player.dart:101:19) flutter: ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄ flutter: │ 🐛 ---> stopPlayerCompleted: true flutter: └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── flutter: ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── flutter: │ #0 FlutterSoundPlayer.stopPlayerCompleted (package:flutter_sound/public/flutter_sound_player.dart:311:13) flutter: │ #1 MethodChannelFlutterSoundPlayer.channelMethodCallHandler (package:flutter_sound_platform_interface/method_channel_flutter_sound_player.dart:101:19) flutter: ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄ flutter: │ 🐛 <--- stopPlayerCompleted: true flutter: └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── flutter: ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── flutter: │ #0 FlutterSoundPlayer._stop (package:flutter_sound/public/flutter_sound_player.dart:1126:13) flutter: │ #1 flutter: ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄ flutter: │ 🐛 FS:<--- _stop flutter: └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── AURemoteIO.cpp:1 162 failed: 18 446 744 073 709 540 765 (enable 1, outf< 2 ch, 0 Hz, Float32, deinterleaved> inf< 2 ch, 0 Hz, Float32, deinterleaved>) AVAEInternal.h:76 required condition is false: [AVAudioIONodeImpl.mm:1 280:SetOutputFormat: (IsFormatSampleRateAndChannelCountValid(hwFormat))] Terminating app due to uncaught exception 'com.apple.coreaudio.avfaudio', reason: 'required condition is false: IsFormatSampleRateAndChannelCountValid(hwFormat)' First throw call stack: ( 0 CoreFoundation 0x000000018048d8a8 exceptionPreprocess + 172 1 libobjc.A.dylib 0x000000018008409c objc_exception_throw + 56 2 CoreFoundation 0x000000018048d74c +[NSException raise:format:] + 0 3 AVFAudio 0x00000001beea63e4 _Z19AVAE_RaiseExceptionP8NSStringz + 48 4 AVFAudio 0x00000001bef64440 _ZN17AVAudioIONodeImpl15SetOutputFormatEmP13AVAudioFormat + 812 5 AVFAudio 0x00000001beeea538 _ZN18AVAudioEngineGraph8_ConnectEP19AVAudioNodeImplBaseS1_jjP13AVAudioFormat + 4156 6 AVFAudio 0x00000001bef7c438 _ZN17AVAudioEngineImpl7ConnectEP11AVAudioNodeS1_mmP13AVAudioFormat + 1428 7 AVFAudio 0x00000001bef7337c -[AVAudioEngine connect:to:format:] + 124 8 Runner 0x0000000100534380 -[AudioEngineFromMic init:] + 332 9 Runner 0x0000000100530424 -[FlautoPlayer startPlayerFromMicSampleRate:nbChannels:] + 84 10 Runner 0x000000010052b130 -[FlutterSoundPlayer startPlayerFromMic:result:] + 524 11 Runner 0x000000010052cc44 -[FlutterSoundPlayerManager handleMethodCall:result:] + 1336 12 Flutter 0x000000010524a3f0 45-[FlutterMethodChannel setMethodCallHandler:]_block_invoke + 164 13 Flutter 0x0000000104c7c300 _ZN7flutter25PlatformMessageHandlerIos21HandlePlatformMessageENSt3_fl10unique_ptrINS_15PlatformMessageENS1_14default_deleteIS3_EEEE_block_invoke + 108 14 libdispatch.dylib 0x000000010167c0f0 _dispatch_call_block_and_release + 24 15 libdispatch.dylib 0x000000010167d93c _dispatch_client_callout + 16 16 libdispatch.dylib 0x000000010168d5e4 _dispatch_main_queue_drain + 1228 17 libdispatch.dylib 0x000000010168d108 _dispatch_main_queue_callback_4CF + 40 18 CoreFoundation 0x00000001803ee1b4 CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 12 19 CoreFoundation 0x00000001803e88cc CFRunLoopRun + 1936 20 CoreFoundation 0x00000001803e7d28 CFRunLoopRunSpecific + 572 21 GraphicsServices 0x000000018e7cdbc0 GSEventRunModal + 160 22 UIKitCore 0x00000001852bafdc -[UIApplication _run] + 868 23 UIKitCore 0x00000001852bec54 UIApplicationMain + 124 24 Runner 0x000000010052138c main + 100 25 dyld 0x0000000100c09558 start_sim + 20 26 ??? 0x00000001005ae0e0 0x0 + 4300923104 27 ??? 0xcd2f000000000000 0x0 + 14785036101680627712 ) libc++abi: terminating due to uncaught exception of type NSException

github-actions[bot] commented 3 months ago

This issue is stale because it has been open 365 days with no activity. Leave a comment or this will be closed in 7 days.