2012-01-29, 16:23
@Calvados - I will investigate this further tomorrow, its late now, but I am pretty sure the wait timeout calc was correct. ALSA should return once there is at-least one period to fill, 1 period is roughly 20ms depending on hardware, so 20ms * 1.5 gives some room for error in timing, but perhaps not enough.
Edit: and no its not (PERIOD_SIZE * 1.5f)
Edit 2: I have adjusted this now to (* periods) instead of 1.5, if it has to wait this long, there is something seriously wrong.
Todays updates
* @DDDamian has updated WASAPI again with some more patches and tweaks, the logging issue will be corrected soon, from what I understand this should only be logged in exclusive mode, but wont know until I can follow this up with him.
* AE now performs dithering when converting to 16bit, this improves the noise floor considerably, 8bit is soon to come.
* Float -> S16 conversion has been completely re-written to accommodate dithering, but also to squeeze more performance out of SSE, I have not yet profiled the new code, but I can already say it will be faster without a doubt.
* New random functions for use with dithering, these are based on an Intel whitepaper and perform anywhere between 2-5x faster then the standard rand() function. The SSE version is also designed to return a __m128 value if desired, so that it can be directly plugged into other SSE optimized code.
Edit: and no its not (PERIOD_SIZE * 1.5f)
Code:
snd_pcm_hw_params_get_period_size(hw_params_copy, &periodSize, NULL);
...
format.m_frames = periodSize;
...
MathUtils::round_int(((float)format.m_frames / (float)framesPerMs) * 1.5f);
Edit 2: I have adjusted this now to (* periods) instead of 1.5, if it has to wait this long, there is something seriously wrong.
Todays updates
* @DDDamian has updated WASAPI again with some more patches and tweaks, the logging issue will be corrected soon, from what I understand this should only be logged in exclusive mode, but wont know until I can follow this up with him.
* AE now performs dithering when converting to 16bit, this improves the noise floor considerably, 8bit is soon to come.
* Float -> S16 conversion has been completely re-written to accommodate dithering, but also to squeeze more performance out of SSE, I have not yet profiled the new code, but I can already say it will be faster without a doubt.
* New random functions for use with dithering, these are based on an Intel whitepaper and perform anywhere between 2-5x faster then the standard rand() function. The SSE version is also designed to return a __m128 value if desired, so that it can be directly plugged into other SSE optimized code.