summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2006-04-26 16:11:57 +0200
committerTakashi Iwai <tiwai@suse.de>2006-04-26 16:11:57 +0200
commit9104d67f40c3fda4600540db6840032f75aba038 (patch)
treeb3c92ee7636d1c4bcdc79d5e51e8404b1700348e
parent6d031b7564da3eb35a1321bf3eea9042f520f886 (diff)
downloadalsa-utils-9104d67f40c3fda4600540db6840032f75aba038.tar.gz
Fix arecord to quit properly at max file size
Fix arecord to quit properly at the max file size of the given format.
-rw-r--r--aplay/aplay.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/aplay/aplay.c b/aplay/aplay.c
index fa3fb4e..7c3d7cd 100644
--- a/aplay/aplay.c
+++ b/aplay/aplay.c
@@ -2165,13 +2165,15 @@ static void capture(char *name_)
2) all requested samples/bytes have been captured (cur>0)
3) filesize threshold was reached (fdcount<wrthreshold)
*/
- } while (file_type == FORMAT_RAW && !timelimit && cur>0 && fdcount<fmt_rec_table[file_type].max_filesize);
+ } while (file_type == FORMAT_RAW && !timelimit && cur>0 &&
+ fdcount<fmt_rec_table[file_type].max_filesize);
/* finish sample container */
fmt_rec_table[file_type].end(fd);
/* repeat the loop when format is raw without timelimit or filesize threshold was reached */
- } while((file_type == FORMAT_RAW && !timelimit) || fdcount>=fmt_rec_table[file_type].max_filesize);
+ } while((file_type == FORMAT_RAW && !timelimit) ||
+ fdcount < fmt_rec_table[file_type].max_filesize);
}
void playbackv_go(int* fds, unsigned int channels, size_t loaded, off64_t count, int rtype, char **names)