Results 1 to 11 of 11

Thread: Asynchronously playing a sound (.wav) on windows mobile

  1. #1
    Join Date
    Mar 2007
    Posts
    57
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Asynchronously playing a sound (.wav) on windows mobile

    Hey guys,

    I've been trying to play a sound with Qt/Embedded on windows mobile.

    First, I tried the QSound:lay thingie, but that didn't work. It seems the thread that's created by QSound is immediately destroyed after it's created, so you hear nothing.

    Then I tried to compile Qt with phonon support. The app compiled great, but when running there's a message that it couldn't load the phonon backend. Is there even a backend for windows mobile?

    I'm just looking for a way to play a wav file on windows mobile, that shouldn't be too hard now should it?

    Thanks for any tips!

  2. #2
    Join Date
    Mar 2007
    Posts
    57
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Asynchronously playing a sound (.wav) on windows mobile

    Okay, it seems the windows mobile 6.0 SDK function PlaySound shows the exact same behaviour...

    I'm really lost here, it shouldn't be hard to play a simple sound on a mobile phone now should it?

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Asynchronously playing a sound (.wav) on windows mobile

    Did you (try to) compile the backend itself?

  4. #4
    Join Date
    Mar 2007
    Posts
    57
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Asynchronously playing a sound (.wav) on windows mobile

    I just compiled the waveout plugin, but I keep getting

    WARNING: bool __cdecl Phonon::FactoryPrivate::createBackend(void) phonon backend plugin could not be loaded
    Don't know if I did all the compile stuff correctly, but it gave me no errors. Do I need to link to the plugin or perhaps put it somewhere on the mobile device

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Asynchronously playing a sound (.wav) on windows mobile

    It probably has to be on the device in a plugins/phonon_backend subdirectory of your QtExtended installation.

  6. #6
    Join Date
    Mar 2007
    Posts
    57
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Asynchronously playing a sound (.wav) on windows mobile

    There is no QtExtended installation on my device :P I'm just putting up the executable and the required libs...

    I'll try to put up the backend thingie in a bit though, I'll let you know.

  7. #7
    Join Date
    Mar 2007
    Posts
    57
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Asynchronously playing a sound (.wav) on windows mobile

    Okaaaay. Or not, actually.

    Compiling src/plugins/phonon/waveout results in 3 .obj files. I've put these in my executable directory with no improvement.

    Is there no other (simpler?) way to just play a sound file on windows mobile?

  8. #8
    Join Date
    Mar 2007
    Posts
    57
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Asynchronously playing a sound (.wav) on windows mobile

    Woohoo, I got QSound to work

    Seems like I was specifying the wrong filename but QSound didn't return an error anyway

    Unfortunately the current sound is stopped when a new one starts (there's no mixing), so I guess I'll have to look into the windows mobile sdk functions anyway

  9. #9
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Asynchronously playing a sound (.wav) on windows mobile

    Quote Originally Posted by TMan View Post
    There is no QtExtended installation on my device :P I'm just putting up the executable and the required libs...
    But you put it somewhere and not anywhere. That's called installing

    Quote Originally Posted by TMan View Post
    Okaaaay. Or not, actually.

    Compiling src/plugins/phonon/waveout results in 3 .obj files. I've put these in my executable directory with no improvement.
    Why not do it the proper way?

    Is there no other (simpler?) way to just play a sound file on windows mobile?
    Sure there is. Build the whole package properly according to instructions.

    Unfortunately the current sound is stopped when a new one starts (there's no mixing), so I guess I'll have to look into the windows mobile sdk functions anyway
    Or you can use Phonon

  10. #10
    Join Date
    Mar 2007
    Posts
    57
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Asynchronously playing a sound (.wav) on windows mobile

    Quote Originally Posted by wysota View Post
    Sure there is. Build the whole package properly according to instructions.
    I did, trust me.
    configure -phonon -phonon-backend -xplatform blabla
    I guess there is no phonon support for windows mobile yet, as this post seems to indicate: http://labs.trolltech.com/blogs/2008...on-windows-ce/

    Anyhow, I'm now using the WaveOut API, for which I found a simple example class that does exactly what I want so far, so problem solved for now. It would be nicer to use the Qt stuff though.

  11. #11
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Asynchronously playing a sound (.wav) on windows mobile

    Quote Originally Posted by TMan View Post
    I did, trust me.
    Then you should have received something more than three intermediate files. If they are intermediate, there also has to be something final, right?

    Anyhow, I'm now using the WaveOut API, for which I found a simple example class that does exactly what I want so far, so problem solved for now. It would be nicer to use the Qt stuff though.
    WinCE support is quite young so it is possible there are some features missing. If you want Phonon support, try the Qt snapshots.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.