From d9affd78e03305d0aa3974b445618bfc74c616eb Mon Sep 17 00:00:00 2001 From: Josh Yelon Date: Mon, 15 May 2006 19:12:52 +0000 Subject: [PATCH] Maybe this will fix the miles problems --- panda/src/audio/config_audio.cxx | 40 +++++++++++++++++++++----------- panda/src/audio/config_audio.h | 11 ++++++--- 2 files changed, 35 insertions(+), 16 deletions(-) diff --git a/panda/src/audio/config_audio.cxx b/panda/src/audio/config_audio.cxx index 042364d397..ddd06e5d6a 100644 --- a/panda/src/audio/config_audio.cxx +++ b/panda/src/audio/config_audio.cxx @@ -27,15 +27,17 @@ NotifyCategoryDef(audio, ""); ConfigVariableString audio_library_name ("audio-library-name", "miles_audio"); -//I should note this somewhere. -//The actual number of sound one could play is 2 times whatever the default is here. -//In this case 32 * 2 = 64. -//The reason for this, is because of the way Panda creates two seperate audio managers. -//One for sound effects, the other for music files. -//At one time this used to be a concern, because wave files [WAV, AIF, MP3, etc...] and -//Music files [MID MOD IT] used to be treated differently. -//However in current Audio APIs [particularly FMOD] a sound file is treated the same -//no matter what it is. +// Config variables for Fmod: + +//I should note this somewhere. The actual number of sound one could +//play is 2 times whatever the default is here. In this case 32 * 2 = +//64. The reason for this, is because of the way Panda creates two +//seperate audio managers. One for sound effects, the other for music +//files. At one time this used to be a concern, because wave files +//[WAV, AIF, MP3, etc...] and Music files [MID MOD IT] used to be +//treated differently. However in current Audio APIs [particularly +//FMOD] a sound file is treated the same no matter what it is. + ConfigVariableInt fmod_number_of_sound_channels ("fmod-number-of-sound-channels", 32, PRC_DESC("Guarantee this many channels you will have with FMOD. AKA the max number of sounds you can play at one time.") ); @@ -45,10 +47,22 @@ ConfigVariableBool fmod_use_surround_sound PRC_DESC("Determines if an FMOD Flavor of PANDA use 5.1 Surround Sound or Not.") ); -//ConfigVariableInt -//ConfigVariableDouble -//ConfigVariableBool -//ConfigVariableFilename +// Config variables for Miles: + +ConfigVariableBool audio_software_midi +("audio-software-midi", false); + +ConfigVariableFilename audio_dls_file +("audio-dls-file", ""); + +ConfigVariableInt audio_output_rate +("audio-output-rate", 22050); + +ConfigVariableInt audio_output_bits +("audio-output-bits", 16); + +ConfigVariableInt audio_output_channels +("audio-output-channels", 2); diff --git a/panda/src/audio/config_audio.h b/panda/src/audio/config_audio.h index bd032696b0..f62901412d 100644 --- a/panda/src/audio/config_audio.h +++ b/panda/src/audio/config_audio.h @@ -36,13 +36,18 @@ NotifyCategoryDecl(audio, EXPCL_PANDA, EXPTP_PANDA); //We Need This one. extern EXPCL_PANDA ConfigVariableString audio_library_name; -//This Specifies the number of possible [max] audio channels. -extern EXPCL_PANDA ConfigVariableInt fmod_number_of_sound_channels; +// Config vars for Fmod: -//This is to turn on Surround Sound. +extern EXPCL_PANDA ConfigVariableInt fmod_number_of_sound_channels; extern EXPCL_PANDA ConfigVariableBool fmod_use_surround_sound; +// Config vars for Miles: +extern EXPCL_PANDA ConfigVariableBool audio_software_midi; +extern EXPCL_PANDA ConfigVariableFilename audio_dls_file; +extern EXPCL_PANDA ConfigVariableInt audio_output_rate; +extern EXPCL_PANDA ConfigVariableInt audio_output_bits; +extern EXPCL_PANDA ConfigVariableInt audio_output_channels;