فهرست منبع

Comments and debug strings

Dave Schuyler 24 سال پیش
والد
کامیت
b6dac68042
2فایلهای تغییر یافته به همراه9 افزوده شده و 4 حذف شده
  1. 5 4
      panda/src/audiotraits/milesAudioManager.cxx
  2. 4 0
      panda/src/audiotraits/milesAudioManager.h

+ 5 - 4
panda/src/audiotraits/milesAudioManager.cxx

@@ -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;

+ 4 - 0
panda/src/audiotraits/milesAudioManager.h

@@ -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);