From 92023f3a3b8c3b9af96473f54c674b61a8df6d59 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 3 Dec 2012 14:18:44 +0000 Subject: Prevent crashes with 8 channel sound assets. --- src/sound_asset.cc | 7 ++++++- src/types.h | 14 ++++++++------ 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/src/sound_asset.cc b/src/sound_asset.cc index 0d0e1cd4..500a72e5 100644 --- a/src/sound_asset.cc +++ b/src/sound_asset.cc @@ -115,9 +115,14 @@ SoundAsset::construct (boost::function get_path) CENTRE, LFE, LS, - RS + RS, + /* XXX: not quite sure what these should be yet */ + CHANNEL_7, + CHANNEL_8 }; + assert (int(_channels) <= int(sizeof(channels) / sizeof(Channel))); + ASDCP::PCM::FrameBuffer frame_buffer_channel[_channels]; ASDCP::PCM::AudioDescriptor audio_desc_channel[_channels]; diff --git a/src/types.h b/src/types.h index 133c229d..433a910c 100644 --- a/src/types.h +++ b/src/types.h @@ -29,12 +29,14 @@ namespace libdcp /** Identifier for a sound channel */ enum Channel { - LEFT = 0, ///< left - RIGHT = 1, ///< right - CENTRE = 2, ///< centre - LFE = 3, ///< low-frequency effects (sub) - LS = 4, ///< left surround - RS = 5 ///< right surround + LEFT = 0, ///< left + RIGHT = 1, ///< right + CENTRE = 2, ///< centre + LFE = 3, ///< low-frequency effects (sub) + LS = 4, ///< left surround + RS = 5, ///< right surround + CHANNEL_7 = 6, ///< channel 7; not sure what this should be called + CHANNEL_8 = 7 ///< channel 8; not sure what this should be called }; enum ContentKind -- cgit v1.2.3 From dc2fb071dac7be85b36953360459fa8ad53e7af5 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 3 Dec 2012 14:18:55 +0000 Subject: Bump version --- wscript | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wscript b/wscript index afc06fd5..fb349311 100644 --- a/wscript +++ b/wscript @@ -3,7 +3,7 @@ import os import lut APPNAME = 'libdcp' -VERSION = '0.31pre' +VERSION = '0.31' def options(opt): opt.load('compiler_cxx') -- cgit v1.2.3 From 8ad6032102944bdf7b3fa21c2b19d65bf0de0d2f Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 3 Dec 2012 14:20:09 +0000 Subject: Bump version --- wscript | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wscript b/wscript index fb349311..dab2ced0 100644 --- a/wscript +++ b/wscript @@ -3,7 +3,7 @@ import os import lut APPNAME = 'libdcp' -VERSION = '0.31' +VERSION = '0.32pre' def options(opt): opt.load('compiler_cxx') -- cgit v1.2.3 From acc40d8befd5d7b997e93cdb8b151c61fdda36b2 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 3 Dec 2012 14:21:03 +0000 Subject: Bump version --- wscript | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wscript b/wscript index dab2ced0..f3841bed 100644 --- a/wscript +++ b/wscript @@ -3,7 +3,7 @@ import os import lut APPNAME = 'libdcp' -VERSION = '0.32pre' +VERSION = '0.32' def options(opt): opt.load('compiler_cxx') -- cgit v1.2.3 From 5700bcadb7378ac018b2879a8d128ba6b098b6b8 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 3 Dec 2012 14:22:08 +0000 Subject: Bump version --- wscript | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wscript b/wscript index f3841bed..4b507e5c 100644 --- a/wscript +++ b/wscript @@ -3,7 +3,7 @@ import os import lut APPNAME = 'libdcp' -VERSION = '0.32' +VERSION = '0.33pre' def options(opt): opt.load('compiler_cxx') -- cgit v1.2.3