//声明: waveOutGetDevCaps( uDeviceID: UINT; {输出设备ID} lpCaps: PWaveOutCaps; {TWaveOutCaps 结构的指针, 用于接受设备信息} uSize: UINT): MMRESULT; {TWaveOutCaps 结构大小} ): MMRESULT; {成功返回 0; 可能的错误值见下:} MMSYSERR_BADDEVICEID = 2; {设备ID超界} MMSYSERR_NODRIVER = 6; {没有安装驱动程序} //TWaveOutCaps 是 tagWAVEOUTCAPSA 结构的重定义: tagWAVEOUTCAPSA = record wMid: Word; {制造商ID} wPid: Word; {产品ID} vDriverVersion: MMVERSION; {版本号; 高字节是主版本号, 低字节是次版本号} szPname: array[0..MAXPNAMELEN-1] of AnsiChar; {产品名称} dwFormats: DWORD; {支持的格式} wChannels: Word; {单声道(1)还是立体声(2)} dwSupport: DWORD; {其他功能} end; //dwFormats: WAVE_INVALIDFORMAT = $00000000; {invalid format} WAVE_FORMAT_1M08 = $00000001; {11.025 kHz, Mono, 8-bit } WAVE_FORMAT_1S08 = $00000002; {11.025 kHz, Stereo, 8-bit } WAVE_FORMAT_1M16 = $00000004; {11.025 kHz, Mono, 16-bit} WAVE_FORMAT_1S16 = $00000008; {11.025 kHz, Stereo, 16-bit} WAVE_FORMAT_2M08 = $00000010; {22.05 kHz, Mono, 8-bit } WAVE_FORMAT_2S08 = $00000020; {22.05 kHz, Stereo, 8-bit } WAVE_FORMAT_2M16 = $00000040; {22.05 kHz, Mono, 16-bit} WAVE_FORMAT_2S16 = $00000080; {22.05 kHz, Stereo, 16-bit} WAVE_FORMAT_4M08 = $00000100; {44.1 kHz, Mono, 8-bit } WAVE_FORMAT_4S08 = $00000200; {44.1 kHz, Stereo, 8-bit } WAVE_FORMAT_4M16 = $00000400; {44.1 kHz, Mono, 16-bit} WAVE_FORMAT_4S16 = $00000800; {44.1 kHz, Stereo, 16-bit} //dwSupport: WAVECAPS_PITCH = $0001; {支持音调控制} WAVECAPS_PLAYBACKRATE = $0002; {支持播放速度控制} WAVECAPS_VOLUME = $0004; {支持音量控制} WAVECAPS_LRVOLUME = $0008; {支持左右声道音量控制} WAVECAPS_SYNC = $0010; {} WAVECAPS_SAMPLEACCURATE = $0020; {} WAVECAPS_DIRECTSOUND = $0040; {}
//举例: