[iyonix-support] Re: Audio input

In message <52f8af194f.christian@xxxxxxxxxx>
          Christian Ludlam <chris@xxxxxxxxxx> wrote:

> There's a file called Spec inside the !AudioIn application which
> gives you the API to get at the data.

Something else bothers me.  Formats 0 to 3 are supposedly 8 bit.
Yet the data they return is obstinately appropriate to 16 bit
linear, and inappropriate for logarithmic in any sense that I
understand.  I assume we're talking about mu-law here, either
coded according to ITU-T G.711 (sign bit on the left, quiet
inputs hover mostly on FF and 7F) or the VIDC version of the
same where the sign bit is on the right and the other 7 bits
are shifted left by 1 place.  The values I get when I open
source 2, for example, in any of formats 0 to 3, is bytes which
hover mostly on 00 or FF, occasionally 01 or FE, and when taken
in pairs, read as signed 16 bit integers with LS byte first,
hovering mostly on 0 and -1.

So it looks as if the "format" parameter when opening a device
for audio input has no effect; the data returned are always 16
bit linear.

RISC OS 5.11, AudioIn 1.00 (24-Jun-04)

What is meant by "8 bit unsigned" and "8 bit signed" when
referring to a logarithmic data format?

Dave
---
To alter your preferences or leave the group, 
visit http://www.freelists.org/list/iyonix-support
Other info via http://www.freelists.org/webpage/iyonix-support

Other related posts: