PCM sound, refactored code940
[picodrive.git] / Pico / Pico.c
index 1f201f4..004a247 100644 (file)
@@ -49,7 +49,8 @@ int PicoInit(void)
 // to be called once on emu exit\r
 void PicoExit(void)\r
 {\r
-  PicoExitMCD();\r
+  if (PicoMCD&1)\r
+    PicoExitMCD();\r
   z80_exit();\r
 \r
   // notaz: sram\r
@@ -322,7 +323,8 @@ static __inline void getSamples(int y)
     if (emustatus&1) emustatus|=2; else emustatus&=~2;\r
     if (PicoWriteSound) PicoWriteSound();\r
     // clear sound buffer\r
-    memset(PsndOut, 0, (PicoOpt & 8) ? (PsndLen<<2) : (PsndLen<<1));\r
+    sound_clear();\r
+    //memset(PsndOut, 0, (PicoOpt & 8) ? (PsndLen<<2) : (PsndLen<<1));\r
   }\r
   else if(emustatus & 3) {\r
     emustatus|= 2;\r