Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [SOLVED] QSound via Jack (Qt5.0)
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] QSound via Jack (Qt5.0)

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 2.0k 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.
  • clogwogC Offline
    clogwogC Offline
    clogwog
    wrote on last edited by
    #1

    I am wondering if QSound can be configured to play via Jack on Linux ?

    Has anyone done this ? are there any examples out there that do more than call QSound::play(..) ?

    i noticed the documentation of QSound between "4.8":http://qt-project.org/doc/qt-4.8/qsound.html#details and "5.0":http://qt-project.org/doc/qt-5.0/qtmultimedia/qsound.html#details has changed as it has removed the platform <-> audio facilities table in the detailed description. Has this changed ? or hasn't the documentation been updated yet ?

    any help would be appreciated.
    thanks,
    tom

    1 Reply Last reply
    0
    • clogwogC Offline
      clogwogC Offline
      clogwog
      wrote on last edited by
      #2

      apparently not. i ended up reading the wav file myself using sndlib and then registering myself as a jack client and streaming the file in

      @JackAudio::instance().init("myname");
      JackAudio::instance().play("/media/helloworld.wav");@

      i tried to enter the whole code but the posts can not be larger than 6000 characters. if anyone would like the source just dm me and i'll send it across.

      please note that this only works with wav files that are sampled in the same speed as jack is running, but since i have control of the wav files, that wasn't a problem

      update

      http://clogwog.net/projects/jaqet.tar.gz

      it's a pretty simple implementation.. (just enough for it to work)
      you can play multiple wav files at the time (as many as MAXIMUM_CHANNELS
      simultaneously)

      it will create as many jack channels as MAXIMUM_CHANNELS
      with the name that you pass into the
      JackAudio::instance().init("myclient");

      i have only taken 2 channels for stereo for each channel

      myclient_0:outport_0
      myclient_0:outport_1

      myclient_1:outport_0
      myclient_1:outport_1

      ...

      myclient_[MAXIMUM_CHANNELS - 1]:outport_0
      myclient_[MAXIMUM_CHANNELS - 1]:outport_1

      1 Reply Last reply
      0
      • D Offline
        D Offline
        dbzhang800
        wrote on last edited by
        #3

        Hi, you can give a try to QtMultimedia module.

        http://qt-project.org/doc/qt-5.0/qtmultimedia/multimediaoverview.html

        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