aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ahoy/gui.c6
-rw-r--r--src/ahoy/gui.h1
-rw-r--r--src/ahoy/main.c7
3 files changed, 10 insertions, 4 deletions
diff --git a/src/ahoy/gui.c b/src/ahoy/gui.c
index fd6a660..82a351e 100644
--- a/src/ahoy/gui.c
+++ b/src/ahoy/gui.c
@@ -112,6 +112,12 @@ noclr:
}
void
+auplay(bool stop)
+{
+ SDL_PauseAudioDevice(adev, stop);
+}
+
+void
readkb(void)
{
SDL_Event e;
diff --git a/src/ahoy/gui.h b/src/ahoy/gui.h
index e262620..5312d4e 100644
--- a/src/ahoy/gui.h
+++ b/src/ahoy/gui.h
@@ -14,6 +14,7 @@ void wininit(void);
void winfree(void);
void winclr(void);
void windrw(void);
+void auplay(bool);
void readkb(void);
extern guistate gs;
diff --git a/src/ahoy/main.c b/src/ahoy/main.c
index 10e79e6..69a7946 100644
--- a/src/ahoy/main.c
+++ b/src/ahoy/main.c
@@ -86,10 +86,9 @@ update_timers(void)
if (c8.ST > 0) {
c8.ST--;
- // SDL_PauseAudioDevice(adev, 0); // Play sound
- } else {
- // SDL_PauseAudioDevice(adev, 1); // Pause sound
- }
+ auplay(false);
+ } else
+ auplay(true);
}
void