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

QMediaPlayer don't play sound from QByteArray in macOS

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P2: Important
    • None
    • 5.9.2
    • Multimedia
    • None
    • macOS 10.12
    • macOS

    Description

      This is my code :

      QFile file("sound.mp3");
      file.open(QIODevice::ReadOnly);
      QByteArray arr = file.readAll();
      QMediaPlayer *player = new QMediaPlayer(this);
      QBuffer *buffer = new QBuffer(player);
      buffer->setData(arr);
      buffer->open(QIODevice::ReadOnly);
      player->setMedia(QMediaContent(),buffer);
      player->play();
      

      This code work in windows fine but in macOS sound don't play, i can just play sound from file in macOS

      Attachments

        Issue Links

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

          Activity

            People

              ylopes Yoann Lopes
              ARASHz4 Arash
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes