Create OpenAL sound sources asychronously
This commit is contained in:
parent
86d18c0c3e
commit
bf14e49ea4
@ -378,7 +378,10 @@ void* SFXManager::mainLoop(void *obj)
|
|||||||
case SFX_MUSIC_DEFAULT_VOLUME:
|
case SFX_MUSIC_DEFAULT_VOLUME:
|
||||||
{
|
{
|
||||||
current->m_music_information->setDefaultVolume();
|
current->m_music_information->setDefaultVolume();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
case SFX_CREATE_SOURCE:
|
||||||
|
current->m_sfx->init(); break;
|
||||||
default: assert("Not yet supported.");
|
default: assert("Not yet supported.");
|
||||||
}
|
}
|
||||||
delete current;
|
delete current;
|
||||||
|
@ -88,6 +88,7 @@ public:
|
|||||||
SFX_MUSIC_WAITING,
|
SFX_MUSIC_WAITING,
|
||||||
SFX_MUSIC_DEFAULT_VOLUME,
|
SFX_MUSIC_DEFAULT_VOLUME,
|
||||||
SFX_EXIT,
|
SFX_EXIT,
|
||||||
|
SFX_CREATE_SOURCE
|
||||||
}; // SFXCommands
|
}; // SFXCommands
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -58,7 +58,8 @@ SFXOpenAL::SFXOpenAL(SFXBuffer* buffer, bool positional, float volume,
|
|||||||
// will not be used anyway.
|
// will not be used anyway.
|
||||||
if (SFXManager::get()->sfxAllowed())
|
if (SFXManager::get()->sfxAllowed())
|
||||||
{
|
{
|
||||||
init();
|
SFXManager::get()->queue(SFXManager::SFX_CREATE_SOURCE, this);
|
||||||
|
//init();
|
||||||
}
|
}
|
||||||
} // SFXOpenAL
|
} // SFXOpenAL
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user