I am trying to find the simplest way to get an audio file to play on an N8. I have tried several examples but none work.
The file exists in: c:\\Sound files\\Sound clips\\sound.mp3 and plays fine on the handset using the handset media player.
I have tried searching for a solution and have even tried the "CONFIG += mobility phononfix" option without any joy.
Thanks!
Here is the code:
Audio.pro
------------------------------------------------
QT += core gui multimedia
TARGET = Audio
TEMPLATE = app
SOURCES += main.cpp\
mainwindow.cpp
HEADERS += mainwindow.h
FORMS += mainwindow.ui
CONFIG += mobility
MOBILITY = multimedia
symbian
{
TARGET.UID3 = 0xecbb94d4
TARGET.CAPABILITY += UserEnvironment NetworkServices ReadUserData
TARGET.EPOCSTACKSIZE = 0x14000
TARGET.EPOCHEAPSIZE = 0x020000 0x800000
}
main.cpp
------------------------------------------------
#include <QtGui/QApplication>
#include "mainwindow.h"
#include <qmediaplayer.h>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MainWindow w;
QMediaPlayer *player;
player = new QMediaPlayer;
player->setMedia(QUrl::fromLocalFile("c:\\Sound files\\Sound clips\\sound.mp3"));
// player->setMedia(QUrl::fromLocalFile("c:\\Sound files\\Sound clips\\sound.wav")); >> doesnt work either
player->play();
w.showMaximized();
return a.exec();
}

layMyAudio()


