Tag: Audio

Reference Signal Source: audio as Media Foundation source

Reference signal source for DirectShow in its video part already received Media Foundation Source interface earlier. This time, the update implements a separate Media Foundation source for audio. MfGenerate2 sample code gives an idea on how to initialize the source: using namespace AlaxInfoDirectShowReferenceSource; CComPtr<IAudioMediaSource> pSource; __C(pSource.CoCreateInstance(__uuidof(AudioMediaSource))); __C(pSource->SetMediaType(NULL, g_nSampleRate, g_nChannelCount, g_nBitDepth)); __C(pSource->put_Duration((DOUBLE) g_nDuration)); CComPtr<IMFMediaSource> pAudioMediaSource =…

Read the full article

Reference signal source for DirectShow

Every so often there are tasks that need certain reference video or video/audio footage with specific properties: resolution, frame rate, frame accuracy with content identifying specific frame, motion in view, amount of motion which is “hard” for processing with encoder tuned for natural video, specific video and audio synchronization. There is of course some content…

Read the full article

Audio playback at non-standard rates in DirectShow

DirectShow streaming and playback in particular offers flexible playback rates for scenarios where playback is requested to take place slower or faster than real time. For a DirectShow developer, the outer interface is pretty straightforward:IMediaPosition::put_Rate takes playback rate and that’s it. Playback rate. Must not be zero. The playback rate is expressed as a ratio of…

Read the full article

Sample: Simultaneous Audio Playback via Waveform Audio (waveOut) API

The minimalistic sample demonstrates support of [deprecated] Waveform Audio API for multiple playback streams. Depending on command line parameters, the application starts threads to open audio hardware using separate waveOutOpen call and stream one or more generated sine waves: 1,000 Hz sine wave as 22,050 Hz, Mono, 16-bit PCM (command line parameter “a”) 5,000 Hz…

Read the full article