12-07-2012 05:49 AM
Hi ,
Ihave include header file
#include <bb/multimedia/MediaPlayer>
and namespace
using namespace bb::multimedia;
then I tried to initialize MediaPlayer as given in this API link
https://developer.blackberry.com/cascades/referenc
MediaPlayer mp(this);
The I tried to build the application. It is giving error
undefined reference to `bb::multimedia::MediaPlayer::MediaPlayer(QObject*
Then I tried as
MediaPlayer mp(QObject *parent=0);
in this time it didn't give error but after I tried to add source url
mp.setSourceUrl(QUrl("asset:///media.mp3"));
then I tried to build aging now it is giving error
request for member 'setSourceUrl' in 'mp', which is of non-class type 'bb::multimedia::MediaPlayer(QObject)'
Do I need to follow any ohter steps to use MediaPlayer?
Thanks,
Jagan
12-07-2012 02:58 PM - edited 12-07-2012 03:00 PM
using namespace bb::multimedia;
MediaPlayer m_Player(this);
m_Player.setSourceUrl(QString("asset:///sounds/").arg("test.wav"));
m_Player.prepare();
m_Player.play();
but the audio file attached has a problem on beta 4
12-07-2012 06:26 PM
01-17-2013 02:11 PM
I have the same problem. How to fix this please?