![]() |
How to play an mp3 sound?
Well I just want to play an mp3 sound. Simple as that. So I read in the documentation how to do it. I wrote the following code..
QAudioDeviceInfo info(QAudioDeviceInfo::defaultOutputDevice()); qDebug() << "Device name" << info.deviceName() << endl; But when I run it to my N900 nothing is printed on the screen!!! Can somebody help me with this? |
Re: How to play an mp3 sound?
|
Re: How to play an mp3 sound?
As I see the developer of the example issues tha command defaultOutputDevice too. Like me. But (in my case) this returns null!!! I have just compiled my code using qt creator and adding MOBILITY += multimedia to the .pro file. When I run it using Simulator then defaultOutputDevice returns something. The same for availableCodecs and so. But when I run the maemo target using my N900 I get nothing....
|
Re: How to play an mp3 sound?
Maybe you should try phonon.
|
Re: How to play an mp3 sound?
can mafw help?
|
Re: How to play an mp3 sound?
Quote:
For example, here's the startRingtone method Ive written for mFakeCaller: Code:
Ive also created project files to help someone before on another thread. Simply replace the animal sound files with a mp3 file :D http://i90.photobucket.com/albums/k2...016-165636.png (Edit: bah looking at that thread again, 42 people downloaded that project and not one person thanked me for making it.. bleeeeeeh :rolleyes: ) |
Re: How to play an mp3 sound?
Thans Kojacker. I will check this out.
|
Re: How to play an mp3 sound?
Κojacker one more question. Why your wav files are not in the qrc files? I try to play some mp3 files which I have added to qrc but they don't play...
|
Re: How to play an mp3 sound?
Quote:
|
Re: How to play an mp3 sound?
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!! ?? |
All times are GMT. The time now is 19:16. |
vBulletin® Version 3.8.8