diff options
| author | Ian C <ianc@noddybox.co.uk> | 2026-06-26 14:46:30 +0100 |
|---|---|---|
| committer | Ian C <ianc@noddybox.co.uk> | 2026-06-26 14:46:30 +0100 |
| commit | c31b779c20638ce25f11489c445a53798a663b13 (patch) | |
| tree | dd4b3b423369d1ee25664221fa0f525002ea9414 /src | |
| parent | fe0ec0f56d2679f52bd68273b058f3c081b20972 (diff) | |
Fixed bad header guard on audio.h
Diffstat (limited to 'src')
| -rw-r--r-- | src/Makefile | 2 | ||||
| -rw-r--r-- | src/audio.h | 5 | ||||
| -rw-r--r-- | src/main.c | 9 |
3 files changed, 13 insertions, 3 deletions
diff --git a/src/Makefile b/src/Makefile index 808c6a9..15db934 100644 --- a/src/Makefile +++ b/src/Makefile @@ -83,7 +83,7 @@ clean: # DO NOT DELETE THIS LINE -- make depend depends on it. -main.o: z80.h spec.h gfx.h gui.h memmenu.h config.h kbbmp.h exit.h tape.h +main.o: z80.h spec.h gfx.h gui.h memmenu.h config.h kbbmp.h exit.h tape.h audio.h main.o: util.h spec.o: spec.h z80.h snap.h gfx.h gui.h config.h exit.h tape.h util.h snap.o: snap.h z80.h util.h diff --git a/src/audio.h b/src/audio.h index fb972ea..83980e4 100644 --- a/src/audio.h +++ b/src/audio.h @@ -24,8 +24,8 @@ */ -#ifndef ESPEC_TAPE_H -#define ESPEC_TAPE_H +#ifndef ESPEC_AUDIO_H +#define ESPEC_AUDIO_H #include <stdlib.h> @@ -38,6 +38,7 @@ */ int AUDIOInit(void); + /* Add the passed buffer to the sound queue. It is a signed 8-bit mono sample which will be converted as appropriate by the audio interface. */ @@ -37,6 +37,7 @@ #include "exit.h" #include "tape.h" #include "util.h" +#include "audio.h" /* ---------------------------------------- MACROS @@ -87,6 +88,14 @@ int main(int argc, char *argv[]) GFXInit(); + if (IConfig(CONF_SOUND)) + { + if (!AUDIOInit()) + { + fprintf(stderr, "warning: couldn't initialise audio\n"); + } + } + SPECInit(z80); white=GFXRGB(255,255,255); |
