473,326 Members | 2,090 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.

sndPlaySound function problem

i want to play a .wav file using sndPlaySound and PlaySound function
but both function doesn't works in the expected way... i just hear a
click sound after execution of these functions.... not the original
recorded sound of .wav file.... on the other hand when i make use of
wave functions to play sound it works fine... can anybody tell that
what exactly the problem is??? all docs i read suggests that these
functions works fine if we hav eto play only a single wave file... but
this doesn't works in my case.... help me...

May 22 '06 #1
2 2535
Try this: (My testBox1.Text is a wav file name with the path)

System.Media.SoundPlayer player = new
System.Media.SoundPlayer(textBox1.Text);

player.Play();

"Ansh" <sh************@gmail.com> a écrit dans le message de news:
11**********************@y43g2000cwc.googlegroups. com...
i want to play a .wav file using sndPlaySound and PlaySound function
but both function doesn't works in the expected way... i just hear a
click sound after execution of these functions.... not the original
recorded sound of .wav file.... on the other hand when i make use of
wave functions to play sound it works fine... can anybody tell that
what exactly the problem is??? all docs i read suggests that these
functions works fine if we hav eto play only a single wave file... but
this doesn't works in my case.... help me...

May 22 '06 #2
Found some interesting references here:
http://www.pinvoke.net/default.aspx/...PlaySound.html
Have fun :-)

"Ansh" <sh************@gmail.com> a écrit dans le message de news:
11**********************@y43g2000cwc.googlegroups. com...
i want to play a .wav file using sndPlaySound and PlaySound function
but both function doesn't works in the expected way... i just hear a
click sound after execution of these functions.... not the original
recorded sound of .wav file.... on the other hand when i make use of
wave functions to play sound it works fine... can anybody tell that
what exactly the problem is??? all docs i read suggests that these
functions works fine if we hav eto play only a single wave file... but
this doesn't works in my case.... help me...

May 22 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Hennie de Nooijer | last post by:
Because of an error in google or underlying site i can reply on my own issue. Therefore i copied the former entered message in this message....
7
by: Mike D. | last post by:
I have a problem with a dynamic library I am developing, but it is really more of a pointer issue than anything else. Hopefully someone here can lend me some assistance or insight into resolving...
19
by: Nak | last post by:
Hi there, *fingers crossed that the newsserver works long enough for me to see any replies to this!!* I'm having crashes when using SndPlaySound with SND_ASYNC and SND_MEMORY in VB.NET. The...
9
by: Andy | last post by:
Hi, I have an application that has several forms. Each form acts as a monitor of a gateway system. If the gateway appears to be dead, the application should play a .wav file (not resource)...
2
by: Fernando Barsoba | last post by:
Dear all, I have been posting about a problem trying to encrypt certain data using HMAC-SHA1 functions. I posted that my problem was solved, but unfortunately, I was being overly optimistic. I...
78
by: Josiah Manson | last post by:
I found that I was repeating the same couple of lines over and over in a function and decided to split those lines into a nested function after copying one too many minor changes all over. The only...
6
by: RandomElle | last post by:
Hi there I'm hoping someone can help me out with the use of the Eval function. I am using Access2003 under WinXP Pro. I can successfully use the Eval function and get it to call any function with...
2
by: Ravikiranreddy | last post by:
Hi every one, Am pasting the error code returned in log please help me in fixing it--- ERROR:An error occurred during the execution of the command "/opt/IBM/db2/V8.1/instance/dascrt -u...
6
by: pauldepstein | last post by:
Let double NR( double x, double(*)(const double&) f ) be the signature of a Newton-Raphson function NR. Here, f is a function which returns a double and accepts a const double&. The aim of...
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
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
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...
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.