0
0
mirror of https://github.com/termux/termux-packages.git synced 2024-12-11 23:00:52 +00:00
termux-packages/packages/cava/no-posix-shmem.patch
Kevin Williams 08657bcca9 upgpkg(main/cava): 0.8.3
Signed-off-by: Kevin Williams <admin@utermux.dev>
2022-11-07 15:28:30 +08:00

46 lines
1.4 KiB
Diff

diff -uNr cava-0.8.3/cava.c cava-0.8.3.mod/cava.c
--- cava-0.8.3/cava.c 2022-11-04 16:01:05.000000000 +0800
+++ cava-0.8.3.mod/cava.c 2022-11-05 17:00:47.299784502 +0800
@@ -372,6 +372,7 @@
audio.rate = 44100;
break;
#endif
+ #ifndef __ANDROID__
case INPUT_SHMEM:
thr_id = pthread_create(&p_thread, NULL, input_shmem, (void *)&audio);
@@ -389,6 +390,7 @@
debug("got format: %d and rate %d\n", audio.format, audio.rate);
// audio.rate = 44100;
break;
+ #endif
#ifdef PORTAUDIO
case INPUT_PORTAUDIO:
thr_id = pthread_create(&p_thread, NULL, input_portaudio, (void *)&audio);
diff -uNr cava-0.8.3/input/shmem.c cava-0.8.3.mod/input/shmem.c
--- cava-0.8.3/input/shmem.c 2022-11-04 16:01:05.000000000 +0800
+++ cava-0.8.3.mod/input/shmem.c 2022-11-05 17:02:06.399784472 +0800
@@ -1,6 +1,7 @@
#include "input/shmem.h"
#include "input/common.h"
+#ifndef __ANDROID__
#include <sys/mman.h>
#include <sys/stat.h>
#include <sys/types.h>
@@ -98,3 +99,4 @@
}
return 0;
}
+#endif // __ANDROID__
diff -uNr cava-0.8.3/input/shmem.h cava-0.8.3.mod/input/shmem.h
--- cava-0.8.3/input/shmem.h 2022-11-04 16:01:05.000000000 +0800
+++ cava-0.8.3.mod/input/shmem.h 2022-11-05 17:02:33.729784462 +0800
@@ -2,4 +2,6 @@
#pragma once
+#ifndef __ANDROID__
void *input_shmem(void *data);
+#endif