Fix for fmod studio 1.5

This commit is contained in:
Drake Arconis
2014-09-10 01:11:14 -04:00
parent eb96dee176
commit 2d0905a4a6
2 changed files with 2 additions and 13 deletions

View File

@@ -314,7 +314,7 @@ bool LLAudioEngine_FMODSTUDIO::init(const S32 num_channels, void* userdata)
result = mSystem->setSoftwareChannels(num_channels + 2);
Check_FMOD_Error(result,"FMOD::System::setSoftwareChannels");
U32 fmod_flags = FMOD_INIT_NORMAL;
U32 fmod_flags = FMOD_INIT_NORMAL | FMOD_INIT_3D_RIGHTHANDED;
if(mEnableProfiler)
{
fmod_flags |= FMOD_INIT_PROFILE_ENABLE;
@@ -446,7 +446,7 @@ bool LLAudioEngine_FMODSTUDIO::init(const S32 num_channels, void* userdata)
FMOD_SPEAKERMODE speaker_mode;
mSystem->getDSPBufferSize(&r_bufferlength, &r_numbuffers);
mSystem->getSoftwareFormat(&r_samplerate, &speaker_mode, NULL);
mSystem->getDriverInfo(0, r_name, NULL, 255, NULL, NULL, &speaker_mode, NULL);
mSystem->getDriverInfo(0, r_name, 255, NULL, NULL, &speaker_mode, NULL);
std::string speaker_mode_str = "unknown";
switch(speaker_mode)
{
@@ -937,12 +937,7 @@ bool LLAudioBufferFMODSTUDIO::loadWAV(const std::string& filename)
exinfo.cbsize = sizeof(exinfo);
exinfo.suggestedsoundtype = FMOD_SOUND_TYPE_WAV; //Hint to speed up loading.
// Load up the wav file into an fmod sample
#if LL_WINDOWS
FMOD_RESULT result = getSystem()->createSound((const char*)utf8str_to_utf16str(filename).c_str(), base_mode | FMOD_UNICODE, &exinfo, &mSoundp);
#else
FMOD_RESULT result = getSystem()->createSound(filename.c_str(), base_mode, &exinfo, &mSoundp);
#endif
if (result != FMOD_OK)
{
// We failed to load the file for some reason.

View File

@@ -88,12 +88,6 @@ void LLListener_FMODSTUDIO::orient(LLVector3 up, LLVector3 at)
{
LLListener::orient(up, at);
// Welcome to the transition between right and left
// (coordinate systems, that is)
// Leaving the at vector alone results in a L/R reversal
// since DX is left-handed and we (LL, OpenGL, OpenAL) are right-handed
at = -at;
mSystem->set3DListenerAttributes(0, NULL, NULL, (FMOD_VECTOR*)at.mV, (FMOD_VECTOR*)up.mV);
}