// VC console # include <windows. h> # include <stdio. h> # pragma comment (Lib, "winmm. lib ") # define mute_length 128 # define sample_rate 11025 void main () {handle hevent = createevent (null, false, false, text (" PCM write ")); Hwaveout Hwaveout; // waveform audio output handle char mute [mute_length]; // mute symbol string Waveformatex Waveformat = {wave_format_pcm, 1, sample_rate, sample_rate, 1, 8, 0}; // set the waveform audio format WavehdrWavehdr = {0, mute_length, 0, 0, 0, 1, null, 0}; // audio data header fillmemory (mute, mute_length, (byte) 0x80 ); // fill the wavehdr with the mute symbol. lpdata = mute; // initialize the information header pointer // enable the audio device Waveoutopen (& Hwaveout, wave_mapper, & waveformat, (DWORD) hevent, 0, callback_event); // prepare the information HeaderWaveoutprepareheader (Hwaveout, & wavehdr, sizeof (wavehdr); While (1) {// play mute symbol Waveoutwrite (Hwaveout, & wavehdr, sizeof (wavehdr); printf ("."); waitforsingleobject (hevent, infinite );}}