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
Super Contributor
Posts: 440
Registered: ‎01-13-2011
My Device: Playbook
My Carrier: NA

Re: Audio Problem - AudioRecorder

[ Edited ]

No idea and it's really hampering my BB10 development.

--------------------------------------------------------------------------------------------------
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

Solution found, reading the docs really helps. Just add lbbmultimedia library. Right click on project, configure > add library and follow the steps
Super Contributor
Posts: 440
Registered: ‎01-13-2011
My Device: Playbook
My Carrier: NA

Re: Audio Problem - AudioRecorder

Still not working for me.

 

I added the llbmultimedia library and a cheat sheet came up saying:

 

The LIBS property should be updated for each configuration scope (e.g. device, simulator) using the -l option to list specific libraries used.
LIBS += -lbbmultimedia

 

Was not sure what to do with this, any ideas?

--------------------------------------------------------------------------------------------------
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

Copy that into your projects .pro file
Super Contributor
Posts: 440
Registered: ‎01-13-2011
My Device: Playbook
My Carrier: NA

Re: Audio Problem - AudioRecorder

I've put it in both device and simulator but it's still not working, is it in the right place?

 

TEMPLATE = app
TARGET = AudioPlayground

CONFIG += qt warn_on debug_and_release cascades

INCLUDEPATH += ../src
SOURCES += ../src/*.cpp
HEADERS += ../src/*.hpp ../src/*.h

lupdate_inclusion {
    SOURCES += ../assets/*.qml
}

device {
	CONFIG(release, debug|release) {
		DESTDIR = o.le-v7
		LIBS += -lbbmultimedia
	}
	CONFIG(debug, debug|release) {
		DESTDIR = o.le-v7-g
		LIBS += -lbbmultimedia
	}
}

simulator {
	CONFIG(release, debug|release) {
		DESTDIR = o
		LIBS += -lbbmultimedia
	}
	CONFIG(debug, debug|release) {
		DESTDIR = o-g
		LIBS += -lbbmultimedia
	}
}

OBJECTS_DIR = $${DESTDIR}/.obj
MOC_DIR = $${DESTDIR}/.moc
RCC_DIR = $${DESTDIR}/.rcc
UI_DIR = $${DESTDIR}/.ui

suredelete.target = sureclean
suredelete.commands = $(DEL_FILE) $${MOC_DIR}/*; $(DEL_FILE) $${RCC_DIR}/*; $(DEL_FILE) $${UI_DIR}/*
suredelete.depends = distclean

QMAKE_EXTRA_TARGETS += suredelete

TRANSLATIONS = \
    $${TARGET}_en_GB.ts \
    $${TARGET}_fr.ts \
    $${TARGET}_it.ts \    
    $${TARGET}_de.ts \
    $${TARGET}_es.ts \
    $${TARGET}.ts

 

--------------------------------------------------------------------------------------------------
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

[ Edited ]

No no, put it after/under(in new row)CONFIG

 

TEMPLATE = app
TARGET = sxs

CONFIG += qt warn_on debug_and_release cascades 

LIBS += -lbbmultimedia -lasound

INCLUDEPATH += ../src
SOURCES += ../src/*.cpp
HEADERS += ../src/*.hpp ../src/*.h
.
.
.
.
.
.

 

 

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

Re: Audio Problem - AudioRecorder

Done and still the error:

 

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

 

I've cleaned the project too.

--------------------------------------------------------------------------------------------------
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

I forgot, use QUrl("/tmp/trcorfin.m4a") as a parameter to the function. I never understood why they use const char* in places where QUrl is required
Super Contributor
Posts: 440
Registered: ‎01-13-2011
My Device: Playbook
My Carrier: NA

Re: Audio Problem - AudioRecorder

Great, it builds now. I still can't test though as I can't update my device to the latest os (as I'm on a Mac).

 

Thanks for all your help, it's much appreciated.

--------------------------------------------------------------------------------------------------
BlackBerry Apps: Instruments | ARTPAD | Piano | Drums | Xylophone