mirror of
https://github.com/libretro/RetroArch
synced 2025-04-16 08:43:10 +00:00
Some minor cleanups - switch_audio_compat.h
This commit is contained in:
parent
c614cb05ec
commit
db43033f9a
@ -1,4 +1,5 @@
|
|||||||
#pragma once
|
#ifndef _SWITCH_AUDIO_COMPAT_H
|
||||||
|
#define _SWITCH_AUDIO_COMPAT_H
|
||||||
|
|
||||||
#ifdef HAVE_LIBNX
|
#ifdef HAVE_LIBNX
|
||||||
#include <switch.h>
|
#include <switch.h>
|
||||||
@ -8,9 +9,9 @@
|
|||||||
|
|
||||||
#ifdef HAVE_LIBNX
|
#ifdef HAVE_LIBNX
|
||||||
|
|
||||||
// libnx definitions
|
/* libnx definitions */
|
||||||
|
|
||||||
// threading
|
/* threading */
|
||||||
typedef Mutex compat_mutex;
|
typedef Mutex compat_mutex;
|
||||||
typedef Thread compat_thread;
|
typedef Thread compat_thread;
|
||||||
typedef CondVar compat_condvar;
|
typedef CondVar compat_condvar;
|
||||||
@ -36,7 +37,7 @@ typedef CondVar compat_condvar;
|
|||||||
#define compat_condvar_wake_all(condvar) \
|
#define compat_condvar_wake_all(condvar) \
|
||||||
condvarWakeAll(condvar)
|
condvarWakeAll(condvar)
|
||||||
|
|
||||||
// audio
|
/* audio */
|
||||||
typedef AudioOutBuffer compat_audio_out_buffer;
|
typedef AudioOutBuffer compat_audio_out_buffer;
|
||||||
#define switch_audio_ipc_init audoutInitialize
|
#define switch_audio_ipc_init audoutInitialize
|
||||||
#define switch_audio_ipc_finalize audoutExit
|
#define switch_audio_ipc_finalize audoutExit
|
||||||
@ -47,12 +48,12 @@ typedef AudioOutBuffer compat_audio_out_buffer;
|
|||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
// libtransistor definitions
|
/* libtransistor definitions */
|
||||||
|
|
||||||
typedef result_t Result;
|
typedef result_t Result;
|
||||||
#define R_FAILED(r) ((r) != RESULT_OK)
|
#define R_FAILED(r) ((r) != RESULT_OK)
|
||||||
|
|
||||||
// threading
|
/* threading */
|
||||||
typedef trn_mutex_t compat_mutex;
|
typedef trn_mutex_t compat_mutex;
|
||||||
typedef trn_thread_t compat_thread;
|
typedef trn_thread_t compat_thread;
|
||||||
typedef trn_condvar_t compat_condvar;
|
typedef trn_condvar_t compat_condvar;
|
||||||
@ -78,7 +79,7 @@ typedef trn_condvar_t compat_condvar;
|
|||||||
#define compat_condvar_wake_all(condvar) \
|
#define compat_condvar_wake_all(condvar) \
|
||||||
trn_condvar_signal(condvar, -1)
|
trn_condvar_signal(condvar, -1)
|
||||||
|
|
||||||
// audio
|
/* audio */
|
||||||
typedef audio_output_buffer_t compat_audio_out_buffer;
|
typedef audio_output_buffer_t compat_audio_out_buffer;
|
||||||
#define switch_audio_ipc_init audio_ipc_init
|
#define switch_audio_ipc_init audio_ipc_init
|
||||||
#define switch_audio_ipc_finalize audio_ipc_finalize
|
#define switch_audio_ipc_finalize audio_ipc_finalize
|
||||||
@ -88,3 +89,5 @@ typedef audio_output_buffer_t compat_audio_out_buffer;
|
|||||||
#define switch_audio_ipc_output_start(a) audio_ipc_output_start(&a->output)
|
#define switch_audio_ipc_output_start(a) audio_ipc_output_start(&a->output)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user