![]() The IMFTransform objects (two of them - one for input resampling, one for output resampling) accept both their input and outputmedia types, and only have a problem when it's actually time to do the resampling (IMFTransform::ProcessOutput is the only part in the process where I ever get an error).The third issue is that in order to resample there's a lot of buffer copying that has to happen and, if I understandexample correctly, a lot of unnecessary memory allocations / deletions.Is this the correct API to use for this application's purpose? This is done using MFInitMediaTypeFromWaveFormatEx. I've created the media types using the WAVEFORMATEXTENSIBLE structures for the devices and my own custom WAVEFORMATEXTENSIBLEthat best describes the internal implementation of the DSP pipeline. Naturally, this confusion makes me wonder if thisis the correct API for what I'm doing - real time audio processing.The second is actually getting the resampler to obey - IMFTransform::ProcessOutput always returns MFETRANSFORMNEEDMOREINPUT. It's written as if it's asynchronous and sends info toa driver somewhere (command queues, locks on the buffers), but it's mentioned several times that all processing is done synchronously, IE within the same thread of my own process (which is what I want). I've run into a few issues - one, I can't find any explanation as to how this API works. There is no need to engage the built-in MusicBee resampler with wasapi-exclusive unless you have files whose rates are neither supported by your audio device, nor able to be handled by the bass.dll fall-back.I'm using the IMFTransform object which is a part of the Windows Media Foundation API. Otherwise, you would have no audio output. ![]() In the BASS audio engine world, if my device gets sent a sample rate it does not support, for example a 22.05k radio stream, bass.dll will "kick in" and internally resample that to a supported rate, i.e. ![]() What this means though is that your audio device must be able to support the rates of your files. Wasapi-exclusive will ignore that setting and send whatever the audio file's original sample rate is to your audio drivers, whether it's 44.1k or 192k. ![]() I find it very strange that you said your Windows only supports 48khz, I think you meant that was the sampling rate set in the Device properties (Control panel/Sound/properties/Advanced). ![]() Wasapi Exclusive DOES by-pass the Windows mixer/resampler. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |