rmbrone / flutter_audio_recorder

Flutter plugin that can support audio recording and level metering
MIT License
119 stars 150 forks source link

sampleRate: 22000 not recording on iOS #49

Open 2math opened 4 years ago

2math commented 4 years ago

First thanks for this great package!

It is super weird and took me a lot of time until figure it out, that the problem is the sample rate. Bellow code is OK on android, while on iOS is changing states but not recording audio(duration remains 0) _recorder = FlutterAudioRecorder(filePath, audioFormat: AudioFormat.AAC, sampleRate: 22000);

This simple change made the package to work on both platforms. I guess iOS does not support all sample rates? _recorder = FlutterAudioRecorder(customPath, audioFormat: AudioFormat.AAC);