switch: increase audio thread priority

switch: use bigger stack size
switch: fix bytes per sample ? (seems perfect audio at least)
This commit is contained in:
Cpasjuste 2018-04-03 22:44:08 +02:00 committed by Dave Murphy
parent 3b41de6ba9
commit 97afa95d57
2 changed files with 3 additions and 3 deletions

View File

@ -74,7 +74,7 @@ SWITCHAUDIO_OpenDevice(_THIS, void *handle, const char *devname, int iscapture)
this->hidden->source_buffer[i].next = NULL; this->hidden->source_buffer[i].next = NULL;
this->hidden->source_buffer[i].buffer = this->hidden->buffer[i]; this->hidden->source_buffer[i].buffer = this->hidden->buffer[i];
this->hidden->source_buffer[i].buffer_size = this->hidden->source_buffer[i].buffer_size =
(u64) this->spec.size / this->spec.channels / 2; (u64) this->spec.size / this->spec.channels / 4;
this->hidden->source_buffer[i].data_size = (u64) this->spec.size; this->hidden->source_buffer[i].data_size = (u64) this->spec.size;
this->hidden->source_buffer[i].data_offset = (u64) 0; this->hidden->source_buffer[i].data_offset = (u64) 0;
audoutAppendAudioOutBuffer(&this->hidden->source_buffer[i]); audoutAppendAudioOutBuffer(&this->hidden->source_buffer[i]);

View File

@ -31,7 +31,7 @@
#include "SDL_thread.h" #include "SDL_thread.h"
#include "../SDL_systhread.h" #include "../SDL_systhread.h"
#define STACK_SIZE 0x2000 #define STACK_SIZE 0x5000
static void static void
SDL_SYS_RunThread(void *data) SDL_SYS_RunThread(void *data)
@ -41,7 +41,7 @@ SDL_SYS_RunThread(void *data)
int SDL_SYS_CreateThread(SDL_Thread *thread, void *args) int SDL_SYS_CreateThread(SDL_Thread *thread, void *args)
{ {
Result res = threadCreate(&thread->handle, SDL_SYS_RunThread, args, STACK_SIZE, 0x2B, -2); Result res = threadCreate(&thread->handle, SDL_SYS_RunThread, args, STACK_SIZE, 0x1C, -2);
if (res != 0) { if (res != 0) {
return SDL_SetError("threadCreate() failed: 0x%08X", res); return SDL_SetError("threadCreate() failed: 0x%08X", res);
} }