summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-01-22 23:22:27 +0000
committerCarl Hetherington <cth@carlh.net>2013-01-22 23:22:27 +0000
commitd714233760a8f6a0541c279c3046984f2d199814 (patch)
tree2941f421f56ed7c351a7dd59dc903148df5e1d07 /src
parente04553be273a10e7face6f8f245d9a37e05454d2 (diff)
Remove hacky start_frame stuff from SoundAsset for now.
Diffstat (limited to 'src')
-rw-r--r--src/sound_asset.cc17
-rw-r--r--src/sound_asset.h8
2 files changed, 3 insertions, 22 deletions
diff --git a/src/sound_asset.cc b/src/sound_asset.cc
index b7253917..4d76a2fd 100644
--- a/src/sound_asset.cc
+++ b/src/sound_asset.cc
@@ -46,12 +46,11 @@ SoundAsset::SoundAsset (
string directory,
string mxf_name,
boost::signals2::signal<void (float)>* progress,
- int fps, int intrinsic_duration, int start_frame
+ int fps, int intrinsic_duration
)
: MXFAsset (directory, mxf_name, progress, fps, intrinsic_duration)
, _channels (files.size ())
, _sampling_rate (0)
- , _start_frame (start_frame)
{
assert (_channels);
@@ -63,12 +62,11 @@ SoundAsset::SoundAsset (
string directory,
string mxf_name,
boost::signals2::signal<void (float)>* progress,
- int fps, int intrinsic_duration, int start_frame, int channels
+ int fps, int intrinsic_duration, int channels
)
: MXFAsset (directory, mxf_name, progress, fps, intrinsic_duration)
, _channels (channels)
, _sampling_rate (0)
- , _start_frame (start_frame)
{
assert (_channels);
@@ -78,7 +76,6 @@ SoundAsset::SoundAsset (
SoundAsset::SoundAsset (string directory, string mxf_name)
: MXFAsset (directory, mxf_name)
, _channels (0)
- , _start_frame (0)
{
ASDCP::PCM::MXFReader reader;
if (ASDCP_FAILURE (reader.OpenRead (path().string().c_str()))) {
@@ -101,7 +98,6 @@ SoundAsset::SoundAsset (string directory, string mxf_name, int fps, int channels
: MXFAsset (directory, mxf_name, 0, fps, 0)
, _channels (channels)
, _sampling_rate (sampling_rate)
- , _start_frame (0)
{
}
@@ -174,15 +170,6 @@ SoundAsset::construct (boost::function<string (Channel)> get_path)
if (ASDCP_FAILURE (mxf_writer.OpenWrite (path().string().c_str(), writer_info, audio_desc))) {
throw FileError ("could not open audio MXF for writing", path().string());
}
-
- /* Skip through up to our _start_frame; this is pretty inefficient... */
- for (int i = 0; i < _start_frame; ++i) {
- for (int j = 0; j < _channels; ++j) {
- if (ASDCP_FAILURE (pcm_parser_channel[j].ReadFrame (frame_buffer_channel[j]))) {
- throw MiscError ("could not read audio frame");
- }
- }
- }
for (int i = 0; i < _intrinsic_duration; ++i) {
diff --git a/src/sound_asset.h b/src/sound_asset.h
index e13c5028..ad350ce5 100644
--- a/src/sound_asset.h
+++ b/src/sound_asset.h
@@ -78,7 +78,6 @@ public:
* @param progress Signal to inform of progress.
* @param fps Frames per second.
* @param intrinsic_duration Length of the whole asset in frames.
- * @param start_frame Frame in the source to start writing from.
* Note that this is different to entry_point in that the asset will contain no data before start_frame.
*/
SoundAsset (
@@ -87,8 +86,7 @@ public:
std::string mxf_name,
boost::signals2::signal<void (float)>* progress,
int fps,
- int intrinsic_duration,
- int start_frame
+ int intrinsic_duration
);
/** Construct a SoundAsset, generating the MXF from some WAV files.
@@ -99,8 +97,6 @@ public:
* @param progress Signal to inform of progress.
* @param fps Frames per second.
* @param intrinsic_duration Length of the whole asset in frames.
- * @param start_frame Frame in the source to start writing from.
- * Note that this is different to entry_point in that the asset will contain no data before start_frame.
* @param channels Number of audio channels.
*/
SoundAsset (
@@ -110,7 +106,6 @@ public:
boost::signals2::signal<void (float)>* progress,
int fps,
int intrinsic_duration,
- int start_frame,
int channels
);
@@ -153,7 +148,6 @@ private:
/** Number of channels in the asset */
int _channels;
int _sampling_rate;
- int _start_frame;
};
}