473,566 Members | 2,785 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to send audio data to speaker

2 New Member
Dear All,

In my application, i want to capture live audio data and send them to speaker. I can able store captured audio data in file but my application requirement is to send data directly to speaker. I m using c++ for programming and windows Xp Sp2 as OS. Can some one please guide that how to send data directly to speaker.

Your quick reply is highly appreciable.

Thank you,

NIraj Shah
Sep 12 '09 #1
3 5268
weaknessforcats
9,208 Recognized Expert Moderator Expert
Doesn't PlaySound work for you? Check MSDN.
Sep 12 '09 #2
Niraj Shah
2 New Member
Thanks for your reply,

I have tried with “Play Sound” but it didn’t work. Let me explain you my application. I am using Win Radio WR-G315e, which receives data from Preset FM band and writes in the file. The function which receives data and writes in the file, The function is as under

SetupStreams(hR adio,SamplesIFH andler,IF,Sampl esAudioHandler, Audio);

Where IF and Audio are file pointers and write data in File. The function “SetupStre ms” is a callback function and which receives data up to user interrupt. Now I have tried that instead of writing file to Audio pointer I have written “PlaySound ” but it didn’t work as Playsound return Boolean value.

Can someone suggests as in which file this “PlaySound ” function writes the data and if I will point the Audio pointer towards that file then I felt my work will be done.

Thanks

Niraj Shah
Sep 14 '09 #3
weaknessforcats
9,208 Recognized Expert Moderator Expert
PlaySound pays a sound on your speakers. It doesn't write to a file.

http://msdn.microsoft.com/en-us/library/aa909766.aspx

If you have written a waveform file, PlaySound can play for you on your speakers.
Sep 14 '09 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

0
1323
by: Andy Purcell | last post by:
Hello, I am trying to use Send.Send() or Send.SendWait() to simulate an audio mute key being pressed. What string argument should I use for this purpose? Thanks, andy
1
10675
by: Andrea V.F. | last post by:
I need to control (Get and Set) this parameters of Windows Audio Mixer: - Master Volume Mute - Master Volume Level In addition, but not mandatory, I need to control also the PC Speaker Mute and Volume. PC Speaker control is aviable only in some Systems such as laptops, in others systems there is no control of PC speaker in Windows Mixer.
19
7909
by: lawrence k | last post by:
How can I find out where my script is outputting to the screen for the first time? My error logs are full of stuff like this: PHP Warning: session_start(): Cannot send session cache limiter - headers already sent in /home/httpd/vhosts/monkeyclaus.org/httpdocs/media/audio/pdsIncludes/CommandStartSession.php on line 14
6
2331
by: Putty | last post by:
Hi. I've written a small python script that was primarily meant for use in a unix-compatible environment. It writes a bunch of raw audio to a file and then sends the file to /dev/audio and the system plays the audio. Very simple. Is there a simple way I could edit the script (which just uses the system call to do this) to run under...
2
7857
by: positivebalance41m | last post by:
I have been searching how to do sound capture (record audio input) in VB.NET for days now. I find some references to "winmm.dll" calls, but they give VB5 or VB6 examples which won't code convert upgrade to VB.NET without warnings errors that I can understand how to fix. There's some ActiveX and OCX's floating around, some free some not,...
3
4310
by: Udhay | last post by:
Sir, I want to read the data of an audio file in c++ (Windows). What is the API which helps to read the data of an audio file. I want to read BitRate,Audio Sample Size,Audio Sample rate and Channel udhay
0
2276
by: Carlos Leite | last post by:
Is there any other option to analyze audio frequencies? Or Any here try to use pymedia to a simple audio FingerPrint. A cant understand what the information the asBands() really giveme. The Docs, say that asBands() return a List of tupples grouped by frquenciy, and the first two values are frquency limits. But I dont thonk so ! Its...
1
3356
by: x2000 | last post by:
How to control windows media player balance for Karaoke? When I changed balance in VB6, just one speaker is out and other is not. I wanna know how to make both speaker out. I want this function for Karaoke.
3
1853
by: reformedman | last post by:
I'm sure someone has written this idea in php, and I wouldn't mind looking at it as a helper but I really would like to know how to code this idea in HTML. In my school we have lecture hours for different subjects. Each subject would have their respective class name, lecture speaker, Title of the lecture, audio file of the 50 minute lecture...
0
7666
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...
0
7584
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...
0
7888
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. ...
1
7644
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...
0
6260
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...
1
5484
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...
0
5213
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...
0
3643
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...
0
3626
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.