summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKimJeongYeon <see2002@gmail.com>2014-02-07 23:52:58 +0900
committerKimJeongYeon <see2002@gmail.com>2014-02-07 23:52:58 +0900
commit1f73394531db1bc2777e6cb47249eead018f8336 (patch)
tree9959f8ae56feb4174f6284abbf60e3c84e17fadc
parent4a94e12986b7f4925b0d457af8c3464ffbef2e2b (diff)
downloadjack2-1f73394531db1bc2777e6cb47249eead018f8336.tar.gz
additional code cleanup for jack android
-rw-r--r--.gitignore2
-rw-r--r--android/Android.mk124
-rw-r--r--android/JackError.cpp30
-rw-r--r--common/Jackdmp.cpp38
-rw-r--r--common/shm.h2
-rw-r--r--example-clients/transport.c10
6 files changed, 104 insertions, 102 deletions
diff --git a/.gitignore b/.gitignore
index 90db7d79..030a9e38 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,5 @@ build/
man/*.1
.waf*
.lock*
+android/.server/
+android/.client/
diff --git a/android/Android.mk b/android/Android.mk
index 464ca244..7d4219d0 100644
--- a/android/Android.mk
+++ b/android/Android.mk
@@ -38,67 +38,67 @@ $(shell rm -rf $(LOCAL_PATH)/$(common_libsource_client_dir))
$(shell mkdir $(LOCAL_PATH)/$(common_libsource_server_dir))
$(shell mkdir $(LOCAL_PATH)/$(common_libsource_client_dir))
-$(shell cp -rf $(LOCAL_PATH)/../common/JackActivationCount.cpp $(LOCAL_PATH)/$(common_libsource_server_dir)/JackActivationCount.cpp)
-$(shell cp -rf $(LOCAL_PATH)/../common/JackAPI.cpp $(LOCAL_PATH)/$(common_libsource_server_dir)/JackAPI.cpp)
-$(shell cp -rf $(LOCAL_PATH)/../common/JackClient.cpp $(LOCAL_PATH)/$(common_libsource_server_dir)/JackClient.cpp)
-$(shell cp -rf $(LOCAL_PATH)/../common/JackConnectionManager.cpp $(LOCAL_PATH)/$(common_libsource_server_dir)/JackConnectionManager.cpp)
-$(shell cp -rf $(LOCAL_PATH)/../common/ringbuffer.c $(LOCAL_PATH)/$(common_libsource_server_dir)/ringbuffer.c)
-$(shell cp -rf $(LOCAL_PATH)/JackError.cpp $(LOCAL_PATH)/$(common_libsource_server_dir)/JackError.cpp)
-$(shell cp -rf $(LOCAL_PATH)/../common/JackException.cpp $(LOCAL_PATH)/$(common_libsource_server_dir)/JackException.cpp)
-$(shell cp -rf $(LOCAL_PATH)/../common/JackFrameTimer.cpp $(LOCAL_PATH)/$(common_libsource_server_dir)/JackFrameTimer.cpp)
-$(shell cp -rf $(LOCAL_PATH)/../common/JackGraphManager.cpp $(LOCAL_PATH)/$(common_libsource_server_dir)/JackGraphManager.cpp)
-$(shell cp -rf $(LOCAL_PATH)/../common/JackPort.cpp $(LOCAL_PATH)/$(common_libsource_server_dir)/JackPort.cpp)
-$(shell cp -rf $(LOCAL_PATH)/../common/JackPortType.cpp $(LOCAL_PATH)/$(common_libsource_server_dir)/JackPortType.cpp)
-$(shell cp -rf $(LOCAL_PATH)/../common/JackAudioPort.cpp $(LOCAL_PATH)/$(common_libsource_server_dir)/JackAudioPort.cpp)
-$(shell cp -rf $(LOCAL_PATH)/../common/JackMidiPort.cpp $(LOCAL_PATH)/$(common_libsource_server_dir)/JackMidiPort.cpp)
-$(shell cp -rf $(LOCAL_PATH)/../common/JackMidiAPI.cpp $(LOCAL_PATH)/$(common_libsource_server_dir)/JackMidiAPI.cpp)
-$(shell cp -rf $(LOCAL_PATH)/../common/JackEngineControl.cpp $(LOCAL_PATH)/$(common_libsource_server_dir)/JackEngineControl.cpp)
-$(shell cp -rf $(LOCAL_PATH)/../common/JackShmMem.cpp $(LOCAL_PATH)/$(common_libsource_server_dir)/JackShmMem.cpp)
-$(shell cp -rf $(LOCAL_PATH)/../common/JackGenericClientChannel.cpp $(LOCAL_PATH)/$(common_libsource_server_dir)/JackGenericClientChannel.cpp)
-$(shell cp -rf $(LOCAL_PATH)/../common/JackGlobals.cpp $(LOCAL_PATH)/$(common_libsource_server_dir)/JackGlobals.cpp)
-$(shell cp -rf $(LOCAL_PATH)/../common/JackDebugClient.cpp $(LOCAL_PATH)/$(common_libsource_server_dir)/JackDebugClient.cpp)
-$(shell cp -rf $(LOCAL_PATH)/../common/JackTransportEngine.cpp $(LOCAL_PATH)/$(common_libsource_server_dir)/JackTransportEngine.cpp)
-$(shell cp -rf $(LOCAL_PATH)/../common/timestamps.c $(LOCAL_PATH)/$(common_libsource_server_dir)/timestamps.c)
-$(shell cp -rf $(LOCAL_PATH)/../common/JackTools.cpp $(LOCAL_PATH)/$(common_libsource_server_dir)/JackTools.cpp)
-$(shell cp -rf $(LOCAL_PATH)/../common/JackMessageBuffer.cpp $(LOCAL_PATH)/$(common_libsource_server_dir)/JackMessageBuffer.cpp)
-$(shell cp -rf $(LOCAL_PATH)/../common/JackEngineProfiling.cpp $(LOCAL_PATH)/$(common_libsource_server_dir)/JackEngineProfiling.cpp)
-$(shell cp -rf $(LOCAL_PATH)/JackAndroidThread.cpp $(LOCAL_PATH)/$(common_libsource_server_dir)/JackAndroidThread.cpp)
-$(shell cp -rf $(LOCAL_PATH)/JackAndroidSemaphore.cpp $(LOCAL_PATH)/$(common_libsource_server_dir)/JackAndroidSemaphore.cpp)
-$(shell cp -rf $(LOCAL_PATH)/../posix/JackPosixProcessSync.cpp $(LOCAL_PATH)/$(common_libsource_server_dir)/JackPosixProcessSync.cpp)
-$(shell cp -rf $(LOCAL_PATH)/../posix/JackPosixMutex.cpp $(LOCAL_PATH)/$(common_libsource_server_dir)/JackPosixMutex.cpp)
-$(shell cp -rf $(LOCAL_PATH)/../posix/JackSocket.cpp $(LOCAL_PATH)/$(common_libsource_server_dir)/JackSocket.cpp)
-$(shell cp -rf $(LOCAL_PATH)/../linux/JackLinuxTime.c $(LOCAL_PATH)/$(common_libsource_server_dir)/JackLinuxTime.c)
-
-$(shell cp -rf $(LOCAL_PATH)/../common/JackActivationCount.cpp $(LOCAL_PATH)/$(common_libsource_client_dir)/JackActivationCount.cpp)
-$(shell cp -rf $(LOCAL_PATH)/../common/JackAPI.cpp $(LOCAL_PATH)/$(common_libsource_client_dir)/JackAPI.cpp)
-$(shell cp -rf $(LOCAL_PATH)/../common/JackClient.cpp $(LOCAL_PATH)/$(common_libsource_client_dir)/JackClient.cpp)
-$(shell cp -rf $(LOCAL_PATH)/../common/JackConnectionManager.cpp $(LOCAL_PATH)/$(common_libsource_client_dir)/JackConnectionManager.cpp)
-$(shell cp -rf $(LOCAL_PATH)/../common/ringbuffer.c $(LOCAL_PATH)/$(common_libsource_client_dir)/ringbuffer.c)
-$(shell cp -rf $(LOCAL_PATH)/JackError.cpp $(LOCAL_PATH)/$(common_libsource_client_dir)/JackError.cpp)
-$(shell cp -rf $(LOCAL_PATH)/../common/JackException.cpp $(LOCAL_PATH)/$(common_libsource_client_dir)/JackException.cpp)
-$(shell cp -rf $(LOCAL_PATH)/../common/JackFrameTimer.cpp $(LOCAL_PATH)/$(common_libsource_client_dir)/JackFrameTimer.cpp)
-$(shell cp -rf $(LOCAL_PATH)/../common/JackGraphManager.cpp $(LOCAL_PATH)/$(common_libsource_client_dir)/JackGraphManager.cpp)
-$(shell cp -rf $(LOCAL_PATH)/../common/JackPort.cpp $(LOCAL_PATH)/$(common_libsource_client_dir)/JackPort.cpp)
-$(shell cp -rf $(LOCAL_PATH)/../common/JackPortType.cpp $(LOCAL_PATH)/$(common_libsource_client_dir)/JackPortType.cpp)
-$(shell cp -rf $(LOCAL_PATH)/../common/JackAudioPort.cpp $(LOCAL_PATH)/$(common_libsource_client_dir)/JackAudioPort.cpp)
-$(shell cp -rf $(LOCAL_PATH)/../common/JackMidiPort.cpp $(LOCAL_PATH)/$(common_libsource_client_dir)/JackMidiPort.cpp)
-$(shell cp -rf $(LOCAL_PATH)/../common/JackMidiAPI.cpp $(LOCAL_PATH)/$(common_libsource_client_dir)/JackMidiAPI.cpp)
-$(shell cp -rf $(LOCAL_PATH)/../common/JackEngineControl.cpp $(LOCAL_PATH)/$(common_libsource_client_dir)/JackEngineControl.cpp)
-$(shell cp -rf $(LOCAL_PATH)/../common/JackShmMem.cpp $(LOCAL_PATH)/$(common_libsource_client_dir)/JackShmMem.cpp)
-$(shell cp -rf $(LOCAL_PATH)/../common/JackGenericClientChannel.cpp $(LOCAL_PATH)/$(common_libsource_client_dir)/JackGenericClientChannel.cpp)
-$(shell cp -rf $(LOCAL_PATH)/../common/JackGlobals.cpp $(LOCAL_PATH)/$(common_libsource_client_dir)/JackGlobals.cpp)
-$(shell cp -rf $(LOCAL_PATH)/../common/JackDebugClient.cpp $(LOCAL_PATH)/$(common_libsource_client_dir)/JackDebugClient.cpp)
-$(shell cp -rf $(LOCAL_PATH)/../common/JackTransportEngine.cpp $(LOCAL_PATH)/$(common_libsource_client_dir)/JackTransportEngine.cpp)
-$(shell cp -rf $(LOCAL_PATH)/../common/timestamps.c $(LOCAL_PATH)/$(common_libsource_client_dir)/timestamps.c)
-$(shell cp -rf $(LOCAL_PATH)/../common/JackTools.cpp $(LOCAL_PATH)/$(common_libsource_client_dir)/JackTools.cpp)
-$(shell cp -rf $(LOCAL_PATH)/../common/JackMessageBuffer.cpp $(LOCAL_PATH)/$(common_libsource_client_dir)/JackMessageBuffer.cpp)
-$(shell cp -rf $(LOCAL_PATH)/../common/JackEngineProfiling.cpp $(LOCAL_PATH)/$(common_libsource_client_dir)/JackEngineProfiling.cpp)
-$(shell cp -rf $(LOCAL_PATH)/JackAndroidThread.cpp $(LOCAL_PATH)/$(common_libsource_client_dir)/JackAndroidThread.cpp)
-$(shell cp -rf $(LOCAL_PATH)/JackAndroidSemaphore.cpp $(LOCAL_PATH)/$(common_libsource_client_dir)/JackAndroidSemaphore.cpp)
-$(shell cp -rf $(LOCAL_PATH)/../posix/JackPosixProcessSync.cpp $(LOCAL_PATH)/$(common_libsource_client_dir)/JackPosixProcessSync.cpp)
-$(shell cp -rf $(LOCAL_PATH)/../posix/JackPosixMutex.cpp $(LOCAL_PATH)/$(common_libsource_client_dir)/JackPosixMutex.cpp)
-$(shell cp -rf $(LOCAL_PATH)/../posix/JackSocket.cpp $(LOCAL_PATH)/$(common_libsource_client_dir)/JackSocket.cpp)
-$(shell cp -rf $(LOCAL_PATH)/../linux/JackLinuxTime.c $(LOCAL_PATH)/$(common_libsource_client_dir)/JackLinuxTime.c)
+$(shell cp -f $(LOCAL_PATH)/../common/JackActivationCount.cpp $(LOCAL_PATH)/$(common_libsource_server_dir)/JackActivationCount.cpp)
+$(shell cp -f $(LOCAL_PATH)/../common/JackAPI.cpp $(LOCAL_PATH)/$(common_libsource_server_dir)/JackAPI.cpp)
+$(shell cp -f $(LOCAL_PATH)/../common/JackClient.cpp $(LOCAL_PATH)/$(common_libsource_server_dir)/JackClient.cpp)
+$(shell cp -f $(LOCAL_PATH)/../common/JackConnectionManager.cpp $(LOCAL_PATH)/$(common_libsource_server_dir)/JackConnectionManager.cpp)
+$(shell cp -f $(LOCAL_PATH)/../common/ringbuffer.c $(LOCAL_PATH)/$(common_libsource_server_dir)/ringbuffer.c)
+$(shell cp -f $(LOCAL_PATH)/JackError.cpp $(LOCAL_PATH)/$(common_libsource_server_dir)/JackError.cpp)
+$(shell cp -f $(LOCAL_PATH)/../common/JackException.cpp $(LOCAL_PATH)/$(common_libsource_server_dir)/JackException.cpp)
+$(shell cp -f $(LOCAL_PATH)/../common/JackFrameTimer.cpp $(LOCAL_PATH)/$(common_libsource_server_dir)/JackFrameTimer.cpp)
+$(shell cp -f $(LOCAL_PATH)/../common/JackGraphManager.cpp $(LOCAL_PATH)/$(common_libsource_server_dir)/JackGraphManager.cpp)
+$(shell cp -f $(LOCAL_PATH)/../common/JackPort.cpp $(LOCAL_PATH)/$(common_libsource_server_dir)/JackPort.cpp)
+$(shell cp -f $(LOCAL_PATH)/../common/JackPortType.cpp $(LOCAL_PATH)/$(common_libsource_server_dir)/JackPortType.cpp)
+$(shell cp -f $(LOCAL_PATH)/../common/JackAudioPort.cpp $(LOCAL_PATH)/$(common_libsource_server_dir)/JackAudioPort.cpp)
+$(shell cp -f $(LOCAL_PATH)/../common/JackMidiPort.cpp $(LOCAL_PATH)/$(common_libsource_server_dir)/JackMidiPort.cpp)
+$(shell cp -f $(LOCAL_PATH)/../common/JackMidiAPI.cpp $(LOCAL_PATH)/$(common_libsource_server_dir)/JackMidiAPI.cpp)
+$(shell cp -f $(LOCAL_PATH)/../common/JackEngineControl.cpp $(LOCAL_PATH)/$(common_libsource_server_dir)/JackEngineControl.cpp)
+$(shell cp -f $(LOCAL_PATH)/../common/JackShmMem.cpp $(LOCAL_PATH)/$(common_libsource_server_dir)/JackShmMem.cpp)
+$(shell cp -f $(LOCAL_PATH)/../common/JackGenericClientChannel.cpp $(LOCAL_PATH)/$(common_libsource_server_dir)/JackGenericClientChannel.cpp)
+$(shell cp -f $(LOCAL_PATH)/../common/JackGlobals.cpp $(LOCAL_PATH)/$(common_libsource_server_dir)/JackGlobals.cpp)
+$(shell cp -f $(LOCAL_PATH)/../common/JackDebugClient.cpp $(LOCAL_PATH)/$(common_libsource_server_dir)/JackDebugClient.cpp)
+$(shell cp -f $(LOCAL_PATH)/../common/JackTransportEngine.cpp $(LOCAL_PATH)/$(common_libsource_server_dir)/JackTransportEngine.cpp)
+$(shell cp -f $(LOCAL_PATH)/../common/timestamps.c $(LOCAL_PATH)/$(common_libsource_server_dir)/timestamps.c)
+$(shell cp -f $(LOCAL_PATH)/../common/JackTools.cpp $(LOCAL_PATH)/$(common_libsource_server_dir)/JackTools.cpp)
+$(shell cp -f $(LOCAL_PATH)/../common/JackMessageBuffer.cpp $(LOCAL_PATH)/$(common_libsource_server_dir)/JackMessageBuffer.cpp)
+$(shell cp -f $(LOCAL_PATH)/../common/JackEngineProfiling.cpp $(LOCAL_PATH)/$(common_libsource_server_dir)/JackEngineProfiling.cpp)
+$(shell cp -f $(LOCAL_PATH)/JackAndroidThread.cpp $(LOCAL_PATH)/$(common_libsource_server_dir)/JackAndroidThread.cpp)
+$(shell cp -f $(LOCAL_PATH)/JackAndroidSemaphore.cpp $(LOCAL_PATH)/$(common_libsource_server_dir)/JackAndroidSemaphore.cpp)
+$(shell cp -f $(LOCAL_PATH)/../posix/JackPosixProcessSync.cpp $(LOCAL_PATH)/$(common_libsource_server_dir)/JackPosixProcessSync.cpp)
+$(shell cp -f $(LOCAL_PATH)/../posix/JackPosixMutex.cpp $(LOCAL_PATH)/$(common_libsource_server_dir)/JackPosixMutex.cpp)
+$(shell cp -f $(LOCAL_PATH)/../posix/JackSocket.cpp $(LOCAL_PATH)/$(common_libsource_server_dir)/JackSocket.cpp)
+$(shell cp -f $(LOCAL_PATH)/../linux/JackLinuxTime.c $(LOCAL_PATH)/$(common_libsource_server_dir)/JackLinuxTime.c)
+
+$(shell cp -f $(LOCAL_PATH)/../common/JackActivationCount.cpp $(LOCAL_PATH)/$(common_libsource_client_dir)/JackActivationCount.cpp)
+$(shell cp -f $(LOCAL_PATH)/../common/JackAPI.cpp $(LOCAL_PATH)/$(common_libsource_client_dir)/JackAPI.cpp)
+$(shell cp -f $(LOCAL_PATH)/../common/JackClient.cpp $(LOCAL_PATH)/$(common_libsource_client_dir)/JackClient.cpp)
+$(shell cp -f $(LOCAL_PATH)/../common/JackConnectionManager.cpp $(LOCAL_PATH)/$(common_libsource_client_dir)/JackConnectionManager.cpp)
+$(shell cp -f $(LOCAL_PATH)/../common/ringbuffer.c $(LOCAL_PATH)/$(common_libsource_client_dir)/ringbuffer.c)
+$(shell cp -f $(LOCAL_PATH)/JackError.cpp $(LOCAL_PATH)/$(common_libsource_client_dir)/JackError.cpp)
+$(shell cp -f $(LOCAL_PATH)/../common/JackException.cpp $(LOCAL_PATH)/$(common_libsource_client_dir)/JackException.cpp)
+$(shell cp -f $(LOCAL_PATH)/../common/JackFrameTimer.cpp $(LOCAL_PATH)/$(common_libsource_client_dir)/JackFrameTimer.cpp)
+$(shell cp -f $(LOCAL_PATH)/../common/JackGraphManager.cpp $(LOCAL_PATH)/$(common_libsource_client_dir)/JackGraphManager.cpp)
+$(shell cp -f $(LOCAL_PATH)/../common/JackPort.cpp $(LOCAL_PATH)/$(common_libsource_client_dir)/JackPort.cpp)
+$(shell cp -f $(LOCAL_PATH)/../common/JackPortType.cpp $(LOCAL_PATH)/$(common_libsource_client_dir)/JackPortType.cpp)
+$(shell cp -f $(LOCAL_PATH)/../common/JackAudioPort.cpp $(LOCAL_PATH)/$(common_libsource_client_dir)/JackAudioPort.cpp)
+$(shell cp -f $(LOCAL_PATH)/../common/JackMidiPort.cpp $(LOCAL_PATH)/$(common_libsource_client_dir)/JackMidiPort.cpp)
+$(shell cp -f $(LOCAL_PATH)/../common/JackMidiAPI.cpp $(LOCAL_PATH)/$(common_libsource_client_dir)/JackMidiAPI.cpp)
+$(shell cp -f $(LOCAL_PATH)/../common/JackEngineControl.cpp $(LOCAL_PATH)/$(common_libsource_client_dir)/JackEngineControl.cpp)
+$(shell cp -f $(LOCAL_PATH)/../common/JackShmMem.cpp $(LOCAL_PATH)/$(common_libsource_client_dir)/JackShmMem.cpp)
+$(shell cp -f $(LOCAL_PATH)/../common/JackGenericClientChannel.cpp $(LOCAL_PATH)/$(common_libsource_client_dir)/JackGenericClientChannel.cpp)
+$(shell cp -f $(LOCAL_PATH)/../common/JackGlobals.cpp $(LOCAL_PATH)/$(common_libsource_client_dir)/JackGlobals.cpp)
+$(shell cp -f $(LOCAL_PATH)/../common/JackDebugClient.cpp $(LOCAL_PATH)/$(common_libsource_client_dir)/JackDebugClient.cpp)
+$(shell cp -f $(LOCAL_PATH)/../common/JackTransportEngine.cpp $(LOCAL_PATH)/$(common_libsource_client_dir)/JackTransportEngine.cpp)
+$(shell cp -f $(LOCAL_PATH)/../common/timestamps.c $(LOCAL_PATH)/$(common_libsource_client_dir)/timestamps.c)
+$(shell cp -f $(LOCAL_PATH)/../common/JackTools.cpp $(LOCAL_PATH)/$(common_libsource_client_dir)/JackTools.cpp)
+$(shell cp -f $(LOCAL_PATH)/../common/JackMessageBuffer.cpp $(LOCAL_PATH)/$(common_libsource_client_dir)/JackMessageBuffer.cpp)
+$(shell cp -f $(LOCAL_PATH)/../common/JackEngineProfiling.cpp $(LOCAL_PATH)/$(common_libsource_client_dir)/JackEngineProfiling.cpp)
+$(shell cp -f $(LOCAL_PATH)/JackAndroidThread.cpp $(LOCAL_PATH)/$(common_libsource_client_dir)/JackAndroidThread.cpp)
+$(shell cp -f $(LOCAL_PATH)/JackAndroidSemaphore.cpp $(LOCAL_PATH)/$(common_libsource_client_dir)/JackAndroidSemaphore.cpp)
+$(shell cp -f $(LOCAL_PATH)/../posix/JackPosixProcessSync.cpp $(LOCAL_PATH)/$(common_libsource_client_dir)/JackPosixProcessSync.cpp)
+$(shell cp -f $(LOCAL_PATH)/../posix/JackPosixMutex.cpp $(LOCAL_PATH)/$(common_libsource_client_dir)/JackPosixMutex.cpp)
+$(shell cp -f $(LOCAL_PATH)/../posix/JackSocket.cpp $(LOCAL_PATH)/$(common_libsource_client_dir)/JackSocket.cpp)
+$(shell cp -f $(LOCAL_PATH)/../linux/JackLinuxTime.c $(LOCAL_PATH)/$(common_libsource_client_dir)/JackLinuxTime.c)
common_libsource_server := \
$(common_libsource_server_dir)/JackActivationCount.cpp \
@@ -214,7 +214,7 @@ net_libsource := \
../posix/JackPosixMutex.cpp \
../common/ringbuffer.c \
../posix/JackNetUnixSocket.cpp \
- ../posix/JackPosixThread.cpp \
+ $(common_libsource_server_dir)/JackAndroidThread.cpp \
../linux/JackLinuxTime.c
client_libsource := \
diff --git a/android/JackError.cpp b/android/JackError.cpp
index af9b08b5..232a097a 100644
--- a/android/JackError.cpp
+++ b/android/JackError.cpp
@@ -101,7 +101,7 @@ static void jack_format_and_log(int level, const char *prefix, const char *fmt,
SERVER_EXPORT void jack_error(const char *fmt, ...)
{
- va_list ap;
+ va_list ap;
char buf[LOG_BUF_SIZE];
va_start(ap, fmt);
vsnprintf(buf, LOG_BUF_SIZE, fmt, ap);
@@ -111,24 +111,24 @@ SERVER_EXPORT void jack_error(const char *fmt, ...)
SERVER_EXPORT void jack_info(const char *fmt, ...)
{
- va_list ap;
- char buf[LOG_BUF_SIZE];
- va_start(ap, fmt);
- vsnprintf(buf, LOG_BUF_SIZE, fmt, ap);
- va_end(ap);
- __android_log_write(ANDROID_LOG_INFO, LOG_TAG, buf);
+ va_list ap;
+ char buf[LOG_BUF_SIZE];
+ va_start(ap, fmt);
+ vsnprintf(buf, LOG_BUF_SIZE, fmt, ap);
+ va_end(ap);
+ __android_log_write(ANDROID_LOG_INFO, LOG_TAG, buf);
}
SERVER_EXPORT void jack_log(const char *fmt,...)
{
- va_list ap;
- char buf[LOG_BUF_SIZE];
- if (JackGlobals::fVerbose) {
- va_start(ap, fmt);
- vsnprintf(buf, LOG_BUF_SIZE, fmt, ap);
- va_end(ap);
- __android_log_write(ANDROID_LOG_VERBOSE, LOG_TAG, buf);
- }
+ va_list ap;
+ char buf[LOG_BUF_SIZE];
+ if (JackGlobals::fVerbose) {
+ va_start(ap, fmt);
+ vsnprintf(buf, LOG_BUF_SIZE, fmt, ap);
+ va_end(ap);
+ __android_log_write(ANDROID_LOG_VERBOSE, LOG_TAG, buf);
+ }
}
SERVER_EXPORT void default_jack_error_callback(const char *desc)
diff --git a/common/Jackdmp.cpp b/common/Jackdmp.cpp
index 6d8db0d0..14f16ecc 100644
--- a/common/Jackdmp.cpp
+++ b/common/Jackdmp.cpp
@@ -136,6 +136,25 @@ static jackctl_parameter_t * jackctl_get_parameter(const JSList * parameters_lis
return NULL;
}
+#ifdef __ANDROID__
+static void jackctl_server_switch_master_dummy(jackctl_server_t * server_ctl, char * master_driver_name)
+{
+ static bool is_dummy_driver = false;
+ if(!strcmp(master_driver_name, "dummy")) {
+ return;
+ }
+ jackctl_driver_t * driver_ctr;
+ if(is_dummy_driver) {
+ is_dummy_driver = false;
+ driver_ctr = jackctl_server_get_driver(server_ctl, master_driver_name);
+ } else {
+ is_dummy_driver = true;
+ driver_ctr = jackctl_server_get_driver(server_ctl, "dummy");
+ }
+ jackctl_server_switch_master(server_ctl, driver_ctr);
+}
+#endif
+
static void print_server_drivers(jackctl_server_t *server, FILE* file)
{
const JSList * node_ptr = jackctl_server_get_drivers_list(server);
@@ -195,25 +214,6 @@ static void usage(FILE* file, jackctl_server_t *server)
}
}
-#ifdef __ANDROID__
-static void jackctl_server_switch_master_dummy(jackctl_server_t * server_ctl, char * master_driver_name)
-{
- static bool is_dummy_driver = false;
- if(!strcmp(master_driver_name, "dummy")) {
- return;
- }
- jackctl_driver_t * driver_ctr;
- if(is_dummy_driver) {
- is_dummy_driver = false;
- driver_ctr = jackctl_server_get_driver(server_ctl, master_driver_name);
- } else {
- is_dummy_driver = true;
- driver_ctr = jackctl_server_get_driver(server_ctl, "dummy");
- }
- jackctl_server_switch_master(server_ctl, driver_ctr);
-}
-#endif
-
// Prototype to be found in libjackserver
extern "C" void silent_jack_error_callback(const char *desc);
diff --git a/common/shm.h b/common/shm.h
index ada2a9d0..92aa5a64 100644
--- a/common/shm.h
+++ b/common/shm.h
@@ -82,7 +82,7 @@ extern "C"
#elif __ANDROID__
#ifndef NAME_MAX
-#define NAME_MAX 255
+#define NAME_MAX 255
#endif
#ifndef SHM_NAME_MAX
diff --git a/example-clients/transport.c b/example-clients/transport.c
index e5d22ec9..a3939368 100644
--- a/example-clients/transport.c
+++ b/example-clients/transport.c
@@ -401,8 +401,8 @@ static void command_loop()
/* Define a custom completion function. */
rl_completion_entry_function = command_generator;
#else
- char line[64] = {0,};
- char *cmd = NULL;
+ char line[64] = {0,};
+ char *cmd = NULL;
#endif
/* Read and execute commands until the user quits. */
@@ -417,9 +417,9 @@ static void command_loop()
break;
}
#else
- printf("%s> ", package);
- fgets(line, sizeof(line), stdin);
- line[strlen(line)-1] = '\0';
+ printf("%s> ", package);
+ fgets(line, sizeof(line), stdin);
+ line[strlen(line)-1] = '\0';
#endif
/* Remove leading and trailing whitespace from the line. */