\r
void YM2612Init_940(int baseclock, int rate)\r
{\r
+ static int oldrate;\r
+\r
+ // HACK\r
+ if (Pico.m.frame_count > 0 && !crashed_940 && rate == oldrate)\r
+ return;\r
+\r
printf("YM2612Init_940()\n");\r
printf("Mem usage: shared_data: %i, shared_ctl: %i\n", sizeof(*shared_data), sizeof(*shared_ctl));\r
\r
shared_ctl->baseclock = baseclock;\r
shared_ctl->rate = rate;\r
add_job_940(JOB940_INITALL);\r
+\r
+ oldrate = rate;\r
}\r
\r
\r
ym_active_chs = shared_ctl->ym_active_chs;\r
\r
// mix in ym buffer. is_buf_empty means nobody mixed there anything yet and it may contain trash\r
- if (is_buf_empty && ym_active_chs) memcpy32(buffer, ym_buf, length<<stereo);\r
+ if (is_buf_empty && ym_active_chs) memcpy(buffer, ym_buf, length << (stereo + 2));\r
else memset32(buffer, 0, length<<stereo);\r
\r
if (shared_ctl->writebuffsel == 1) {\r