//===================================================================================== // geSound_SystemCreate //===================================================================================== GENESISAPI geSound_System *geSound_CreateSoundSystem(HWND hWnd) { geSound_System *SoundSystem; SoundSystem = GE_RAM_ALLOCATE_STRUCT(geSound_System); if (!SoundSystem) { geErrorLog_Add(GE_ERR_OUT_OF_MEMORY, NULL); return NULL; } memset(SoundSystem, 0, sizeof(geSound_System)); // Initialize the sound system SoundSystem->SoundM = CreateSoundManager(hWnd); if (!SoundSystem->SoundM) { geRam_Free(SoundSystem); geErrorLog_Add(GE_ERR_CREATE_SOUND_MANAGER_FAILED, NULL); return NULL; } SoundSystem->GlobalVolume = 1.0f; return SoundSystem; }
void AudioTest1() { return; SoundManager* soundManager = CreateSoundManager(); for(int i = 0; i < 100000; i++ ) SharedPtr<Sound> sound = soundManager->createSound("content/ptrs.wav"); //sound->removeSmartPtr }