Triode wrote: 
> I think Clive is already using sox to upsample to 384 on the server.  
> Clive - does this work in real time if the server is on the wandboard?

One word answer, yes. You'll be using one proc core exclusively for the
up/over sampling 44k1->352k8 or 48k -> 384k. 
Example below with my server side sox re-sampling on the WB, 44k1 ->
352k8, very high quality, minimum phase.

I have several other thoughts about going down this path. I'll send you
an email this evening.


Code:
--------------------
    
  ##
  ## HDCDUpsample
  ##
  flc flc * 00:1f:7b:b2:02:85
  # FT:{START=--skip=%t}U:{END=--until=%v}D:{RESAMPLE=-r %d}
  [flac] -dcs $START$ $END$ -- $FILE$ | [HDCDUpsample.sh] --file=$FILE$ -W 
--oversample="8" --max-sample-rate="384000" --sox-general-opt="-q" 
--sox-input-opt="-t wav -" --sox-output-opt="-t flac -C0 -b24 -D -" 
--sox-effect-opt="gain -1 rate -v -s -M"
  
--------------------



Code:
--------------------
    
  top - 05:35:39 up 1 day,  3:52,  2 users,  load average: 4.42, 3.90, 3.57
  Tasks: 112 total,   2 running, 110 sleeping,   0 stopped,   0 zombie
  %Cpu0  : 78.8 us,  1.7 sy,  0.0 ni, 18.8 id,  0.0 wa,  0.0 hi,  0.7 si,  0.0 
st
  %Cpu1  : 37.1 us,  1.7 sy,  0.0 ni, 60.9 id,  0.0 wa,  0.0 hi,  0.3 si,  0.0 
st
  KiB Mem:    848036 total,   832216 used,    15820 free,    32104 buffers
  KiB Swap:        0 total,        0 used,        0 free,   524716 cached
  
  PID USER      PR  NI  VIRT  RES  SHR S  %CPU %MEM    TIME+  COMMAND           
  25414 squeezeb  20   0 15472 6680 2244 R  92.5  0.8   0:54.41 sox             
  
  25390 squeezeb  20   0 92948  80m 5188 S  16.2  9.8   0:32.92 squeezeboxserve 
  
  25330 squeezel  10 -10 12280 9692 3604 S   7.6  1.1   0:05.38 squeezelite     
  
  25404 squeezeb  20   0  553m  16m 5668 S   2.4  2.0   0:03.25 java            
  
  25402 squeezeb  20   0  7776  824  636 S   1.3  0.1   0:00.77 flac
  
--------------------



Code:
--------------------
    
  [fedora@wandboard squeezeboxserver]$ less /var/log/squeezeboxserver/HDCD.log
  2013-05-29 05:34:37,274 INFO  (main) [HDCD] [] HDCD Version: 20130306
  2013-05-29 05:34:37,308 WARN  (main) [HDCD] [] hdcd.exe is not found!
  2013-05-29 05:34:37,317 INFO  (main) [HDCD] [] HDCDUpsample 
--file=/storage/music/lossless/June_Tabor/Ashore/01 - Finisterre.flac -W 
--oversample=8 --max-sample-rate=384000 --sox-general-opt=-q --sox-input-opt=-t 
wav - --sox-output-opt=-t flac -C0 -b24 -D - --sox-effect-opt=gain -1 rate -v 
-s -M
  2013-05-29 05:34:37,423 INFO  (main) [HDCD] [] --async-rate not set.
  2013-05-29 05:34:37,594 DEBUG (main) [HDCD] 
[/storage/music/lossless/June_Tabor/Ashore/01 - Finisterre.flac] Sample Rate: 
44100, BPS: 16, Channels: 2
  2013-05-29 05:34:37,596 DEBUG (main) [HDCD] 
[/storage/music/lossless/June_Tabor/Ashore/01 - Finisterre.flac] Requested 
Oversample Ratio: 8, Requested Output Rate: 352800, Max Output Rate: 384000, 
Actual Output Rate: 352800
  2013-05-29 05:34:37,665 DEBUG (main) [HDCD] 
[/storage/music/lossless/June_Tabor/Ashore/01 - Finisterre.flac] Starting 
without checking for HDCD encoding. --without-hdcd cmdline argument given!
  2013-05-29 05:34:37,775 DEBUG (main) [HDCD] 
[/storage/music/lossless/June_Tabor/Ashore/01 - Finisterre.flac] Pass through, 
not decoding. (STDIN -> sox -q -t wav - -t flac -C0 -b24 -D - gain -1 rate -v 
-s -M 352800)
  2013-05-29 05:41:50,348 DEBUG (main) [HDCD] 
[/storage/music/lossless/June_Tabor/Ashore/01 - Finisterre.flac] Cleaning Up
  2013-05-29 05:41:50,349 INFO  (main) [HDCD] 
[/storage/music/lossless/June_Tabor/Ashore/01 - Finisterre.flac] Finished
  
--------------------



Code:
--------------------
    
  [fedora@wandboard squeezeboxserver]$ 
/usr/share/squeezeboxserver/Bin/HDCDUpsample.sh --help
  usage: HDCDUpsample [--file <NAME>] [--fis <NAME>] [--fos <NAME>] [-h]
  [--max-sample-rate <RATE>] [--oversample <RATIO>] [--sox-effect-opt
  <EFFECT_OPTS>] [--sox-gain-db <DB_GAIN>] [--sox-gain-db-hdcd
  <DB_GAIN>] [--sox-general-opt <GENERAL_OPTS>] [--sox-input-opt
  <INPUT_OPTS>] [--sox-output-opt <OUTPUT_OPTS>] [-W] [-X]
  --file <NAME>                      the file to be processed.
  --fis <NAME>                       the file input stream.
  --fos <NAME>                       the file output stream.
  -h,--help                             Show help.
  --max-sample-rate <RATE>           The maximum sample rate supported
  by the output device. Defaults to
  "96000" if not specified.
  --oversample <RATIO>               The oversample ratio. ie. RATIO *
  sample_rate = output_sample_rate.
  Defaults to "1" if not specified.
  --sox-effect-opt <EFFECT_OPTS>     The effect options to be passed to
  sox. Defaults to "rate -v -s -L" if
  not specified.
  --sox-gain-db <DB_GAIN>            The gain (in db) to be applied by
  sox (before resampling) when not
  decoding hdcd. NB. Ignored when
  output sample rate == input sample
  rate. ie. when not resampling.
  --sox-gain-db-hdcd <DB_GAIN>       The gain (in db) to be applied by
  sox (before resampling) when
  decoding hdcd.
  --sox-general-opt <GENERAL_OPTS>   The general options to be passed to
  sox. Defaults to "-q" if not
  specified.
  --sox-input-opt <INPUT_OPTS>       The input options to be passed to
  sox. Defaults to "-t wav -" if not
  specified.
  --sox-output-opt <OUTPUT_OPTS>     The output options to be passed to
  sox. Defaults to "-t flac -C0 -b24
  -D -" if not specified.
  -W,--without-hdcd                     Disable HDCD decoding.
  -X,--async-rate                       Switch off the requirement that
  output rate should be an integer
  multiple/divisor of the original
  rate.
  
--------------------


------------------------------------------------------------------------
JackOfAll's Profile: http://forums.slimdevices.com/member.php?userid=3069
View this thread: http://forums.slimdevices.com/showthread.php?t=98544

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

Reply via email to