SqueezePlay Fix for 24 bit output on Linux

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • linuxfox
    Junior Member
    • Nov 2011
    • 7

    SqueezePlay Fix for 24 bit output on Linux

    Hi
    as noticed in other threads, squeezeplay outputs always in 16bit in linux.
    I made a little change in squeezeplay/src/audio/decode/decode_alsa.c to make it output 24bit

    I changed the line:
    sample_size = luaL_optinteger(L, -1, 16);
    with:
    sample_size = luaL_optinteger(L, -1, 24);

    And now the output is always S24_LE.

    What happens to 16bit data? It sounds ok so I think that is padded to 24 bit by squeezeplay or portaudio, is that right?
    Why the sample size is "fixed" to 16 bit?

    Thank you
    Fabio
  • linuxfox
    Junior Member
    • Nov 2011
    • 7

    #2
    More tests and it's still not OK

    I've done some listening tests and the 24bit files sound better in mplayer than in squeezeplay.
    More test show that the previous fix didn't improve sound on 24bit files: they sound like 16bit files.
    Alsa and squeezeplay debugging show that output is 24bit but it sounds like 16bit padded into 24bit. I think that squeezeplay converts the sound from 24bit to 16bit and (in the end, probably by jive_alsa) it is again converted to 24bit...
    Any help from the developers?
    Thank you in advance
    Fabio

    Comment

    • kipeta
      Senior Member
      • Nov 2011
      • 155

      #3
      in Linux you can choose the audio device and other parameters through setting file:
      ~/.squeezeplay/userpath/settings/DesktopJive.lua

      I have following content in it:
      settings = {mac="xx:xx:xx:xx:xx:xx",uuid="xxxxxxxxxxxxxxxxxxx x"",alsaSampleSize=24,alsaPlaybackDevice="plugh w:2 ,0",alsaEffectsDevice="plughw:0,0",alsaPlaybackB uf ferTime=50000,alsaPlaybackPeriodCount=3}

      I have verified that above settings really give 24bit at least to my USB Audiophilleo1 device.
      Kimmo
      www.daphile.com

      Comment

      • linuxfox
        Junior Member
        • Nov 2011
        • 7

        #4
        Great post. Now I do not have to patch the sources every time!
        Interesting the alsaplaybackbuffertime option. Does a bigger buffer give better sound quality?

        Comment

        • wilbert-vb
          Member
          • Feb 2011
          • 55

          #5
          High CPU usage

          Originally posted by kipeta
          in Linux you can choose the audio device and other parameters through setting file:
          ~/.squeezeplay/userpath/settings/DesktopJive.lua

          I have following content in it:
          settings = {mac="xx:xx:xx:xx:xx:xx",uuid="xxxxxxxxxxxxxxxxxxx x"",alsaSampleSize=24,alsaPlaybackDevice="plugh w:2 ,0",alsaEffectsDevice="plughw:0,0",alsaPlaybackB uf ferTime=50000,alsaPlaybackPeriodCount=3}

          I have verified that above settings really give 24bit at least to my USB Audiophilleo1 device.
          Thank you very much for this gem of information, I do want to add that your line results in a high CPU load.
          Top shows a load of 30%.

          When I modify your line to this, I have a normal CPU load of 1%:
          settings = {mac="xx:xx:xx:xx:xx:xx",uuid="yyy",alsaSampleSize =24,alsaPlaybackDevice="plughw:1,0",}

          Comment

          • kipeta
            Senior Member
            • Nov 2011
            • 155

            #6
            Originally posted by wilbert-vb
            Thank you very much for this gem of information, I do want to add that your line results in a high CPU load.
            Top shows a load of 30%.

            When I modify your line to this, I have a normal CPU load of 1%:
            settings = {mac="xx:xx:xx:xx:xx:xx",uuid="yyy",alsaSampleSize =24,alsaPlaybackDevice="plughw:1,0",}
            I don't personally have such a high load (jive and both jive_alsa's are showing 1-4% in Top). It's really difficult to guess the reason for your case. Which process of SqueezePlay is causing the load? jive or jive_alsa? jive_alsa of Effects or Playback device?
            Kimmo
            www.daphile.com

            Comment

            Working...