}
int
-ExportGraphBuilder::process (nframes_t frames, bool last_cycle)
+ExportGraphBuilder::process (framecnt_t frames, bool last_cycle)
{
- assert(frames == process_buffer_frames);
+ assert(frames <= process_buffer_frames);
for (ChannelMap::iterator it = channels.begin(); it != channels.end(); ++it) {
- it->first->read (process_buffer, process_buffer_frames);
- ProcessContext<Sample> context(process_buffer, process_buffer_frames, 1);
+ it->first->read (process_buffer, frames);
+ ProcessContext<Sample> context(process_buffer, frames, 1);
if (last_cycle) { context.set_flag (ProcessContext<Sample>::EndOfInput); }
it->second->process (context);
}
/* SFC */
-ExportGraphBuilder::SFC::SFC (ExportGraphBuilder &, FileSpec const & new_config, nframes_t max_frames)
+ExportGraphBuilder::SFC::SFC (ExportGraphBuilder &, FileSpec const & new_config, framecnt_t max_frames)
: data_width(0)
{
config = new_config;
/* Normalizer */
-ExportGraphBuilder::Normalizer::Normalizer (ExportGraphBuilder & parent, FileSpec const & new_config, nframes_t /*max_frames*/)
+ExportGraphBuilder::Normalizer::Normalizer (ExportGraphBuilder & parent, FileSpec const & new_config, framecnt_t /*max_frames*/)
: parent (parent)
{
config = new_config;
bool
ExportGraphBuilder::Normalizer::process()
{
- nframes_t frames_read = tmp_file->read (*buffer);
+ framecnt_t frames_read = tmp_file->read (*buffer);
return frames_read != buffer->frames();
}
/* SRC */
-ExportGraphBuilder::SRC::SRC (ExportGraphBuilder & parent, FileSpec const & new_config, nframes_t max_frames)
+ExportGraphBuilder::SRC::SRC (ExportGraphBuilder & parent, FileSpec const & new_config, framecnt_t max_frames)
: parent (parent)
{
config = new_config;
}
/* SilenceHandler */
-ExportGraphBuilder::SilenceHandler::SilenceHandler (ExportGraphBuilder & parent, FileSpec const & new_config, nframes_t max_frames)
+ExportGraphBuilder::SilenceHandler::SilenceHandler (ExportGraphBuilder & parent, FileSpec const & new_config, framecnt_t max_frames)
: parent (parent)
{
config = new_config;
max_frames_in = max_frames;
- nframes_t sample_rate = parent.session.nominal_frame_rate();
+ framecnt_t sample_rate = parent.session.nominal_frame_rate();
silence_trimmer.reset (new SilenceTrimmer<Sample>(max_frames_in));
silence_trimmer->set_trim_beginning (config.format->trim_beginning());
}
}
- nframes_t max_frames_out = new_config.channel_config->get_n_chans() * max_frames;
+ framecnt_t const max_frames_out = new_config.channel_config->get_n_chans() * max_frames;
children.push_back (new SilenceHandler (parent, new_config, max_frames_out));
interleaver->add_output (children.back().sink ());
}