-// This is part of Pico Library\r
-\r
-// (c) Copyright 2004 Dave, All rights reserved.\r
-// (c) Copyright 2006,2007 notaz, All rights reserved.\r
-// Free for non-commercial use.\r
-\r
-// For commercial use, separate licencing terms must be obtained.\r
-\r
+/*\r
+ * PicoDrive\r
+ * (c) Copyright Dave, 2004\r
+ * (C) notaz, 2006-2009\r
+ *\r
+ * This work is licensed under the terms of MAME license.\r
+ * See COPYING file in the top-level directory.\r
+ */\r
\r
#include <string.h>\r
#include "ym2612.h"\r
memset32(buf32, 0, length<<stereo);\r
\r
//printf("active_chs: %02x\n", buf32_updated);\r
+ (void)buf32_updated;\r
\r
// CD: PCM sound\r
if (do_pcm) {\r
#if SIMPLE_WRITE_SOUND\r
if (y != 224) return;\r
PsndRender(0, PsndLen);\r
- if (PicoWriteSound) PicoWriteSound(PsndLen);\r
+ if (PicoWriteSound)\r
+ PicoWriteSound(PsndLen * ((PicoOpt & POPT_EN_STEREO) ? 4 : 2));\r
PsndClear();\r
#else\r
static int curr_pos = 0;\r
if (emustatus & 2)\r
curr_pos += PsndRender(curr_pos, PsndLen-PsndLen/2);\r
else curr_pos = PsndRender(0, PsndLen);\r
- if (emustatus&1) emustatus|=2; else emustatus&=~2;\r
- if (PicoWriteSound) PicoWriteSound(curr_pos);\r
+ if (emustatus & 1)\r
+ emustatus |= 2;\r
+ else emustatus &= ~2;\r
+ if (PicoWriteSound)\r
+ PicoWriteSound(curr_pos * ((PicoOpt & POPT_EN_STEREO) ? 4 : 2));\r
// clear sound buffer\r
PsndClear();\r
}\r
}\r
\r
if (PicoWriteSound != NULL)\r
- PicoWriteSound(length);\r
+ PicoWriteSound(length * ((PicoOpt & POPT_EN_STEREO) ? 4 : 2));\r
PsndClear();\r
}\r
\r