summaryrefslogtreecommitdiff
path: root/src/sound_asset_writer.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/sound_asset_writer.cc')
-rw-r--r--src/sound_asset_writer.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/sound_asset_writer.cc b/src/sound_asset_writer.cc
index 8d302ed3..4a27639e 100644
--- a/src/sound_asset_writer.cc
+++ b/src/sound_asset_writer.cc
@@ -50,13 +50,13 @@ SoundAssetWriter::SoundAssetWriter (SoundAsset* asset, boost::filesystem::path f
_state->audio_desc.AvgBps = _sound_asset->sampling_rate() * _state->audio_desc.BlockAlign;
_state->audio_desc.LinkedTrackID = 0;
_state->audio_desc.ChannelFormat = ASDCP::PCM::CF_NONE;
-
+
_state->frame_buffer.Capacity (ASDCP::PCM::CalcFrameBufferSize (_state->audio_desc));
_state->frame_buffer.Size (ASDCP::PCM::CalcFrameBufferSize (_state->audio_desc));
memset (_state->frame_buffer.Data(), 0, _state->frame_buffer.Capacity());
-
+
_sound_asset->fill_writer_info (&_state->writer_info, _sound_asset->id(), standard);
-
+
Kumu::Result_t r = _state->mxf_writer.OpenWrite (file.string().c_str(), _state->writer_info, _state->audio_desc);
if (ASDCP_FAILURE (r)) {
boost::throw_exception (FileError ("could not open audio MXF for writing", file.string(), r));
@@ -69,7 +69,7 @@ void
SoundAssetWriter::write (float const * const * data, int frames)
{
DCP_ASSERT (!_finalized);
-
+
for (int i = 0; i < frames; ++i) {
byte_t* out = _state->frame_buffer.Data() + _frame_buffer_offset;
@@ -111,7 +111,7 @@ SoundAssetWriter::finalize ()
if (_frame_buffer_offset > 0) {
write_current_frame ();
}
-
+
if (ASDCP_FAILURE (_state->mxf_writer.Finalize())) {
boost::throw_exception (MiscError ("could not finalise audio MXF"));
}