You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Float audio samples use the value range of -1....0....1 casting them just to int won't do the job. For a proper conversion, the bit depth of the integer (8/16/32/64) must be known. Here is a good stack overflow article how to do it right.
Problem is, that within a Float32Buffer, the bit depth is not available :-(
The text was updated successfully, but these errors were encountered:
Hi,
I tried to convert a
Float32Buffer
to anIntBuffer
, resulting in silence. Problem is, that the current implementation has a flaw:audio/float_buffer.go
Line 36 in 9867513
audio/float_buffer.go
Line 107 in 9867513
Float audio samples use the value range of
-1....0....1
casting them just toint
won't do the job. For a proper conversion, the bit depth of the integer (8/16/32/64) must be known. Here is a good stack overflow article how to do it right.Problem is, that within a Float32Buffer, the bit depth is not available :-(
The text was updated successfully, but these errors were encountered: