- fixed the capture to stdout in WAV.

- allow more than 32bit int in the raw capture mode.
This commit is contained in:
Takashi Iwai 2003-03-19 14:42:00 +00:00
parent 093a701102
commit 436b33787d

View file

@ -1527,6 +1527,10 @@ static void begin_wave(int fd, size_t cnt)
u_int tmp;
u_short tmp2;
/* WAVE cannot handle greater than 32bit (signed?) int */
if (cnt == (size_t)-2)
cnt = 0x7fffff00;
bits = 8;
switch ((unsigned long) hwparams.format) {
case SND_PCM_FORMAT_U8:
@ -1754,14 +1758,15 @@ void playback_go(int fd, size_t loaded, size_t count, int rtype, char *name)
void capture_go(int fd, size_t count, int rtype, char *name)
{
size_t c;
size_t c, cur;
ssize_t r, err;
header(rtype, name);
set_params();
while (count > 0) {
c = count;
do {
for (cur = count; cur > 0; cur -= r) {
c = cur;
if (c > chunk_bytes)
c = chunk_bytes;
c = c * 8 / bits_per_frame;
@ -1774,8 +1779,8 @@ void capture_go(int fd, size_t count, int rtype, char *name)
}
if (err > 0)
fdcount += err;
count -= r;
}
} while (rtype == FORMAT_RAW && !timelimit);
}
/*