Correct Media Type settings for a DirectShow filter that delivers Wav audio data?

偶尔善良 提交于 2019-12-06 03:00:29

(1) is MEDIATYPE_Audio.

(2) is typically a mapping from FOURCC code into GUID, see Media Types, Audio Media Types section.

(3) is FORMAT_WaveFormatEx.

(4) is a pointer (typically allocated by COM task memory allocator API) to WAVEFORMATEX structure.

1) - yes you should allocate memory, put valid data there, by copying or initializing directly, and put this pointer to pbFormat and structure size into cbFormat.

2) - yes it looks good, it is defined like this in first place: WAVEFORMATEX structure.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!