diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-06-21 01:14:06 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-06-21 01:14:06 +0100 |
| commit | 5a5324ed3a381a86dfe0a6e3932c1d58fdcd596f (patch) | |
| tree | 769dca1358e35017ce5a5b3ab2dfafe2b24d61ed /src/lib/upmixer_a.cc | |
| parent | 4e83acad0c2a5c528709a175a80261b8147d3b49 (diff) | |
Use make_shared<>.
Diffstat (limited to 'src/lib/upmixer_a.cc')
| -rw-r--r-- | src/lib/upmixer_a.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/upmixer_a.cc b/src/lib/upmixer_a.cc index a1221e5ac..e390487d4 100644 --- a/src/lib/upmixer_a.cc +++ b/src/lib/upmixer_a.cc @@ -21,6 +21,7 @@ #include "upmixer_a.h" #include "audio_buffers.h" #include "audio_mapping.h" +#include <boost/make_shared.hpp> #include "i18n.h" @@ -28,6 +29,7 @@ using std::string; using std::min; using std::vector; using boost::shared_ptr; +using boost::make_shared; UpmixerA::UpmixerA (int sampling_rate) : _left (0.02, 1900.0 / sampling_rate, 4800.0 / sampling_rate) @@ -61,7 +63,7 @@ UpmixerA::out_channels () const shared_ptr<AudioProcessor> UpmixerA::clone (int sampling_rate) const { - return shared_ptr<AudioProcessor> (new UpmixerA (sampling_rate)); + return make_shared<UpmixerA> (sampling_rate); } shared_ptr<AudioBuffers> @@ -85,7 +87,7 @@ UpmixerA::run (shared_ptr<const AudioBuffers> in, int channels) all_out.push_back (_ls.run (in_L)); all_out.push_back (_rs.run (in_R)); - shared_ptr<AudioBuffers> out (new AudioBuffers (channels, in->frames ())); + shared_ptr<AudioBuffers> out = make_shared<AudioBuffers> (channels, in->frames ()); int const N = min (channels, 6); for (int i = 0; i < N; ++i) { |
