1 #ifndef _SWITCH_AUDIO_COMPAT_H 2 #define _SWITCH_AUDIO_COMPAT_H 7 #include <libtransistor/nx.h> 19 #define compat_thread_create(thread, func, data, stack_size, prio, cpu) \ 20 threadCreate(thread, func, data, stack_size, prio, cpu) 21 #define compat_thread_start(thread) \ 23 #define compat_thread_join(thread) \ 24 threadWaitForExit(thread) 25 #define compat_thread_close(thread) \ 27 #define compat_mutex_create(mutex) \ 29 #define compat_mutex_lock(mutex) \ 31 #define compat_mutex_unlock(mutex) \ 33 #define compat_condvar_create(condvar) \ 35 #define compat_condvar_wait(condvar, mutex) \ 36 condvarWait(condvar, mutex) 37 #define compat_condvar_wake_all(condvar) \ 38 condvarWakeAll(condvar) 42 #define switch_audio_ipc_init audoutInitialize 43 #define switch_audio_ipc_finalize audoutExit 44 #define switch_audio_ipc_output_get_released_buffer(a, b) audoutGetReleasedAudioOutBuffer(&a->current_buffer, &b) 45 #define switch_audio_ipc_output_append_buffer(a, b) audoutAppendAudioOutBuffer(b) 46 #define switch_audio_ipc_output_stop(a) audoutStopAudioOut() 47 #define switch_audio_ipc_output_start(a) audoutStartAudioOut() 54 #define R_FAILED(r) ((r) != RESULT_OK) 61 #define compat_thread_create(thread, func, data, stack_size, prio, cpu) \ 62 trn_thread_create(thread, func, data, prio, cpu, stack_size, NULL) 63 #define compat_thread_start(thread) \ 64 trn_thread_start(thread) 65 #define compat_thread_join(thread) \ 66 trn_thread_join(thread, -1) 67 #define compat_thread_close(thread) \ 68 trn_thread_destroy(thread) 69 #define compat_mutex_create(mutex) \ 70 trn_mutex_create(mutex) 71 #define compat_mutex_lock(mutex) \ 73 #define compat_mutex_unlock(mutex) \ 74 trn_mutex_unlock(mutex) 75 #define compat_condvar_create(condvar) \ 76 trn_condvar_create(condvar) 77 #define compat_condvar_wait(condvar, mutex) \ 78 trn_condvar_wait(condvar, mutex, -1) 79 #define compat_condvar_wake_all(condvar) \ 80 trn_condvar_signal(condvar, -1) 84 #define switch_audio_ipc_init audio_ipc_init 85 #define switch_audio_ipc_finalize audio_ipc_finalize 86 #define switch_audio_ipc_output_get_released_buffer(a, b) audio_ipc_output_get_released_buffer(&a->output, &b, &a->current_buffer) 87 #define switch_audio_ipc_output_append_buffer(a, b) audio_ipc_output_append_buffer(&a->output, b) 88 #define switch_audio_ipc_output_stop(a) audio_ipc_output_stop(&a->output) 89 #define switch_audio_ipc_output_start(a) audio_ipc_output_start(&a->output) trn_mutex_t compat_mutex
Definition: switch_audio_compat.h:57
result_t Result
Definition: switch_audio_compat.h:53
trn_condvar_t compat_condvar
Definition: switch_audio_compat.h:59
trn_thread_t compat_thread
Definition: switch_audio_compat.h:58
audio_output_buffer_t compat_audio_out_buffer
Definition: switch_audio_compat.h:83