I need Help for :
Hi,
Thanks for your work.
Im sometime getting : An initialization of this audio session is currently already in progress.
The app enable user, to swipe cards that contains each one an audio player.
I suppose i'm calling dispose, while init have not finish.
In INIT
await playerModule.openAudioSession(
focus: AudioFocus.requestFocusAndStopOthers,
category: SessionCategory.playAndRecord,
mode: SessionMode.modeDefault,
device: AudioDevice.speaker);
````
In DISPOSE
```dart
await playerModule.closeAudioSession();
````
Maybe, i need to wait for open session before closing it ?
Another question about quality, is there any ressources to know how to tweak recorder quality. Im using this actually
```dart
await recorderModule.startRecorder(
toFile: p,
codec: _codec,
bitRate: 16000,
numChannels: 1,
sampleRate: SAMPLE_RATE,
);
hi @Abacaxi-Nelson ,
Your problem with the "Initialization in progress" is probably because you try to access your recorder but the future returned by openAudioSession() is not completed.
An await in init() is not correct. You may not block init()
I realize that blocking the recorder until the initialization is finished is not very difficult for the App but Flutter Sound can do something better, because all the apps have this difficulty.
I plan to fix that in version 6.5 (or 6.6 not sure), and you will not have any more any problem
Actually I am terminating the 6.4.3, and I hope to release it next week.
Thanks @Larpoux.
Closing
Most helpful comment
hi @Abacaxi-Nelson ,
Your problem with the "Initialization in progress" is probably because you try to access your recorder but the future returned by
openAudioSession()is not completed.An await in
init()is not correct. You may not blockinit()I realize that blocking the recorder until the initialization is finished is not very difficult for the App but Flutter Sound can do something better, because all the apps have this difficulty.
I plan to fix that in version 6.5 (or 6.6 not sure), and you will not have any more any problem
Actually I am terminating the 6.4.3, and I hope to release it next week.