Prefill the sfx stream buffer to ensure the decoders have allocated any memory they might need. Problem found using jack_interposer (http://repo.or.cz/w/jack_interposer.git).

This commit is contained in:
Bill Currie 2010-08-06 00:41:42 +00:00 committed by Jeff Teunissen
parent dabb720fd1
commit 98a0da742a

View file

@ -166,9 +166,7 @@ SND_SFX_StreamOpen (sfx_t *sfx, void *file,
SND_SetPaint (&stream->buffer);
stream->resample (&stream->buffer, 0, 0); // get sfx setup properly
stream->seek (stream->file, 0, &stream->wavinfo);
stream->buffer.advance (&stream->buffer, 0);
stream->buffer.setpos (&stream->buffer, 0); // pre-fill the buffer
return new_sfx;
}