示例#1
0
        public void Play()
        {
            // Make sure we have data
            this.WaitForBufferFull();

            WaveFormNative.waveOutWrite(_DeviceHandle, ref _Header, Marshal.SizeOf(_Header));

            _IsEmpty = true;
        }
示例#2
0
        public virtual void Play()
        {
            this._WaitForCompletion.Reset();

//			this._PlayEvent.WaitOne();
//			this._PlayEvent.Reset();
            this._IsPlaying = true;

            int result = WaveFormNative.waveOutWrite(this._DeviceHandle, ref this._Header, Marshal.SizeOf(this._Header));

            if (result != WaveError.MMSYSERR_NOERROR)
            {
                throw new SoundCoreException(WaveError.GetMessage(result), result);
            }
        }