471,620 Members | 1,330 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,620 software developers and data experts.

playing wave files on specific Audio device ?

Hi

I can play a wave file through a p/invoke to winmm , but how can i play a
wave file to a specific audio device if i have more then one audio device in
my pc ?
Johan
Nov 17 '05 #1
2 7592
You will have to use the waveOutXXX functions from Win32. Follow this link
for a short tutorial on how to play wave sounds through those functions:

http://www.planet-source-code.com/vb...=4422&lngWId=3

Also if you search MSDN there are waveOutXXX functions that will allow you
to enumerate output devices and select them.

http://msdn.microsoft.com/library/de...aveoutopen.asp

Alex

"Sagaert Johan" <RE*************@hotmail.com> wrote in message
news:uD**************@TK2MSFTNGP14.phx.gbl...
Hi

I can play a wave file through a p/invoke to winmm , but how can i play a
wave file to a specific audio device if i have more then one audio device
in
my pc ?
Johan

Nov 17 '05 #2
Thanks , that worked ,
i will put it in a dll for easy reuse.

"Alex Passos" <bz@netmerlin.nospam.com> wrote in message
news:OU**************@tk2msftngp13.phx.gbl...
You will have to use the waveOutXXX functions from Win32. Follow this link for a short tutorial on how to play wave sounds through those functions:

http://www.planet-source-code.com/vb...=4422&lngWId=3
Also if you search MSDN there are waveOutXXX functions that will allow you
to enumerate output devices and select them.

http://msdn.microsoft.com/library/de...aveoutopen.asp
Alex

"Sagaert Johan" <RE*************@hotmail.com> wrote in message
news:uD**************@TK2MSFTNGP14.phx.gbl...
Hi

I can play a wave file through a p/invoke to winmm , but how can i play a wave file to a specific audio device if i have more then one audio device in
my pc ?
Johan


Nov 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by webstar | last post: by
2 posts views Thread by webstar | last post: by
4 posts views Thread by Jonesgj | last post: by
1 post views Thread by blitzme | last post: by
1 post views Thread by =?Utf-8?B?15DXldeo158=?= | last post: by
1 post views Thread by XIAOLAOHU | last post: by
reply views Thread by leo001 | last post: by
1 post views Thread by ZEDKYRIE | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.