Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. QResource, Audio and SoundEffect problems
Forum Updated to NodeBB v4.3 + New Features

QResource, Audio and SoundEffect problems

Scheduled Pinned Locked Moved QML and Qt Quick
5 Posts 3 Posters 3.5k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    pekalicious
    wrote on last edited by
    #1

    Hi everyone,

    I've spent a whole week trying to figure out what exactly works and what doesn't in regards to audio and symbian and still nothing. I started with Phonon, writing a C++ music player and then found the QtMultimediaKit. I now use a loader and the audio element.

    Music worked fine but SoundEffect didn't. For more details have a look over here: http://stackoverflow.com/questions/8440600/qml-soundeffect-not-working-audio-does

    "Oh well", I said, "let's go with music only". I then moved all my QML, txt and audio files to a qrc, only to find out that now even music doesn't work. Whenever an audio is about to play, I get this:

    qrc file :/audio/menu.ogg
    Size 353349
    Sequential 0

    If I try to play the music from my filesystem, as in, "file://path/to/audio.mp3", it works fine. But when I try to load it from qrc, it doesn't.

    Any suggestions?

    My setup is Windows 7, QtSDK 7.4.7, Symbian 1.1.

    Thank you in advance!

    1 Reply Last reply
    0
    • D Offline
      D Offline
      danimo
      wrote on last edited by
      #2

      Audio will not work with embedded resources. The reason being that Qt will invoke the local audio system which does not know about resource paths. You will need to put the files into the file system.

      1 Reply Last reply
      0
      • P Offline
        P Offline
        pekalicious
        wrote on last edited by
        #3

        I see.. I used the local filesystem instead but SoundEffect still wasn't working. I worked around this by using Audio element for my background music (with fade in/out effects) and Phonon for the sound effects.

        Thank you for verifying this.

        1 Reply Last reply
        0
        • G Offline
          G Offline
          grego
          wrote on last edited by
          #4

          One thing that jumped out to me from your code is that by default Symbian does not support ogg.
          But, I don't have SoundEffect working either on Symbian, still testing...

          Grego - http://mpaja.com/

          1 Reply Last reply
          0
          • P Offline
            P Offline
            pekalicious
            wrote on last edited by
            #5

            I hope that that is not true because I already sent my game for review with ogg files :/

            It worked with the Audio element when testing on the simulator and I think it says in the documentation that ogg is supported.

            Oh well, worst case scenario, I'll fail the review, change the files to mp3 and resubmit.

            Thanks for the tip.

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved