2012-02-06, 18:10
DDDamian Wrote:WASAPI is not the same as the audio driver. Windows users have two choices regardless of their driver - WASAPI and DirectSound. DirectSound handles Windows mixing/resampling. When you talk to DirectSound it tells you what sample rate it is running at, as set in your audio settings, and it remixes everything to that forrmat. When you talk to WASAPI you tell it what to output, and skip the resampling. If this doesn't match your Windows settings you override them. You are negotiating with the audio driver for the best format it can handle, ideally your source format. This can be to the exclusion of all other apps seeking audio output (Exclusive mode) or at a compromise format (Shared mode).
The purest audio output is going to be in WASAPI exclsive mode - you bypass the Windows mixer and any resampling/mixing. Most modern audio hardware will handle the source format whether it's 2ch 16/44.1 or 8ch 24/192. While in this mode no other system sounds can play - only XBMC streams.
Even in this mode there are two choices - timed or event-driven. In timed mode the app has to present new data before the buffer runs dry using delays. In event-driven mode Windows calls you back to let you know it needs new data.
With this patch there are still the 16-bit limitations and timed polling, which AE does improve upon, but obviously is still a WIP.
Hope the little primer helps!
Thanks for the primer, and sorry if this is answered in the above - but how does this patch (combined with WASAPI audio output) deal with multichannel flac files ? As said above, I am getting 2 ch output on a multichannel audio file (confirmed by bringing up the codec info during playback). Am I doing something wrong ?