summaryrefslogtreecommitdiff
path: root/src/lib/resampler.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-06-21 01:14:06 +0100
committerCarl Hetherington <cth@carlh.net>2016-06-21 01:14:06 +0100
commit5a5324ed3a381a86dfe0a6e3932c1d58fdcd596f (patch)
tree769dca1358e35017ce5a5b3ab2dfafe2b24d61ed /src/lib/resampler.cc
parent4e83acad0c2a5c528709a175a80261b8147d3b49 (diff)
Use make_shared<>.
Diffstat (limited to 'src/lib/resampler.cc')
-rw-r--r--src/lib/resampler.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/resampler.cc b/src/lib/resampler.cc
index db5552d15..4476d9f1f 100644
--- a/src/lib/resampler.cc
+++ b/src/lib/resampler.cc
@@ -24,6 +24,7 @@
#include "compose.hpp"
#include "dcpomatic_assert.h"
#include <samplerate.h>
+#include <boost/make_shared.hpp>
#include <iostream>
#include "i18n.h"
@@ -33,6 +34,7 @@ using std::pair;
using std::make_pair;
using std::runtime_error;
using boost::shared_ptr;
+using boost::make_shared;
/** @param in Input sampling rate (Hz)
* @param out Output sampling rate (Hz)
@@ -62,7 +64,7 @@ Resampler::run (shared_ptr<const AudioBuffers> in)
int in_frames = in->frames ();
int in_offset = 0;
int out_offset = 0;
- shared_ptr<AudioBuffers> resampled (new AudioBuffers (_channels, 0));
+ shared_ptr<AudioBuffers> resampled = make_shared<AudioBuffers> (_channels, 0);
while (in_frames > 0) {
@@ -136,7 +138,7 @@ Resampler::run (shared_ptr<const AudioBuffers> in)
shared_ptr<const AudioBuffers>
Resampler::flush ()
{
- shared_ptr<AudioBuffers> out (new AudioBuffers (_channels, 0));
+ shared_ptr<AudioBuffers> out = make_shared<AudioBuffers> (_channels, 0);
int out_offset = 0;
int64_t const output_size = 65536;