I actually played with this for several hours today, but couldn't get it
to work correctly for the hi-res AIFF files. I was testing with a 24/192
album from hdtracks (I used dbpoweramp to transcode the FLAC from
hdtracks into AIFF), as well as a small library of 16/44.1 AIFF.
Invariably, if I got the 24/192 file to play something other than white
noise, it played at what sounded like 1/2 speed (also very tubby
sounding, with loud bass).

This was using rules placed in custom-convert.conf (which needs to be
located in the same folder as convert.conf). No need to modify
convert.conf. If a rule exists in both convert.conf and
custom-convert.conf, the one in custom-convert.conf will override the
former.

The standard rule for AIFF is just:


Code:
--------------------
    
  aif aif * *
        -
--------------------


Which means do nothing to the stream, although I think the server may
strip the header from of the AIFF file before streaming. The reason LMS
refuses to use the rule for hi-res is that it knows the Transporter
can't handle 24/192 and there needs to be means of resampling in the
rule. Since there isn't one, it just doesn't play the file.

So I tried variations on rules like this:


Code:
--------------------
    
  aif aif * *
        # FD:{RESAMPLE=-r %d}
        [sox] -q -t aif $FILE$ -t raw $RESAMPLE$ -c 2 -s -B -
--------------------


This transcodes AIFF to what is essentially AIFF without the header. The
-B keeps it big-endian, which AIFF uses. If you use AIFF output (-t aif
instead of -t raw) then you hear a "tick" at the start of every file, as
the player attempts to play the header as part of the music stream.

The -t arguments to SoX tell it what kind of input file to expect, and
what type of file to produce as output. It's capable of processing and
transcoding many different audio formats. The input designation may not
strictly be necessary here, as SoX can usually figure out the input file
type from the file's headers.


Code:
--------------------
    
  -q        : quiet mode
  -t aif    : the input audio is AIFF
  $FILE$    : full path of the input file
  -t raw    : produce a headerless raw data stream as output
  $RESAMPE$ : expanded resample rule from the line above (should end up being 
"-r 96000" when playing the 24/192 file)
  -c 2      : produce 2 channel output
  -s        : use signed-integer encoding
  -B        : output big-endian byte-order
  -         : send the output to stdout, which is what LMS expects
--------------------


Run sox --help to get a full usage explanation.

You _can_ set up a PCM rule in custom-convert.conf and then force it to
be used on the file types settings page. But the only difference with
PCM and what is shown above, is the endianness of the data, as PCM use
little-endian encoding (like WAV does). I get *exactly* the same results
here as with the above. It plays 16/44.1, but 24/192 plays slow.


Code:
--------------------
    
  aif pcm * *
        # FD:{RESAMPLE=-r %d}
        [sox] -q -t aif $FILE$ -t raw $RESAMPLE$ -c 2 -s -L -
--------------------



In the end, I think the playback speed problem has to do with
transcoding from a 24 bit source. I'm not sure where the bug is, though.
It may have to do with the fact we're sending a headerless stream to the
Transporter, and that it assumes it's 16 bit audio. It may be that doing
pretty much the same resampling and streaming the audio as FLAC is
understood by the Transporter because it reads the proper audio
information in the FLAC headers that it receives.


------------------------------------------------------------------------
JJZolx's Profile: http://forums.slimdevices.com/member.php?userid=10
View this thread: http://forums.slimdevices.com/showthread.php?t=102893

_______________________________________________
audiophiles mailing list
audiophiles@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/audiophiles

Reply via email to