QAudioRecorder [Sailfish OS]
-
Hello,
I'm new with C++ and I'm still learning it. I was thinking what would be a good exercise which isn't too hard but provides much information for me -- and I ended up with using QAudioRecorder.
I'm able to record sound with it but for some reason it doesn't make a difference at all which QAudioEncoderSettings I use - the sound quality is still the same. And that's not the only problem ...
The recorded .wav file which can be played with, for example, VLC player but not with Windows Media Player. Also the websites which can play audio files doesn't recognize this as an audio. Why? I also checked the audio details of it and it says the bit rate is 0 and it has no length at all.
And one final question is that on qt-project.org the "QAudioRecorder example project" [http://qt-project.org/doc/qt-5.1/qtmultimedia/audiorecorder.html] uses the following function to list supported sample rates but for some reason I can not get it working - no matter what audio codecs I'll try -- though I'm not even sure does it matter, but still ...
Here are the links for the source:
untitled.cpp: https://www.dropbox.com/s/rljimkyokjdzn93/untitled.cpp
record.h: https://www.dropbox.com/s/42snsqp3c2hfkjn/record.h
record.cpp: https://www.dropbox.com/s/0qhqlzonskjbd8b/record.cppAnd I'm not looking for an answer that I can just copy. But I assume just a short description wouldn't be enough because I'm completely new with C++.
Much appreciated, folks! :)
Sincerely,
Heikki Kullas