mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
don't actually read the main `data' chunks; only refer to them by location.
allows support for huge wav files (eg, cdda.wav)
This commit is contained in:
parent
8c13014ad9
commit
c58dac3ccf
1 changed files with 14 additions and 0 deletions
|
@ -312,6 +312,20 @@ riff_read (QFile *f)
|
|||
chunk = &list->ck;
|
||||
}
|
||||
break;
|
||||
case CASE ('d','a','t','a'):
|
||||
{
|
||||
data_t *data = malloc (sizeof (data_t));
|
||||
int c;
|
||||
|
||||
data->ck = ck;
|
||||
data->data = malloc (sizeof (int));
|
||||
*((int *)data->data) = Qtell (f);
|
||||
Qseek (f, ck.len, SEEK_CUR);
|
||||
if ((c = Qgetc (f)) && c != -1)
|
||||
Qungetc (f, c);
|
||||
chunk = &data->ck;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
{
|
||||
data_t *data = malloc (sizeof (data_t));
|
||||
|
|
Loading…
Reference in a new issue