mirror of
https://github.com/libretro/RetroArch
synced 2025-02-10 21:40:22 +00:00
defines/ headers are libretro-common headers, search for them in
system header includes - other cleanups/nits
This commit is contained in:
parent
5e6d917417
commit
85598f24ad
@ -31,9 +31,10 @@
|
|||||||
#include <retro_endianness.h>
|
#include <retro_endianness.h>
|
||||||
#include <string/stdstring.h>
|
#include <string/stdstring.h>
|
||||||
|
|
||||||
|
#include <defines/cocoa_defines.h>
|
||||||
|
|
||||||
#include "../audio_driver.h"
|
#include "../audio_driver.h"
|
||||||
#include "../../verbosity.h"
|
#include "../../verbosity.h"
|
||||||
#include "defines/cocoa_defines.h"
|
|
||||||
|
|
||||||
typedef struct coreaudio
|
typedef struct coreaudio
|
||||||
{
|
{
|
||||||
@ -125,7 +126,6 @@ static OSStatus audio_write_cb(void *userdata,
|
|||||||
#if TARGET_OS_IPHONE
|
#if TARGET_OS_IPHONE
|
||||||
static void coreaudio_interrupt_listener(void *data, UInt32 interrupt_state)
|
static void coreaudio_interrupt_listener(void *data, UInt32 interrupt_state)
|
||||||
{
|
{
|
||||||
(void)data;
|
|
||||||
#if TARGET_OS_IOS
|
#if TARGET_OS_IOS
|
||||||
g_interrupted = (interrupt_state == kAudioSessionBeginInterruption);
|
g_interrupted = (interrupt_state == kAudioSessionBeginInterruption);
|
||||||
#endif
|
#endif
|
||||||
@ -133,7 +133,7 @@ static void coreaudio_interrupt_listener(void *data, UInt32 interrupt_state)
|
|||||||
#else
|
#else
|
||||||
static void choose_output_device(coreaudio_t *dev, const char* device)
|
static void choose_output_device(coreaudio_t *dev, const char* device)
|
||||||
{
|
{
|
||||||
unsigned i;
|
int i;
|
||||||
UInt32 deviceCount;
|
UInt32 deviceCount;
|
||||||
AudioObjectPropertyAddress propaddr;
|
AudioObjectPropertyAddress propaddr;
|
||||||
AudioDeviceID *devices = NULL;
|
AudioDeviceID *devices = NULL;
|
||||||
@ -203,7 +203,6 @@ static void *coreaudio_init(const char *device,
|
|||||||
#endif
|
#endif
|
||||||
AURenderCallbackStruct cb = {0};
|
AURenderCallbackStruct cb = {0};
|
||||||
AudioStreamBasicDescription stream_desc = {0};
|
AudioStreamBasicDescription stream_desc = {0};
|
||||||
bool component_unavailable = false;
|
|
||||||
static bool session_initialized = false;
|
static bool session_initialized = false;
|
||||||
#if !HAS_MACOSX_10_12
|
#if !HAS_MACOSX_10_12
|
||||||
ComponentDescription desc = {0};
|
ComponentDescription desc = {0};
|
||||||
@ -215,9 +214,6 @@ static void *coreaudio_init(const char *device,
|
|||||||
if (!dev)
|
if (!dev)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
(void)session_initialized;
|
|
||||||
(void)device;
|
|
||||||
|
|
||||||
dev->lock = slock_new();
|
dev->lock = slock_new();
|
||||||
dev->cond = scond_new();
|
dev->cond = scond_new();
|
||||||
|
|
||||||
@ -240,21 +236,20 @@ static void *coreaudio_init(const char *device,
|
|||||||
desc.componentManufacturer = kAudioUnitManufacturer_Apple;
|
desc.componentManufacturer = kAudioUnitManufacturer_Apple;
|
||||||
|
|
||||||
#if !HAS_MACOSX_10_12
|
#if !HAS_MACOSX_10_12
|
||||||
comp = FindNextComponent(NULL, &desc);
|
if (!(comp = FindNextComponent(NULL, &desc)))
|
||||||
#else
|
|
||||||
comp = AudioComponentFindNext(NULL, &desc);
|
|
||||||
#endif
|
|
||||||
if (!comp)
|
|
||||||
goto error;
|
goto error;
|
||||||
|
#else
|
||||||
|
if (!(comp = AudioComponentFindNext(NULL, &desc)))
|
||||||
|
goto error;
|
||||||
|
#endif
|
||||||
|
|
||||||
#if !HAS_MACOSX_10_12
|
#if !HAS_MACOSX_10_12
|
||||||
component_unavailable = (OpenAComponent(comp, &dev->dev) != noErr);
|
if ((OpenAComponent(comp, &dev->dev) != noErr))
|
||||||
#else
|
|
||||||
component_unavailable = (AudioComponentInstanceNew(comp, &dev->dev) != noErr);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (component_unavailable)
|
|
||||||
goto error;
|
goto error;
|
||||||
|
#else
|
||||||
|
if ((AudioComponentInstanceNew(comp, &dev->dev) != noErr))
|
||||||
|
goto error;
|
||||||
|
#endif
|
||||||
|
|
||||||
#if !TARGET_OS_IPHONE
|
#if !TARGET_OS_IPHONE
|
||||||
if (device)
|
if (device)
|
||||||
@ -321,8 +316,7 @@ static void *coreaudio_init(const char *device,
|
|||||||
fifo_size *= 2 * sizeof(float);
|
fifo_size *= 2 * sizeof(float);
|
||||||
dev->buffer_size = fifo_size;
|
dev->buffer_size = fifo_size;
|
||||||
|
|
||||||
dev->buffer = fifo_new(fifo_size);
|
if (!(dev->buffer = fifo_new(fifo_size)))
|
||||||
if (!dev->buffer)
|
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
RARCH_LOG("[CoreAudio]: Using buffer size of %u bytes: (latency = %u ms)\n",
|
RARCH_LOG("[CoreAudio]: Using buffer size of %u bytes: (latency = %u ms)\n",
|
||||||
@ -417,11 +411,7 @@ static bool coreaudio_start(void *data, bool is_shutdown)
|
|||||||
return dev->is_paused ? false : true;
|
return dev->is_paused ? false : true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool coreaudio_use_float(void *data)
|
static bool coreaudio_use_float(void *data) { return true; }
|
||||||
{
|
|
||||||
(void)data;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
static size_t coreaudio_write_avail(void *data)
|
static size_t coreaudio_write_avail(void *data)
|
||||||
{
|
{
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__PSL1GHT__) || defined(__PS3__)
|
#if defined(__PSL1GHT__) || defined(__PS3__)
|
||||||
#include "defines/ps3_defines.h"
|
#include <defines/ps3_defines.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __MACH__
|
#ifdef __MACH__
|
||||||
|
Loading…
x
Reference in New Issue
Block a user