@@ -167,7 +167,7 @@ class Device : public Object
167167{
168168public:
169169 // ! Construct device.
170- explicit Device (const std::shared_ptr<const Context>& context,
170+ explicit Device (std::shared_ptr<const Context> context,
171171 const DeviceParameters& params = {});
172172
173173 // ! @name Getters and setters
@@ -619,7 +619,7 @@ class Device : public Object
619619
620620 // ! Add stream to device.
621621 // ! Same as AddStreamAsync(Direction), but allows to construct stream manually.
622- void AddStreamAsync (const std::shared_ptr<Stream>& stream);
622+ void AddStreamAsync (std::shared_ptr<Stream> stream);
623623
624624 // ! Remove stream from device.
625625 // ! @remarks
@@ -630,7 +630,7 @@ class Device : public Object
630630 // ! owned objects asynchronously (when HAL allows it). Hence, GetStreamCount()
631631 // ! and GetStreamByIndex() are updated immediately, but GetOwnedObjectIDs(),
632632 // ! GetStreamIDs(), etc. are updated some time later.
633- void RemoveStreamAsync (const std::shared_ptr<Stream>& stream);
633+ void RemoveStreamAsync (std::shared_ptr<Stream> stream);
634634
635635 // ! @}
636636
@@ -672,7 +672,7 @@ class Device : public Object
672672 // ! Add volume control to device.
673673 // ! Same as AddVolumeControlAsync(Direction), but allows to construct control
674674 // ! manually.
675- void AddVolumeControlAsync (const std::shared_ptr<VolumeControl>& control);
675+ void AddVolumeControlAsync (std::shared_ptr<VolumeControl> control);
676676
677677 // ! Remove volume control from device.
678678 // ! @remarks
@@ -683,7 +683,7 @@ class Device : public Object
683683 // ! owned objects asynchronously (when HAL allows it). Hence, GetVolumeControlCount()
684684 // ! and GetVolumeControlByIndex() are updated immediately, but GetOwnedObjectIDs(),
685685 // ! GetControlIDs(), etc. are updated some time later.
686- void RemoveVolumeControlAsync (const std::shared_ptr<VolumeControl>& control);
686+ void RemoveVolumeControlAsync (std::shared_ptr<VolumeControl> control);
687687
688688 // ! @}
689689
@@ -723,7 +723,7 @@ class Device : public Object
723723
724724 // ! Add mute control to device.
725725 // ! Same as AddMuteControlAsync(Direction), but allows to construct control manually.
726- void AddMuteControlAsync (const std::shared_ptr<MuteControl>& control);
726+ void AddMuteControlAsync (std::shared_ptr<MuteControl> control);
727727
728728 // ! Remove mute control from device.
729729 // ! @remarks
@@ -734,7 +734,7 @@ class Device : public Object
734734 // ! owned objects asynchronously (when HAL allows it). Hence, GetMuteControlCount()
735735 // ! and GetMuteControlByIndex() are updated immediately, but GetOwnedObjectIDs(),
736736 // ! GetControlIDs(), etc. are updated some time later.
737- void RemoveMuteControlAsync (const std::shared_ptr<MuteControl>& control);
737+ void RemoveMuteControlAsync (std::shared_ptr<MuteControl> control);
738738
739739 // ! @}
740740
@@ -744,7 +744,7 @@ class Device : public Object
744744 // ! Set handler for control requests.
745745 // ! This is optional. You may provide a custom handler if you want to do
746746 // ! custom processing or want to inject custom client implementation.
747- void SetControlHandler (const std::shared_ptr<ControlRequestHandler>& handler);
747+ void SetControlHandler (std::shared_ptr<ControlRequestHandler> handler);
748748
749749 // ! Called before new client start I/O with the device.
750750 // ! Updates client map and invokes OnAddClient().
@@ -790,7 +790,7 @@ class Device : public Object
790790 // ! You need to provide your own implementation if you want your device
791791 // ! to actually do something useful. Default implementation is suitable for
792792 // ! a null / black hole device.
793- void SetIOHandler (const std::shared_ptr<IORequestHandler>& handler);
793+ void SetIOHandler (std::shared_ptr<IORequestHandler> handler);
794794
795795 // ! Get the current zero time stamp for the device.
796796 // ! In default implementation, the zero time stamp and host time are increased
@@ -874,7 +874,7 @@ class Device : public Object
874874 // ! If invoked from PerformConfigurationChange(), assumes that we're already
875875 // ! at the point where it's safe to change configuration and executes the
876876 // ! function immediately.
877- void RequestConfigurationChange (const std::function<void ()>& func = {});
877+ void RequestConfigurationChange (std::function<void ()> func = {});
878878
879879 // ! Called by the Host to allow the device to perform a configuration change
880880 // ! that had been previously requested via a call to the Host method,
@@ -982,8 +982,7 @@ class Device : public Object
982982 // ! Invoked by SetAvailableSampleRatesAsync() to actually change the list.
983983 // ! Default implementation just updates the list returned by
984984 // ! GetAvailableSampleRates().
985- virtual OSStatus SetAvailableSampleRatesImpl (
986- const std::vector<AudioValueRange>& rates);
985+ virtual OSStatus SetAvailableSampleRatesImpl (std::vector<AudioValueRange> rates);
987986
988987 // ! Set channels for stereo.
989988 // ! Invoked by SetPreferredChannelsForStereoAsync() to actually change the value.
@@ -1003,14 +1002,13 @@ class Device : public Object
10031002 // ! By default, it also affects values returned by GetPreferredChannelCount() and
10041003 // ! GetPreferredChannelLayout().
10051004 virtual OSStatus SetPreferredChannelsImpl (
1006- const std::vector<AudioChannelDescription>& channels);
1005+ std::vector<AudioChannelDescription> channels);
10071006
10081007 // ! Invoked by SetPreferredChannelLayoutAsync() to actually change the value.
10091008 // ! Default implementation changes the value returned by GetPreferredChannelLayout().
10101009 // ! By default, it also affects values returned by GetPreferredChannelCount() and
10111010 // ! GetPreferredChannels().
1012- virtual OSStatus SetPreferredChannelLayoutImpl (
1013- const std::vector<UInt8>& channelLayout);
1011+ virtual OSStatus SetPreferredChannelLayoutImpl (std::vector<UInt8> channelLayout);
10141012
10151013 // ! Start or stop device identification.
10161014 // ! This can be requested by UI, but probably makes little sense to virtual devices.
0 commit comments