mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-05-06 16:01:10 +00:00
ok, non-resampled flacs now work beautifully
This commit is contained in:
parent
7502cd9ec5
commit
0e3b395943
1 changed files with 3 additions and 2 deletions
|
@ -159,7 +159,8 @@ flac_write_func (const FLAC__StreamDecoder *decoder,
|
||||||
float *out;
|
float *out;
|
||||||
float scale = 2.0 / (1 << ff->info.bits_per_sample);
|
float scale = 2.0 / (1 << ff->info.bits_per_sample);
|
||||||
int step = ff->info.channels;
|
int step = ff->info.channels;
|
||||||
unsigned i, j;
|
unsigned j;
|
||||||
|
int i;
|
||||||
|
|
||||||
if (!ff->buffer)
|
if (!ff->buffer)
|
||||||
ff->buffer = calloc (ff->info.max_blocksize * ff->info.channels,
|
ff->buffer = calloc (ff->info.max_blocksize * ff->info.channels,
|
||||||
|
@ -265,7 +266,7 @@ flac_read (flacfile_t *ff, float *buf, int len)
|
||||||
res * ff->info.channels * sizeof (float));
|
res * ff->info.channels * sizeof (float));
|
||||||
count += res;
|
count += res;
|
||||||
len -= res;
|
len -= res;
|
||||||
buf += res;
|
buf += res * ff->info.channels;
|
||||||
ff->pos += res;
|
ff->pos += res;
|
||||||
} else if (res < 0) {
|
} else if (res < 0) {
|
||||||
Sys_Printf ("flac error %d\n", res);
|
Sys_Printf ("flac error %d\n", res);
|
||||||
|
|
Loading…
Reference in a new issue