Details
-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
5.2.0 Alpha, 5.2.0 Beta1 , 5.2.0 RC1, 5.2.0
-
None
-
mac, ios, os x, qt 5.2, iOS 7.0.4, iPhone, iPad
Description
My .pro:
QT += core gui multimedia
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = app-name
TEMPLATE = app
QTPLUGIN += qtaudio_coreaudio
QTPLUGIN += qtmedia_audioengine
QTPLUGIN += qavfcamera
QTPLUGIN += qavfmediaplayer
CONFIG += mobility
I have this code:
QSound *sound=new QSound(":/sounds/files/sounds/sound.wav");
sound->play();
It doesn't work with ressources, relative or absolute paths.
I am on a Mac Book Pro Retina with OS X 10.9 / iOS Simulator, Qt 5.2.
QMediaPlayer *player = new QMediaPlayer;
player->setMedia(QUrl::fromLocalFile("sound.wav");
player->setVolume(50);
player->play();
The same code works on android - QMediaPlayer works on Mac OS X 10.9 Mevericks, too.