diff options
author | Javier <dev.git@javispedro.com> | 2022-11-27 00:55:21 +0100 |
---|---|---|
committer | Javier <dev.git@javispedro.com> | 2022-11-27 01:07:21 +0100 |
commit | 971641a3b4c572146619ac6ef3ba8c89e3967048 (patch) | |
tree | 22aafbbcfa72de7de30fd32e188e9eb5716549e1 /Adlib.cpp | |
parent | 3b31b72e93eb6556ea0d89e28622df2066636cdd (diff) | |
download | vmusic-971641a3b4c572146619ac6ef3ba8c89e3967048.tar.gz vmusic-971641a3b4c572146619ac6ef3ba8c89e3967048.zip |
updating to virtualbox7.0 APIv0.3.2
Diffstat (limited to 'Adlib.cpp')
-rw-r--r-- | Adlib.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -211,7 +211,8 @@ static DECLCALLBACK(int) adlibRenderThread(RTTHREAD ThreadSelf, void *pvUser) && ASMAtomicReadU64(&pThis->tmLastWrite) + ADLIB_RENDER_SUSPEND_TIMEOUT >= RTTimeSystemMilliTS()) { Log9(("rendering %lld frames\n", buf_frames)); - PDMDevHlpCritSectEnter(pDevIns, &pThis->critSect, VERR_SEM_BUSY); + rc = PDMDevHlpCritSectEnter(pDevIns, &pThis->critSect, VERR_SEM_BUSY); + PDM_CRITSECT_RELEASE_ASSERT_RC_DEV(pDevIns, &pThis->critSect, rc); OPL3_GenerateStream(&pThis->opl, buf, buf_frames); PDMDevHlpCritSectLeave(pDevIns, &pThis->critSect); @@ -406,7 +407,8 @@ static void adlibWriteRegister(PPDMDEVINS pDevIns, uint16_t reg, uint8_t value) break; default: - PDMDevHlpCritSectEnter(pDevIns, &pThis->critSect, VERR_SEM_BUSY); + int rc = PDMDevHlpCritSectEnter(pDevIns, &pThis->critSect, VERR_SEM_BUSY); + PDM_CRITSECT_RELEASE_ASSERT_RC_DEV(pDevIns, &pThis->critSect, rc); OPL3_WriteRegBuffered(&pThis->opl, reg, value); PDMDevHlpCritSectLeave(pDevIns, &pThis->critSect); break; @@ -544,9 +546,11 @@ static DECLCALLBACK(void) adlibR3Reset(PPDMDEVINS pDevIns) { PADLIBSTATE pThis = PDMDEVINS_2_DATA(pDevIns, PADLIBSTATE); - PDMDevHlpCritSectEnter(pDevIns, &pThis->critSect, VERR_SEM_BUSY); + int rc = PDMDevHlpCritSectEnter(pDevIns, &pThis->critSect, VERR_SEM_BUSY); + PDM_CRITSECT_RELEASE_ASSERT_RC_DEV(pDevIns, &pThis->critSect, rc); OPL3_Reset(&pThis->opl, pThis->uSampleRate); PDMDevHlpCritSectLeave(pDevIns, &pThis->critSect); + pThis->oplReg = 0; pThis->timer1Enable = false; pThis->timer1Expire = 0; |