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. Is it possible to run QAudioOutput in a different thread than the main thread?

Is it possible to run QAudioOutput in a different thread than the main thread?

Scheduled Pinned Locked Moved Mobile and Embedded
1 Posts 1 Posters 2.7k Views
  • 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 Offline
    A Offline
    AndersG
    wrote on last edited by
    #1

    Hi,

    We are using QAudioOutput for playing sound in our application. When doing GUI modifications the sound flickers. So to solve this we want to move QAudioOutput to its own thread.

    But when doing this we get a segmentation fault when instantiating QAudioOutput it seems to occur somewhere inside the ALSA code. If we instantiate the QAudioOutput before moving it to the new thread we get the following assertion “control.c: 234: snd_ctl_card_info: Assertion `ctl && info' failed” form the ALSA library when calling QAudioOutput::Start().

    We are using Qt version 4.7.1 cross-compiled for an ARM cortex A8 platform.

    I have googled on the problem and found examples of moving QAudioOutput to a thread but also found people explaining that QAudioOutput needs to be running in the main application thread to work.

    So my question is, is it possible to run QAudioOutput in a QThread or not, and does anyone have a solution to this problem.

    Thanks,

    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