Can not play wav file on ios
-
I have an adio recorder to record wav files on iOS. This works very well!
With it I have generated an output file:/private/var/mobile/Containers/Data/Application/very-very-very-long-number/tmp/projectname.tmp.wav
I have downloaded this file with xcode and played this file with Quick Time Player.
Everything is ok and works very fine!Now I try desperate to play this file with a player, but everything I do, it does not work.
For Example with qml:MediaPlayer { id: playMusic source: "/private/var/mobile/Containers/Data/Application/very-very-very-long-number/tmp/projectname.tmp.wav" volume: 70 onError: { console.log(error) } }
Or with C++
QMediaPlayer player(this); player.setVolume(70); QMediaContent content(QUrl::fromLocalFile(fileName)); player.setMedia(content); player.play();
And some others more...
Nothing do work!
The sound is there and it works! The Quick Time Player plays it. But my players do not work.Do you know an realy working example?
I guess anything is wrong with the path. But I'm not sure.Thanks for help!
edit: The wav file I can open for reading with QFile::open... This works also!
-
Hi peter-70,
First, for the QML part, volume attribute must take a value between 0.0 and 1.0 according to my console.
Speaking of the console, do you get any warning message? For instance I gotdefaultServiceProvider::requestService(): no service found for - "org.qt-project.qt.mediaplayer"
Which is probably a missing plugin or something.
It would help to search on the Internet these console messages, to see if there is any topic already solved on any forum.Now, if you have no sound AND no messages, then I regret I won't be able to help you any further.