mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-01 09:23:03 -04:00
minor tweaks
This commit is contained in:
parent
8a84a3b284
commit
0ffae72f88
@ -25,6 +25,8 @@
|
||||
ConfigureDecl(config_fmodAudio, EXPCL_FMOD_AUDIO, EXPTP_FMOD_AUDIO);
|
||||
NotifyCategoryDecl(fmodAudio, EXPCL_FMOD_AUDIO, EXPTP_FMOD_AUDIO);
|
||||
|
||||
extern ConfigVariableInt fmod_audio_preload_threshold;
|
||||
|
||||
extern EXPCL_FMOD_AUDIO void init_libFmodAudio();
|
||||
extern "C" EXPCL_FMOD_AUDIO Create_AudioManager_proc *get_audio_manager_func_fmod_audio();
|
||||
|
||||
|
@ -39,6 +39,7 @@
|
||||
TypeHandle FmodAudioManager::_type_handle;
|
||||
|
||||
FMOD::System *FmodAudioManager::_system;
|
||||
|
||||
pset<FmodAudioManager *> FmodAudioManager::_all_managers;
|
||||
|
||||
bool FmodAudioManager::_system_is_valid = false;
|
||||
@ -128,14 +129,22 @@ FmodAudioManager() {
|
||||
//Stick Surround Sound 5.1 thing Here.
|
||||
if (fmod_use_surround_sound) {
|
||||
audio_debug("Setting FMOD to use 5.1 Surround Sound.");
|
||||
result = _system->setSpeakerMode( FMOD_SPEAKERMODE_5POINT1 );
|
||||
result = _system->setSpeakerMode(FMOD_SPEAKERMODE_5POINT1);
|
||||
fmod_audio_errcheck("_system->setSpeakerMode()", result);
|
||||
}
|
||||
|
||||
//Now we Initialize the System.
|
||||
int nchan = fmod_number_of_sound_channels;
|
||||
result = _system->init(nchan, FMOD_INIT_NORMAL, 0);
|
||||
fmod_audio_errcheck("_system->init()", result);
|
||||
int nchan = fmod_number_of_sound_channels;
|
||||
int flags = FMOD_INIT_NORMAL;
|
||||
|
||||
result = _system->init(nchan, flags, 0);
|
||||
if (result == FMOD_ERR_TOOMANYCHANNELS) {
|
||||
fmodAudio_cat.error()
|
||||
<< "Value too large for fmod-number-of-sound-channels: " << nchan
|
||||
<< "\n";
|
||||
} else {
|
||||
fmod_audio_errcheck("_system->init()", result);
|
||||
}
|
||||
|
||||
_system_is_valid = (result == FMOD_OK);
|
||||
|
||||
@ -165,8 +174,10 @@ FmodAudioManager() {
|
||||
_midi_info.dlsname = _dlsname.c_str();
|
||||
}
|
||||
|
||||
result = _system->createChannelGroup("UserGroup", &_channelgroup);
|
||||
fmod_audio_errcheck("_system->createChannelGroup()", result);
|
||||
if (_is_valid) {
|
||||
result = _system->createChannelGroup("UserGroup", &_channelgroup);
|
||||
fmod_audio_errcheck("_system->createChannelGroup()", result);
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
Loading…
x
Reference in New Issue
Block a user