Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 7 of 7
  1. #1
    Senior Member
    Join Date
    May 2008
    Location
    Canada
    Posts
    2,824

    Sample rate for PCM when resampling

    Hi - I was trying to find a solution for the following issue:

    When LMS has to downsample a file because the player does not support its sample rate (eg more then 44.1KHz), the samplerate indicated in the slimproto header is the original rate, not the downsampled one. For any self-describing format, this is not an issue, but for for pcm, the player has no way to know the real sampling rate, so playback sounds like chipmunk. I'm not trying to argue if LMS should send the actual rate or the original one in slimproto, maybe it's by design to let the player display the original file data, but one way to fix that would be to add in the content-type of the stream sent by LMS, the actual sample rate as well (audio/L16;rate=xxx). Today, LMS just sends audio/L16 as a content-type. Can somebody points me a bit where, in the LMS code, this is done so that I can propose a patch? I know marcoc did something for squeezelite, but it does not seem to fill the need of raw PCM and non-local files.

    Thanks
    LMS 7.7, 7.8 and 7.9 - 5xRadio, 3xBoom, 4xDuet, 1xTouch, 1 SB2. Sonos PLAY:3, PLAY:5, Marantz NR1603, JBL OnBeat, XBoxOne, XBMC, Foobar2000, ShairPortW, JRiver 21, 2xChromecast Audio, Chromecast v1 and v2, , Pi B3, B2, Pi B+, 2xPi A+, Odroid-C1, Odroid-C2, Cubie2, Yamaha WX-010, AppleTV 4, Airport Express

  2. #2
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    19,475

    Sample rate for PCM when resampling

    > rate as well (audio/L16;rate=xxx). Today, LMS just sends audio/L16 as a
    > content-type. Can somebody points me a bit where, in the LMS code, this
    > is done so that I can propose a patch? I know marcoc did something for
    > squeezelite, but it does not seem to fill the need of raw PCM and
    > non-local files.


    And using PCM is a necessity?

    TBH: there are dark corners in our code which I tend not to visit.
    That's certainly one of them... It's certainly somewhere in Slim/Player.

    --

    Michael

  3. #3
    Senior Member pippin's Avatar
    Join Date
    Oct 2007
    Location
    Berlin
    Posts
    13,866
    If the player is a UPnP player then the spec says PCM is a required format option while FLAC is not (and usually unsupported).
    ---
    learn more about iPeng, the iPhone and iPad remote for the Squeezebox and
    Logitech UE Smart Radio as well as iPeng Party, the free Party-App,
    at penguinlovesmusic.com
    New: iPeng 9, the Universal App for iPhone, iPad and Apple Watch

  4. #4
    Senior Member
    Join Date
    May 2008
    Location
    Canada
    Posts
    2,824
    Quote Originally Posted by mherger View Post
    > rate as well (audio/L16;rate=xxx). Today, LMS just sends audio/L16 as a
    > content-type. Can somebody points me a bit where, in the LMS code, this
    > is done so that I can propose a patch? I know marcoc did something for
    > squeezelite, but it does not seem to fill the need of raw PCM and
    > non-local files.


    And using PCM is a necessity?

    TBH: there are dark corners in our code which I tend not to visit.
    That's certainly one of them... It's certainly somewhere in Slim/Player.

    --

    Michael
    Quote Originally Posted by pippin View Post
    If the player is a UPnP player then the spec says PCM is a required format option while FLAC is not (and usually unsupported).
    I like the term "dark corners" :-)

    One of the reason why some want to use PCM is that this is the only option for the plugin to support replay gain
    LMS 7.7, 7.8 and 7.9 - 5xRadio, 3xBoom, 4xDuet, 1xTouch, 1 SB2. Sonos PLAY:3, PLAY:5, Marantz NR1603, JBL OnBeat, XBoxOne, XBMC, Foobar2000, ShairPortW, JRiver 21, 2xChromecast Audio, Chromecast v1 and v2, , Pi B3, B2, Pi B+, 2xPi A+, Odroid-C1, Odroid-C2, Cubie2, Yamaha WX-010, AppleTV 4, Airport Express

  5. #5
    Senior Member pippin's Avatar
    Join Date
    Oct 2007
    Location
    Berlin
    Posts
    13,866
    Why is that?
    ---
    learn more about iPeng, the iPhone and iPad remote for the Squeezebox and
    Logitech UE Smart Radio as well as iPeng Party, the free Party-App,
    at penguinlovesmusic.com
    New: iPeng 9, the Universal App for iPhone, iPad and Apple Watch

  6. #6
    Senior Member
    Join Date
    May 2008
    Location
    Canada
    Posts
    2,824
    Quote Originally Posted by pippin View Post
    Why is that?
    Because it's just a bridge that forwards what it receives from LMS, it does not decode the audio (only my airplay bridge does that) and UPnP devices do not support replay gain. But when I receive pcm from LMS, I can apply replay gain on the samples directly (then audio is forwarded to the uPnP player as pcm, wav or aif)
    LMS 7.7, 7.8 and 7.9 - 5xRadio, 3xBoom, 4xDuet, 1xTouch, 1 SB2. Sonos PLAY:3, PLAY:5, Marantz NR1603, JBL OnBeat, XBoxOne, XBMC, Foobar2000, ShairPortW, JRiver 21, 2xChromecast Audio, Chromecast v1 and v2, , Pi B3, B2, Pi B+, 2xPi A+, Odroid-C1, Odroid-C2, Cubie2, Yamaha WX-010, AppleTV 4, Airport Express

  7. #7
    Senior Member pippin's Avatar
    Join Date
    Oct 2007
    Location
    Berlin
    Posts
    13,866
    Ah, understand
    ---
    learn more about iPeng, the iPhone and iPad remote for the Squeezebox and
    Logitech UE Smart Radio as well as iPeng Party, the free Party-App,
    at penguinlovesmusic.com
    New: iPeng 9, the Universal App for iPhone, iPad and Apple Watch

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •