summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLuo Jinghua <sunmoon1997@gmail.com>2011-03-08 18:45:22 +0800
committerLuo Jinghua <sunmoon1997@gmail.com>2011-03-08 18:45:22 +0800
commit1f421defccb3f4b0226f7e03c25d1551127f304a (patch)
tree1ceacd1202a24c02018967369b16327713352ed8 /src
parent4f57cbff7f42345c4597d67a3bf9921cac22ca60 (diff)
alsa: replace '.' with ',' in device name from parameter list
Diffstat (limited to 'src')
-rw-r--r--src/device_alsa.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/device_alsa.cpp b/src/device_alsa.cpp
index 5a8652f..bfb2c22 100644
--- a/src/device_alsa.cpp
+++ b/src/device_alsa.cpp
@@ -159,6 +159,12 @@ namespace audiere {
"default", "plughw:0,0", "hw:0,0", ""
};
std::string default_device = parameters.getValue("device", devices[0].c_str());
+
+ // replace '.' with ','
+ for (size_t i = 0; i < default_device.length(); i++)
+ if (default_device[i] == '.')
+ default_device[i] = ',';
+
if (default_device != devices[0])
devices[0] = default_device;