Welcome to Sourcefabric's bug tracker. Not a member? Sign up for an account.

Liquidsoap

FLAC with 24 bit decoded audio volume is too low.

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 1.0.0+dev
  • Component/s: None
  • Environment:
    CentOS 5.5, libsamplerate-0.1.8, flac-1.2.1
  1. flac24-mrteam.zip
    (33.20 MB)
    Wittawas Nakkasem
    22/Feb/12 6:35 PM

Activity

Hide
Romain Beauxis added a comment - 25/Feb/12 7:26 PM
Hi!

Thanks for including a test file!!

Unfortunately, I cannot reproduce. I have tried this and it worked:
  liquidsoap 'output.ao(single("/tmp/bla.flac")) set("log.level",4)'

Could you tell us more about your issue? And, if possible, include logs and perhaps a script?

Thanks
Show
Romain Beauxis added a comment - 25/Feb/12 7:26 PM Hi! Thanks for including a test file!! Unfortunately, I cannot reproduce. I have tried this and it worked:   liquidsoap 'output.ao(single("/tmp/bla.flac")) set("log.level",4)' Could you tell us more about your issue? And, if possible, include logs and perhaps a script? Thanks
Hide
Martin Konecny added a comment - 27/Feb/12 2:18 AM
I'd guess this has something to do with the system libraries Liquidsoap uses for playing FLAC correct Romain? Vittee, can the command line utility mplayer play this file on your system?
Show
Martin Konecny added a comment - 27/Feb/12 2:18 AM I'd guess this has something to do with the system libraries Liquidsoap uses for playing FLAC correct Romain? Vittee, can the command line utility mplayer play this file on your system?
Hide
Wittawas Nakkasem added a comment - 01/Mar/12 7:22 PM
Hi,

Sorry for the delay.

After re-investigating the issue, I found out that the file can be played in Liquidsoap, with some problem.
The 24 bits FLAC sound is too quiet compared to 16 bits FLAC, I don't know what cause this, but I can hear it as usual via various players (foorbar2000, windows media player, mplayer, etc)

The issue of track begin skipped was caused by the "eat_blank" operator which I instruct it to skip a track which is too quiet.

BTW, The actual root cause of this issue is that the decoding of 24 bits FLAC file is too quiet.
Show
Wittawas Nakkasem added a comment - 01/Mar/12 7:22 PM Hi, Sorry for the delay. After re-investigating the issue, I found out that the file can be played in Liquidsoap, with some problem. The 24 bits FLAC sound is too quiet compared to 16 bits FLAC, I don't know what cause this, but I can hear it as usual via various players (foorbar2000, windows media player, mplayer, etc) The issue of track begin skipped was caused by the "eat_blank" operator which I instruct it to skip a track which is too quiet. BTW, The actual root cause of this issue is that the decoding of 24 bits FLAC file is too quiet.
Hide
Wittawas Nakkasem added a comment - 02/Mar/12 7:08 PM - edited
Hi,

I've looked into ocaml-flac source code and noticed that flac_stub.c does not handle 24 bit flac properly.

Here's just a dirty and quick fix (decoding only).

at function:

static inline double sample_to_double(FLAC__int32 x, unsigned bps)

at line 400 add this case to switch statement

    case 24:
      return (((double)x)/0x007fffffL);


and, TADA! 24 bit FLAC files are now decoded properly, I can hear it loudly and clearly :)

Show
Wittawas Nakkasem added a comment - 02/Mar/12 7:08 PM - edited Hi, I've looked into ocaml-flac source code and noticed that flac_stub.c does not handle 24 bit flac properly. Here's just a dirty and quick fix (decoding only). at function: static inline double sample_to_double(FLAC__int32 x, unsigned bps) at line 400 add this case to switch statement     case 24:       return (((double)x)/0x007fffffL); and, TADA! 24 bit FLAC files are now decoded properly, I can hear it loudly and clearly :)
Hide
Martin Konecny added a comment - 02/Mar/12 9:33 PM
Great! Please patch upstream :)
Show
Martin Konecny added a comment - 02/Mar/12 9:33 PM Great! Please patch upstream :)
Hide
Romain Beauxis added a comment - 03/Mar/12 2:16 AM
Just done, thanks!

Is there any reason for you guys to release a new ocaml-flac soon? The bug does not seem that bad to me and I'd like to wait a bit to see if other issues may be reported.

However, if you need this fix pushed, I'll do it quickly..
Show
Romain Beauxis added a comment - 03/Mar/12 2:16 AM Just done, thanks! Is there any reason for you guys to release a new ocaml-flac soon? The bug does not seem that bad to me and I'd like to wait a bit to see if other issues may be reported. However, if you need this fix pushed, I'll do it quickly..
Hide
Romain Beauxis added a comment - 03/Mar/12 2:17 AM
Ha, I forgot: it would be nice if you could confirm that I did the right thing, although I'm quite confident but you never know :-)
Show
Romain Beauxis added a comment - 03/Mar/12 2:17 AM Ha, I forgot: it would be nice if you could confirm that I did the right thing, although I'm quite confident but you never know :-)
Hide
Wittawas Nakkasem added a comment - 03/Mar/12 5:27 AM
Hi,

Thanks for giving me credit in the source file, however, could you please update my name to Wittawas Nakkasem? as it is the real-life full name.

Thanks :)
Show
Wittawas Nakkasem added a comment - 03/Mar/12 5:27 AM Hi, Thanks for giving me credit in the source file, however, could you please update my name to Wittawas Nakkasem? as it is the real-life full name. Thanks :)
Hide
Romain Beauxis added a comment - 03/Mar/12 5:45 AM
Done!
Show
Romain Beauxis added a comment - 03/Mar/12 5:45 AM Done!

People

Dates

  • Created:
    22/Feb/12 6:35 PM
    Updated:
    03/Mar/12 5:45 AM
    Resolved:
    03/Mar/12 2:17 AM