Page 1 of 1

A question about audio output

Posted: Sun Jul 17, 2022 6:51 pm
by tft
Hallo

My computer has 6 audio jacks. I would like to use one of them as an additional headphone output to play a separate audio track. Anyone an idea. It's still about the anime project.

THX TFT

Re: A question about audio output

Posted: Sun Jul 17, 2022 9:34 pm
by infratec
From which OS are you talking :?: :?: :?:
Or do you need solutions for all OSs?

Re: A question about audio output

Posted: Mon Jul 18, 2022 6:18 am
by tft
Windows 10 PC

Re: A question about audio output

Posted: Mon Jul 18, 2022 6:59 am
by AndyMK
You can use the Portaudio library

Re: A question about audio output

Posted: Sat Sep 07, 2024 2:04 am
by gregreen
I've been looking at portaudio and the purebasic code I've been able to find does load the .dll and the c library and reports the ASIO audio channels (I have an 8 channel Gigaport Ex.

What I can't figure out is how to play a wav or mp3 file out a specific channel. The code reports pointer errors and things related to memory. I'm using Windows 11. I've stared at everything and I have no clue. It would be wonderful if someone would post a purebasic example file that works. The Gigaport Ex is an awesome 8 channel USB soundcard with ASIO drivers that is fantastic. I'm motivated to investigate a way to utilize it with purebasic but so far am lost in the weeds trying to sort it out.

If one of the genius' here would comment more than "...use the Portaudio library" that would be totally awesome and worth a measure of support/Patreon donation... Thanks in advance! Love purebasic!

Re: A question about audio output

Posted: Sat Sep 07, 2024 7:34 am
by morosh
Not sure if I've understand you correctly, but if you mean to select a particular device, have a look at: viewtopic.php?t=79723

HTH

Re: A question about audio output

Posted: Sat Sep 07, 2024 6:47 pm
by gregreen
I saw that but wasn't able to make anything work, except for running the program svcl.exe to switch the default output. That works, but it feels a bit hacky. Let's say I had 4 stereo wav files I wanted to play simultaneously out four different sound devices. So far, that seems above my paygrade, and while I can think of a very "hacky" way to do it with svcl.exe I'm not keen to invest the time coding that. (I might though, for proof of concept)

It would be very cool to be able to just:
Loadmovie(0, moviename$)
PlayMovie(0, WindowID(0), audioOutputDeviceName$)

Dolby Atmos is a thing that's coming on the consumer side, so this type of add on could be useful.

I love how Purebasic lets me quickly try out ideas with the help of some awesome folks here on the forum.