Usenet comp.unix.osf.misc (1992-2004)
 help / color / mirror / Atom feed
From: "Christopher N. Worsley" <chris.worsley@cop.dec.com>
Subject: Programming Sound Board with MME
Date: 1996/08/26	[thread overview]
Message-ID: <32226836.1664@cop.dec.com> (raw)


hi all:

i am working with MME in OSF1 on an alpha platform. the MME API to
the sound board under OSF1 is identical to that in Windows (with
some extentions).

the wave API to the sound board is nice, but docs seem hard to find.
if you know of a good reference, please let me know where i can get
more information other than that found in the man pages.

i have a specific question about the format of the data returned to
the application.

part 1.
  the function waveInOpen() accepts a callback parameter.
  this callback is executed when the driver has opened/closed
  the sound device AND when a data buffer is ready for
  application processing.

part 2.
  the application allocates buffers (via mmeAllocBuffer()) and
  turns them over to the MME library by calling waveInAddBuffer().

part 3.
  in the callback function, the application gets a refernce to
  the buffer with the data in it.

the big question:
  how is the data formatted?

it _SEEMS_ that if the wave input device (the sound card) is opened
with:
  * mono, 8-bit resolution ->
    format is: each byte in the buffer is a sound unit.

  * stereo, 8-bit resolution ->
    format is: 1st byte is left channel, 2nd byte is right channel

but, what is the organization when the wave input format is set to
16-bit resolution. some experiments i've run haven't been successful.
can you confirm that in stereo mode using 16-bit resolution that
   * byte #1 is the LSB of a 16-bit word for the left channel
   * byte #2 is the MSB of a 16-bit word for the left channel
   * byte #3 is the LSB of a 16-bit word for the right channel
   * byte #4 is the MSB of a 16-bit word for the right channel
   * etc?

and, BTW, should i expect the data to be signed or unsigned?

all help is appreciated!


christopher



                 reply	other threads:[~1996-08-26  4:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox