move more globals to PicoInterface

similar reasons as before
This commit is contained in:
notaz 2017-10-22 02:04:26 +03:00
parent 075672bf9f
commit 6311a3baf5
27 changed files with 244 additions and 247 deletions

View file

@ -402,9 +402,9 @@ int YM2612UpdateOne_940(int *buffer, int length, int stereo, int is_buf_empty)
writebuff_ptr = 0;
/* predict sample counter for next frame */
if (PsndLen_exc_add) {
length = PsndLen;
if (PsndLen_exc_cnt + PsndLen_exc_add >= 0x10000) length++;
if (Pico.snd.len_e_add) {
length = Pico.snd.len;
if (Pico.snd.len_e_cnt + Pico.snd.len_e_add >= 0x10000) length++;
}
/* give 940 ym job */
@ -463,11 +463,11 @@ int mp3dec_start(FILE *f, int fpos_start)
if (loaded_mp3 != f)
{
if (PicoMessage != NULL)
if (PicoIn.osdMessage != NULL)
{
fseek(f, 0, SEEK_END);
if (ftell(f) > 2*1024*1024)
PicoMessage("Loading MP3...");
PicoIn.osdMessage("Loading MP3...");
}
fseek(f, 0, SEEK_SET);
fread(mp3_mem, 1, MP3_SIZE_MAX, f);

View file

@ -692,7 +692,7 @@ void pemu_sound_start(void)
{
soc = soc_detect();
if (soc == SOCID_POLLUX) {
PsndRate = pollux_get_real_snd_rate(PsndRate);
PicoIn.sndRate = pollux_get_real_snd_rate(PicoIn.sndRate);
PsndRerate(Pico.m.frame_count ? 1 : 0);
}
@ -707,10 +707,10 @@ void pemu_sound_stop(void)
int i;
/* get back from Pollux pain */
PsndRate += 1000;
PicoIn.sndRate += 1000;
for (i = 0; i < ARRAY_SIZE(sound_rates); i++) {
if (PsndRate >= sound_rates[i]) {
PsndRate = sound_rates[i];
if (PicoIn.sndRate >= sound_rates[i]) {
PicoIn.sndRate = sound_rates[i];
break;
}
}