Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Qt Academy Launch in California!

    MediaPlayer and sounds not in resource

    Qt on BlackBerry and QNX
    2
    10
    5326
    Loading More Posts
    • 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.
    • A
      AlterX last edited by

      Hello,
      I am trying to play a sound using relative path...to achieve this I am using DEPLOYMENTFOLDERS to copy files onto BB10 and then trying something like this:
      @
      MediaPlayer {
      source: "../sound/audio.wav"
      }
      @

      It doesn't work: it shows me:
      @
      "Failed to copy resource file to temporary file /accounts/1000/appdata/com.example.TestSoundBB.testDev_TestSoundBBce1d120c/tmp/qtmedia_{625ad0cf-9bb1-4c3e-a349-7989dbddaff1}.wav for playback"
      @

      I have to do something extra, maybe set directory in bar-descriptor.xml!?

      Qt Ambassador
      Real-time cooperative teams: http://www.softairrealfight.net
      Free Real-time network platform sdk: https://github.com/AlterX76/Solomon

      https://codereview.qt-project.org/...

      1 Reply Last reply Reply Quote 0
      • WindJunkie
        WindJunkie last edited by

        where this DEPLOYMENTFOLDERS does come from? It does not look something BB10 related... That is your QtDir::HomePath()? You have to make sure that all default path set right before using relative paths. Relative paths should also fit with the sandbox security model on BB10

        --
        Vladimir Minenko

        1 Reply Last reply Reply Quote 0
        • A
          AlterX last edited by

          DEPLOYMENTFOLDERS is a standard Qt way to deploy file to devices using it in pro file.
          I mean it worked with symbian, meego and right now with new Android Qt port.

          Qt Ambassador
          Real-time cooperative teams: http://www.softairrealfight.net
          Free Real-time network platform sdk: https://github.com/AlterX76/Solomon

          https://codereview.qt-project.org/...

          1 Reply Last reply Reply Quote 0
          • WindJunkie
            WindJunkie last edited by

            Ah, ok... No, this variable is not evaluated/used for BB10. You currently have to specify all assets in the bar descr file, those in the pro file will be ignored. Due to this, there will be no conflicts, you just need to update two places, if assets change. I will put this topic on the list though. There is an initiative to unify deployment across possibly all targets some time in the future.

            --
            Vladimir Minenko

            1 Reply Last reply Reply Quote 0
            • A
              AlterX last edited by

              That is importante to know behaviour on BB...so how Van I specify a dir of audios in bar-descriptor and then I can just sue relative path...could you provvide a little example ?

              Qt Ambassador
              Real-time cooperative teams: http://www.softairrealfight.net
              Free Real-time network platform sdk: https://github.com/AlterX76/Solomon

              https://codereview.qt-project.org/...

              1 Reply Last reply Reply Quote 0
              • WindJunkie
                WindJunkie last edited by

                Ok, I will add it to the section "Where do the app resources land on the device" in "this":http://qt-project.org/wiki/Deployment_on_BlackBerry article. In the next days. Working on other things right now... :-)

                --
                Vladimir Minenko

                1 Reply Last reply Reply Quote 0
                • A
                  AlterX last edited by

                  I have read how BB works with filesystem, however, it didn't work on my project.
                  First I have put audio in resource and tried with:
                  @
                  MediaPlayer {
                  id:movingSound
                  volume: 1.0
                  source: "qrc:///audio/move.wav"
                  }
                  @
                  No error, but no sound heard.

                  then, I have put it using bar-descriptor:
                  @
                  <asset path="%SRC_DIR%/audio">audio</asset>
                  @

                  and then used:
                  @
                  source: "../../audio/move.wav" (qml file was in qml/ProjectDir)
                  @
                  and I got same result: no error, but no sound heard.

                  So how can I get sound worked?

                  Qt Ambassador
                  Real-time cooperative teams: http://www.softairrealfight.net
                  Free Real-time network platform sdk: https://github.com/AlterX76/Solomon

                  https://codereview.qt-project.org/...

                  1 Reply Last reply Reply Quote 0
                  • WindJunkie
                    WindJunkie last edited by

                    Do other audio files work? Can you please open an issue on the Qt Bugreports for QtPorts:BB10 and attach this wav file? It is important to attach the file, since MediaPlayer generally does work on BB10, even though there are a few other issues around QtMultiedia to be fixed. Thanks!

                    --
                    Vladimir Minenko

                    1 Reply Last reply Reply Quote 0
                    • A
                      AlterX last edited by

                      Ok no problem

                      Qt Ambassador
                      Real-time cooperative teams: http://www.softairrealfight.net
                      Free Real-time network platform sdk: https://github.com/AlterX76/Solomon

                      https://codereview.qt-project.org/...

                      1 Reply Last reply Reply Quote 0
                      • A
                        AlterX last edited by

                        Vladimir, I have attached audio clip to this already opened bug:
                        "here":https://bugreports.qt-project.org/browse/QTBUG-37626

                        Qt Ambassador
                        Real-time cooperative teams: http://www.softairrealfight.net
                        Free Real-time network platform sdk: https://github.com/AlterX76/Solomon

                        https://codereview.qt-project.org/...

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post