473,698 Members | 2,090 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 8132
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
2816
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
5165
by: webstar | last post by:
How do you play wave files using java.applet.Applet?
2
2084
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
1706
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
5448
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
2009
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
4133
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
8671
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
8598
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
9016
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...
1
8887
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7709
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...
1
6515
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5858
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
4360
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4613
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.