Advertisement
Guest User

Untitled

a guest
Oct 30th, 2011
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.33 KB | None | 0 0
  1. diff --git a/src-0.2.97.13/burn/sound/k053260.cpp b/src-0.2.97.13/burn/sound/k053260.cpp
  2. index 6ee854a..f60b7c0 100644
  3. --- a/src-0.2.97.13/burn/sound/k053260.cpp
  4. +++ b/src-0.2.97.13/burn/sound/k053260.cpp
  5. @@ -15,14 +15,14 @@
  6.  static unsigned int nUpdateStep;
  7.  
  8.  struct k053260_channel_def {
  9. -   unsigned long       rate;
  10. -   unsigned long       size;
  11. -   unsigned long       start;
  12. -   unsigned long       bank;
  13. -   unsigned long       volume;
  14. +   uint32_t        rate;
  15. +   uint32_t        size;
  16. +   uint32_t        start;
  17. +   uint32_t        bank;
  18. +   uint32_t        volume;
  19.     int                 play;
  20. -   unsigned long       pan;
  21. -   unsigned long       pos;
  22. +   uint32_t        pan;
  23. +   uint32_t        pos;
  24.     int                 loop;
  25.     int                 ppcm; /* packed PCM ( 4 bit signed ) */
  26.     int                 ppcm_data;
  27. @@ -32,7 +32,7 @@ struct k053260_chip_def {
  28.     int                             regs[0x30];
  29.     unsigned char                   *rom;
  30.     int                             rom_size;
  31. -   unsigned long                   *delta_table;
  32. +   uint32_t                    *delta_table;
  33.     k053260_channel_def channels[4];
  34.  };
  35.  
  36. @@ -43,7 +43,7 @@ static void InitDeltaTable(int rate, int clock ) {
  37.     int     i;
  38.     double  base = ( double )rate;
  39.     double  max = (double)(clock); /* Hz */
  40. -   unsigned long val;
  41. +   uint32_t val;
  42.  
  43.     for( i = 0; i < 0x1000; i++ ) {
  44.         double v = ( double )( 0x1000 - i );
  45. @@ -52,7 +52,7 @@ static void InitDeltaTable(int rate, int clock ) {
  46.  
  47.         if ( target && base ) {
  48.             target = fixed / ( base / target );
  49. -           val = ( unsigned long )target;
  50. +           val = ( uint32_t )target;
  51.             if ( val == 0 )
  52.                 val = 1;
  53.         } else
  54. @@ -95,11 +95,11 @@ K053260_INLINE int limit( int val, int max, int min ) {
  55.  
  56.  void K053260Update(int chip, short *pBuf, int length)
  57.  {
  58. -   static const long dpcmcnv[] = { 0,1,2,4,8,16,32,64, -128, -64, -32, -16, -8, -4, -2, -1};
  59. +   static const int dpcmcnv[] = { 0,1,2,4,8,16,32,64, -128, -64, -32, -16, -8, -4, -2, -1};
  60.  
  61.     int i, j, lvol[4], rvol[4], play[4], loop[4], ppcm_data[4], ppcm[4];
  62.     unsigned char *rom[4];
  63. -   unsigned long delta[4], end[4], pos[4];
  64. +   uint32_t delta[4], end[4], pos[4];
  65.     int dataL, dataR;
  66.     signed char d;
  67.     ic = &Chips[chip];
  68. @@ -211,7 +211,7 @@ void K053260Init(int chip, int clock, unsigned char *rom, int nLen)
  69.     for ( i = 0; i < 0x30; i++ )
  70.         ic->regs[i] = 0;
  71.  
  72. -   ic->delta_table = ( unsigned long * )malloc( 0x1000 * sizeof( unsigned long ) );
  73. +   ic->delta_table = ( uint32_t * )malloc( 0x1000 * sizeof( uint32_t ) );
  74.  
  75.     InitDeltaTable( rate, clock );
  76.  
  77.  
  78.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement