SoundPlayer is a method which plays .wav files in c#
Questions tagged [soundplayer]
129 questions
-1
votes
1 answer
Play/Pause button for .wav file
I have seen a few posts about multi-function buttons here and elsewhere, but I am having trouble implementing their suggestions.
I am coding a synthesizer that generates and saves a .wav file.
I have a button that plays the sound with SoundPlayer…
Freddie Waters
- 1
- 2
-1
votes
1 answer
C# - Get time from soundplayer
Is there any way to get the number of milliseconds that have passed since the soundplayer started playing?
So far I'm using Environment's tick counter by getting the start time and then the current time every frame, but sometimes that's inaccurate…
iptq
- 617
- 1
- 6
- 15
-1
votes
1 answer
Variable not declared error in a Maze Game
The maze game I have developed via a tutorial I found by research is doing well. Step by step I have been debugging this application for Windows using VB in Visual Studio 2012. I was told by the tutorial to use the following code:
Private Sub…
Alex Stack
- 41
- 2
- 2
- 7
-2
votes
2 answers
Is it possible to create a loop where if i click on a picture box it will stop music, on click again play it
private void pictureBox1_Click(object sender, EventArgs e)
{
SoundPlayer ssp = new SoundPlayer();
ssp.Stop();
pctmutesplash.Image = Properties.Resources.unmuteicon;
}
RyanJM
- 19
- 5
-2
votes
1 answer
FIle dialog gives path that doesn't work with soundplayer
When I use the file dialog to get a path it gives me the path but it doesn't work with SoundPlayer. The path it returns has the disk letter capitalised which doesn't work with SoundPlayer.
I don't know how to word what I'm searching so I came…
Niami
- 23
- 4
-2
votes
1 answer
playing AWS Lex response audio stream using .net SoundPlayer gives error "The wave header is corrupt"
I am trying to develop a winforms application to integrating AWS lex voice service.
I am not able to play the audio received from AWS Lex bot "postContentResponse.AudioStream" in winforms application. I am using SoundPlayer to play the audio stream.…
Varun Nair
- 144
- 11
-3
votes
1 answer
Using audio file in c# console application
I'm making a text based game on cmd using c#, and I need your help.
I'm using this code for playing audio:
SoundPlayer sndPlayer = new SoundPlayer();
sndPlayer.SoundLocation = @"C:\Users\Uri\Desktop\Music\Music for game\sp8.wav";
…
Toortelz
- 9
- 2
-3
votes
1 answer
Playing a .wav file in c# using SoundPlayer
I am currently having a probelm, where a file was sent to me as .m4a and I renamed it to .wav..... (I think that is the issue as I can play other .wav files)
Now it is giving me this error when I run the code:
Additional information: The file…
Kyle Rickaby
- 87
- 2
- 15
-5
votes
2 answers
Program exists when using the Play method in SoundPlayer
When I use the Play method with the SoundPlayer, my program exits and there is no sound playing. Please help me.
Code:
SoundPlayer player;
player = new SoundPlayer();
private void wii_WiimoteChanged(object s, EventArgs e)
{
if…
user2715040
- 1
- 1