3 ms·
> it plays random noise at the maximum possible level, bypassing the system volume but why bypassing the system volume? It does not make sense to me.
by severak_cz 5y ago
> it plays random noise at the maximum possible level, bypassing the system volume
but why bypassing the system volume? It does not make sense to me.
- ahartmetz 5y agoIf the system volume is a multiplier and the float values have large exponents... Small times huge ~= huge. I guess safe volume control should ideally limit the output energy. Energy is proportional to square (or so) of frequency, so ideally it would take that into account as well. That rules out simply hard-clamping sample values because that creates high frequency / energy distortions. Not trivial, especially if low latency is also required.
- mojuba 5y agoExactly and it's not obvious at first. You can easily see that the system doesn't limit the FP audio in Logic Pro: you can in principle crank up the volume all you want. So if the system volume multiplier is, say, 0.1, you can have a buffer with values -10..10 and that will play at maximum volume fine. Everything beyond that will get clipped by the DAC. So random FP noise clipped is still random FP noise at maximum level.
- user-the-name 5y agoI hit this bug just the other night, and I think what caused it was accidentally sending NaNs to the audio API. That bypassed whatever clamping functions were in place, and just produced an ear-piercing shriek. Very unpleasant.
- mojuba 5y agoNo, it's not just NaN's, see my reply above.
- user-the-name 5y agoJust tried it and yeah, I can reproduce. That is pretty bad!