SimformSolutionsPvtLtd / audio_waveforms

Use this plugin to generate waveforms while recording audio in any file formats supported by given encoders or from audio files. We can use gestures to scroll through the waveforms or seek to any position while playing audio and also style waveforms
https://pub.dev/packages/audio_waveforms
MIT License
245 stars 125 forks source link

Android 14 ogg vorbis cause start failed: -38 #271

Closed Mistic92 closed 3 months ago

Mistic92 commented 3 months ago

Describe the bug I'm trying to record ogg with vorbis encoder on Android 14 (Pixel 6 Pro) but I'm getting errors like below

E/MediaRecorder( 7734): start failed: -38
E/AudioWaveforms( 7734): Failed to start recording

When I'm using aac encoder it is working.

To Reproduce Steps to reproduce the behavior:

    recorderController = RecorderController()
      ..androidEncoder = AndroidEncoder.vorbis
      ..androidOutputFormat = AndroidOutputFormat.ogg
      ..iosEncoder = IosEncoder.kAudioFormatOpus
      ..bitRate = 32000
      ..sampleRate = 44100;

Expected behavior A clear and concise description of what you expected to happen.

Smartphone (please complete the following information):

Mistic92 commented 3 months ago

Ok, vorbis on android is only for decoding. https://developer.android.com/media/platform/supported-formats