get rid of port_config.h
[picodrive.git] / pico / sound / sound.c
index 48ad409..ede33f1 100644 (file)
@@ -1,11 +1,11 @@
-// 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
@@ -14,6 +14,8 @@
 #include "../cd/pcm.h"\r
 #include "mix.h"\r
 \r
+#define SIMPLE_WRITE_SOUND 0\r
+\r
 void (*PsndMix_32_to_16l)(short *dest, int *src, int count) = mix_32_to_16l_stereo;\r
 \r
 // master int buffer to mix to\r
@@ -181,6 +183,9 @@ PICO_INTERNAL void PsndDoDAC(int line_to)
   int dout = ym2612.dacout;\r
   int line_from = PsndDacLine;\r
 \r
+  if (line_to >= 312)\r
+    line_to = 311;\r
+\r
   PsndDacLine = line_to + 1;\r
 \r
   pos =dac_info[line_from]>>4;\r