mirror of
https://github.com/libretro/RetroArch
synced 2025-04-16 08:43:10 +00:00
[ORBIS] Initial audio driver
This commit is contained in:
parent
ea2ed2fb07
commit
a1e455d197
@ -60,7 +60,7 @@ else
|
|||||||
|
|
||||||
OBJ += input/drivers/ps4_input.o
|
OBJ += input/drivers/ps4_input.o
|
||||||
OBJ += input/drivers_joypad/ps4_joypad.o
|
OBJ += input/drivers_joypad/ps4_joypad.o
|
||||||
#OBJ += audio/drivers/psp_audio.o
|
OBJ += audio/drivers/psp_audio.o
|
||||||
#OBJ += frontend/drivers/platform_orbis.o
|
#OBJ += frontend/drivers/platform_orbis.o
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -119,7 +119,7 @@ static const audio_driver_t *audio_drivers[] = {
|
|||||||
#ifdef EMSCRIPTEN
|
#ifdef EMSCRIPTEN
|
||||||
&audio_rwebaudio,
|
&audio_rwebaudio,
|
||||||
#endif
|
#endif
|
||||||
#if defined(PSP) || defined(VITA)
|
#if defined(PSP) || defined(VITA) || defined(ORBIS)
|
||||||
&audio_psp,
|
&audio_psp,
|
||||||
#endif
|
#endif
|
||||||
#ifdef _3DS
|
#ifdef _3DS
|
||||||
|
@ -16,21 +16,28 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#if defined(VITA) || defined(PSP)
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
|
#endif
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include <rthreads/rthreads.h>
|
#include <rthreads/rthreads.h>
|
||||||
#include <queues/fifo_queue.h>
|
#include <queues/fifo_queue.h>
|
||||||
|
|
||||||
#ifdef VITA
|
#if defined(VITA)
|
||||||
#include <psp2/kernel/processmgr.h>
|
#include <psp2/kernel/processmgr.h>
|
||||||
#include <psp2/kernel/threadmgr.h>
|
#include <psp2/kernel/threadmgr.h>
|
||||||
#include <psp2/kernel/sysmem.h>
|
#include <psp2/kernel/sysmem.h>
|
||||||
#include <psp2/audioout.h>
|
#include <psp2/audioout.h>
|
||||||
#else
|
#elif defined(PSP)
|
||||||
#include <pspkernel.h>
|
#include <pspkernel.h>
|
||||||
#include <pspaudio.h>
|
#include <pspaudio.h>
|
||||||
|
#elif defined(ORBIS)
|
||||||
|
#include <audioout.h>
|
||||||
|
#define SCE_AUDIO_OUT_PORT_TYPE_MAIN 0
|
||||||
|
#define SCE_AUDIO_OUT_MODE_STEREO 1
|
||||||
|
#define SceUID uint32_t
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "../audio_driver.h"
|
#include "../audio_driver.h"
|
||||||
@ -64,10 +71,14 @@ static void audioMainLoop(void *data)
|
|||||||
{
|
{
|
||||||
psp_audio_t* psp = (psp_audio_t*)data;
|
psp_audio_t* psp = (psp_audio_t*)data;
|
||||||
|
|
||||||
#ifdef VITA
|
#if defined(VITA)
|
||||||
int port = sceAudioOutOpenPort(
|
int port = sceAudioOutOpenPort(
|
||||||
SCE_AUDIO_OUT_PORT_TYPE_MAIN, AUDIO_OUT_COUNT,
|
SCE_AUDIO_OUT_PORT_TYPE_MAIN, AUDIO_OUT_COUNT,
|
||||||
psp->rate, SCE_AUDIO_OUT_MODE_STEREO);
|
psp->rate, SCE_AUDIO_OUT_MODE_STEREO);
|
||||||
|
#elif defined(ORBIS)
|
||||||
|
int port = sceAudioOutOpen(0xff,
|
||||||
|
SCE_AUDIO_OUT_PORT_TYPE_MAIN, 0, AUDIO_OUT_COUNT,
|
||||||
|
psp->rate, SCE_AUDIO_OUT_MODE_STEREO);
|
||||||
#else
|
#else
|
||||||
sceAudioSRCChReserve(AUDIO_OUT_COUNT, psp->rate, 2);
|
sceAudioSRCChReserve(AUDIO_OUT_COUNT, psp->rate, 2);
|
||||||
#endif
|
#endif
|
||||||
@ -95,7 +106,7 @@ static void audioMainLoop(void *data)
|
|||||||
scond_signal(psp->cond);
|
scond_signal(psp->cond);
|
||||||
slock_unlock(psp->cond_lock);
|
slock_unlock(psp->cond_lock);
|
||||||
|
|
||||||
#ifdef VITA
|
#if defined(VITA) || defined(ORBIS)
|
||||||
sceAudioOutOutput(port,
|
sceAudioOutOutput(port,
|
||||||
cond ? (psp->zeroBuffer)
|
cond ? (psp->zeroBuffer)
|
||||||
: (psp->buffer + read_pos_2));
|
: (psp->buffer + read_pos_2));
|
||||||
@ -105,8 +116,10 @@ static void audioMainLoop(void *data)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef VITA
|
#if defined(VITA)
|
||||||
sceAudioOutReleasePort(port);
|
sceAudioOutReleasePort(port);
|
||||||
|
#elif defined(ORBIS)
|
||||||
|
sceAudioOutClose(port);
|
||||||
#else
|
#else
|
||||||
sceAudioSRCChRelease();
|
sceAudioSRCChRelease();
|
||||||
#endif
|
#endif
|
||||||
@ -304,8 +317,10 @@ audio_driver_t audio_psp = {
|
|||||||
psp_audio_set_nonblock_state,
|
psp_audio_set_nonblock_state,
|
||||||
psp_audio_free,
|
psp_audio_free,
|
||||||
psp_audio_use_float,
|
psp_audio_use_float,
|
||||||
#ifdef VITA
|
#if defined(VITA)
|
||||||
"vita",
|
"vita",
|
||||||
|
#elif defined(ORBIS)
|
||||||
|
"orbis",
|
||||||
#else
|
#else
|
||||||
"psp",
|
"psp",
|
||||||
#endif
|
#endif
|
||||||
|
@ -361,7 +361,7 @@ static enum audio_driver_enum AUDIO_DEFAULT_DRIVER = AUDIO_XENON360;
|
|||||||
static enum audio_driver_enum AUDIO_DEFAULT_DRIVER = AUDIO_WII;
|
static enum audio_driver_enum AUDIO_DEFAULT_DRIVER = AUDIO_WII;
|
||||||
#elif defined(WIIU)
|
#elif defined(WIIU)
|
||||||
static enum audio_driver_enum AUDIO_DEFAULT_DRIVER = AUDIO_WIIU;
|
static enum audio_driver_enum AUDIO_DEFAULT_DRIVER = AUDIO_WIIU;
|
||||||
#elif defined(PSP) || defined(VITA)
|
#elif defined(PSP) || defined(VITA) || defined(ORBIS)
|
||||||
static enum audio_driver_enum AUDIO_DEFAULT_DRIVER = AUDIO_PSP;
|
static enum audio_driver_enum AUDIO_DEFAULT_DRIVER = AUDIO_PSP;
|
||||||
#elif defined(PS2)
|
#elif defined(PS2)
|
||||||
static enum audio_driver_enum AUDIO_DEFAULT_DRIVER = AUDIO_PS2;
|
static enum audio_driver_enum AUDIO_DEFAULT_DRIVER = AUDIO_PS2;
|
||||||
@ -679,8 +679,10 @@ const char *config_get_default_audio(void)
|
|||||||
case AUDIO_WIIU:
|
case AUDIO_WIIU:
|
||||||
return "AX";
|
return "AX";
|
||||||
case AUDIO_PSP:
|
case AUDIO_PSP:
|
||||||
#ifdef VITA
|
#if defined(VITA)
|
||||||
return "vita";
|
return "vita";
|
||||||
|
#elif defined(ORBIS)
|
||||||
|
return "orbis";
|
||||||
#else
|
#else
|
||||||
return "psp";
|
return "psp";
|
||||||
#endif
|
#endif
|
||||||
|
@ -770,7 +770,7 @@ AUDIO
|
|||||||
#include "../audio/drivers/wiiu_audio.c"
|
#include "../audio/drivers/wiiu_audio.c"
|
||||||
#elif defined(EMSCRIPTEN)
|
#elif defined(EMSCRIPTEN)
|
||||||
#include "../audio/drivers/rwebaudio.c"
|
#include "../audio/drivers/rwebaudio.c"
|
||||||
#elif defined(PSP) || defined(VITA)
|
#elif defined(PSP) || defined(VITA) || defined(ORBIS)
|
||||||
#include "../audio/drivers/psp_audio.c"
|
#include "../audio/drivers/psp_audio.c"
|
||||||
#elif defined(PS2)
|
#elif defined(PS2)
|
||||||
// #include "../audio/drivers/ps2_audio.c"
|
// #include "../audio/drivers/ps2_audio.c"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user