Jump to content
Tim111888

PlaySound to a specific device?

Recommended Posts

Tim111888

Hello Guys, need your help.

I want to play short warning-sounds to a specific not default device.  Unfortunately SoundPlay() outputs sound to default device only. I imagine it could be possible to specify output devices via bass.dll functions or some other dll calls. I just need an example.

---------------------------------

example:

example_SoundPlay("example.mp3", "output = virtual cable line 1")

---------------------------------

Thank You

Share this post


Link to post
Share on other sites
BetaLeaf

Would changing the Default Device before using SoundPlay() be out of the question? I use NirCMD to change the default device all the time because I use multiple headsets on my pc. You could always change the default device back after the sound is played. Unfortunately I do not know how to play audio on non-default devices. 

  • Like 1

False Positive Reporter - Mass email all anti virus vendors with an attachment of your program for fast and easy whitelisting.

My GitHub Page: https://github.com/BetaLeaf

Share this post


Link to post
Share on other sites
Tim111888

Yo Guys, I have found a solution.  DirectSound UDF by eukalyptus.

EZ PZ

  • Like 1

Share this post


Link to post
Share on other sites
BetaLeaf

Fantastic. I'll be looking into this myself. Thanks for letting me know!

DirectSound UDF

Edited by BetaLeaf
Added link to UDF

False Positive Reporter - Mass email all anti virus vendors with an attachment of your program for fast and easy whitelisting.

My GitHub Page: https://github.com/BetaLeaf

Share this post


Link to post
Share on other sites
Seminko
On 5. 3. 2016 at 9:56 PM, Tim111888 said:

Yo Guys, I have found a solution.  DirectSound UDF by eukalyptus.

EZ PZ

Care to ellaborate?

Share this post


Link to post
Share on other sites
Seminko
42 minutes ago, Jos said:

don't hold your breath. ;)

I don't, but it's worth a try. :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×