]> git.alsa-project.org Git - alsa-utils.git/commitdiff
More size_t off64_t changes
authorJaroslav Kysela <perex@perex.cz>
Wed, 27 Aug 2003 11:12:50 +0000 (11:12 +0000)
committerJaroslav Kysela <perex@perex.cz>
Wed, 27 Aug 2003 11:12:50 +0000 (11:12 +0000)
aplay/aplay.c

index 21891323e8054de7a7fb7a13d701d98881174ff3..a569b1fb79ba329d4005591a15bb32066410de15 100644 (file)
@@ -95,7 +95,7 @@ static size_t chunk_bytes;
 static snd_output_t *log;
 
 static int fd = -1;
-static size_t pbrec_count = (size_t)-1, fdcount;
+static off64_t pbrec_count = (size_t)-1, fdcount;
 static int vocmajor, vocminor;
 
 /* needed prototypes */
@@ -1510,16 +1510,15 @@ static void init_raw_data(void)
 }
 
 /* calculate the data count to read from/to dsp */
-static size_t calc_count(void)
+static off64_t calc_count(void)
 {
-       size_t count;
+       off64_t count;
 
        if (!timelimit) {
-               count = (size_t)-1;
+               count = (off64_t)-1;
        } else {
-               count = snd_pcm_format_size(hwparams.format,
-                                           timelimit * hwparams.rate *
-                                           hwparams.channels);
+               count = snd_pcm_format_size(hwparams.format, hwparams.rate * hwparams.channels);
+               count *= (off64_t)timelimit;
        }
        return count < pbrec_count ? count : pbrec_count;
 }