In MAC Send/Write audio data on partcular output channel of audio device
-
I want to know that in MAC using QT audio APIs like QAudioSource, QaudioSink and QAudioDevice we can detect device, we can know mx output channels also but how can we know those output channel names
And main question is if you want to stream audio on particular output channel then how you can do it.
For e.g. if you are using dante virtual soundcard then in windows if it's WDM mode then you OS will detect all WDM stereo channels as seperate WDM device itself so you can select that particular channel and send audio data.
But in MAC your OS will just detect the device name and let's say you want to send audio data on particularly 6th channel of dante virtual souncard so how can i do it using QT audio APIs or i will have to use coreAudio API itself.
For routing i kno i can use Dante controller all m trying to know how to send/ write data on particular output channel of output device in MAC. -
Hi and welcome to devnet,
Until Qt 6.5, Qt uses the system API so if it does not show one device per channel on your system Qt won't be able to access them.
Since Qt 6.5, there is an ffmpeg backend, it might be able to provide more support for your use case.
-
@SGaist Hi, I guess in Qt it's hard to stream audio on particular channel in MAC.
Now i am thinking to either use coreAudio API itself or for windows ASIO i use portaudio library so imight use same here.
Though initially i wanted to try with QT audio APIs itself as it would be very easy. -
Which version of Qt are you using ?
I remember writing a cross platform PortAudio based QIODevice that I used as output for Qt Multimedia in Qt 5. -
@SGaist I am using Qt 6.4. In Qt 6+ multimedia APIs have changed but i think functionality is kinda same. In windows WDM mode it's easy with Qt audio API, for ASIO I use portaudio.
Now again for MAC, QT audio APIs i think will able to detect the device and give me total no. of channels but problem is if i want to stream on particular channel then i don't think Qt audio APIs can handle it. There are channelCount and ChannelConifg functions are there in QAudioFormat but i don't think i can still reach to specific channel. -
Actually i thought maximumChannelCount function in QAudioDevice (QAudioDeviceInfo in Qt 5.15 or Qt <6) will able to give me channels but it's not the case it's just giving supported channels. And on mac i don't know why i am getting "audio device has unknown channel 'some no.' " with Qt audio APIs and this error will come acc to whatever device channel i am selecting. For e.g i f i am selecting 8*8 channel then "audio device has unknown channel 'some no.' " error will come 8 times.
-
I think you have a use case that shows the limit of the current implementation.
You should open a bug report to explain your situation and issue.