|
2011-02-05
, 14:08
|
Posts: 435 |
Thanked: 769 times |
Joined on Apr 2010
|
#12
|
mediaObject->setCurrentSource(Phonon::MediaSource(":new/images/images/cow.mp3"))
it doesn't work
The Following User Says Thank You to gionni88 For This Useful Post: | ||
|
2011-02-05
, 14:18
|
|
Posts: 402 |
Thanked: 451 times |
Joined on Dec 2007
@ India
|
#13
|
No. I found no errors. If I use this line
mediaObject->setCurrentSource(Phonon::MediaSource(":new/images/images/cow.mp3"))
it doesn't work
if I use this
mediaObject->setCurrentSource(Phonon::MediaSource("/home/grizos/NokiaQtSDK/Projects/Babytoy/music/cow.mp3"));
It works ok.!!!!
Very strange!! ??
|
2011-02-05
, 15:02
|
|
Posts: 63 |
Thanked: 12 times |
Joined on Feb 2010
@ Thessaloniki Greece
|
#14
|
QFile *file = new QFile(":new/images/music/cow.mp3"); mediaObject->setCurrentSource(Phonon::MediaSource(file));
MediaSource::Stream not yet handled
|
2011-08-07
, 22:13
|
Posts: 7 |
Thanked: 3 times |
Joined on Jul 2010
|
#16
|
//QString url; url = ":/new/prefix1/a.mp3"; //Phonon::MediaObject *music; music = Phonon::createPlayer(Phonon::MusicCategory, Phonon::MediaSource(url)); //file exists, therefore exists is returned to the console if(QFile::exists(url)) qDebug("exists"); else qDebug("doesn't"); //works if user selects the file: url = QFileDialog::getOpenFileName(this, tr("Select Music Files"), QDesktopServices::storageLocation(QDesktopServices::MusicLocation)); music->setCurrentSource(url); music->play(); //no error is being outputed qDebug(music->errorString().toAscii());
mediaObject->setCurrentSource(Phonon::MediaSource("qrc:/new/images/images/cow.mp3"))
is that path structure 'new/images/images/..' set up ok within your qrc?
Follow me on my neglected twitter @kojacker
Cybot950 - Control a robot with your N9/N950
SMSPetFeeder - Build a Bluetooth/SMS dog feeder with Qt, N950, and arduino
Nerf950 - Use your N9/N950 to fire a Nerf gun