mirror of https://github.com/bsnes-emu/bsnes.git
Increase the minimum required cycles for a sync, fix SGB jingle audio
This commit is contained in:
parent
280f609785
commit
91b0e491c5
|
@ -466,7 +466,7 @@ static void render_jingle(GB_gameboy_t *gb, size_t count);
|
|||
void GB_sgb_render(GB_gameboy_t *gb)
|
||||
{
|
||||
if (gb->apu_output.sample_rate) {
|
||||
render_jingle(gb, gb->apu_output.sample_rate / (GB_get_clock_rate(gb) / LCDC_PERIOD));
|
||||
render_jingle(gb, gb->apu_output.sample_rate / (GB_get_clock_rate(gb) / (double)LCDC_PERIOD));
|
||||
}
|
||||
|
||||
if (gb->sgb->intro_animation < INTRO_ANIMATION_LENGTH) gb->sgb->intro_animation++;
|
||||
|
|
|
@ -59,7 +59,7 @@ void GB_timing_sync(GB_gameboy_t *gb)
|
|||
return;
|
||||
}
|
||||
/* Prevent syncing if not enough time has passed.*/
|
||||
if (gb->cycles_since_last_sync < LCDC_PERIOD / 4) return;
|
||||
if (gb->cycles_since_last_sync < LCDC_PERIOD / 3) return;
|
||||
|
||||
uint64_t target_nanoseconds = gb->cycles_since_last_sync * 1000000000LL / 2 / GB_get_clock_rate(gb); /* / 2 because we use 8MHz units */
|
||||
int64_t nanoseconds = get_nanoseconds();
|
||||
|
|
Loading…
Reference in New Issue