mirror of
https://github.com/alsa-project/alsa-utils
synced 2025-01-03 14:49:45 +01:00
More size_t off64_t changes
This commit is contained in:
parent
5014a50176
commit
0cc48a4ef8
1 changed files with 6 additions and 7 deletions
|
@ -95,7 +95,7 @@ static size_t chunk_bytes;
|
||||||
static snd_output_t *log;
|
static snd_output_t *log;
|
||||||
|
|
||||||
static int fd = -1;
|
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;
|
static int vocmajor, vocminor;
|
||||||
|
|
||||||
/* needed prototypes */
|
/* needed prototypes */
|
||||||
|
@ -1510,16 +1510,15 @@ static void init_raw_data(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* calculate the data count to read from/to dsp */
|
/* 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) {
|
if (!timelimit) {
|
||||||
count = (size_t)-1;
|
count = (off64_t)-1;
|
||||||
} else {
|
} else {
|
||||||
count = snd_pcm_format_size(hwparams.format,
|
count = snd_pcm_format_size(hwparams.format, hwparams.rate * hwparams.channels);
|
||||||
timelimit * hwparams.rate *
|
count *= (off64_t)timelimit;
|
||||||
hwparams.channels);
|
|
||||||
}
|
}
|
||||||
return count < pbrec_count ? count : pbrec_count;
|
return count < pbrec_count ? count : pbrec_count;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue