Better handle inexact ALSA period counts
This commit is contained in:
+4
-1
@@ -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)
|
||||
@@ -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