mirror of
https://github.com/love2d/megasource.git
synced 2026-08-19 20:20:11 +02:00
Updated OpenAL Soft to 1.17.2.
This commit is contained in:
@@ -677,6 +677,7 @@ static ALCboolean ALCplaybackAlsa_reset(ALCplaybackAlsa *self)
|
||||
unsigned int rate;
|
||||
const char *funcerr;
|
||||
int allowmmap;
|
||||
int dir;
|
||||
int err;
|
||||
|
||||
switch(device->FmtType)
|
||||
@@ -770,7 +771,7 @@ static ALCboolean ALCplaybackAlsa_reset(ALCplaybackAlsa *self)
|
||||
}
|
||||
CHECK(snd_pcm_hw_params_set_channels(self->pcmHandle, hp, ChannelsFromDevFmt(device->FmtChans)));
|
||||
/* set rate (implicitly constrains period/buffer parameters) */
|
||||
if(GetConfigValueBool(al_string_get_cstr(device->DeviceName), "alsa", "allow-resampler", 0))
|
||||
if(!GetConfigValueBool(al_string_get_cstr(device->DeviceName), "alsa", "allow-resampler", 0))
|
||||
{
|
||||
if(snd_pcm_hw_params_set_rate_resample(self->pcmHandle, hp, 0) < 0)
|
||||
ERR("Failed to disable ALSA resampler\n");
|
||||
@@ -787,7 +788,9 @@ static ALCboolean ALCplaybackAlsa_reset(ALCplaybackAlsa *self)
|
||||
/* retrieve configuration info */
|
||||
CHECK(snd_pcm_hw_params_get_access(hp, &access));
|
||||
CHECK(snd_pcm_hw_params_get_period_size(hp, &periodSizeInFrames, NULL));
|
||||
CHECK(snd_pcm_hw_params_get_periods(hp, &periods, NULL));
|
||||
CHECK(snd_pcm_hw_params_get_periods(hp, &periods, &dir));
|
||||
if(dir != 0)
|
||||
WARN("Inexact period count: %u (%d)\n", periods, dir);
|
||||
|
||||
snd_pcm_hw_params_free(hp);
|
||||
hp = NULL;
|
||||
|
||||
Reference in New Issue
Block a user