diff --git a/src/YM2413.cpp b/src/YM2413.cpp index 68faf3ef..429224bb 100644 --- a/src/YM2413.cpp +++ b/src/YM2413.cpp @@ -266,4 +266,6 @@ void YM2413::LoadState(std::istream& stream) stream.read(reinterpret_cast(&m_pOPLL->slot[i].eg_out), sizeof(m_pOPLL->slot[i].eg_out)); stream.read(reinterpret_cast(&m_pOPLL->slot[i].update_requests), sizeof(m_pOPLL->slot[i].update_requests)); } + + OPLL_forceRefresh(m_pOPLL); } diff --git a/src/audio/emu2413/emu2413.c b/src/audio/emu2413/emu2413.c index 564ce00b..ba05e3f2 100644 --- a/src/audio/emu2413/emu2413.c +++ b/src/audio/emu2413/emu2413.c @@ -950,7 +950,7 @@ OPLL *OPLL_new(void) { initializeTables(); } - opll = (OPLL *)calloc(sizeof(OPLL), 1); + opll = (OPLL *)calloc(1, sizeof(OPLL)); if (opll == NULL) return NULL;