#ifdef DCPOMATIC_HAVE_EBUR128_PATCHED_FFMPEG
, _ebur128 (new AudioFilterGraph(film->audio_frame_rate(), film->audio_channels()))
#endif
- , _sample_peak (new float[film->audio_channels()])
- , _sample_peak_frame (new Frame[film->audio_channels()])
+ , _sample_peak (film->audio_channels())
+ , _sample_peak_frame (film->audio_channels())
, _analysis (film->audio_channels())
{
_ebur128->setup (_filters);
#endif
- _current = new AudioPoint[_film->audio_channels()];
+ _current = std::vector<AudioPoint>(_film->audio_channels());
if (!from_zero) {
_start = _playlist->start().get_value_or(DCPTime());
int leqm_channels = film->audio_channels();
auto content = _playlist->content();
- if (content.size() == 1 && content[0]->audio && content[0]->audio->stream()) {
- leqm_channels = content[0]->audio->stream()->channels();
+ if (content.size() == 1 && content[0]->audio) {
+ leqm_channels = content[0]->audio->mapping().mapped_output_channels().size();
}
/* XXX: is this right? Especially for more than 5.1? */
AudioAnalyser::~AudioAnalyser ()
{
- delete[] _current;
for (auto i: _filters) {
delete const_cast<Filter*> (i);
}
- delete[] _sample_peak;
- delete[] _sample_peak_frame;
}