Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Application Programming › C# -playing an mp3 file using mciSendString.
New Posts  All Forums:Forum Nav:

C# -playing an mp3 file using mciSendString.

post #1 of 2
Thread Starter 
Hello, so i"m making a program that records sound with microphone and play"s it with delay that user wants, it"s for a professor, he wants to use it for practicing people witch speech problems, now i solved most of it, i"m making it with visualstudio ( C# ) and i"m using mciSendString for recording and saving sound in an mp3 file, i succeeded that and i got a working mp3 file, here is a copy of event for recording and saving sound:

private void button1_Click(object sender, RoutedEventArgs e)
{
mciSendString("open new Type waveaudio Alias recsound", "", 0, 0);
mciSendString("record recsound", "", 0, 0);

}

private void button2_Click(object sender, RoutedEventArgs e)
{
mciSendString("save recsound C:\\Users\\Overclocker\\Desktop\\test.mp3", "", 0, 0);
mciSendString("close recsound ", "", 0, 0);

}


so it works fine, now i need an event to play the sound,i tried few commands like this one:

mciSendString("play recsound C:\\Users\\Overclocker\\Desktop\\test.mp3", null, 0, IntPtr.Zero);

but nothing happens, it just won"t play, could you please help me? thanks...
post #2 of 2
Thread Starter 
somebody ?
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Application Programming
Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Application Programming › C# -playing an mp3 file using mciSendString.