Re: [linux-audio-dev] libsndfile (was Sample conversion tools)

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] libsndfile (was Sample conversion tools)
From: Josh Green (jgreen_AT_users.sourceforge.net)
Date: Wed Jun 05 2002 - 08:23:35 EEST


On Tue, 2002-06-04 at 03:57, Erik de Castro Lopo wrote:
> On 04 Jun 2002 03:09:47 -0600
> Josh Green <jgreen_AT_users.sourceforge.net> wrote:
>
> > Wow, I was not aware of that. I thought that "sf_read_short" should only
> > be called for 16 bit audio, sf_read_int for 24 bit, etc.
>
> Version 1 (ready RealSoonNow (tm) honest :-)) even does something sensible
> when you read say a 24 bit PCM file using the sf_read_short () function. The
> rule for version 1 is as follows:
>
> "whenever integer data is moved from one sized container to another sized
> container, the most signicant bit in the source container will become the
> most significant bit in the destination container."
>

What would happen in the current implementation? Would it be truncated?
What I am wondering is if I use sf_read_short () for loading all samples
regardless of format will it work correctly?

> > Perhaps I
> > should read the manual again to see how obvious this feature of
> > libsndfile is in the docs.
>
> Please do. Maybe I didn't put enough emphasis on this feature in the docs.
> It certainly is pretty obvious if you look at the programs in the example/
> directory of the distribution.
>

Nope, never did look at the programs in example/ :) Perhaps it should be
made more obvious in the docs, I'll look over them again sometime.

> Erik
> --

Cheers.
        Josh Green


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Wed Jun 05 2002 - 08:22:18 EEST