Quad;627464 Wrote: 
> I don't get this. Sorry Phil, unlike you I'm always confusing instead of
> helping. But once started I can't stop.
> 
> Here we go ;-)
> 
> When I put this in my custom-convert, things are almost fine
> 
> > 
Code:
--------------------
  >   >  flc pcm * *
  >     # IFD:{RESAMPLE=-r %d}
  >     [sox] -D -q -t flac $FILE$ -t raw -c2 -s $RESAMPLE$ - 
--------------------
> > 
> 
> Everything up to 96k streams as PCM to my Touch at its original
> sample rate. On top, even 192k files seem to be treated with this
> line but they play way too slow and my DAC says it's 44.1k!
> 
> When I put this, things look even better but still not optimal
> 
> > 
Code:
--------------------
  >   >  flc pcm * *
  >     # IFD:{RESAMPLE=-r 44100}
  >     [sox] -D -q -t flac $FILE$ -t raw -c2 -s $RESAMPLE$ - 
--------------------
> > 
> 
> Now all of my library is playing at the right speed regardless the
> sample rate, but obviously 192k files are downsampled to 44.1k
> instead of 96k.
> 
> And yes, you are right, SoX is perfectly capable of resampling PCM.
> Outside the Squeezebox world I managed to do so.
> 
> If you could explain how and why things are the way they are, I would
> be grateful.

As I said, SBS does not handle smart downsampling for WAV/PCM - hence
your first version above doesn't work for 192 (actually it won't work
for anything > 96) - you can't use the "%d" option!

So your second version is better but not great.

What I do is similar to your second version but:
1) I force EVERYTHING to 96
2) you MUST lower the volume slightly when upsampling to avoid clipping
-v0.965 works for me.
3) use the high quality resampling algorithm -v


see below: remember I am streaming FLAC as FLAC (via Inguz but that is
irrelevant)...

flc flc * *
        # FT:{START=--skip=%t}U:{END=--until=%v}D:{RESAMPLE=rate -v -s 96k}
        [flac] -dcs $START$ $END$ -- $FILE$ | [sox] -q -v0.965 -t wav - -t wav
-C 0 - rate -v -s -L -a 96000 | [InguzDSP] -id "00:04:20:22:01:8e" -wav
-wavo -d 24 | [flac] -cs -0 --totally-silent -


flc flc transcode * - identical to above.





The key parts are:
1) lower the volume slightly
2) use 96000 as the fixed resampling rate for everything
3) use the -v option for very high quality resampling


-- 
Phil Leigh

You want to see the signal path BEFORE it gets onto a CD/vinyl...it
ain't what you'd call minimal...
Touch(wired/XP) - Audiolense 3.3/2.0+INGUZ DRC - MF M1 DAC - Linn 5103
- full Aktiv 5.1 system (6x LK140's, ESPEK/TRIKAN/KATAN/SEIZMIK 10.5),
Pekin Tuner, Townsend Supertweeters, Blue Jeans Belden Digital,Kimber
8TC Speaker & Chord Signature Plus Interconnect cables
Stax4070+SRM7/II phones
Kitchen Boom, Outdoors: SB Radio, Harmony One remote for everything.
------------------------------------------------------------------------
Phil Leigh's Profile: http://forums.slimdevices.com/member.php?userid=85
View this thread: http://forums.slimdevices.com/showthread.php?t=86994

_______________________________________________
Touch mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/touch

Reply via email to