WaveoutWrite function introduction

zhaozj2021-02-16  99

URL: http://msdn.microsoft.com/library/en-us/multimed/htm/_win32_waveoutwrite.asp? Frame = true This function sends a data block to a specified waveform audio output device. (The Waveoutwrite Function Sends a Data Block to the Given Waveform-Audio Output Device.)

The prototype is as follows: MmResult Waveoutwrite (Hwaveout Hwo, LPWaveHDR PWH, UINT CBWH);

The parameter (s) is as follows: (Parameters) HWO waveform audio output device handle (Handle). PWH, pointing to a pointer to the WaveHDR structure containing data block information. CBWH This is the size of the WaveHDR structure (you can use Sizeof (WaveHDR)).

Returned Value: If the function is successfully completed, it returns the MMSYSERR__NOERROR to return the following value: Value Description MMSYSERR_INVALHANLE gives the device handle is invalid. MMSYSERR_NODRIVER has no device driver. MMSYSERR_NOMEM does not assign memory (MEMORY) WAVERR_UNPREPARED PWH parameter item referred to by PREPARED (this will not use WaveoutPrepareHeader this function!)

Note:

When the data in the buffer is lost, the WaveHDR structure of DWFLAGS

Members will be set to DHDR_DOONE, and you must use Waveoutp before the buffer is transmitted to the WaveoutWrite function.

RepareHeader function prepare. After the device is suspended by the Waveoutpause function, playback in

A data block starts when it is sent to the device.

Requirements: Requirements Windows NT / 2000 / XP: Included in Windows NT 3.1 and later Windows 95/98 / Me: Included in Windows 95 and later Header: Declared in Mmsystem.h; include Windows.h Library:.. Use Winmm.. Lib. (Friends with VC ID should not forget to add this stuff in Link!)

Reference: Waveform Audio, Waveform Functions, Wavehdr, WaveoutPrepareHead,

Waveoutpause

转载请注明原文地址:https://www.9cbs.com/read-13397.html

New Post(0)