Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-35755

No QSound or QMediaPlayer in Qt 5.2 iOS

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 5.2.0 Alpha, 5.2.0 Beta1 , 5.2.0 RC1, 5.2.0
    • Multimedia
    • None
    • mac, ios, os x, qt 5.2, iOS 7.0.4, iPhone, iPad
    • iOS/tvOS/watchOS

    Description

      My .pro:
      QT += core gui multimedia
      greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
      TARGET = app-name
      TEMPLATE = app
      QTPLUGIN += qtaudio_coreaudio
      QTPLUGIN += qtmedia_audioengine
      QTPLUGIN += qavfcamera
      QTPLUGIN += qavfmediaplayer
      CONFIG += mobility

      I have this code:

      QSound *sound=new QSound(":/sounds/files/sounds/sound.wav");
      sound->play();

      It doesn't work with ressources, relative or absolute paths.

      I am on a Mac Book Pro Retina with OS X 10.9 / iOS Simulator, Qt 5.2.

      QMediaPlayer *player = new QMediaPlayer;
      player->setMedia(QUrl::fromLocalFile("sound.wav");
      player->setVolume(50);
      player->play();

      The same code works on android - QMediaPlayer works on Mac OS X 10.9 Mevericks, too.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            ylopes Yoann Lopes
            syfy323 Kevin Olbrich
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes