From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,9c6675b68433c888,start X-Google-Attributes: gidfee84,public X-Google-Thread: f678f,9c6675b68433c888,start X-Google-Attributes: gidf678f,public X-Google-Thread: 115960,9c6675b68433c888,start X-Google-Attributes: gid115960,public From: "Christopher N. Worsley" Subject: Programming Sound Board with MME Date: 1996/08/26 Message-ID: <32226836.1664@cop.dec.com>#1/1 X-Deja-AN: 176716243 content-type: text/plain; charset=us-ascii organization: Digital Equipment Corporation mime-version: 1.0 newsgroups: comp.unix.osf.misc,comp.unix.osf.osf1,comp.os.ms-windows.programmer.multimedia x-mailer: Mozilla 2.01 (Win95; I) 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