{"id":1033,"date":"2009-09-18T19:01:32","date_gmt":"2009-09-18T17:01:32","guid":{"rendered":"https:\/\/alax.info\/blog\/?p=1033"},"modified":"2009-09-20T11:20:06","modified_gmt":"2009-09-20T09:20:06","slug":"audio-oscillogram-filter","status":"publish","type":"post","link":"https:\/\/alax.info\/blog\/1033","title":{"rendered":"Audio Oscillogram DirectShow Filter"},"content":{"rendered":"<p>Unlike video, audio is difficult to troubleshoot in a way that once an issue has been noticed it was dynamic and already in past and it may be difficult to repeat, explain, forward as a screenshot etc. So it needs a visualization in order to check certain specific of the media stream.<\/p>\n<p>Here we go with a Audio Oscillogram Filter, a filter which may be inserted into audio part of the graph, it insists on PCM audio (multichannel is OK, 8 or 16 bits per sample), so decoders might be required upstream and will be automatically inserted.<\/p>\n<p>Once the filter is running, it shows a tool window with a visualization of the waveform coming through. Additionally, it shows a discontinuity sample (that is, a sample with <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/dd373500%28VS.85%29.aspx\">AM_SAMPLE_DATADISCONTINUITY<\/a> flag)\u00a0 with a thick read vertical line, and a mismatch (gap or override) in neighboring sample start and stop times with a thin red line.<\/p>\n<p><a href=\"https:\/\/alax.info\/blog\/wp-content\/uploads\/2009\/09\/18-image001.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1034\" title=\"Alax.Info Audio Oscillogram Filter\" src=\"https:\/\/alax.info\/blog\/wp-content\/uploads\/2009\/09\/18-image001-320x193.png\" alt=\"Alax.Info Audio Oscillogram Filter\" width=\"320\" height=\"193\" srcset=\"https:\/\/alax.info\/blog\/wp-content\/uploads\/2009\/09\/18-image001-320x193.png 320w, https:\/\/alax.info\/blog\/wp-content\/uploads\/2009\/09\/18-image001.png 758w\" sizes=\"auto, (max-width: 320px) 100vw, 320px\" \/><\/a><\/p>\n<p>Additionally to this, a window provides an option to pop up downstream audio renderer property sheet in order to check\/debug rendering statistics, such as buffer fullness and break count (programmatically available via <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/dd389140%28VS.85%29.aspx\">IAMAudioRendererStats<\/a> interface). Unfortunately Microsoft does not provide a well done proxy\/stub pair for this interface and the property page and there is no way to access this property page connecting to graph remotely. Using this filter the property sheet is shown directly from the hosting process and works correctly.<\/p>\n<p><a href=\"https:\/\/alax.info\/blog\/wp-content\/uploads\/2009\/09\/20-image001.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1042\" title=\"Audio Renderer Properties\" src=\"https:\/\/alax.info\/blog\/wp-content\/uploads\/2009\/09\/20-image001-320x231.png\" alt=\"Audio Renderer Properties\" width=\"320\" height=\"231\" srcset=\"https:\/\/alax.info\/blog\/wp-content\/uploads\/2009\/09\/20-image001-320x231.png 320w, https:\/\/alax.info\/blog\/wp-content\/uploads\/2009\/09\/20-image001.png 529w\" sizes=\"auto, (max-width: 320px) 100vw, 320px\" \/><\/a><\/p>\n<p>A partial Visual C++ .NET 2008 source code is <a href=\"http:\/\/code.assembla.com\/roatl-utilities\/subversion\/nodes\/trunk\/MediaTools\/Utility\">available from SVN<\/a>, release binary <a href=\"http:\/\/code.assembla.com\/roatl-utilities\/subversion\/nodes\/trunk\/MediaTools\/_Bin\/Release%20Trace\/Utility.dll?format=raw\">included<\/a>.<\/p>\n<h2>File and Class Summary<\/h2>\n<h3>Utility.dll<\/h3>\n<p>Utility.dll (<a href=\"http:\/\/code.assembla.com\/roatl-utilities\/subversion\/nodes\/trunk\/MediaTools\/_Bin\/Release%20Trace\/Utility.dll?format=raw\">download<\/a>) hosts the following classes:<\/p>\n<ul>\n<li>DirectShow Filters\n<ul>\n<li><span style=\"text-decoration: underline;\">Audio Oscillogram Filter<\/span>, to visualize\/debug audio data<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h2>Class Overview<\/h2>\n<h3>Audio Oscillogram Filter<\/h3>\n<p>The filter visualizes PCM audio data going through in a form of oscillogram.<\/p>\n<ul>\n<li>Filter Executable: Utility.dll<\/li>\n<li>Filter CLSID: __uuidof(PcmAudioOscillogramFilter) {1450C047-C394-469e-BBB6-A1F949B893FA}<\/li>\n<li>Filter Property Page CLSID: N\/A<\/li>\n<li>Filter Merit: <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/ms787275%28VS.85%29.aspx\">MERIT_DO_NOT_USE<\/a><\/li>\n<li>Filter Category: <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/ms783347%28VS.85%29.aspx\">CLSID_LegacyAmFilterCategory<\/a><\/li>\n<li>Filter Interfaces: <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/ms682273%28VS.85%29.aspx\">IPersistStreamInit<\/a>, <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/ms690091%28VS.85%29.aspx\">IPersistStream<\/a>, <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/ms784601%28VS.85%29.aspx\">IBaseFilter<\/a>, <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/ms785914%28VS.85%29.aspx\">IMediaFilter<\/a>, <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/ms688695%28VS.85%29.aspx\">IPersist<\/a>,\u00a0<a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/ms784083%28VS.85%29.aspx\">IAMovieSetup<\/a>, <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/ms783950%28VS.85%29.aspx\">IAMFilterMiscFlags<\/a>, IPcmAudioOscillogramFilter, <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/ms221608.aspx\">IDispatch<\/a><\/li>\n<li>Filter Pins: single input pin (Input), single ouput pin (Ouput)<\/li>\n<li>Input Pin Media Types: MEDIATYPE_Audio\/MEDIASUBTYPE_PCM<\/li>\n<li>Input Pin Interfaces:\u00a0<a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/ms786565%28VS.85%29.aspx\">IPin<\/a>, <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/ms786054%28VS.85%29.aspx\">IMemInputPin<\/a><\/li>\n<li>Output Pin Media Types: MEDIATYPE_Audio\/MEDIASUBTYPE_PCM<\/li>\n<li>Output Pin Interfaces:\u00a0<a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/ms786565%28VS.85%29.aspx\">IPin<\/a><\/li>\n<\/ul>\n<h4>Remarks<\/h4>\n<p>The filter will create a tool window with audio visualization when put into paused\/running state. The filter graph should be controlled (IMediaControl) from a GUI aware apartment so that window messages could reach internal filter&#8217;s window.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Unlike video, audio is difficult to troubleshoot in a way that once an issue has been noticed it was dynamic and already in past and it may be difficult to repeat, explain, forward as a screenshot etc. So it needs a visualization in order to check certain specific of the media stream. Here we go&hellip; <\/p>\n<p><a class=\"moretag\" href=\"https:\/\/alax.info\/blog\/1033\">Read the full article<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[159],"tags":[485,78,119,239,249],"class_list":["post-1033","post","type-post","status-publish","format-standard","hentry","category-media-tools","tag-audio","tag-directshow","tag-filter","tag-mediatools","tag-visual"],"_links":{"self":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/posts\/1033","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/comments?post=1033"}],"version-history":[{"count":0,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/posts\/1033\/revisions"}],"wp:attachment":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/media?parent=1033"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/categories?post=1033"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/tags?post=1033"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}