diff options
author | Max Kellermann <max@musicpd.org> | 2020-05-28 13:30:52 +0200 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2020-07-01 17:35:39 +0200 |
commit | 5c7243d3add84b0f11da0ebea558b31984b0a65f (patch) | |
tree | deff722af879d4f39ea68cef6fe8dd8bd4fcebd6 /src/output/plugins | |
parent | 44cfdff39a8dd1f0077aba9bef62b275f85f97d4 (diff) |
output/osx: make several fields `const`
Diffstat (limited to 'src/output/plugins')
-rw-r--r-- | src/output/plugins/OSXOutputPlugin.cxx | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/output/plugins/OSXOutputPlugin.cxx b/src/output/plugins/OSXOutputPlugin.cxx index 5b2f11e6e..7f84e6e83 100644 --- a/src/output/plugins/OSXOutputPlugin.cxx +++ b/src/output/plugins/OSXOutputPlugin.cxx @@ -66,8 +66,8 @@ struct OSXOutput final : AudioOutput { OSType component_subtype; /* only applicable with kAudioUnitSubType_HALOutput */ const char *device_name; - const char *channel_map; - bool hog_device; + const char *const channel_map; + const bool hog_device; bool pause; #ifdef ENABLE_DSD /** @@ -75,7 +75,7 @@ struct OSXOutput final : AudioOutput { * * @see http://dsd-guide.com/dop-open-standard */ - bool dop_setting; + const bool dop_setting; bool dop_enabled; Manual<PcmExport> pcm_export; #endif @@ -131,7 +131,12 @@ osx_output_test_default_device() } OSXOutput::OSXOutput(const ConfigBlock &block) - :AudioOutput(FLAG_ENABLE_DISABLE|FLAG_PAUSE) + :AudioOutput(FLAG_ENABLE_DISABLE|FLAG_PAUSE), + channel_map(block.GetBlockValue("channel_map")), + hog_device(block.GetBlockValue("hog_device", false)) +#ifdef ENABLE_DSD + , dop_setting(block.GetBlockValue("dop", false)) +#endif { const char *device = block.GetBlockValue("device"); @@ -148,12 +153,6 @@ OSXOutput::OSXOutput(const ConfigBlock &block) /* XXX am I supposed to strdup() this? */ device_name = device; } - - channel_map = block.GetBlockValue("channel_map"); - hog_device = block.GetBlockValue("hog_device", false); -#ifdef ENABLE_DSD - dop_setting = block.GetBlockValue("dop", false); -#endif } AudioOutput * |