Recording audio from Go on Ubuntu Phone?

49 views
Skip to first unread message

Steven Phillips

unread,
Jan 30, 2016, 5:33:41 AM1/30/16
to go-qml
At https://developer.ubuntu.com/api/apps/qml/sdk-15.04.1/QtMultimedia.audiooverview/ I see that creating an audio recording is possible from C++, but what about Go/go-qml?  If this is not presently supported, how much C++ code would I have to write to wrap this C++ API from Go?

EDIT: I now see the very helpful https://groups.google.com/forum/#!searchin/go-qml/QtMultimedia/go-qml/l_Wml1zbPg4/MCVcPLqelhQJ , which makes it clear that QtMultimedia functionality can be called from QML directly, but it's not clear to me that I can have as much control from QML as I may need, which would preferably be more like the level of control one can have from C++ (see code sample below).

So either being able to do the following from Go or QML would be fantastic.  Thanks!

audioRecorder = new QAudioRecorder;
QAudioEncoderSettings audioSettings;
audioSettings.setCodec("audio/amr");
audioSettings.setQuality(QMultimedia::HighQuality);
audioRecorder->setEncodingSettings(audioSettings);
audioRecorder->setOutputLocation(QUrl::fromLocalFile("test.amr"));
audioRecorder->record();
Reply all
Reply to author
Forward
0 new messages