mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2025-01-18 06:25:37 +00:00
dep/cubeb: Add cubeb_get_backend_names()
This commit is contained in:
parent
8f45bf7f27
commit
609b050676
|
@ -469,6 +469,11 @@ CUBEB_EXPORT int
|
||||||
cubeb_init(cubeb ** context, char const * context_name,
|
cubeb_init(cubeb ** context, char const * context_name,
|
||||||
char const * backend_name);
|
char const * backend_name);
|
||||||
|
|
||||||
|
/** Returns a list of backend names which can be supplid to cubeb_init().
|
||||||
|
Array is null-terminated. */
|
||||||
|
CUBEB_EXPORT const char**
|
||||||
|
cubeb_get_backend_names();
|
||||||
|
|
||||||
/** Get a read-only string identifying this context's current backend.
|
/** Get a read-only string identifying this context's current backend.
|
||||||
@param context A pointer to the cubeb context.
|
@param context A pointer to the cubeb context.
|
||||||
@retval Read-only string identifying current backend. */
|
@retval Read-only string identifying current backend. */
|
||||||
|
|
|
@ -290,6 +290,61 @@ cubeb_init(cubeb ** context, char const * context_name,
|
||||||
return CUBEB_ERROR;
|
return CUBEB_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char**
|
||||||
|
cubeb_get_backend_names()
|
||||||
|
{
|
||||||
|
static const char* backend_names[] = {
|
||||||
|
#if defined(USE_PULSE)
|
||||||
|
"pulse",
|
||||||
|
#endif
|
||||||
|
#if defined(USE_PULSE_RUST)
|
||||||
|
"pulse-rust",
|
||||||
|
#endif
|
||||||
|
#if defined(USE_JACK)
|
||||||
|
"jack",
|
||||||
|
#endif
|
||||||
|
#if defined(USE_ALSA)
|
||||||
|
"alsa",
|
||||||
|
#endif
|
||||||
|
#if defined(USE_AUDIOUNIT)
|
||||||
|
"audiounit",
|
||||||
|
#endif
|
||||||
|
#if defined(USE_AUDIOUNIT_RUST)
|
||||||
|
"audiounit-rust",
|
||||||
|
#endif
|
||||||
|
#if defined(USE_WASAPI)
|
||||||
|
"wasapi",
|
||||||
|
#endif
|
||||||
|
#if defined(USE_WINMM)
|
||||||
|
"winmm",
|
||||||
|
#endif
|
||||||
|
#if defined(USE_SNDIO)
|
||||||
|
"sndio",
|
||||||
|
#endif
|
||||||
|
#if defined(USE_SUN)
|
||||||
|
"sun",
|
||||||
|
#endif
|
||||||
|
#if defined(USE_OPENSL)
|
||||||
|
"opensl",
|
||||||
|
#endif
|
||||||
|
#if defined(USE_OSS)
|
||||||
|
"oss",
|
||||||
|
#endif
|
||||||
|
#if defined(USE_AAUDIO)
|
||||||
|
"aaudio",
|
||||||
|
#endif
|
||||||
|
#if defined(USE_AUDIOTRACK)
|
||||||
|
"audiotrack",
|
||||||
|
#endif
|
||||||
|
#if defined(USE_KAI)
|
||||||
|
"kai",
|
||||||
|
#endif
|
||||||
|
NULL,
|
||||||
|
};
|
||||||
|
|
||||||
|
return backend_names;
|
||||||
|
}
|
||||||
|
|
||||||
char const *
|
char const *
|
||||||
cubeb_get_backend_id(cubeb * context)
|
cubeb_get_backend_id(cubeb * context)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue