diff options
author | Ruediger Hanke | 2002-04-06 15:57:34 +0000 |
---|---|---|
committer | Ruediger Hanke | 2002-04-06 15:57:34 +0000 |
commit | d5d4c8d1785cc914e643871eaa9568249b1709bd (patch) | |
tree | 33e4a1e39eae10ee65e446d9ec3ad68a3fe74a21 /morphos | |
parent | 39ee96d901be17bb9633f7adb7c6c2d062856071 (diff) | |
download | scummvm-rg350-d5d4c8d1785cc914e643871eaa9568249b1709bd.tar.gz scummvm-rg350-d5d4c8d1785cc914e643871eaa9568249b1709bd.tar.bz2 scummvm-rg350-d5d4c8d1785cc914e643871eaa9568249b1709bd.zip |
Attempt to fix an audio problem somebody reported which I can't reproduce ...
svn-id: r3883
Diffstat (limited to 'morphos')
-rw-r--r-- | morphos/morphos_sound.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/morphos/morphos_sound.cpp b/morphos/morphos_sound.cpp index 17add88953..4077561ad7 100644 --- a/morphos/morphos_sound.cpp +++ b/morphos/morphos_sound.cpp @@ -210,14 +210,7 @@ int morphos_music_thread( Scumm *s, ULONG MidiUnit, bool NoMusic ) for(;;) { if( CheckSignal( SIGBREAKF_CTRL_F ) ) - { - if( ahiReqSent[ ahiCurBuf ] ) - { - AbortIO( (struct IORequest *)ahiReq[ ahiCurBuf ] ); - WaitIO ( (struct IORequest *)ahiReq[ ahiCurBuf ] ); - } break; - } if( !snd_driv.wave_based() ) { @@ -248,7 +241,10 @@ int morphos_music_thread( Scumm *s, ULONG MidiUnit, bool NoMusic ) UWORD ahiOtherBuf = !ahiCurBuf; if( ahiReqSent[ ahiCurBuf ] ) + { WaitIO( (struct IORequest *)req ); + ahiReqSent[ ahiCurBuf ] = FALSE; + } if( CheckSignal( SIGBREAKF_CTRL_F ) ) break; @@ -272,6 +268,12 @@ int morphos_music_thread( Scumm *s, ULONG MidiUnit, bool NoMusic ) } } + if( ahiReqSent[ ahiCurBuf ] ) + { + AbortIO( (struct IORequest *)ahiReq[ ahiCurBuf ] ); + WaitIO ( (struct IORequest *)ahiReq[ ahiCurBuf ] ); + } + if( TimerAvailable ) { CloseDevice( (struct IORequest *)TimerIORequest ); |