/* * private int GetSoundVolume() * { * // By the default set the volume to 0 * uint CurrVol = 0; * // At this point, CurrVol gets assigned the volume * waveOutGetVolume(IntPtr.Zero, out CurrVol); * // Calculate the volume * ushort CalcVol = (ushort)(CurrVol & 0x0000ffff); * // Get the volume on a scale of 1 to 10 (to fit the trackbar) * return CalcVol / (ushort.MaxValue / 10); * } * */ private void SetSoundVolume(SoundPlaySettings settings) { //if (null != this.settings) //{ this.SetSoundVolume(/*this.*/ settings.SoundVolume); //} }
public void ScheduleSound(int count, SoundPlaySettings settings) { this.soundQueue.Enqueue(new SoundPacket() { Count = count, Settings = settings }); /* * if (!this.soundPlayer.IsBusy && settings != null && count > 0) * { * this.settings = settings; * // Set the WAV sound volume. * this.SetSoundVolume(); * this.soundPlayer.RunWorkerAsync(count); * }*/ }