mirror of
https://github.com/libretro/RetroArch
synced 2025-04-23 11:43:20 +00:00
(Switch) Silence some more warnings
This commit is contained in:
parent
128a65cc4c
commit
4f39c60bc0
@ -239,8 +239,8 @@ static void *switch_audio_init(const char *device,
|
|||||||
unsigned *new_rate)
|
unsigned *new_rate)
|
||||||
{
|
{
|
||||||
unsigned i;
|
unsigned i;
|
||||||
char names[8][0x20];
|
|
||||||
#ifndef HAVE_LIBNX
|
#ifndef HAVE_LIBNX
|
||||||
|
char names[8][0x20];
|
||||||
uint32_t num_names = 0;
|
uint32_t num_names = 0;
|
||||||
#endif
|
#endif
|
||||||
switch_audio_t *swa = (switch_audio_t*) calloc(1, sizeof(*swa));
|
switch_audio_t *swa = (switch_audio_t*) calloc(1, sizeof(*swa));
|
||||||
|
@ -35,10 +35,9 @@
|
|||||||
|
|
||||||
#include "switch_audio_compat.h"
|
#include "switch_audio_compat.h"
|
||||||
|
|
||||||
static const size_t thread_stack_size = 1024 * 8;
|
#define THREAD_STACK_SIZE (1024 * 8)
|
||||||
static const int thread_preferred_cpu = 2;
|
#define THREAD_PREFERRED_CPU 2
|
||||||
static const int channel_count = 2;
|
#define SAMPLE_SIZE sizeof(uint16_t)
|
||||||
static const size_t sample_size = sizeof(uint16_t);
|
|
||||||
|
|
||||||
#define AUDIO_BUFFER_COUNT 2
|
#define AUDIO_BUFFER_COUNT 2
|
||||||
|
|
||||||
@ -207,7 +206,7 @@ static void *switch_thread_audio_init(const char *device, unsigned rate, unsigne
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
*new_rate = swa->sampleRate;
|
*new_rate = swa->sampleRate;
|
||||||
swa->fifoSize = (swa->sampleRate * sample_size * swa->latency) / 1000;
|
swa->fifoSize = (swa->sampleRate * SAMPLE_SIZE * swa->latency) / 1000;
|
||||||
|
|
||||||
for (i = 0; i < AUDIO_BUFFER_COUNT; i++)
|
for (i = 0; i < AUDIO_BUFFER_COUNT; i++)
|
||||||
{
|
{
|
||||||
@ -248,7 +247,7 @@ static void *switch_thread_audio_init(const char *device, unsigned rate, unsigne
|
|||||||
device, rate, swa->sampleRate, swa->latency, block_frames, swa->fifoSize);
|
device, rate, swa->sampleRate, swa->latency, block_frames, swa->fifoSize);
|
||||||
|
|
||||||
svcGetThreadPriority(&prio, 0xffff8000);
|
svcGetThreadPriority(&prio, 0xffff8000);
|
||||||
rc = compat_thread_create(&swa->thread, &mainLoop, (void*)swa, thread_stack_size, prio - 1, thread_preferred_cpu);
|
rc = compat_thread_create(&swa->thread, &mainLoop, (void*)swa, THREAD_STACK_SIZE, prio - 1, THREAD_PREFERRED_CPU);
|
||||||
|
|
||||||
if (R_FAILED(rc))
|
if (R_FAILED(rc))
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user