I need to record audio using custom actions, because the bitrate, samplerate and codec need to be different than the built-in ones.
I tried starting the recordin in one custom action, and stopping it in another. But that reported that the recorder wasn't recording, when I tried stopping it. I verified this by listening to the audio, and it just had stopped recording by itself (I'm guessing it stops as soon as the custom action goes out of scope).
I then tried making 3 custom actions:
1: initializeGlobalRecorderCustomAction
This one, I added to the Initial Actions of main.dart, to make the audio recorder variable be alive throughout the app's lifetime...
2: startRecordingCustomAction
3: stopRecordingCustomAction
But it seems that including this global variable through main.dart "Initial Actions" doesn't make the variable known to my other custom functions...
Bonus question, can I avoid making custom action by being able to specify the type of audio that I want to record (rate, depth, codec, etc.)?