Wav audio select output and volume left/right

Just starting out? Need help? Post your questions and find answers here.
gregreen
User
User
Posts: 28
Joined: Fri Apr 21, 2023 7:26 pm

Wav audio select output and volume left/right

Post by gregreen »

I'm using an 8 channel Gigaport eX with installed ASIO drivers (Windows 11). I'm looking for the best way with Purebasic to select the audio output (there are 4 stereo to select from) AND set the pan or volume for left and right separately WHILE playing the wav file.

I've looked at the bass library and there is a lot there to absorb for my little brain and... I don't know if that would be the best solution.

I've been able to select the output and play a raw pcm file with sample code from github. But I really need to do it with a wav (or mp3) file and also be able to set volume for left/right independently. If anyone can point me in the right direction that would be awesome.
gregreen
User
User
Posts: 28
Joined: Fri Apr 21, 2023 7:26 pm

Re: Wav audio select output and volume left/right

Post by gregreen »

Ok, feeling a bit stupid... LoadMovie loads mp3 files fine and volume left/right is easily set using MovieAudio(0,volume,LRvolume) LRvolume= -100 to 100
duh.
However, I'm still sorting out how to select the channel output from which I have four to choose. When I figure that out I will post. Bones to Kirk: "...so easy a child could do it."
gregreen
User
User
Posts: 28
Joined: Fri Apr 21, 2023 7:26 pm

Re: Wav audio select output and volume left/right

Post by gregreen »

Can I do something like waveOutOpen_() to select an audio output channel for movie audio (which is just an mp3)?

I can get a list of available outputs, I just can't figure out how to set one prior to PlayMovie(0,WindowID(0))
Feeling stumped...
gregreen
User
User
Posts: 28
Joined: Fri Apr 21, 2023 7:26 pm

[SOLVED] Wav audio select output and volume left/right

Post by gregreen »

For the time being, I'm just running the command line program svcl.exe within my Purebasic app to set the default audio output. It's not ideal, but it's super simple and fast to get results.

Purebasic is my goto for quickly checking out ideas and the help on this forum is awesome. Thanks everyone!
Post Reply