View Single Post
Old 01 May 2017, 11:14   #68
Registered User
Join Date: Jul 2008
Location: Netherlands
Posts: 299
Originally Posted by Toni Wilen View Post
Use of floats would only make sense if whole audio paths uses floats but I am not going to have 2 audio paths...

Simple doing extra conversion pass at the end sounds pointless. (Why would application conversion be any faster than OS conversion?)
True. So it seems to boil down to the question which Wasapi mode is used by the larger part of the WinUAE userbase: Wasapi shared mode OR Wasapi exclusive mode?

If the larger part of the userbase uses shared mode instead of exclusive, then it would make sense the convert whole audio path to float (and add conversion step to int when mode is exclusive).

Here's my reasoning (a bit elaborate I know, but makes it easier to pinpoint incorrect reasoning or assumptions..)

From what I understand in shared mode the wasapi engine is the "middleman" and it always converts to float for its own processing. Since this wasapi engine uses float, it makes no sense to feed it integer as it will always lead to an extra (costly?) conversion step.

winuae integer -> float (by wasapi engine) -> device (int?)

Conclusion 1: using float leads to performance increase in shared mode because conversion step by wasapi engine is skipped

I guess wasapi exclusive works quite different because there's no "middleman" / wasapi engine: the application talks directly to the device so it must use a stream format that the audio hardware explicitly supports. I guess this will be either float or int, but from what I know most devices only accept integer. Conclusion 2: it makes sense to keep audio path integer when using exclusive mode.

I guess we're on the same page regarding the above.

Now to the most relevant, Conclusion 3: if Wasapi shared mode is used by significantly more users than exclusive mode, than logical thing to do is to have whole audio path in float, and add float to int conversion for exclusive mode.

That way you keep one audio path, but in general the larger part of the user base will enjoy increased performance

Personally I'm using Wasapi in shared mode also, so I guess my vote would go to using float in the audio path and having the benefit of the increased performance..
Dr.Venom is offline  
Page generated in 0.05184 seconds with 9 queries