diff options
Diffstat (limited to 'src/sound_frame.cc')
| -rw-r--r-- | src/sound_frame.cc | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/sound_frame.cc b/src/sound_frame.cc index 2d31291b..540c3dfd 100644 --- a/src/sound_frame.cc +++ b/src/sound_frame.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2012-2014 Carl Hetherington <cth@carlh.net> + Copyright (C) 2012-2016 Carl Hetherington <cth@carlh.net> This file is part of libdcp. @@ -30,18 +30,12 @@ using namespace std; using namespace dcp; -SoundFrame::SoundFrame (boost::filesystem::path path, int n, ASDCP::AESDecContext* c) +SoundFrame::SoundFrame (ASDCP::PCM::MXFReader* reader, int n, ASDCP::AESDecContext* c) { - ASDCP::PCM::MXFReader reader; - Kumu::Result_t r = reader.OpenRead (path.string().c_str()); - if (ASDCP_FAILURE (r)) { - boost::throw_exception (FileError ("could not open MXF file for reading", path, r)); - } - /* XXX: unfortunate guesswork on this buffer size */ _buffer = new ASDCP::PCM::FrameBuffer (1 * Kumu::Megabyte); - if (ASDCP_FAILURE (reader.ReadFrame (n, *_buffer, c))) { + if (ASDCP_FAILURE (reader->ReadFrame (n, *_buffer, c))) { boost::throw_exception (DCPReadError ("could not read audio frame")); } } |
