summaryrefslogtreecommitdiff
path: root/apps/codecs/libasap/apokeysnd.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs/libasap/apokeysnd.c')
-rw-r--r--apps/codecs/libasap/apokeysnd.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/codecs/libasap/apokeysnd.c b/apps/codecs/libasap/apokeysnd.c
index ead611be5f..811e2f9b4a 100644
--- a/apps/codecs/libasap/apokeysnd.c
+++ b/apps/codecs/libasap/apokeysnd.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * apokeysnd.c - another POKEY sound emulator 2 * apokeysnd.c - another POKEY sound emulator
3 * 3 *
4 * Copyright (C) 2007-2009 Piotr Fusik 4 * Copyright (C) 2007-2010 Piotr Fusik
5 * 5 *
6 * This file is part of ASAP (Another Slight Atari Player), 6 * This file is part of ASAP (Another Slight Atari Player),
7 * see http://asap.sourceforge.net 7 * see http://asap.sourceforge.net
@@ -469,13 +469,14 @@ FUNC(void, PokeySound_StartFrame, (P(ASAP_State PTR, ast)))
469 469
470FUNC(void, PokeySound_EndFrame, (P(ASAP_State PTR, ast), P(int, current_cycle))) 470FUNC(void, PokeySound_EndFrame, (P(ASAP_State PTR, ast), P(int, current_cycle)))
471{ 471{
472 V(int, clk) = ASAP_MAIN_CLOCK(ast);
472 end_frame(ast, ADDRESSOF ast _ base_pokey, current_cycle); 473 end_frame(ast, ADDRESSOF ast _ base_pokey, current_cycle);
473 if (ast _ extra_pokey_mask != 0) 474 if (ast _ extra_pokey_mask != 0)
474 end_frame(ast, ADDRESSOF ast _ extra_pokey, current_cycle); 475 end_frame(ast, ADDRESSOF ast _ extra_pokey, current_cycle);
475 ast _ sample_offset += current_cycle * ASAP_SAMPLE_RATE; 476 ast _ sample_offset += current_cycle * ASAP_SAMPLE_RATE;
476 ast _ sample_index = 0; 477 ast _ sample_index = 0;
477 ast _ samples = TO_INT(ast _ sample_offset / ASAP_MAIN_CLOCK); 478 ast _ samples = TO_INT(ast _ sample_offset / clk);
478 ast _ sample_offset %= ASAP_MAIN_CLOCK; 479 ast _ sample_offset %= clk;
479} 480}
480 481
481/* Fills buffer with samples from delta_buffer. */ 482/* Fills buffer with samples from delta_buffer. */