Diff for /np2/win9x/soundmng.cpp between versions 1.13 and 1.16

version 1.13, 2007/01/08 01:16:59 version 1.16, 2007/11/11 07:11:27
Line 14 Line 14
 #include        "mt32snd.h"  #include        "mt32snd.h"
 #endif  #endif
   
 #if !defined(_WIN64)  #if defined(_M_IA64) || defined(_M_AMD64)
 #define SOUNDBUFFERALIGN        (1 << 2)  
 #else  
 #define SOUNDBUFFERALIGN        (1 << 3)  #define SOUNDBUFFERALIGN        (1 << 3)
   #else
   #define SOUNDBUFFERALIGN        (1 << 2)
 #endif  #endif
   
 #if !defined(_WIN64)  #if !defined(_WIN64)
Line 61  static void    (PARTSCALL *fnmix)(SINT16 Line 61  static void    (PARTSCALL *fnmix)(SINT16
   
 // ---- directsound  // ---- directsound
   
 static BRESULT dsoundcreate(void) {  static BRESULT dsoundcreate(HWND hWnd)
   {
         // DirectSoundの初期化          // DirectSoundの初期化
         if (FAILED(DirectSoundCreate(0, &pDSound, 0))) {          if (FAILED(DirectSoundCreate(0, &pDSound, 0))) {
                 goto dscre_err;                  goto dscre_err;
         }          }
         if (FAILED(pDSound->SetCooperativeLevel(hWndMain, DSSCL_PRIORITY))) {          if (FAILED(pDSound->SetCooperativeLevel(hWnd, DSSCL_PRIORITY)))
                 if (FAILED(pDSound->SetCooperativeLevel(hWndMain, DSSCL_NORMAL))) {          {
                   if (FAILED(pDSound->SetCooperativeLevel(hWnd, DSSCL_NORMAL)))
                   {
                         goto dscre_err;                          goto dscre_err;
                 }                  }
         }          }
Line 92  UINT soundmng_create(UINT rate, UINT ms) Line 94  UINT soundmng_create(UINT rate, UINT ms)
                 (rate != 11025) && (rate != 22050) && (rate != 44100)) {                  (rate != 11025) && (rate != 22050) && (rate != 44100)) {
                 goto stcre_err1;                  goto stcre_err1;
         }          }
   
         if (ms < 40) {          if (ms < 40) {
                 ms = 40;                  ms = 40;
         }          }
Line 135  UINT soundmng_create(UINT rate, UINT ms) Line 138  UINT soundmng_create(UINT rate, UINT ms)
         vermouth_module = midimod_create(rate);          vermouth_module = midimod_create(rate);
         midimod_loadall(vermouth_module);          midimod_loadall(vermouth_module);
 #endif  #endif
   
 #if defined(MT32SOUND_DLL)  #if defined(MT32SOUND_DLL)
         mt32sound_setrate(rate);          mt32sound_setrate(rate);
 #endif  #endif
   
         dsstreamevent = (UINT8)-1;          dsstreamevent = (UINT8)-1;
         return(samples);          return(samples);
   
Line 466  void soundmng_pcmstop(UINT num) { Line 471  void soundmng_pcmstop(UINT num) {
   
 BRESULT soundmng_initialize(void) {  BRESULT soundmng_initialize(void) {
   
         if (dsoundcreate() != SUCCESS) {          if (dsoundcreate(g_hWndMain) != SUCCESS) {
                 goto smcre_err;                  goto smcre_err;
         }          }
         pcmcreate();          pcmcreate();

Removed from v.1.13  
changed lines
  Added in v.1.16


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