Revert "Use make_shared<>."
[dcpomatic.git] / test / ffmpeg_audio_test.cc
index 4d6200d78d5bab9ed1c6fb63f18fce0f219920a2..cfbaf46c30aaa8d064458551ce1ea1d551b7ccfb 100644 (file)
@@ -1,19 +1,20 @@
 /*
-    Copyright (C) 2013-2015 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2013-2016 Carl Hetherington <cth@carlh.net>
 
-    This program is free software; you can redistribute it and/or modify
+    This file is part of DCP-o-matic.
+
+    DCP-o-matic is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
     the Free Software Foundation; either version 2 of the License, or
     (at your option) any later version.
 
-    This program is distributed in the hope that it will be useful,
+    DCP-o-matic is distributed in the hope that it will be useful,
     but WITHOUT ANY WARRANTY; without even the implied warranty of
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     GNU General Public License for more details.
 
     You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+    along with DCP-o-matic.  If not, see <http://www.gnu.org/licenses/>.
 
 */
 
  *  @brief A simple test of reading audio from an FFmpeg file.
  */
 
-#include <boost/test/unit_test.hpp>
-#include <dcp/cpl.h>
-#include <dcp/dcp.h>
-#include <dcp/sound_asset.h>
-#include <dcp/sound_frame.h>
-#include <dcp/reel_sound_asset.h>
-#include <dcp/reel.h>
-#include "lib/sndfile_content.h"
+#include "lib/ffmpeg_content.h"
 #include "lib/film.h"
 #include "lib/dcp_content_type.h"
 #include "lib/video_content.h"
 #include "lib/ratio.h"
 #include "lib/ffmpeg_content.h"
 #include "test.h"
+#include <dcp/cpl.h>
+#include <dcp/dcp.h>
+#include <dcp/sound_asset.h>
+#include <dcp/sound_frame.h>
+#include <dcp/reel_sound_asset.h>
+#include <dcp/sound_asset_reader.h>
+#include <dcp/reel.h>
+#include <boost/test/unit_test.hpp>
 
 using std::string;
 using boost::shared_ptr;
@@ -74,7 +76,7 @@ BOOST_AUTO_TEST_CASE (ffmpeg_audio_test)
        int frame = 0;
 
        while (n < sound_asset->asset()->intrinsic_duration()) {
-               shared_ptr<const dcp::SoundFrame> sound_frame = sound_asset->asset()->get_frame (frame++);
+               shared_ptr<const dcp::SoundFrame> sound_frame = sound_asset->asset()->start_read()->get_frame (frame++);
                uint8_t const * d = sound_frame->data ();
 
                for (int i = 0; i < sound_frame->size(); i += (3 * sound_asset->asset()->channels())) {