Commit 1f733945 authored by KimJeongYeon's avatar KimJeongYeon
Browse files

additional code cleanup for jack android

parent 4a94e129
......@@ -2,3 +2,5 @@ build/
man/*.1
.waf*
.lock*
android/.server/
android/.client/
......@@ -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 := \
......
......@@ -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)
......
......@@ -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);
......
......@@ -82,7 +82,7 @@ extern "C"
#elif __ANDROID__
#ifndef NAME_MAX
#define NAME_MAX 255
#define NAME_MAX 255
#endif
#ifndef SHM_NAME_MAX
......
......@@ -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. */
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment