NO_AUDIO option master
authorJohn Tsiombikas <nuclear@member.fsf.org>
Sat, 9 Sep 2023 02:36:10 +0000 (05:36 +0300)
committerJohn Tsiombikas <nuclear@member.fsf.org>
Sat, 9 Sep 2023 02:36:10 +0000 (05:36 +0300)
Makefile.android
src/music.c

index 2fd8c7d..8583c71 100644 (file)
@@ -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 $(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
        mkdir -p apkbuild/assets/data apkbuild/assets/sdr
        cp -r data/* apkbuild/assets/data
        cp -r sdr/* apkbuild/assets/sdr
index 81b98d0..ce4f795 100644 (file)
@@ -1,3 +1,5 @@
+#ifndef NO_AUDIO
+
 #include <stdio.h>
 #include <sys/stat.h>
 #include "music.h"
 #include <stdio.h>
 #include <sys/stat.h>
 #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;
 }
        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