}
if(!mainmenu){
OPENAL_SetPaused(channels[stream_music3], true);
- OPENAL_SetPaused(channels[music1], false);
+ resume_stream(music1);
}
}
if(mainmenu==3){
//resume
mainmenu=0;
OPENAL_SetPaused(channels[stream_music3], true);
- OPENAL_SetPaused(channels[music1], false);
+ resume_stream(music1);
}
}
velocity=facing*-10;
velocity.y=5;
skeleton.free=0;
- if(id==0)OPENAL_SetPaused(channels[whooshsound], false);
+ if(id==0)
+ resume_stream(whooshsound);
award_bonus(id, cannon);
}
targetframe=3;
velocity=facing*-8;
velocity.y=4;
- if(id==0)OPENAL_SetPaused(channels[whooshsound], false);
+ if(id==0)
+ resume_stream(whooshsound);
}
if(targetanimation==walljumprightanim){
targetanimation=rightflipanim;
velocity=facing*8;
velocity.y=4;
}
- if(id==0)OPENAL_SetPaused(channels[whooshsound], false);
+ if(id==0)
+ resume_stream(whooshsound);
}
if(targetanimation==walljumpleftanim){
if(attackkeydown){
velocity=DoRotation(facing,0,-30,0)*-8;
velocity.y=4;
}
- if(id==0)OPENAL_SetPaused(channels[whooshsound], false);
+ if(id==0)
+ resume_stream(whooshsound);
}
if(targetanimation==sneakattackanim){
float ycoords=oldcoords.y;
OPENAL_SetPaused (channels[soundid], false);
}
+void
+resume_stream(int soundid)
+{
+ OPENAL_SetPaused (channels[soundid], false);
+}
+
+void
+pause_sound(int soundid)
+{
+ OPENAL_SetPaused (channels[soundid], true);
+}
+
extern void emit_sound_np(int soundid, float vol = 256.f);
extern void emit_stream_at(int soundid, const XYZ &pos = XYZ(), float vol = 256.f);
extern void emit_stream_np(int soundid, float vol = 256.f);
+extern void resume_stream(int soundid);
+extern void pause_sound(int soundid);
extern int footstepsound, footstepsound2, footstepsound3, footstepsound4;
#endif