I plugged a USB microphone into TV to record external audio. In my .NET app (using Tizen .NET API in Visual Studio Professional 2022) I can detect it with AudioManager.GetConnectedDevices(). To record audio I set the privileges (microphone) and follow the instructions here:
Raw Audio Playback and Recording | Tizen Docs (Raw Audio Playback and Recording | Tizen Docs)
I tried both methods sync and asysnc:
Class AudioCapture (Class AudioCapture)
Class AsyncAudioCapture (Class AsyncAudioCapture)
I instantiate AudioCapture or AsyncAudioCapture objects and when I invoke the Prepare() method the app crashes without any exception or error message.
Simplified code snippet:
AudioCapture audioCapture = new AudioCapture(44100, AudioChannel.Mono, AudioSampleType.S16Le);
int bufferSize = audioCapture.GetBufferSize();
const int RecordingSec = 1;
bufferSize *= 10 * RecordingSec;
audioCapture.Prepare(); // THIS LINE CRASHES
byte[] buffer = audioCapture.Read(bufferSize);
The same result is on two different models (Tizen 6.0 and Tizen 6.5).
How can I record audio from microphone on Tizen TV? What am I missing?