2

I want to play a track (.wav file) in my Windows Forms Application. But I do not want it to play from the beginning, but from a certain point somewhere in the track (let's say 10 seconds). To play the track from beginning is no problem:

private void playSimpleSound()
{
    SoundPlayer simpleSound = new SoundPlayer(@"c:\Windows\Media\sound.wav");
    simpleSound.Play();
}

But how can I skip the first 10 secons, and play only the rest of it?

Thanks in advance!

4

1 回答 1

1

SoundPlayer类不支持这样做。它对 WAV 文件提供了非常简单的控制。也许这个问题可以帮助你。

于 2014-09-16T19:49:25.310 回答