marius
marius

Reputation: 172

Windows Form: Play sound, but not from beginning

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!

Upvotes: 2

Views: 587

Answers (1)

Uğur Aldanmaz
Uğur Aldanmaz

Reputation: 1038

SoundPlayer class not to support to do this. It gives a very simple control on WAV files. Maybe this question can help you.

Upvotes: 1

Related Questions