Unsolved Support for multiple instances of QAudioOutput using multiple Qt threads
-
Is it possible to playback multiple audio streams (simultaneously) by instantiating multiple instances of QAudioOutput (each in their own Qt thread)?
The Qt documentation is not particularly clear in this regard.
-
Hi and welcome to devnet,
Do you want to play several files each on a different speaker ?
-
Hi SGaist - no real intention to play on different speakers, would ideally just like to play on one.
-
So mixing the content of different files ?
-
@SGaist I didn't want to interfere last night by intervening with a post, but a Mixer came to mind immediately. since that's an area of particular interest to me!
-
I guess I was looking for the simplest solution - I thought that by (say) having two instances of QAudioOutput that I could potentially playback two audio streams simultaneously and have the OS handle any mixing - thereby avoiding need for own mixing step. Would this be possible?
-
What OS do you have in mind ?
Note that running a small test case would likely have gotten you the answer sooner.
-
SGaist - this would be for Windows.
-
@Qwerty123 Sorry to butt in again. Get Audacity! Add your two Audio Files. Pan them Left&Right in the stereo field and Export. One file with both Audio Sources. Now you only need one instance of QAudioOutput. (Be careful with audio levels and unwanted frequencies like too much bass - less is more!)