engine: platform: always create zeroed buffer for audio
This commit is contained in:
parent
89430400d9
commit
0e2abf9040
2 changed files with 2 additions and 2 deletions
|
@ -184,7 +184,7 @@ qboolean SNDDMA_Init( void )
|
|||
return false;
|
||||
}
|
||||
|
||||
dma.buffer = Mem_Malloc( sndpool, samples * 2 ); //allocate pcm frame buffer
|
||||
dma.buffer = Mem_Calloc( sndpool, samples * 2 ); //allocate pcm frame buffer
|
||||
dma.samplepos = 0;
|
||||
dma.samples = samples;
|
||||
dma.format.width = 2;
|
||||
|
|
|
@ -175,7 +175,7 @@ qboolean SNDDMA_Init( void )
|
|||
if( !samplecount )
|
||||
samplecount = 0x8000;
|
||||
dma.samples = samplecount * obtained.channels;
|
||||
dma.buffer = Mem_Malloc( sndpool, dma.samples * 2 );
|
||||
dma.buffer = Mem_Calloc( sndpool, dma.samples * 2 );
|
||||
dma.samplepos = 0;
|
||||
|
||||
sdl_format = obtained.format;
|
||||
|
|
Loading…
Add table
Reference in a new issue