aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/cubeb_alsa.c
diff options
context:
space:
mode:
authorSebastien Alaiwan <[email protected]>2014-10-13 08:03:34 +0200
committerSebastien Alaiwan <[email protected]>2014-10-13 08:03:34 +0200
commitdd728569d3b880c0540563df555ba7b42d196b98 (patch)
tree515ce5fc82f1bf4db6cc6cb7127a7dcbaaf5f967 /src/cubeb_alsa.c
parentceb42110fe00bf29a47ecf8c57b1e81b253e3dd4 (diff)
downloadcubeb-dd728569d3b880c0540563df555ba7b42d196b98.tar.gz
cubeb-dd728569d3b880c0540563df555ba7b42d196b98.zip
Fix ALSA implementation of get_preferred_sample_rate (snd_pcm_open was always returning -2 otherwise)
Diffstat (limited to 'src/cubeb_alsa.c')
-rw-r--r--src/cubeb_alsa.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cubeb_alsa.c b/src/cubeb_alsa.c
index a962553..2070229 100644
--- a/src/cubeb_alsa.c
+++ b/src/cubeb_alsa.c
@@ -962,7 +962,7 @@ alsa_get_preferred_sample_rate(cubeb * ctx, uint32_t * rate) {
/* get a pcm, disabling resampling, so we get a rate the
* hardware/dmix/pulse/etc. supports. */
- rv = snd_pcm_open(&pcm, "", SND_PCM_STREAM_PLAYBACK | SND_PCM_NO_AUTO_RESAMPLE, 0);
+ rv = snd_pcm_open(&pcm, "default", SND_PCM_STREAM_PLAYBACK | SND_PCM_NO_AUTO_RESAMPLE, 0);
if (rv < 0) {
return CUBEB_ERROR;
}