sbooth / Max

An audio converter and CD ripper
https://sbooth.org/Max/
GNU General Public License v2.0
279 stars 60 forks source link

can't encode mp3s from 24 bit #36

Closed custerflux closed 4 years ago

custerflux commented 4 years ago

Max version 0.9.2b2 doesn't seem to be able to process 24-bit audio into MP3 correctly. Whatever the samplerate, 24-bit audio gets encoded into total silence. It will encode properly to other formats besides MP3, and 16-bit audio seems to pass through everything just fine.

timnyss commented 4 years ago

Same issue. This only happened since I updated to Catalina a few weeks ago.

sbooth commented 4 years ago

This was an interesting bug that also affected to 32-bit source data. lame_encode_buffer_long2() expects the values to be scaled to fit the size of long, not a particular bit width. Max was assuming 32-bit scaling.

sbooth commented 4 years ago

Max-0.9.2b3 is now available and contains the fix.

timnyss commented 4 years ago

Many thanks!!!!!

On Mon, Sep 14, 2020, 14:01 Stephen F. Booth notifications@github.com wrote:

Max-0.9.2b3 is now available and contains the fix.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/sbooth/Max/issues/36#issuecomment-692006999, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQ667X2QP3OEM7HK7QYT4D3SFYA2RANCNFSM4PIE33NQ .

custerflux commented 4 years ago

Works great! Thank you.

sbooth commented 4 years ago

In hindsight it would be easier to use lame_encode_buffer_ieee_float() for all bit depths but I don't think that API existed in LAME 3.95 when this code was originally written.