aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2015-01-07 18:43:45 +0100
committerMax Kellermann <max@duempel.org>2015-01-07 18:43:45 +0100
commit15d29da43baa1c6285ce559547efb62937cfcf93 (patch)
tree308cf447b03810e50755e376d26b6fa86d059c96
parent8b217d531305433df01c789dab4dc81d58f05eba (diff)
downloadmpd-15d29da43baa1c6285ce559547efb62937cfcf93.tar.gz
mpd-15d29da43baa1c6285ce559547efb62937cfcf93.tar.xz
mpd-15d29da43baa1c6285ce559547efb62937cfcf93.zip
output/oss: add "device" parameter to constructor
Diffstat (limited to '')
-rw-r--r--src/output/plugins/OssOutputPlugin.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/output/plugins/OssOutputPlugin.cxx b/src/output/plugins/OssOutputPlugin.cxx
index f7b491bed..366f7fa56 100644
--- a/src/output/plugins/OssOutputPlugin.cxx
+++ b/src/output/plugins/OssOutputPlugin.cxx
@@ -80,9 +80,9 @@ struct OssOutput {
*/
int oss_format;
- OssOutput()
+ OssOutput(const char *_device=nullptr)
:base(oss_output_plugin),
- fd(-1), device(nullptr) {}
+ fd(-1), device(_device) {}
bool Initialize(const config_param &param, Error &error_r) {
return base.Configure(param, error_r);
@@ -193,13 +193,12 @@ oss_open_default(Error &error)
for (int i = ARRAY_SIZE(default_devices); --i >= 0; ) {
ret[i] = oss_stat_device(default_devices[i], &err[i]);
if (ret[i] == OSS_STAT_NO_ERROR) {
- OssOutput *od = new OssOutput();
+ OssOutput *od = new OssOutput(default_devices[i]);
if (!od->Initialize(empty, error)) {
delete od;
return NULL;
}
- od->device = default_devices[i];
return od;
}
}