473,326 Members | 2,102 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,326 software developers and data experts.

How to send audio data to speaker

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 5247
weaknessforcats
9,208 Expert Mod 8TB
Doesn't PlaySound work for you? Check MSDN.
Sep 12 '09 #2
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(hRadio,SamplesIFHandler,IF,SamplesAud ioHandler,Audio);

Where IF and Audio are file pointers and write data in File. The function “SetupStrems” 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 Expert Mod 8TB
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
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
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...
19
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...
6
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...
2
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...
3
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...
0
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....
1
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...
3
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...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.