X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Fdos%2Faudos.c;h=2e6f376d96d36fff5aed1bd647c06c28ef067c59;hb=01b93b41c17cc4da5e4b57adbb8373ef7fb8dc26;hp=6b7709affdf8bbabc833a2ea504c6651e32a8e83;hpb=b49854e0980a030cc8338a7f4ee779ecde1aae38;p=dosdemo diff --git a/src/dos/audos.c b/src/dos/audos.c index 6b7709a..2e6f376 100644 --- a/src/dos/audos.c +++ b/src/dos/audos.c @@ -1,4 +1,6 @@ #include + +#ifndef NO_SOUND #include #include #include @@ -43,6 +45,7 @@ int au_init(void) void au_shutdown(void) { + printf("au_shutdown\n"); if(curmod) { au_stop_module(curmod); } @@ -220,3 +223,67 @@ void sleep_msec(unsigned long msec) #endif } } + +#else /* NO_SOUND */ +#include "audio.h" + +static int vol_master, vol_mus, vol_sfx; + +int au_init(void) +{ + vol_master = vol_mus = vol_sfx = 255; + return 0; +} + +void au_shutdown(void) +{ + printf("au_shutdown\n"); +} + +struct au_module *au_load_module(const char *fname) +{ + return 0; +} + +void au_free_module(struct au_module *mod) +{ +} + +int au_play_module(struct au_module *mod) +{ + return -1; +} + +void au_update(void) +{ +} + +int au_stop_module(struct au_module *mod) +{ + return -1; +} + +int au_module_state(struct au_module *mod) +{ + return AU_STOPPED; +} + +int au_volume(int vol) +{ + AU_VOLADJ(vol_master, vol); + return vol_master; +} + +int au_sfx_volume(int vol) +{ + AU_VOLADJ(vol_sfx, vol); + return vol_sfx; +} + + +int au_music_volume(int vol) +{ + AU_VOLADJ(vol_mus, vol); + return vol_mus; +} +#endif /* NO_SOUND */