summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2013-03-18 05:21:41 -0700
committerChris Robinson <[email protected]>2013-03-18 05:21:41 -0700
commit6bf8f01af5317a3fcf7e90d9a6f4e31895f37e75 (patch)
tree015690a7c4c1b1ff90744a002da3e314ead37a55
parentbf54de498416146bb6057ef5589476d361e4c2e6 (diff)
Report the actual ALSA error if setting the buffer metrics fails
-rw-r--r--Alc/backends/alsa.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Alc/backends/alsa.c b/Alc/backends/alsa.c
index 5ff6307f..89227be1 100644
--- a/Alc/backends/alsa.c
+++ b/Alc/backends/alsa.c
@@ -805,10 +805,10 @@ static ALCboolean alsa_reset_playback(ALCdevice *device)
ERR("Failed to disable ALSA resampler\n");
CHECK(snd_pcm_hw_params_set_rate_near(data->pcmHandle, hp, &rate, NULL));
/* set buffer time (implicitly constrains period/buffer parameters) */
- if(snd_pcm_hw_params_set_buffer_time_near(data->pcmHandle, hp, &bufferLen, NULL) < 0)
+ if((err=snd_pcm_hw_params_set_buffer_time_near(data->pcmHandle, hp, &bufferLen, NULL)) < 0)
ERR("snd_pcm_hw_params_set_buffer_time_near failed: %s\n", snd_strerror(err));
/* set period time (implicitly sets buffer size/bytes/time and period size/bytes) */
- if(snd_pcm_hw_params_set_period_time_near(data->pcmHandle, hp, &periodLen, NULL) < 0)
+ if((err=snd_pcm_hw_params_set_period_time_near(data->pcmHandle, hp, &periodLen, NULL)) < 0)
ERR("snd_pcm_hw_params_set_period_time_near failed: %s\n", snd_strerror(err));
/* install and prepare hardware configuration */
CHECK(snd_pcm_hw_params(data->pcmHandle, hp));