diff options
author | Juan J. Martinez <jjm@usebox.net> | 2023-07-02 21:31:19 +0100 |
---|---|---|
committer | Juan J. Martinez <jjm@usebox.net> | 2023-07-02 21:31:19 +0100 |
commit | a88810c8a70c8e3a7533a266774ab61a84a9adf4 (patch) | |
tree | 9ec78cd5e20f06a6cbcbd0251e215f2ecaae71c4 /src/main.c | |
parent | 6e03fe85b19bc533888a4689572aab0ccf68edc4 (diff) | |
download | gold-mine-run-a88810c8a70c8e3a7533a266774ab61a84a9adf4.tar.gz gold-mine-run-a88810c8a70c8e3a7533a266774ab61a84a9adf4.zip |
Add sound support
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -6,6 +6,7 @@ #include "timer.h" #include "keyb.h" +#include "sound.h" #include "vga.h" #include "data.h" #include "menu.h" @@ -18,14 +19,24 @@ void free_all() { timer_free(); keyb_free(); + sound_free(); } int main(int argc, char *argv[]) { + if (!sound_init()) + { + fprintf(stderr, "ERROR: failed to init sound\n"); + return 1; + } + timer_init(); keyb_init(); atexit(free_all); + /* to update mikmod */ + timer_user_fn(sound_update); + /* set VGA 320x200, 256 col */ if (!set_mode(0x13)) { |