aboutsummaryrefslogtreecommitdiff
path: root/morphos
diff options
context:
space:
mode:
authorRuediger Hanke2002-04-06 15:57:34 +0000
committerRuediger Hanke2002-04-06 15:57:34 +0000
commitd5d4c8d1785cc914e643871eaa9568249b1709bd (patch)
tree33e4a1e39eae10ee65e446d9ec3ad68a3fe74a21 /morphos
parent39ee96d901be17bb9633f7adb7c6c2d062856071 (diff)
downloadscummvm-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.cpp16
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 );