mirror of
https://github.com/libretro/RetroArch
synced 2025-03-01 16:13:40 +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 i;
|
||||
char names[8][0x20];
|
||||
#ifndef HAVE_LIBNX
|
||||
char names[8][0x20];
|
||||
uint32_t num_names = 0;
|
||||
#endif
|
||||
switch_audio_t *swa = (switch_audio_t*) calloc(1, sizeof(*swa));
|
||||
|
@ -35,10 +35,9 @@
|
||||
|
||||
#include "switch_audio_compat.h"
|
||||
|
||||
static const size_t thread_stack_size = 1024 * 8;
|
||||
static const int thread_preferred_cpu = 2;
|
||||
static const int channel_count = 2;
|
||||
static const size_t sample_size = sizeof(uint16_t);
|
||||
#define THREAD_STACK_SIZE (1024 * 8)
|
||||
#define THREAD_PREFERRED_CPU 2
|
||||
#define SAMPLE_SIZE sizeof(uint16_t)
|
||||
|
||||
#define AUDIO_BUFFER_COUNT 2
|
||||
|
||||
@ -207,7 +206,7 @@ static void *switch_thread_audio_init(const char *device, unsigned rate, unsigne
|
||||
#endif
|
||||
|
||||
*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++)
|
||||
{
|
||||
@ -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);
|
||||
|
||||
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))
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user