Disable creating wav file when using QAudioRecorder

410 Views Asked by At

I am developing app witch may sample audio from microphone. I have used QAudioRecorder and QAudioProbe to sample. Everything works fine. But I have just realized the QAudioRecorder saves recorded audio to my documents. Maybe I should use QAudioInput instead. I will do it all again if I must. But, is there any way to disable creation of that audio file? I have my samples. I don't need them on my harddrive. Thank you for help.

1

There are 1 best solutions below

1
Mr. Developerdude On BEST ANSWER

Unfortunately, a storage location is inherent to QAudioRecorder, and you must use a lower-level way to "capture audio" without storing it to disk.

Here is a minimal example using QAudioInput: http://doc.qt.io/qt-5/qtmultimedia-multimedia-audioinput-example.html