Bug 15119 - SB Server should resample unsupported sample rates
: SB Server should resample unsupported sample rates
Status: REOPENED
Product: Logitech Media Server
Classification: Unclassified
Component: Audio
: 7.4.1
: PC Windows XP
: -- normal (vote)
: Future
Assigned To: Unassigned bug - please assign me!
: community_fix
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-11-16 14:36 UTC by Walker LaRon
Modified: 2011-11-06 23:22 UTC (History)
6 users (show)

See Also:
Category: Bug


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Walker LaRon 2009-11-16 14:36:12 UTC
Ticket #091115-001466

Transporter fw 80
41.0 kHz 16 bit FLAC files

When customer plays 16 bit 41.0 kHz files, they play too fast.  Customer sent 3 files, an we were able to recreate the issue here.

**These files play fine on Classic and Boom***

Issue only occurs on Transporters

Open the Squeezebox Server web control
	-Click on Settings (bottom right hand corner)
	-Go to the advanced tab
	-Change the dropdown menu to File Types
	-Locate the FLAC section, and change the dropdown from "Native" to "Disabled"
	-Click the Apply button then click Close (bottom right hand corner)


Re-choose the file whether on the Transporter or SB Server.  I will play correctly. 

Spoke with QA, advised to create a bug.

Thanks,

LaRon
Comment 1 Walker LaRon 2009-11-16 14:47:20 UTC
Files too large to attached.  Please download them via the following link.

https://rcpt.yousendit.com/776644632/03f5b4e28d58c95a25fb9dfa8621949a

Thanks,

LaRon
Comment 2 Andy Grundman 2009-11-17 13:12:56 UTC
Yeah, the real fix is for the user to re-rip at the correct sample rate.  Nobody should be using 41 kHz.  Actually I'm a bit surprised we can play a 41 kHz file.

However, I would expect sox resampling to kick in here to resample this to 44.1, but it probably doesn't because we only coded for the downsampling case I think.  Alan: any ideas?
Comment 3 Alan Young 2009-11-17 23:18:10 UTC
Yes, we only coded for the downsampling case - that is, when the sample-rate of the file is greater than the maximum rate supported by the player.

Also, I believe that we only support 'standard' sample rates: 8000, 11025, 16000, 22050, 24000, 32000, 44100, 48000, 88200, 96000.
Comment 4 Chris Owens 2009-11-18 17:05:08 UTC
From the product documentation: Sample rates: 44.1kHz, 48kHz, 88.2kHz, 96kHz
Comment 5 Jim McAtee 2009-11-18 17:51:51 UTC
Why do they play correctly on SB3 and Boom?  Different internal clocks or is it a complete mystery?
Comment 6 Spies Steven 2009-11-18 18:00:17 UTC
I don't agree that this should be a wont fix.  We should at least fail gracefully instead of playing the flac at the wrong speed.
Comment 7 Chris Owens 2009-11-18 18:03:01 UTC
I seem to recall Sean put something into the SB2/3 firmware to play at
arbitrary speeds for a customer who was interested in using the products for
transcription.  My guess would be that there wasn't room for both that AND
Sean's audiophile magic in the Transporter FW.  :)

I will poke around a bit and try to find any more info.

Steven and LaRon, does the file play correctly if you DON'T go out of your way to disable transcoding as LaRon describes in step 1?
Comment 8 Walker LaRon 2009-11-18 19:39:00 UTC
Hello Chris,

No, the files play like Alvin and the Chipmunks.. to describe it best.


Thanks,

LaRon
Comment 9 Spies Steven 2009-11-20 11:06:00 UTC
So it turns out that transporter is playing the 41 kHz flac as 88.2 kHz and the classic is playing the track at 44.1 kHz. So neither player is playing the track at the right speed.  While the classic is playing about 7% fast the transporter is playing about 215% fast which is hard to miss indeed.

I also tested the track on touch and even tough the output is playing at 44.1 kHz it is playing at the right speed.  Does the touch have the ability to resample or is sox involved and I just don't realize it?

Anyway I would think a simple solution to this issue would be to define all of the sample rates that the players support properly and any track outside of those rates gets resampled on the server or just not play.

Oh and I decoded the flac to wav and I get the same result so this does not seem format specific. Also it is a valid flac file as well.  

Alan, what do you think?
Comment 10 Alan Young 2009-11-21 00:15:15 UTC
(In reply to comment #9)

> I also tested the track on touch and even tough the output is playing at 44.1
> kHz it is playing at the right speed.  Does the touch have the ability to
> resample or is sox involved and I just don't realize it?

Playing FLAC, but not PCM, Touch may have the ability to resample in the audio driver. I do not know how good or CPU-intensive that resampling is.
Comment 11 Alan Young 2009-11-21 00:19:38 UTC
Anyone interested in developing an enhancement should probably look at Slim::Player::CapabilitiesHelper::samplerateLimit
Comment 12 Chris Owens 2010-01-04 15:21:31 UTC
Do you know why this is assigned to you, LaRon?
Comment 13 Walker LaRon 2010-01-04 15:34:33 UTC
(In reply to comment #12)
> Do you know why this is assigned to you, LaRon?

Hello Chris,

I have no idea.


Thanks,

LaRon
Comment 14 Chris Owens 2010-01-25 18:13:35 UTC
Is it even possible to disable transcoding on a per-player basis?  I don't know what is the right solution for this problem.
Comment 15 Alan Young 2010-01-25 21:55:00 UTC
Chris, I don't understand that last comment.
Comment 16 Chris Owens 2010-01-27 15:10:13 UTC
Sorry, maybe I'm over-analyzing this bug.  

* The problem is: 41KHz files play at the wrong sample rate on the Transporter.  
* The workaround is (according to LaRon in the original comment) to change the 'File Types' settings.

Maybe that is the fix.  I don't know.
Comment 17 Alan Young 2010-01-27 22:27:36 UTC
The issue is that the products do not support playing files with non-standard sample-rates - this is fine. The bug is that, instead of refusing to play them, it plays them badly. I would call this a very minor bug indeed.
Comment 18 Alan Young 2011-11-06 23:22:37 UTC
Unassigned bugs cannot have a priority.