473,657 Members | 2,475 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 8124
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******** ******@TK2MSFTN GP14.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.n ospam.com> wrote in message
news:OU******** ******@tk2msftn gp13.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******** ******@TK2MSFTN GP14.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
2810
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
5159
by: webstar | last post by:
How do you play wave files using java.applet.Applet?
2
2083
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
4060
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 like to do the same in VB.NEt, but I thought about being able to play MP3s for fun... Any help appreciated. Thanks
1
1704
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 6.0... When I create the EXE I can bind the wave files to the EXE yet they will not play,unless I keep the original wave files in the local directory... This seems to defeat the purpose of binding the files in the first place.
3
5439
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 how to merge the two wave file and the two files has to play simultaneously. i have placed my script here <?php $content = joinwavs(array('1.wav','2.wav')); header('Content-Type: audio/x-wav'); //echo $content;
1
2005
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 couldn't solve the audio device problem. I have tried many programs to detect which audio device I have, and using this tool : DriverGuide ToolKit, I identified it as realtek audio device. (I have an Intel motherboard)
5
4132
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 Winamp lost sound. The only thing I did between the time I had sound and when it quit was defragment. I received an error saying I had no audio device. I had this problem before and I solved it by reinstalling all the Soundmax IDA drivers off...
0
8411
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8323
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8838
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8739
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7351
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5638
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4329
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1969
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1732
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.