(Switch) Cleanups
This commit is contained in:
parent
0c7ee3d573
commit
1f1571425a
|
@ -32,9 +32,8 @@
|
|||
|
||||
#define SAMPLE_RATE 48000
|
||||
#define NUM_CHANNELS 2
|
||||
#ifndef HAVE_LIBNX
|
||||
|
||||
#define SAMPLE_BUFFER_SIZE (((SAMPLE_RATE * NUM_CHANNELS * sizeof(uint16_t)) + 0xfff) & ~0xfff)
|
||||
#endif
|
||||
|
||||
typedef struct
|
||||
{
|
||||
|
@ -55,8 +54,8 @@ typedef struct
|
|||
static uint32_t switch_audio_data_size(void)
|
||||
{
|
||||
static const int framerate = 1000 / 30;
|
||||
static const int samplecount = (SAMPLE_RATE / framerate);
|
||||
return (samplecount * NUM_CHANNELS * sizeof(uint16_t));
|
||||
static const int sample_count = (SAMPLE_RATE / framerate);
|
||||
return (sample_count * NUM_CHANNELS * sizeof(uint16_t));
|
||||
}
|
||||
#else
|
||||
static uint32_t switch_audio_data_size(void)
|
||||
|
@ -67,7 +66,6 @@ static uint32_t switch_audio_data_size(void)
|
|||
|
||||
static size_t switch_audio_buffer_size(void *data)
|
||||
{
|
||||
(void) data;
|
||||
#ifdef HAVE_LIBNX
|
||||
return (switch_audio_data_size() + 0xfff) & ~0xfff;
|
||||
#else
|
||||
|
@ -154,7 +152,6 @@ static bool switch_audio_stop(void *data)
|
|||
|
||||
/* TODO/FIXME - fix libnx codepath */
|
||||
#ifndef HAVE_LIBNX
|
||||
|
||||
if (!swa->is_paused)
|
||||
if (switch_audio_ipc_output_stop(swa) != 0)
|
||||
return false;
|
||||
|
@ -214,7 +211,6 @@ static void switch_audio_free(void *data)
|
|||
|
||||
static bool switch_audio_use_float(void *data)
|
||||
{
|
||||
(void) data;
|
||||
return false; /* force INT16 */
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue