Triode,  here is the decode=info log of playing a DFF version of a track
followed by a DSF version of the same track,  both in the same playlist.
DFF finishes correctly, DSF prints some diagnostics when it fails.


Code:
--------------------
    [05:38:17.975651] codec_open:211 codec open: 'd'
  [05:38:18.133479] _read_header:134 DSDIFF version: 1.4.0.0
  [05:38:18.133731] _read_header:138 sample rate: 2822400
  [05:38:18.133793] _read_header:142 channels: 2
  [05:38:18.133852] _read_header:145 found dsd len: 174172342
  [05:38:18.133910] dsd_decode:524 setting track_start
  [05:38:18.133965] dsd_decode:535 DOP output
  [05:42:22.608775] _decode_dsdiff:472 end of track samples
  [05:42:22.608961] decode_thread:99 decode complete
  
--------------------


Code:
--------------------
    
  [05:42:22.667158] codec_open:211 codec open: 'd'
  [05:42:22.809234] _read_header:158 DSF version: 1 format: 0
  [05:42:22.809386] _read_header:168 channels: 2
  [05:42:22.809447] _read_header:169 sample rate: 2822400
  [05:42:22.809503] _read_header:170 lsb first: 1
  [05:42:22.809557] _read_header:171 sample bytes: 87086171  <- value is half 
what I would expect for a 2 channel track.
  [05:42:22.809615] _read_header:172 block size: 4096
  [05:42:22.809670] _read_header:178 found dsd len: 174178316
  [05:42:22.809724] dsd_decode:524 setting track_start
  [05:42:22.809776] dsd_decode:535 DOP output
  [05:46:29.416061] _decode_dsf:253 frames got to zero
  [05:46:29.416251] _decode_dsf:254 sample bytes: 1
  [05:46:29.416318] _decode_dsf:255 bytes: 2982
  [05:46:29.416373] _decode_dsf:256 bytes per frame: 2
  [05:46:29.416431] decode_thread:99 decode error
--------------------


Sample Bytes gets set very differently when playing DSF tracks, the
value is half what I would expect, but that seems to be because we are
reading the 8-Byte sample count, which by Sony's definition means > 
[Annotation2]
> Sample count is the num per 1 channel.
> Ex) n second data: Sample count would be Sampling frequency * n where the 
> quotation comes from
http://dsd-guide.com/sites/default/files/white-papers/DSFFileFormatSpec_E.pdf


This made me want to try the following:

Code:
--------------------
    diff --git a/dsd.c b/dsd.c
  index 691d9cc..1114383 100644
  --- a/dsd.c
  +++ b/dsd.c
  @@ -163,7 +163,7 @@ static int _read_header(void) {
  d->channels = unpack32le((void *)(streambuf->readp + 24));
  d->sample_rate = unpack32le((void *)(streambuf->readp + 28));
  d->lsb_first = (unpack32le((void *)(streambuf->readp + 32)) == 1);
  -                                       d->sample_bytes = unpack64le((void 
*)(streambuf->readp + 36)) / 8;
  +                                       d->sample_bytes = unpack64le((void 
*)(streambuf->readp + 36)) * d->channels / 8;
  d->block_size = unpack32le((void *)(streambuf->readp + 44));
  LOG_INFO("channels: %u", d->channels);
  LOG_INFO("sample rate: %u", d->sample_rate);
--------------------


But doing the above creates a different problem (track runs off the end,
with a loud crackle)

Hoping some of the above makes sense.



----------------------
"Dreamer, easy in the chair that really fits you..."
------------------------------------------------------------------------
dsdreamer's Profile: http://forums.slimdevices.com/member.php?userid=12588
View this thread: http://forums.slimdevices.com/showthread.php?t=99395

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

Reply via email to