In order to obtain a reference audio source and especially useful for debugging purposes, including:
- audio input device unrelated to physical device, to avoid conditions when device is already in use by someone else
- non-zero audio signal which is independent of certain speaker or broadcasting service, including one that makes capture, transmission or rendering issues easily perceptible by human
- configurable to provide different audio media types, including through well known DirectShow interfaces, such as IAMStreamConfig
- configurable to present in system as both regular DirectShow Filter, and as an Audio Capture Source which can be enumerated by applications
- to be able to check how exactly other applications are accessing and configuring audio capture source
I added a new filter to the Media Tools library, a Tone Source Filter. The filter generates PCM Audio data, either infinite sine waveform, or interrupted signal of requested parameters:
The filter accepts connection on PCM media types with flexible sampling rates in range 8 KHz through 200 KHz, 8-bit audio and 1 channel. Media type is also configurable through or, if not configured this way, the first enumerated media type off the Output pin is also configurable through property page and/or persistent setting accessible via private IDispatch derived interface property.
Additionally, the filter may configured as a system-wide available audio input device, such as for example available to VLC Media Player or Media Player Classic:
In order to configure the filter as such device, the library exports function DoToneSourceFilterDevicePropertySheetModal, which can be called using rundll32 utility (“rundll32 Acquisition.dll,DoToneSourceFilterDevicePropertySheetModal” from command line):
A partial Visual C++ .NET 2008 source code is available from SVN, release binary included.
File and Class Summary
Acqusition.dll
Acqusition.dll (download) hosts the following classes:
- DirectShow Filters
- Tone Source Filter, to generate reference/debug audio data
Class Overview
Tone Source Filter
The filter generates uninterrupted or interrupted reference sine waveform in form of PCM audio data.
- Filter Executable: Acquisition.dll
- Filter CLSID: __uuidof(ToneSourceFilter) {8002935A-B2EC-40ef-968C-E0358E5DED10}
- Filter Property Page CLSID: __uuidof(ToneSourceFilterGeneralPropertyPage), {EBD8ABB2-6DD3-4c54-A7F1-9FE4DA283EDF}, ToneSourceFilterPreferedFormatPropertyPage, {EE224187-4FA3-4c3f-9D5D-492694CCFEB7}
- Filter Merit: MERIT_DO_NOT_USE
- Filter Category: CLSID_LegacyAmFilterCategory (also configurable as CLSID_AudioInputDeviceCategory)
- Filter Interfaces: IPersistStreamInit, IPersistStream, ISpecifyPropertyPages, IPersistPropertyBag, IBaseFilter, IMediaFilter, IPersist, IAMovieSetup, IAMFilterMiscFlags, IToneSourceFilter, IDispatch
- Filter Pins: single ouput pin (Ouput)
- Output Pin Media Types: MEDIATYPE_Audio/MEDIASUBTYPE_PCM
- Output Pin Interfaces: IPin, IMemInputPin, IAMPushSource, IAMLatency, IAMBufferNegotiation, IKsPropertySet, IAMStreamConfig
Remarks
The hosting library (DLL) exposes DoToneSourceFilterDevicePropertySheetModal function which provides GUI to configure the filter as one or more audio capture source device, which can be enumerated by System Device Enumerator.
after running regsvr32 on Acquisition.dll, I don’t seem to see it in the list (in VLC)? Does it seem to work for you with FMLE 3.2?
Thanks!
The filters should be working but not out of the box as you expect, and not just by registering the DLL. Use IP Video Source https://alax.info/blog/1223 instead, it is more – let us say – user friendly and automatic. You install it, you add one or more cameras, and yes they are on the VLC list like this:
Ok I figured out how to call DoToneSourceFilterDevicePropertySheetModal https://gist.github.com/3251499 :razz: unfortunately after adding one I can’t seem to open it in VLC VLC cannot use the device “abc”, because its type is not supported. Any idea what I might be missing?