24 #if !defined(CPPPARSER) && !defined(LINK_ALL_STATIC) && !defined(BUILDING_PANDA_AUDIO) 25 #error Buildsystem error: BUILDING_PANDA_AUDIO not defined 32 Configure(config_audio);
33 NotifyCategoryDef(audio,
"");
36 (
"audio-active",
true);
39 (
"audio-cache-limit", 15,
40 PRC_DESC(
"The number of sounds in the cache."));
43 (
"audio-library-name",
"null");
46 (
"audio-volume", 1.0f);
51 (
"audio-doppler-factor", 1.0f);
54 (
"audio-distance-factor", 1.0f);
57 (
"audio-drop-off-factor", 1.0f);
60 (
"audio-buffering-seconds", 3.0f,
61 PRC_DESC(
"Controls the amount of audio buffering when streaming audio. " 62 "If you are playing a streaming sound, and any single frame " 63 "takes longer than this, the audio will stutter. Caution: " 64 "buffering streaming audio takes a lot of memory. For example, " 65 "5 seconds of stereo audio at 44,100 samples/sec takes one " 66 "megabyte. The 3-second default is intentionally high, favoring " 67 "correctness over efficiency, but for a commercial application " 68 "you may wish to lower this."));
71 (
"audio-preload-threshold", 1000000,
72 PRC_DESC(
"If the decompressed size of a sound file exceeds this amount, " 73 "then Panda3D will not attempt to store that sound file in RAM. " 74 "Instead, it will stream the sound file from disk. It is not " 75 "practical to stream multiple sound-files from disk at the same " 76 "time - the hard drive seek time makes it stutter."));
81 (
"audio-min-hw-channels", 15,
82 PRC_DESC(
"Guarantee this many channels on the local sound card, or just " 83 "play EVERYTHING in software."));
88 (
"fmod-number-of-sound-channels", 128,
89 PRC_DESC(
"Guarantee this many channels you will have with FMOD. AKA the max number of sounds you can play at one time.") );
92 (
"fmod-use-surround-sound",
false,
93 PRC_DESC(
"Determines if an FMOD Flavor of PANDA use 5.1 Surround Sound or not. " 94 "This variable is deprecated and should not be used. Use the enum " 95 "variable fmod-speaker-mode instead."));
98 (
"fmod-speaker-mode", FSM_unspecified,
99 PRC_DESC(
"Sets the speaker configuration that the FMOD sound system will use. " 100 "Options: raw, mono, stereo, quad, surround, 5.1 and 7.1. "));
106 (
"audio-software-midi",
true);
110 PRC_DESC(
"Specifies a DLS file that defines an instrument set to load " 111 "for MIDI file playback. If this is not specified, the sound " 112 "interface will try to use the system default DLS file, if " 113 "one is available; the likely success of this depends on the " 114 "operating system."));
117 (
"audio-play-midi",
true);
120 (
"audio-play-wave",
true);
123 (
"audio-play-mp3",
true);
126 (
"audio-output-rate", 22050);
129 (
"audio-output-bits", 16);
132 (
"audio-output-channels", 2);
134 ConfigureFn(config_audio) {
135 FilterProperties::init_type();
136 AudioLoadRequest::init_type();
137 AudioManager::init_type();
138 AudioSound::init_type();
139 NullAudioManager::init_type();
140 NullAudioSound::init_type();
144 operator << (ostream &out, FmodSpeakerMode sm) {
149 return out <<
"mono";
151 return out <<
"stereo";
153 return out <<
"quad";
155 return out <<
"surround";
160 case FSM_unspecified:
164 return out <<
"**invalid FmodSpeakerMode (" << (int)sm <<
")**";
168 operator >> (istream &in, FmodSpeakerMode &sm) {
172 if (word.size() == 0) {
173 sm = FSM_unspecified;
174 }
else if (cmp_nocase(word,
"raw") == 0) {
176 }
else if (cmp_nocase(word,
"mono") == 0) {
178 }
else if (cmp_nocase(word,
"stereo") == 0) {
180 }
else if (cmp_nocase(word,
"quad") == 0) {
182 }
else if (cmp_nocase(word,
"surround") == 0) {
184 }
else if (cmp_nocase(word,
"5point1") == 0 ||
185 cmp_nocase(word,
"5.1") == 0) {
187 }
else if (cmp_nocase(word,
"7point1") == 0 ||
188 cmp_nocase(word,
"7.1") == 0) {
192 audio_cat->error() <<
"Invalid FmodSpeakerMode value: " << word <<
"\n";
193 sm = FSM_unspecified;
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is a convenience class to specialize ConfigVariable as a Filename type.
This is a convenience class to specialize ConfigVariable as a boolean type.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is a convenience class to specialize ConfigVariable as a floating- point type.
The name of a file, such as a texture file or an Egg file.
This is a convenience class to specialize ConfigVariable as a string type.
This class specializes ConfigVariable as an enumerated type.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is a convenience class to specialize ConfigVariable as an integer type.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.