On Sat, Apr 21, 2012 at 01:29:37PM +0200, Jurgen Kramer wrote:
> +struct dsdiff_header_dsf {
> +     struct dsdiff_id id;            /* "DSD " */
> +     uint32_t size_low, size_high;   /* DSD chunk size, including id = 28 */
> +     uint32_t fsize_low, fsize_high; /* Total file size */
> +     uint32_t pmeta_low, pmeta_high; /* Pointer to id3v2 metadata, should be
> +                                        at the end of the file */
> +};

What's the reason for not using uint64_t?

> +     /* Check bits per sample format, determine if bitreverse is needed */
> +     metadata->bitreverse = dsf_fmt_chunk.bitssample == 1 ?  true : false;

@Max: Would it make sense to directly assign the value, which the '=='
operator returned?


> +     metadata->fileisdff = false;
> +     return true;
> +
> +     } else {

The indentation is a bit confusing here.

>  /**
> + * DSF data is build up of alternating 4096 blocks of DSD samples for left 
> and
> + * right data. Convert the buffer holding 1 block of 4096 DSD left samples 
> and 
> + * 1 block of 4096 DSD right samples to 8k of samples in normal PCM 
> left/right
> + * order.
> + */
> +static void
> +dsf_to_pcm_order(uint8_t *p, uint8_t *q, size_t nrbytes)

You can see by reading the code that the content of 'p' is copied into
'q', but more descriptive names (like 'from' and 'to') would make it
more readable.


Thanks,
        Jonathan Neuschäfer

------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Musicpd-dev-team mailing list
Musicpd-dev-team@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team

Reply via email to