Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Highlighted
Super Contributor
Posts: 440
Registered: ‎01-13-2011
My Device: Playbook
My Carrier: NA
Accepted Solution

Audio Problem - AudioRecorder

I'm looking at the new audio stuff here:

 

https://developer.blackberry.com/cascades/documentation/design/audio_video/recording_audio.html

 

Using:

 

AudioRecorder recorder;

recorder.setOutputUri("/tmp/recording.m4a");

recorder.record();

 

But I get the error:

 

Description Resource Path Location Type
'class bb::multimedia::AudioRecorder' has no member named 'setOutputUri' app.cpp /AudioPlayground/src line 56 C/C++ Problem

 

Any ideas?

--------------------------------------------------------------------------------------------------
BlackBerry Apps: Instruments | ARTPAD | Piano | Drums | Xylophone
Super Contributor
Posts: 440
Registered: ‎01-13-2011
My Device: Playbook
My Carrier: NA

Re: Audio Problem - AudioRecorder

anyone?

--------------------------------------------------------------------------------------------------
BlackBerry Apps: Instruments | ARTPAD | Piano | Drums | Xylophone
Retired
Posts: 155
Registered: ‎07-16-2012
My Device: Dev Alpha
My Carrier: Bell

Re: Audio Problem - AudioRecorder

Hi JeffLemon,

 

did you set the permission onaccess_sharedfor Shared Files, on bar-descriptor.xml file?

 

Just double checking...

Super Contributor
Posts: 440
Registered: ‎01-13-2011
My Device: Playbook
My Carrier: NA

Re: Audio Problem - AudioRecorder

Hi,

 

Yes, the correct permisisons are set.

--------------------------------------------------------------------------------------------------
BlackBerry Apps: Instruments | ARTPAD | Piano | Drums | Xylophone
Super Contributor
Posts: 440
Registered: ‎01-13-2011
My Device: Playbook
My Carrier: NA

Re: Audio Problem - AudioRecorder

Anyone?

--------------------------------------------------------------------------------------------------
BlackBerry Apps: Instruments | ARTPAD | Piano | Drums | Xylophone
Developer
Posts: 671
Registered: ‎03-21-2012
My Device: BlackBerry PlayBook 16GB
My Carrier: Vip
Super Contributor
Posts: 440
Registered: ‎01-13-2011
My Device: Playbook
My Carrier: NA

Re: Audio Problem - AudioRecorder

[ Edited ]

I've already taken a look at those, neither solves the problem.

 

The dictaphone uses QML for the audio recorder, I want to know how to do it in C++ and the blackberry docs are compltley wrong.

 

Can someone please tell me how to do this, about to give up blackberry dev altogether.

 

 

--------------------------------------------------------------------------------------------------
BlackBerry Apps: Instruments | ARTPAD | Piano | Drums | Xylophone
Developer
Posts: 671
Registered: ‎03-21-2012
My Device: BlackBerry PlayBook 16GB
My Carrier: Vip

Re: Audio Problem - AudioRecorder

Correct function is recorder.setOutputUrl("/tmp/recording.m4a");

URL not URi
Super Contributor
Posts: 440
Registered: ‎01-13-2011
My Device: Playbook
My Carrier: NA

Re: Audio Problem - AudioRecorder

URL gives an error:

 

error: no matching function for call to 'bb::multimedia::AudioRecorder::setOutputUrl(const char [19])'

--------------------------------------------------------------------------------------------------
BlackBerry Apps: Instruments | ARTPAD | Piano | Drums | Xylophone
Developer
Posts: 671
Registered: ‎03-21-2012
My Device: BlackBerry PlayBook 16GB
My Carrier: Vip

Re: Audio Problem - AudioRecorder

Passing const QUrl also fails

C:\ndk-10.0.9-workspace\sxs\arm/../src/Sxs.cpp:22: undefined reference to `bb::multimedia::AudioRecorder::AudioRecorder(QObject*)'
C:\ndk-10.0.9-workspace\sxs\arm/../src/Sxs.cpp:24: undefined reference to `bb::multimedia::AudioRecorder:Smiley Tonguerepare()'
C:\ndk-10.0.9-workspace\sxs\arm/../src/Sxs.cpp:25: undefined reference to `bb::multimedia::AudioRecorder::setOutputUrl(QUrl const&)'
C:\ndk-10.0.9-workspace\sxs\arm/../src/Sxs.cpp:26: undefined reference to `bb::multimedia::AudioRecorder::record()'
C:\ndk-10.0.9-workspace\sxs\arm/../src/Sxs.cpp:26: undefined reference to `bb::multimedia::AudioRecorder::~AudioRecorder()'
C:\ndk-10.0.9-workspace\sxs\arm/../src/Sxs.cpp:26: undefined reference to `bb::multimedia::AudioRecorder::~AudioRecorder()'
cc: C:/bbndk-10.0.9/host_10_0_9_52/win32/x86/usr/bin/ntoarm-ld caught signal 1
make[2]: Leaving directory `C:/ndk-10.0.9-workspace/sxs/arm'
make[2]: *** [o.le-v7-g/sxs] Error 1
make[1]: Leaving directory `C:/ndk-10.0.9-workspace/sxs/arm'
make[1]: *** [debug] Error 2
make: *** [Device-Debug] Error 2

**** Build Finished ****


WTF is wrong ?