public void SetWasapiPlayer(WasapiPlayer player) { mMP3Player = player; mMP3Player.PlaybackStopped += OnPlaybackStopped; mMP3Player.PostVolumeMeter += mWasapiPlayer_PostVolumeMeter; knobVolume.Value = (int)(mMP3Player.Volume * 100.0f); }
public void SetWasapiPlayer(WasapiPlayer player) { mWasapiPlayer = player; mWasapiPlayer.PlaybackStopped += OnPlaybackStopped; mWasapiPlayer.FileNameUpdated += mWasapiPlayer_FileNameUpdated; mWasapiPlayer.PreVolumeMeter += mWasapiPlayer_PreVolumeMeter; mWasapiPlayer.PostVolumeMeter += mWasapiPlayer_PostVolumeMeter; volumeSlider1.Volume = mWasapiPlayer.Volume; }