Diff for /np2/sound/sound.c between versions 1.20 and 1.22

version 1.20, 2005/04/01 15:35:49 version 1.22, 2011/01/15 18:04:43
Line 68  static void streamprepare(UINT samples)  Line 68  static void streamprepare(UINT samples) 
 #if defined(SUPPORT_WAVEREC)  #if defined(SUPPORT_WAVEREC)
 // ---- wave rec  // ---- wave rec
   
 BOOL sound_recstart(const char *filename) {  BOOL sound_recstart(const OEMCHAR *filename) {
   
         WAVEWR  rec;          WAVEWR  rec;
   
Line 242  void sound_reset(void) { Line 242  void sound_reset(void) {
   
 void sound_changeclock(void) {  void sound_changeclock(void) {
   
         UINT32  clock;          UINT32  clk;
         UINT    hz;          UINT    hz;
         UINT    hzmax;          UINT    hzmax;
   
Line 251  void sound_changeclock(void) { Line 251  void sound_changeclock(void) {
         }          }
   
         // とりあえず 25で割り切れる。          // とりあえず 25で割り切れる。
         clock = pccore.realclock / 25;          clk = pccore.realclock / 25;
         hz = soundcfg.rate / 25;          hz = soundcfg.rate / 25;
   
         // で、クロック数に合せて調整。(64bit演算しろよな的)          // で、クロック数に合せて調整。(64bit演算しろよな的)
         hzmax = (1 << (32 - 8)) / (clock >> 8);          hzmax = (1 << (32 - 8)) / (clk >> 8);
         while(hzmax < hz) {          while(hzmax < hz) {
                 clock = (clock + 1) >> 1;                  clk = (clk + 1) >> 1;
                 hz = (hz + 1) >> 1;                  hz = (hz + 1) >> 1;
         }          }
         TRACEOUT(("hzbase/clockbase = %d/%d", hz, clock));          TRACEOUT(("hzbase/clockbase = %d/%d", hz, clk));
         soundcfg.hzbase = hz;          soundcfg.hzbase = hz;
         soundcfg.clockbase = clock;          soundcfg.clockbase = clk;
         soundcfg.minclock = 2 * clock / hz;          soundcfg.minclock = 2 * clk / hz;
         soundcfg.lastclock = CPU_CLOCK;          soundcfg.lastclock = CPU_CLOCK;
 }  }
   

Removed from v.1.20  
changed lines
  Added in v.1.22


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