X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=pico%2Fsound%2Fsound.c;h=ede33f11fd8cc92915f37e5c12e40044d0b6d710;hb=c7fd7bb8b7bc6342026a42e5316bd275a2f815c7;hp=5bb8e9d89fc216358958c98572e5ce1dae3db880;hpb=f6c49d38cbb965c502ca2af66d76e92f95acda7c;p=picodrive.git diff --git a/pico/sound/sound.c b/pico/sound/sound.c index 5bb8e9d..ede33f1 100644 --- a/pico/sound/sound.c +++ b/pico/sound/sound.c @@ -1,11 +1,11 @@ -// This is part of Pico Library - -// (c) Copyright 2004 Dave, All rights reserved. -// (c) Copyright 2006,2007 notaz, All rights reserved. -// Free for non-commercial use. - -// For commercial use, separate licencing terms must be obtained. - +/* + * PicoDrive + * (c) Copyright Dave, 2004 + * (C) notaz, 2006-2009 + * + * This work is licensed under the terms of MAME license. + * See COPYING file in the top-level directory. + */ #include #include "ym2612.h" @@ -14,6 +14,8 @@ #include "../cd/pcm.h" #include "mix.h" +#define SIMPLE_WRITE_SOUND 0 + void (*PsndMix_32_to_16l)(short *dest, int *src, int count) = mix_32_to_16l_stereo; // master int buffer to mix to @@ -181,6 +183,9 @@ PICO_INTERNAL void PsndDoDAC(int line_to) int dout = ym2612.dacout; int line_from = PsndDacLine; + if (line_to >= 312) + line_to = 311; + PsndDacLine = line_to + 1; pos =dac_info[line_from]>>4; @@ -337,6 +342,7 @@ static int PsndRender(int offset, int length) memset32(buf32, 0, length<