From ecf29cf61d90f633e13982fc6e7b6734a1e10454 Mon Sep 17 00:00:00 2001 From: John Tsiombikas Date: Sat, 9 Sep 2023 05:36:10 +0300 Subject: [PATCH] NO_AUDIO option --- Makefile.android | 3 +++ src/music.c | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/Makefile.android b/Makefile.android index 2fd8c7d..8583c71 100644 --- a/Makefile.android +++ b/Makefile.android @@ -63,6 +63,9 @@ $(name).unsigned.apk: $(so64) $(so32) AndroidManifest.xml $(icons) cp $(so64) apkbuild/lib/arm64-v8a/$(lib_so) cp $(so32) apkbuild/lib/armeabi-v7a/$(lib_so) cp $(so32) apkbuild/lib/armeabi/$(lib_so) + cp $(NDK)/prebuilt/android-arm64/gdbserver/gdbserver apkbuild/lib/arm64-v8a/gdbserver + cp $(NDK)/prebuilt/android-arm/gdbserver/gdbserver apkbuild/lib/armeabi-v7a/gdbserver + cp $(NDK)/prebuilt/android-arm/gdbserver/gdbserver apkbuild/lib/armeabi/gdbserver mkdir -p apkbuild/assets/data apkbuild/assets/sdr cp -r data/* apkbuild/assets/data cp -r sdr/* apkbuild/assets/sdr diff --git a/src/music.c b/src/music.c index 81b98d0..ce4f795 100644 --- a/src/music.c +++ b/src/music.c @@ -1,3 +1,5 @@ +#ifndef NO_AUDIO + #include #include #include "music.h" @@ -195,3 +197,33 @@ static ma_result vinfo(ma_vfs *vfs, ma_vfs_file fp, ma_file_info *inf) inf->sizeInBytes = st.st_size; return MA_SUCCESS; } + +#else /* NO_AUDIO */ + +int init_music(void) +{ + return 0; +} + +void destroy_music(void) +{ +} + +void play_music(void) +{ +} + +void stop_music(void) +{ +} + +void seek_music(long tm) +{ +} + + +void set_music_volume(float vol) +{ +} + +#endif -- 1.7.10.4