This commit is contained in:
Themaister 2010-05-28 20:58:56 +02:00
parent 93d962b557
commit d82bff0bb6
2 changed files with 9 additions and 9 deletions

8
alsa.c
View File

@ -76,17 +76,17 @@ static void* __alsa_init(const char* device, int rate, int latency)
TRY_ALSA(snd_pcm_hw_params(alsa->pcm, params));
snd_pcm_uframes_t alsa_sizes;
snd_pcm_hw_params_get_period_size(params, &alsa_sizes, NULL);
snd_pcm_uframes_t buffer_size;
//snd_pcm_hw_params_get_period_size(params, &buffer_size, NULL);
//fprintf(stderr, "ALSA Period size: %d frames\n", (int)alsa_sizes);
snd_pcm_hw_params_get_buffer_size(params, &alsa_sizes);
snd_pcm_hw_params_get_buffer_size(params, &buffer_size);
//fprintf(stderr, "Buffer size: %d frames\n", (int)alsa_sizes);
if (snd_pcm_sw_params_malloc(&sw_params) < 0)
goto error;
TRY_ALSA(snd_pcm_sw_params_current(alsa->pcm, sw_params));
TRY_ALSA(snd_pcm_sw_params_set_start_threshold(alsa->pcm, sw_params, alsa_sizes));
TRY_ALSA(snd_pcm_sw_params_set_start_threshold(alsa->pcm, sw_params, buffer_size/2));
TRY_ALSA(snd_pcm_sw_params(alsa->pcm, sw_params));
snd_pcm_sw_params_free(sw_params);

View File

@ -44,19 +44,19 @@
static const bool force_aspect = true; // On resize and fullscreen, rendering area will stay 8:7
// Windowed
static const float xscale = 5.0; // Real x res = 256 * xscale
static const float yscale = 5.0; // Real y res = 224 * yscale
static const float xscale = 3.0; // Real x res = 256 * xscale
static const float yscale = 3.0; // Real y res = 224 * yscale
// Fullscreen
static bool fullscreen = false; // To start in Fullscreen on not
static const unsigned fullscreen_x = 1920;
static const unsigned fullscreen_y = 1200;
static const unsigned fullscreen_x = 1280;
static const unsigned fullscreen_y = 720;
// Video VSYNC (recommended)
static const bool vsync = true;
// Audio
static const unsigned out_rate = 48000;
static const unsigned out_rate = 44100;
static const unsigned in_rate = 31950;
// Input samplerate from libSNES.
// Lower this if you are experiencing frequent audio dropouts and vsync is enabled.