473,386 Members | 1,754 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 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 8057
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: webstar | last post by:
hi, could you please tell me how to play a small wave file if a button is pressed. or if there is another format that is easer then use that instead of wave. thanks matt
2
by: webstar | last post by:
How do you play wave files using java.applet.Applet?
2
by: godyuyu | last post by:
i need change the system preferred audio device in my vc++ project ,but i can't find the resolution.I just want to know the method.
4
by: Jonesgj | last post by:
Hi All. I want to play a wav, MP3 or WMA file from my app. Is this easy to to? My old VB app would play a particle wav to attract the users attention if they were not at the terminal. I would...
1
by: blitzme | last post by:
I created a PERL script to play a wave file using Win32::Sound All went well. So then I was trying to create an executable file with the wav files bound inside it using Activestate Dev kit...
3
by: rajasekar.karthik | last post by:
Hi Guys I need a php script which will merge two wave files as i have already done a script which will will join the two wave files and play one after the other, can anyone advice me...
1
by: =?Utf-8?B?15DXldeo158=?= | last post by:
I have recently installed my windows XP, the process went smoothly, but I had encounterd some drivers issues after the installation. I managed to solve the ethernet adapter driver issue, but I...
5
Xentrik
by: Xentrik | last post by:
I have no audio. First Windows media player gave me an error, I don't remember what it was because I rarely use it, I use Winamp as my default and I had sound on Winamp so I didn't really care. Then...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.