SoundPlayer is a method which plays .wav files in c#
Questions tagged [soundplayer]
133 questions
0
votes
1 answer
Play sound parallel
How can I play sound parallel in c++?
I tried it with the PlaySound function of the Windows Api and Threads, but when a sound starts playing in another Thread, the sound from the other Threads stopped.
Is there any way to get two different sounds to…

user2737037
- 1,119
- 1
- 16
- 29
0
votes
2 answers
SoundPlayer and Windows 7 wav file
When I try to play the sound file "Windows Critical Stop.wav" I get the following exception: exec {"Sound API only supports playing PCM wave files."} System.Exception {System.InvalidOperationException}
I understand what PCM is, I just do not know…
user239299
0
votes
5 answers
Media player in C#
Well I am making a media player in the C# using the System.Media.SoundPlayer class but there are too many limitations in that like it only plays .wav files and there is no volume control in this and also there is no media-progessbar. So is there any…
user2750987
0
votes
1 answer
C# Audio with SoundPlayer - Is that really all there is to it?
I'm attempting to teach myself audio programming in C# through online tutorials. I'm using wave files (*.wav) with SoundPlayer.
What confuses me is this: why do the tutorials bother reading in and chopping up a wave file if we're just going to…

rpgZenMaster
- 15
- 4
0
votes
1 answer
System.Media.SoundPlayer Selective Playing
I have a small application, the intent being that when a user presses a key a few things happen
Creates a new instance of an object for recording the keystroke
Checks a dictionary, grabs an instance of a System.Media.Soundplayer class
Modifies the…

Sam
- 113
- 6
0
votes
2 answers
How to run a .wav in client. ASP.NET
I have an application that plays a wave file using the SoundPlayer class. However, when I publish the application in IIS, the file will not play.
To use the SoundPlayer class I added a reference windows.dll, it may interfere?
public void…

Flávio Costa
- 895
- 5
- 18
- 41
0
votes
2 answers
Play a sound while key is down
i would like to play a sound in C# while the key is down. If the key is released the sounds automatically stops.
This is what I have so far:
var player = new System.Windows.Media.MediaPlayer();
try
{
player.Open(new…

Joscplan
- 1,024
- 2
- 15
- 35
0
votes
4 answers
C# - .WAV Playback Randomly High Pitch
For some reason, when a WAV file is played back using the snippet below, it randomly plays back screwy, like a high pitch noise. It doesn't happen all the time, just randomly. It seems to happen more often when it is played back more frequently. …

user
- 16,429
- 28
- 80
- 97
0
votes
1 answer
Playing sounds: accessing length and position
I'm using the System.Media.SoundPlayer for playing sounds in C# desktop application passing the sound location.
Everything works fine. But how can I access the total file length (in milliseconds) and the player position?
Theses properties are…

Victor
- 8,309
- 14
- 80
- 129
0
votes
1 answer
C# change image when sound stops playing
I am making a .wav player application in which I have a button to play the loaded .wav
So if the sound is playing a "pause" button will be showed and when it stops a "play" button will be showed.
currently using this:
using (SoundPlayer…

Joscplan
- 1,024
- 2
- 15
- 35
0
votes
1 answer
J2ME Player doesn't play files that were converted from ogg
So far all mp3 files I've tried work just fine, however, when trying a file I converted from Vorbis format it just wouldn't play.
No errors or anything, it's just that it doesn't make any sound.
Tried multiple converting apps.
Any way this can be…

Lior
- 5,454
- 8
- 30
- 38
0
votes
2 answers
How to play a sound without creating a new player each time
I'm working in a form project and playing a few sounds in some methods and events.
For example, in a method I have this one:
SoundPlayer sndplayrONE = new SoundPlayer(Properties.Resources.wavsound1);
sndplayrONE.Play();
In another one, I have…

Zeky Strelok
- 1
- 1
0
votes
1 answer
c# SoundPlayer playlist loop
Maybe I have a simple question, but I am little bit confused from MSDN. I want to use something to play music. I know it may sound easy.
private void playMusic(string path) {
using (SoundPlayer player = new SoundPlayer(path)) {
…

wolen
- 705
- 2
- 8
- 21
0
votes
1 answer
XML sound's byte form
I have a .wav file and i write this byte form to XML. I want to play this song on my form but I am not sure I am correct and it doesn't work. Str is my file's byte form.
byte[] soundBytes = Convert.FromBase64String(str);
MemoryStream ms = new…

Berat Akgül
- 152
- 2
- 11
0
votes
2 answers
ASP.NET Sound Resource not publishing
So I created an ASP.NET 4 application in VS2010, that needs to play sound to the end user, and it is working perfectly in my local development environment. The problem is the sound resource nor the Resources.resx is not being published to the…

Off The Gold
- 1,228
- 15
- 28