|
@@ -82,7 +82,14 @@ ConfigVariableInt fmod_number_of_sound_channels
|
|
|
|
|
|
|
|
ConfigVariableBool fmod_use_surround_sound
|
|
ConfigVariableBool fmod_use_surround_sound
|
|
|
("fmod-use-surround-sound", false,
|
|
("fmod-use-surround-sound", false,
|
|
|
- PRC_DESC("Determines if an FMOD Flavor of PANDA use 5.1 Surround Sound or Not.") );
|
|
|
|
|
|
|
+ PRC_DESC("Determines if an FMOD Flavor of PANDA use 5.1 Surround Sound or not. "
|
|
|
|
|
+ "This variable is deprecated and should not be used. Use the enum "
|
|
|
|
|
+ "variable fmod-speaker-mode instead."));
|
|
|
|
|
+
|
|
|
|
|
+ConfigVariableEnum<FmodSpeakerMode> fmod_speaker_mode
|
|
|
|
|
+("fmod-speaker-mode", FSM_unspecified,
|
|
|
|
|
+ PRC_DESC("Sets the speaker configuration that the FMOD sound system will use. "
|
|
|
|
|
+ "Options: raw, mono, stereo, quad, surround, 5.1, 7.1 and prologic. "));
|
|
|
|
|
|
|
|
|
|
|
|
|
// Config variables for Miles:
|
|
// Config variables for Miles:
|
|
@@ -116,8 +123,6 @@ ConfigVariableInt audio_output_bits
|
|
|
ConfigVariableInt audio_output_channels
|
|
ConfigVariableInt audio_output_channels
|
|
|
("audio-output-channels", 2);
|
|
("audio-output-channels", 2);
|
|
|
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
ConfigureFn(config_audio) {
|
|
ConfigureFn(config_audio) {
|
|
|
FilterProperties::init_type();
|
|
FilterProperties::init_type();
|
|
|
AudioLoadRequest::init_type();
|
|
AudioLoadRequest::init_type();
|
|
@@ -127,5 +132,62 @@ ConfigureFn(config_audio) {
|
|
|
NullAudioSound::init_type();
|
|
NullAudioSound::init_type();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ostream &
|
|
|
|
|
+operator << (ostream &out, FmodSpeakerMode sm) {
|
|
|
|
|
+ switch (sm) {
|
|
|
|
|
+ case FSM_raw:
|
|
|
|
|
+ return out << "raw";
|
|
|
|
|
+ case FSM_mono:
|
|
|
|
|
+ return out << "mono";
|
|
|
|
|
+ case FSM_stereo:
|
|
|
|
|
+ return out << "stereo";
|
|
|
|
|
+ case FSM_quad:
|
|
|
|
|
+ return out << "quad";
|
|
|
|
|
+ case FSM_surround:
|
|
|
|
|
+ return out << "surround";
|
|
|
|
|
+ case FSM_5point1:
|
|
|
|
|
+ return out << "5.1";
|
|
|
|
|
+ case FSM_7point1:
|
|
|
|
|
+ return out << "7.1";
|
|
|
|
|
+ case FSM_prologic:
|
|
|
|
|
+ return out << "prologic";
|
|
|
|
|
+ case FSM_unspecified:
|
|
|
|
|
+ return out;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return out << "**invalid FmodSpeakerMode (" << (int)sm << ")**";
|
|
|
|
|
+}
|
|
|
|
|
|
|
|
-
|
|
|
|
|
|
|
+istream &
|
|
|
|
|
+operator >> (istream &in, FmodSpeakerMode &sm) {
|
|
|
|
|
+ string word;
|
|
|
|
|
+ in >> word;
|
|
|
|
|
+
|
|
|
|
|
+ if (word.size() == 0) {
|
|
|
|
|
+ sm = FSM_unspecified;
|
|
|
|
|
+ } else if (cmp_nocase(word, "raw") == 0) {
|
|
|
|
|
+ sm = FSM_raw;
|
|
|
|
|
+ } else if (cmp_nocase(word, "mono") == 0) {
|
|
|
|
|
+ sm = FSM_mono;
|
|
|
|
|
+ } else if (cmp_nocase(word, "stereo") == 0) {
|
|
|
|
|
+ sm = FSM_stereo;
|
|
|
|
|
+ } else if (cmp_nocase(word, "quad") == 0) {
|
|
|
|
|
+ sm = FSM_quad;
|
|
|
|
|
+ } else if (cmp_nocase(word, "surround") == 0) {
|
|
|
|
|
+ sm = FSM_surround;
|
|
|
|
|
+ } else if (cmp_nocase(word, "5point1") == 0 ||
|
|
|
|
|
+ cmp_nocase(word, "5.1") == 0) {
|
|
|
|
|
+ sm = FSM_5point1;
|
|
|
|
|
+ } else if (cmp_nocase(word, "7point1") == 0 ||
|
|
|
|
|
+ cmp_nocase(word, "7.1") == 0) {
|
|
|
|
|
+ sm = FSM_7point1;
|
|
|
|
|
+ } else if (cmp_nocase(word, "prologic") == 0) {
|
|
|
|
|
+ sm = FSM_prologic;
|
|
|
|
|
+
|
|
|
|
|
+ } else {
|
|
|
|
|
+ gobj_cat->error() << "Invalid FmodSpeakerMode value: " << word << "\n";
|
|
|
|
|
+ sm = FSM_unspecified;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return in;
|
|
|
|
|
+}
|