Object similar to phonon to play sound
-
[quote author="Bomb3rman" date="1358446965"]Did you already look into QtMultimediaKit (Qt4) or QtMultimedia(qt5)?[/quote]
I've tried MediaPlayer (bb) and QMediaPlayer in cpp files without success; SoundEffect doesn't fit the ability to play sounds using queue.
-
I mean, I'm trying to use QMediaPlayer or MediaPlayer (bb) in cpp backend but I'm not able to hear something.
I've tried with "/qml/file.wav", ":/sounds/file.wav" and "qrc:/sounds/file.wav".
SoundEffect on qml side, as I've told, works, but it causes to mix sounds if there are two or more clips...
I'm really stuck on this, I've just completed the app except this issue and so I cannot release the game
:( -
Have you looked at the Media Player documentation?
https://developer.blackberry.com/cascades/reference/multimedia_mediaplayer.html
And I think, this is what you are looking for:
https://developer.blackberry.com/cascades/reference/bb__multimedia__mediaplayer.html#setsourceurl
Its just not telling you, what kind of playlist it expects. There is no addTrack or something.
But there seems to be a Playback Completed Signal, which could solve your problem, you'll just have to emulate the Playlist outside.
Which should not be to hard, a list of the songs to play, and an iterator/index should do. -
I ba e looked at all of that: cascades mediaplayer,qmediaplayer...i ha e tried to play mp3 and wav, using path or resources. No one is able to reproduce sounds! I am using my own qml thru js that call my internal qml object (using cpp and qmlregistertype). Moreover i ha e tried to use bb mediaplayer directly in the main file without sound as well