[linux-audio-dev] sophomore questions

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

Subject: [linux-audio-dev] sophomore questions
From: ljp (ljp_AT_llornkcor.com)
Date: Tue Apr 03 2001 - 14:59:55 EEST


If I do this

read( sd, inbuffer, BUFSIZE);

for( i=0;i<BUFSIZE;i++) {
leftBuf=(inbuffer[2*i] * gain);

}

would I do this?
write( file_d, leftBuf, BUFSIZE/2);

to write a mono file?

Some code I am working with does this.

read( sd, inbuffer, BUFSIZE*2)/2;

What would be the advantage of doing this?

thanks-
ljp


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

This archive was generated by hypermail 2b28 : Sat Apr 07 2001 - 15:59:07 EEST