Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. [SOLVED] IOS & AUDIO
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] IOS & AUDIO

Scheduled Pinned Locked Moved Mobile and Embedded
7 Posts 4 Posters 2.3k 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.
  • niqtN Offline
    niqtN Offline
    niqt
    wrote on last edited by
    #1

    Hi,
    my application don't play audio file with qml MediaPlayer.
    I have added in my .pro:
    @
    QT += quick qml gui core multimedia

    QTPLUGIN += qtaudio_coreaudio
    QTPLUGIN += qtmedia_audioengine
    QTPLUGIN += qavfcamera
    QTPLUGIN += qavfmediaplayer
    @

    Also, if I set as a source file does not exist, on the console I do not even no error message.

    @
    MediaPlayer {
    id: playMusic
    source: "qrc:/audiotest/notexist.wav"
    }
    @

    What I wrong?

    1 Reply Last reply
    0
    • M Offline
      M Offline
      MaxL
      wrote on last edited by
      #2

      Do you have your RESOURCES set in your .pro with your qrc files ?
      I see that there is an autoPlay to set to true if you want it to play . What exactly are you doing in your app ?

      "MediaPlayer":http://qt-project.org/doc/qt-5.0/qtmultimedia/qml-qtmultimedia5-mediaplayer.html#autoPlay-prop

      1 Reply Last reply
      0
      • niqtN Offline
        niqtN Offline
        niqt
        wrote on last edited by
        #3

        i have qrc in pro file and the play begin after a click.

        1 Reply Last reply
        0
        • M Offline
          M Offline
          MaxL
          wrote on last edited by
          #4

          Does it work when running on Mac ?

          1 Reply Last reply
          0
          • niqtN Offline
            niqtN Offline
            niqt
            wrote on last edited by
            #5

            I found a solution, to put together qml and audio file in the bundle.
            I created this wiki page "IOS sound & image":http://qt-project.org/wiki/IOS_SOUND__IMAGE

            Z 1 Reply Last reply
            0
            • M Offline
              M Offline
              m_andrej
              wrote on last edited by
              #6

              niqt: Your example project from Github doesn't work at all. It doesn't even start, because it can't find main.qml (it's included neither in *.pro file nor in resource file).

              1 Reply Last reply
              0
              • niqtN niqt

                I found a solution, to put together qml and audio file in the bundle.
                I created this wiki page "IOS sound & image":http://qt-project.org/wiki/IOS_SOUND__IMAGE

                Z Offline
                Z Offline
                zabaat
                wrote on last edited by
                #7

                @niqt
                Your github doesn't work and appears to be missing any code pertinent to your 'solution'?

                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