00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #include "config_audio.h"
00016 #include "dconfig.h"
00017 #include "filterProperties.h"
00018 #include "audioLoadRequest.h"
00019 #include "audioManager.h"
00020 #include "audioSound.h"
00021 #include "nullAudioManager.h"
00022 #include "nullAudioSound.h"
00023
00024 Configure(config_audio);
00025 NotifyCategoryDef(audio, "");
00026
00027 ConfigVariableBool audio_active
00028 ("audio-active", true);
00029
00030 ConfigVariableInt audio_cache_limit
00031 ("audio-cache-limit", 15,
00032 PRC_DESC("The number of sounds in the cache."));
00033
00034 ConfigVariableString audio_library_name
00035 ("audio-library-name", "null");
00036
00037 ConfigVariableDouble audio_volume
00038 ("audio-volume", 1.0f);
00039
00040
00041
00042 ConfigVariableDouble audio_doppler_factor
00043 ("audio-doppler-factor", 1.0f);
00044
00045 ConfigVariableDouble audio_distance_factor
00046 ("audio-distance-factor", 1.0f);
00047
00048 ConfigVariableDouble audio_drop_off_factor
00049 ("audio-drop-off-factor", 1.0f);
00050
00051 ConfigVariableDouble audio_buffering_seconds
00052 ("audio-buffering-seconds", 3.0f,
00053 PRC_DESC("Controls the amount of audio buffering when streaming audio. "
00054 "If you are playing a streaming sound, and any single frame "
00055 "takes longer than this, the audio will stutter. Caution: "
00056 "buffering streaming audio takes a lot of memory. For example, "
00057 "5 seconds of stereo audio at 44,100 samples/sec takes one "
00058 "megabyte. The 3-second default is intentionally high, favoring "
00059 "correctness over efficiency, but for a commercial application "
00060 "you may wish to lower this."));
00061
00062 ConfigVariableInt audio_preload_threshold
00063 ("audio-preload-threshold", 1000000,
00064 PRC_DESC("If the decompressed size of a sound file exceeds this amount, "
00065 "then Panda3D will not attempt to store that sound file in RAM. "
00066 "Instead, it will stream the sound file from disk. It is not "
00067 "practical to stream multiple sound-files from disk at the same "
00068 "time - the hard drive seek time makes it stutter."));
00069
00070
00071
00072 ConfigVariableInt audio_min_hw_channels
00073 ("audio-min-hw-channels", 15,
00074 PRC_DESC("Guarantee this many channels on the local sound card, or just "
00075 "play EVERYTHING in software."));
00076
00077
00078
00079 ConfigVariableInt fmod_number_of_sound_channels
00080 ("fmod-number-of-sound-channels", 128,
00081 PRC_DESC("Guarantee this many channels you will have with FMOD. AKA the max number of sounds you can play at one time.") );
00082
00083 ConfigVariableBool fmod_use_surround_sound
00084 ("fmod-use-surround-sound", false,
00085 PRC_DESC("Determines if an FMOD Flavor of PANDA use 5.1 Surround Sound or Not.") );
00086
00087
00088
00089
00090 ConfigVariableBool audio_software_midi
00091 ("audio-software-midi", true);
00092
00093 ConfigVariableFilename audio_dls_file
00094 ("audio-dls-file", Filename(),
00095 PRC_DESC("Specifies a DLS file that defines an instrument set to load "
00096 "for MIDI file playback. If this is not specified, the sound "
00097 "interface will try to use the system default DLS file, if "
00098 "one is available; the likely success of this depends on the "
00099 "operating system."));
00100
00101 ConfigVariableBool audio_play_midi
00102 ("audio-play-midi", true);
00103
00104 ConfigVariableBool audio_play_wave
00105 ("audio-play-wave", true);
00106
00107 ConfigVariableBool audio_play_mp3
00108 ("audio-play-mp3", true);
00109
00110 ConfigVariableInt audio_output_rate
00111 ("audio-output-rate", 22050);
00112
00113 ConfigVariableInt audio_output_bits
00114 ("audio-output-bits", 16);
00115
00116 ConfigVariableInt audio_output_channels
00117 ("audio-output-channels", 2);
00118
00119
00120
00121 ConfigureFn(config_audio) {
00122 FilterProperties::init_type();
00123 AudioLoadRequest::init_type();
00124 AudioManager::init_type();
00125 AudioSound::init_type();
00126 NullAudioManager::init_type();
00127 NullAudioSound::init_type();
00128 }
00129
00130
00131