reduce some memory allocs in the sound thread
This commit is contained in:
@@ -70,7 +70,7 @@ bool RageSound_DSound_Software::GetData()
|
|||||||
}
|
}
|
||||||
memset(buf, 0, bufsize*sizeof(Uint16));
|
memset(buf, 0, bufsize*sizeof(Uint16));
|
||||||
|
|
||||||
SoundMixBuffer mix;
|
static SoundMixBuffer mix;
|
||||||
|
|
||||||
for(unsigned i = 0; i < sounds.size(); ++i)
|
for(unsigned i = 0; i < sounds.size(); ++i)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ bool RageSound_WaveOut::GetData()
|
|||||||
buf = new Sint16[bufsize];
|
buf = new Sint16[bufsize];
|
||||||
memset(buf, 0, bufsize*sizeof(Uint16));
|
memset(buf, 0, bufsize*sizeof(Uint16));
|
||||||
memset(buffers[b].lpData, 0, bufsize*sizeof(Uint16));
|
memset(buffers[b].lpData, 0, bufsize*sizeof(Uint16));
|
||||||
SoundMixBuffer mix;
|
static SoundMixBuffer mix;
|
||||||
|
|
||||||
for(unsigned i = 0; i < sounds.size(); ++i)
|
for(unsigned i = 0; i < sounds.size(); ++i)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user