Browse Source

removed hack for sound length, now that MSS 6.1c has a fix

Dave Schuyler 24 years ago
parent
commit
3d3c7f50c5
1 changed files with 1 additions and 13 deletions
  1. 1 13
      panda/src/audiotraits/milesAudioSound.cxx

+ 1 - 13
panda/src/audiotraits/milesAudioSound.cxx

@@ -204,19 +204,7 @@ get_balance() const {
 
 
 float MilesAudioSound::
 float MilesAudioSound::
 length() const {
 length() const {
-  // hack:
-  // For now, the sound needs to be playing, in order to 
-  // get the right length.  I'm in contact with RAD about the problem.  I've
-  // sent them example code.  They've told me they're looking into it.
-  // Until then, we'll play the sound to get the length.
-  float length;
-  if (AIL_quick_status(_audio)==QSTAT_PLAYING) {
-    length=((float)AIL_quick_ms_length(_audio))*0.001;
-  } else {
-    AIL_quick_play(_audio, 1);
-    length=((float)AIL_quick_ms_length(_audio))*0.001;
-    AIL_quick_halt(_audio);
-  }
+  float length=((float)AIL_quick_ms_length(_audio))*0.001;
   audio_debug("MilesAudioSound::length() returning "<<length);
   audio_debug("MilesAudioSound::length() returning "<<length);
   return length;
   return length;
 }
 }