Xbox: virtual memory fixes

This commit is contained in:
Ryan Dortmans
2004-11-08 02:38:32 +00:00
parent 2d25453707
commit 30a01a3c99
4 changed files with 45 additions and 0 deletions
+8
View File
@@ -12,6 +12,10 @@
#include "arch/arch.h"
#include "arch/Sound/RageSoundDriver.h"
#if defined(XBOX)
#include "archutils/Xbox/VirtualMemory.h"
#endif
/*
* This mutex is locked before Update() deletes old sounds from owned_sounds. Lock
* this mutex if you want to ensure that sounds remain valid. (Other threads may
@@ -217,6 +221,10 @@ RageSound *RageSoundManager::PlaySound( RageSound &snd, const RageSoundParams *p
else
{
sound_to_play = new RageSound(snd);
#if defined(XBOX)
// keep the sound data committed to memory
vmem_Manager.Lock(sound_to_play);
#endif
/* We're responsible for freeing it. */
g_SoundManMutex.Lock(); /* lock for access to owned_sounds */