Comments and debug strings

This commit is contained in:
Dave Schuyler 2001-07-14 01:39:59 +00:00
parent 12e4575200
commit b6dac68042
2 changed files with 9 additions and 4 deletions

View File

@ -37,7 +37,7 @@ PT(AudioManager) Create_AudioManager() {
////////////////////////////////////////////////////////////////////
// Function: MilesAudioManager::MilesAudioManager
// Access: Public
// Description: set the overall volume of SFX
// Description:
////////////////////////////////////////////////////////////////////
MilesAudioManager::
MilesAudioManager() {
@ -88,14 +88,14 @@ MilesAudioManager() {
// We increment _active_managers regardless of possible errors above.
// The miles shutdown call will do the right thing when it's called,
// either way.
audio_debug(" _active_managers="<<_active_managers);
++_active_managers;
audio_debug(" _active_managers="<<_active_managers);
}
////////////////////////////////////////////////////////////////////
// Function: MilesAudioManager::MilesAudioManager
// Function: MilesAudioManager::~MilesAudioManager
// Access: Public
// Description: set the overall volume of SFX
// Description:
////////////////////////////////////////////////////////////////////
MilesAudioManager::
~MilesAudioManager() {
@ -108,6 +108,7 @@ MilesAudioManager::
}
_sounds.clear();
--_active_managers;
audio_debug(" _active_managers="<<_active_managers);
if (!_active_managers) {
if (audio_software_midi) {
HDLSDEVICE dls;

View File

@ -45,14 +45,18 @@ public:
bool get_active();
private:
// The sound cache/pool:
typedef pmap<string, HAUDIO > SoundMap;
SoundMap _sounds;
// The offspring of this manager:
typedef pset<MilesAudioSound* > AudioSet;
AudioSet _soundsOnLoan;
// State:
float _volume;
bool _active;
// keep a count for startup and shutdown:
static int _active_managers;
// Optional Downloadable Sound field for software midi:
static HDLSFILEID _dls_field;
HAUDIO load(Filename file_name);