click noise fixed when 940 was used
authornotaz <notasas@gmail.com>
Thu, 26 Jun 2008 20:04:33 +0000 (20:04 +0000)
committernotaz <notasas@gmail.com>
Thu, 26 Jun 2008 20:04:33 +0000 (20:04 +0000)
git-svn-id: file:///home/notaz/opt/svn/PicoDrive/platform@498 be3aeb3a-fb24-0410-a615-afba39da0efa

gp2x/940ctl.c

index b372d92..ee250f8 100644 (file)
@@ -82,10 +82,6 @@ int YM2612Write_940(unsigned int a, unsigned int v, int scanline)
                        upd = 0;\r
                        break;\r
 \r
-               case 1: /* data port 0    */\r
-                       if (ST_address == 0x2b) upd = 0; /* DAC sel */\r
-                       break;\r
-\r
                case 2: /* address port 1 */\r
                        if (addr_A1 == 1 && ST_address == v)\r
                                return 0;\r
@@ -403,8 +399,8 @@ int YM2612UpdateOne_940(int *buffer, int length, int stereo, int is_buf_empty)
 \r
        /* predict sample counter for next frame */\r
        if (PsndLen_exc_add) {\r
-               if (PsndLen_exc_cnt + PsndLen_exc_add >= 0x10000) length = PsndLen + 1;\r
-               else length = PsndLen;\r
+               length = PsndLen;\r
+               if (PsndLen_exc_cnt + PsndLen_exc_add >= 0x10000) length++;\r
        }\r
 \r
        /* give 940 ym job */\r