Diff for /np2/macos9/soundmng.cpp between versions 1.1 and 1.2

version 1.1, 2003/10/23 07:20:43 version 1.2, 2003/11/06 01:58:36
Line 10 Line 10
 #endif  #endif
   
   
 #define SOUNDBUFFERS    2  #define SOUNDBUFFERS    3
   
 typedef struct {  typedef struct {
         SndChannelPtr   hdl;          SndChannelPtr   hdl;
Line 182  UINT soundmng_create(UINT rate, UINT ms) Line 182  UINT soundmng_create(UINT rate, UINT ms)
         if (SoundChannel_Init()) {          if (SoundChannel_Init()) {
                 goto qsinit_err;                  goto qsinit_err;
         }          }
         samples = (rate / 3) & (~3);          samples = rate * ms / 1000;
           samples = (samples + 3) & (~3);
         if (SoundBuffer_Init(rate, samples)) {          if (SoundBuffer_Init(rate, samples)) {
                 goto qsinit_err;                  goto qsinit_err;
         }          }
Line 197  UINT soundmng_create(UINT rate, UINT ms) Line 198  UINT soundmng_create(UINT rate, UINT ms)
   
 qsinit_err:  qsinit_err:
         soundmng_destroy();          soundmng_destroy();
         (void)ms;  
         return(0);          return(0);
 }  }
   
 void soundmng_destroy(void) {  void soundmng_destroy(void) {
   
         if (QS_Avail) {          if (QS_Avail) {
                   QS_Avail = FALSE;
                   SoundBuffer_Term();
                   SoundChannel_Term();
 #if defined(VERMOUTH_LIB)  #if defined(VERMOUTH_LIB)
                 midimod_destroy(vermouth_module);                  midimod_destroy(vermouth_module);
                 vermouth_module = NULL;                  vermouth_module = NULL;
 #endif  #endif
                 QS_Avail = FALSE;  
                 SoundBuffer_Term();  
                 SoundChannel_Term();  
         }          }
 }  }
   

Removed from v.1.1  
changed lines
  Added in v.1.2


RetroPC.NET-CVS <cvs@retropc.net>