diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/sound_asset.cc | 17 | ||||
| -rw-r--r-- | src/wscript | 10 |
2 files changed, 14 insertions, 13 deletions
diff --git a/src/sound_asset.cc b/src/sound_asset.cc index 500a72e5..e987239a 100644 --- a/src/sound_asset.cc +++ b/src/sound_asset.cc @@ -155,25 +155,18 @@ SoundAsset::construct (boost::function<string (Channel)> get_path) for (int i = 0; i < _length; ++i) { - byte_t *data_s = frame_buffer.Data(); - byte_t *data_e = data_s + frame_buffer.Capacity(); - byte_t sample_size = ASDCP::PCM::CalcSampleSize (audio_desc_channel[0]); - int offset = 0; - for (int j = 0; j < _channels; ++j) { memset (frame_buffer_channel[j].Data(), 0, frame_buffer_channel[j].Capacity()); if (ASDCP_FAILURE (pcm_parser_channel[j].ReadFrame (frame_buffer_channel[j]))) { throw MiscError ("could not read audio frame"); } - - if (frame_buffer_channel[j].Size() != frame_buffer_channel[j].Capacity()) { - stringstream s; - s << "short audio frame; " << _channels << " channels, " - << frame_buffer_channel[j].Size() << " vs " << frame_buffer_channel[j].Capacity(); - throw MiscError (s.str ()); - } } + byte_t *data_s = frame_buffer.Data(); + byte_t *data_e = data_s + frame_buffer.Capacity(); + byte_t sample_size = ASDCP::PCM::CalcSampleSize (audio_desc_channel[0]); + int offset = 0; + while (data_s < data_e) { for (int j = 0; j < _channels; ++j) { byte_t* frame = frame_buffer_channel[j].Data() + offset; diff --git a/src/wscript b/src/wscript index 6c7f2392..9fb6a7e7 100644 --- a/src/wscript +++ b/src/wscript @@ -1,5 +1,9 @@ def build(bld): - obj = bld(features = 'cxx cxxshlib') + if bld.env.STATIC_LIBDCP: + obj = bld(features = 'cxx cxxstlib') + else: + obj = bld(features = 'cxx cxxshlib') + obj.name = 'libdcp' obj.target = 'dcp' obj.export_includes = ['.'] @@ -50,3 +54,7 @@ def build(bld): """ bld.install_files('${PREFIX}/include/libdcp', headers) + if bld.env.STATIC_LIBDCP: + bld.install_files('${PREFIX}/lib', 'libdcp.a') + else: + bld.install_files('${PREFIX}/lib', 'libdcp.so') |
