summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gtk2_ardour/analysis_window.cc10
-rw-r--r--gtk2_ardour/ardour_ui.cc22
-rw-r--r--gtk2_ardour/ardour_ui.h16
-rw-r--r--gtk2_ardour/ardour_ui_ed.cc20
-rw-r--r--gtk2_ardour/audio_clock.cc89
-rw-r--r--gtk2_ardour/audio_clock.h28
-rw-r--r--gtk2_ardour/audio_region_view.cc14
-rw-r--r--gtk2_ardour/audio_region_view.h4
-rw-r--r--gtk2_ardour/audio_streamview.cc10
-rw-r--r--gtk2_ardour/audio_streamview.h2
-rw-r--r--gtk2_ardour/automation_region_view.cc2
-rw-r--r--gtk2_ardour/automation_region_view.h2
-rw-r--r--gtk2_ardour/automation_time_axis.cc2
-rw-r--r--gtk2_ardour/automation_time_axis.h4
-rw-r--r--gtk2_ardour/crossfade_edit.cc12
-rw-r--r--gtk2_ardour/editor.cc2
-rw-r--r--gtk2_ardour/editor.h6
-rw-r--r--gtk2_ardour/editor_ops.cc12
-rw-r--r--gtk2_ardour/editor_regions.cc10
-rw-r--r--gtk2_ardour/editor_rulers.cc6
-rw-r--r--gtk2_ardour/editor_summary.cc2
-rw-r--r--gtk2_ardour/editor_summary.h4
-rw-r--r--gtk2_ardour/editor_tempodisplay.cc2
-rw-r--r--gtk2_ardour/export_format_dialog.cc4
-rw-r--r--gtk2_ardour/export_range_markers_dialog.cc4
-rw-r--r--gtk2_ardour/imageframe_socket_handler.cc20
-rw-r--r--gtk2_ardour/imageframe_time_axis_group.cc2
-rw-r--r--gtk2_ardour/imageframe_time_axis_view.cc5
-rw-r--r--gtk2_ardour/imageframe_view.cc4
-rw-r--r--gtk2_ardour/imageframe_view.h4
-rw-r--r--gtk2_ardour/location_ui.cc4
-rw-r--r--gtk2_ardour/marker.cc2
-rw-r--r--gtk2_ardour/marker.h2
-rw-r--r--gtk2_ardour/marker_time_axis_view.cc4
-rw-r--r--gtk2_ardour/marker_view.cc4
-rw-r--r--gtk2_ardour/midi_streamview.cc2
-rw-r--r--gtk2_ardour/plugin_eq_gui.cc14
-rw-r--r--gtk2_ardour/plugin_eq_gui.h4
-rw-r--r--gtk2_ardour/plugin_ui.cc4
-rw-r--r--gtk2_ardour/port_insert_ui.cc6
-rw-r--r--gtk2_ardour/public_editor.h4
-rwxr-xr-xgtk2_ardour/region_editor.cc4
-rw-r--r--gtk2_ardour/region_view.cc10
-rw-r--r--gtk2_ardour/route_params_ui.cc4
-rw-r--r--gtk2_ardour/route_time_axis.cc8
-rw-r--r--gtk2_ardour/route_time_axis.h6
-rw-r--r--gtk2_ardour/selection.cc10
-rw-r--r--gtk2_ardour/selection.h10
-rw-r--r--gtk2_ardour/sfdb_ui.cc4
-rw-r--r--gtk2_ardour/step_editor.cc4
-rw-r--r--gtk2_ardour/streamview.h8
-rw-r--r--gtk2_ardour/strip_silence_dialog.cc4
-rw-r--r--gtk2_ardour/strip_silence_dialog.h4
-rw-r--r--gtk2_ardour/tempo_dialog.cc4
-rw-r--r--gtk2_ardour/tempo_dialog.h4
-rw-r--r--gtk2_ardour/time_axis_view.cc5
-rw-r--r--gtk2_ardour/time_axis_view.h4
-rw-r--r--gtk2_ardour/visual_time_axis.cc6
-rw-r--r--libs/ardour/amp.cc31
-rw-r--r--libs/ardour/ardour/amp.h18
-rw-r--r--libs/ardour/ardour/audio_buffer.h18
-rw-r--r--libs/ardour/ardour/audio_diskstream.h26
-rw-r--r--libs/ardour/ardour/audio_port.h18
-rw-r--r--libs/ardour/ardour/audio_track.h4
-rw-r--r--libs/ardour/ardour/audio_unit.h16
-rw-r--r--libs/ardour/ardour/audioanalyser.h4
-rw-r--r--libs/ardour/ardour/audioengine.h77
-rw-r--r--libs/ardour/ardour/audiofilesource.h4
-rw-r--r--libs/ardour/ardour/audioplaylist.h4
-rw-r--r--libs/ardour/ardour/audioregion.h4
-rw-r--r--libs/ardour/ardour/audiosource.h2
-rw-r--r--libs/ardour/ardour/auditioner.h6
-rw-r--r--libs/ardour/ardour/automatable.h12
-rw-r--r--libs/ardour/ardour/buffer.h6
-rw-r--r--libs/ardour/ardour/buffer_set.h10
-rw-r--r--libs/ardour/ardour/butler.h8
-rw-r--r--libs/ardour/ardour/click.h32
-rw-r--r--libs/ardour/ardour/delivery.h12
-rw-r--r--libs/ardour/ardour/diskstream.h34
-rw-r--r--libs/ardour/ardour/element_importer.h4
-rw-r--r--libs/ardour/ardour/export_channel.h18
-rw-r--r--libs/ardour/ardour/export_format_specification.h10
-rw-r--r--libs/ardour/ardour/export_graph_builder.h20
-rw-r--r--libs/ardour/ardour/export_handler.h4
-rw-r--r--libs/ardour/ardour/export_profile_manager.h4
-rw-r--r--libs/ardour/ardour/export_timespan.h18
-rw-r--r--libs/ardour/ardour/gain.h8
-rw-r--r--libs/ardour/ardour/graph.h14
-rw-r--r--libs/ardour/ardour/importable_source.h6
-rw-r--r--libs/ardour/ardour/internal_return.h10
-rw-r--r--libs/ardour/ardour/internal_send.h4
-rw-r--r--libs/ardour/ardour/interpolation.h8
-rw-r--r--libs/ardour/ardour/io.h14
-rw-r--r--libs/ardour/ardour/io_processor.h2
-rw-r--r--libs/ardour/ardour/ladspa_plugin.h14
-rw-r--r--libs/ardour/ardour/latent.h14
-rw-r--r--libs/ardour/ardour/lv2_plugin.h14
-rw-r--r--libs/ardour/ardour/meter.h2
-rw-r--r--libs/ardour/ardour/midi_buffer.h10
-rw-r--r--libs/ardour/ardour/midi_diskstream.h18
-rw-r--r--libs/ardour/ardour/midi_playlist.h6
-rw-r--r--libs/ardour/ardour/midi_port.h12
-rw-r--r--libs/ardour/ardour/midi_region.h6
-rw-r--r--libs/ardour/ardour/midi_ring_buffer.h2
-rw-r--r--libs/ardour/ardour/midi_source.h32
-rw-r--r--libs/ardour/ardour/midi_state_tracker.h2
-rw-r--r--libs/ardour/ardour/midi_track.h23
-rw-r--r--libs/ardour/ardour/mix.h38
-rw-r--r--libs/ardour/ardour/monitor_processor.h2
-rw-r--r--libs/ardour/ardour/panner.h16
-rw-r--r--libs/ardour/ardour/peak.h4
-rw-r--r--libs/ardour/ardour/playlist_factory.h2
-rw-r--r--libs/ardour/ardour/plugin.h4
-rw-r--r--libs/ardour/ardour/plugin_insert.h18
-rw-r--r--libs/ardour/ardour/port.h22
-rw-r--r--libs/ardour/ardour/port_insert.h19
-rw-r--r--libs/ardour/ardour/processor.h8
-rw-r--r--libs/ardour/ardour/rc_configuration_vars.h4
-rw-r--r--libs/ardour/ardour/region.h8
-rw-r--r--libs/ardour/ardour/resampled_source.h8
-rw-r--r--libs/ardour/ardour/return.h8
-rw-r--r--libs/ardour/ardour/route.h38
-rw-r--r--libs/ardour/ardour/runtime_functions.h10
-rw-r--r--libs/ardour/ardour/send.h2
-rw-r--r--libs/ardour/ardour/session.h164
-rw-r--r--libs/ardour/ardour/session_event.h4
-rw-r--r--libs/ardour/ardour/silentfilesource.h2
-rw-r--r--libs/ardour/ardour/slave.h28
-rw-r--r--libs/ardour/ardour/smf_source.h22
-rw-r--r--libs/ardour/ardour/sndfileimportable.h6
-rw-r--r--libs/ardour/ardour/sndfilesource.h4
-rw-r--r--libs/ardour/ardour/source_factory.h2
-rw-r--r--libs/ardour/ardour/strip_silence.h6
-rw-r--r--libs/ardour/ardour/tempo.h12
-rw-r--r--libs/ardour/ardour/thread_buffers.h2
-rw-r--r--libs/ardour/ardour/ticker.h18
-rw-r--r--libs/ardour/ardour/track.h14
-rw-r--r--libs/ardour/ardour/types.h17
-rw-r--r--libs/ardour/ardour/utils.h2
-rw-r--r--libs/ardour/ardour/vbap.h4
-rw-r--r--libs/ardour/audio_diskstream.cc60
-rw-r--r--libs/ardour/audio_playlist.cc10
-rw-r--r--libs/ardour/audio_port.cc10
-rw-r--r--libs/ardour/audio_region_importer.cc2
-rw-r--r--libs/ardour/audio_track.cc8
-rw-r--r--libs/ardour/audio_track_importer.cc2
-rw-r--r--libs/ardour/audio_unit.cc6
-rw-r--r--libs/ardour/audioanalyser.cc2
-rw-r--r--libs/ardour/audioengine.cc46
-rw-r--r--libs/ardour/audiofilesource.cc20
-rw-r--r--libs/ardour/audioregion.cc45
-rw-r--r--libs/ardour/audiosource.cc4
-rw-r--r--libs/ardour/auditioner.cc6
-rw-r--r--libs/ardour/automatable.cc4
-rw-r--r--libs/ardour/automation_list.cc2
-rw-r--r--libs/ardour/buffer_set.cc12
-rw-r--r--libs/ardour/butler.cc2
-rw-r--r--libs/ardour/caimportable.cc14
-rw-r--r--libs/ardour/coreaudiosource.cc2
-rw-r--r--libs/ardour/default_click.cc4
-rw-r--r--libs/ardour/delivery.cc14
-rw-r--r--libs/ardour/diskstream.cc14
-rw-r--r--libs/ardour/element_importer.cc6
-rw-r--r--libs/ardour/export_channel.cc6
-rw-r--r--libs/ardour/export_format_specification.cc6
-rw-r--r--libs/ardour/export_graph_builder.cc16
-rw-r--r--libs/ardour/export_handler.cc8
-rw-r--r--libs/ardour/export_profile_manager.cc4
-rw-r--r--libs/ardour/export_timespan.cc15
-rw-r--r--libs/ardour/gain.cc8
-rw-r--r--libs/ardour/graph.cc6
-rw-r--r--libs/ardour/import.cc10
-rw-r--r--libs/ardour/internal_return.cc10
-rw-r--r--libs/ardour/internal_send.cc4
-rw-r--r--libs/ardour/interpolation.cc18
-rw-r--r--libs/ardour/io.cc16
-rw-r--r--libs/ardour/io_processor.cc2
-rw-r--r--libs/ardour/ladspa_plugin.cc14
-rw-r--r--libs/ardour/location_importer.cc2
-rw-r--r--libs/ardour/lv2_plugin.cc14
-rw-r--r--libs/ardour/meter.cc4
-rw-r--r--libs/ardour/midi_buffer.cc6
-rw-r--r--libs/ardour/midi_clock_slave.cc4
-rw-r--r--libs/ardour/midi_diskstream.cc28
-rw-r--r--libs/ardour/midi_playlist.cc22
-rw-r--r--libs/ardour/midi_port.cc18
-rw-r--r--libs/ardour/midi_region.cc6
-rw-r--r--libs/ardour/midi_ring_buffer.cc6
-rw-r--r--libs/ardour/midi_source.cc12
-rw-r--r--libs/ardour/midi_state_tracker.cc2
-rw-r--r--libs/ardour/midi_stretch.cc2
-rw-r--r--libs/ardour/midi_track.cc19
-rw-r--r--libs/ardour/mix.cc38
-rw-r--r--libs/ardour/monitor_processor.cc6
-rw-r--r--libs/ardour/mtc_slave.cc20
-rw-r--r--libs/ardour/onset_detector.cc2
-rw-r--r--libs/ardour/panner.cc30
-rw-r--r--libs/ardour/playlist_factory.cc2
-rw-r--r--libs/ardour/plugin_insert.cc26
-rw-r--r--libs/ardour/port.cc6
-rw-r--r--libs/ardour/port_insert.cc10
-rw-r--r--libs/ardour/rb_effect.cc34
-rw-r--r--libs/ardour/region.cc16
-rw-r--r--libs/ardour/resampled_source.cc12
-rw-r--r--libs/ardour/return.cc2
-rw-r--r--libs/ardour/reverse.cc2
-rw-r--r--libs/ardour/route.cc46
-rw-r--r--libs/ardour/send.cc2
-rw-r--r--libs/ardour/session.cc22
-rw-r--r--libs/ardour/session_click.cc8
-rw-r--r--libs/ardour/session_export.cc6
-rw-r--r--libs/ardour/session_midi.cc16
-rw-r--r--libs/ardour/session_process.cc58
-rw-r--r--libs/ardour/session_state.cc4
-rw-r--r--libs/ardour/session_time.cc30
-rw-r--r--libs/ardour/session_transport.cc12
-rw-r--r--libs/ardour/slave.cc4
-rw-r--r--libs/ardour/smf_source.cc18
-rw-r--r--libs/ardour/sndfileimportable.cc12
-rw-r--r--libs/ardour/sndfilesource.cc10
-rw-r--r--libs/ardour/source_factory.cc2
-rw-r--r--libs/ardour/sse_functions_xmm.cc2
-rw-r--r--libs/ardour/st_stretch.cc20
-rw-r--r--libs/ardour/strip_silence.cc2
-rw-r--r--libs/ardour/tempo.cc6
-rw-r--r--libs/ardour/test/interpolation_test.cpp32
-rw-r--r--libs/ardour/test/midi_clock_slave_test.h6
-rw-r--r--libs/ardour/thread_buffers.cc2
-rw-r--r--libs/ardour/ticker.cc22
-rw-r--r--libs/ardour/track.cc14
-rw-r--r--libs/ardour/transient_detector.cc4
-rw-r--r--libs/ardour/utils.cc6
-rw-r--r--libs/ardour/vbap.cc6
-rw-r--r--libs/ardour/vst_plugin.cc8
-rw-r--r--libs/audiographer/audiographer/general/chunker.h12
-rw-r--r--libs/audiographer/audiographer/general/deinterleaver.h8
-rw-r--r--libs/audiographer/audiographer/general/interleaver.h16
-rw-r--r--libs/audiographer/audiographer/general/normalizer.h4
-rw-r--r--libs/audiographer/audiographer/general/sample_format_converter.h8
-rw-r--r--libs/audiographer/audiographer/general/silence_trimmer.h38
-rw-r--r--libs/audiographer/audiographer/general/sr_converter.h12
-rw-r--r--libs/audiographer/audiographer/process_context.h28
-rw-r--r--libs/audiographer/audiographer/sndfile/sndfile.h4
-rw-r--r--libs/audiographer/audiographer/sndfile/sndfile_reader.h6
-rw-r--r--libs/audiographer/audiographer/sndfile/sndfile_writer.h4
-rw-r--r--libs/audiographer/audiographer/sndfile/tmp_file.h4
-rw-r--r--libs/audiographer/audiographer/type_utils.h10
-rw-r--r--libs/audiographer/audiographer/types.h6
-rw-r--r--libs/audiographer/src/general/sample_format_converter.cc16
-rw-r--r--libs/audiographer/src/general/sr_converter.cc10
-rw-r--r--libs/audiographer/tests/general/chunker_test.cc22
-rw-r--r--libs/audiographer/tests/general/deinterleaver_test.cc10
-rw-r--r--libs/audiographer/tests/general/interleaver_deinterleaver_test.cc8
-rw-r--r--libs/audiographer/tests/general/interleaver_test.cc14
-rw-r--r--libs/audiographer/tests/general/normalizer_test.cc2
-rw-r--r--libs/audiographer/tests/general/peak_reader_test.cc2
-rw-r--r--libs/audiographer/tests/general/sample_format_converter_test.cc20
-rw-r--r--libs/audiographer/tests/general/silence_trimmer_test.cc28
-rw-r--r--libs/audiographer/tests/general/sr_converter_test.cc20
-rw-r--r--libs/audiographer/tests/general/threader_test.cc2
-rw-r--r--libs/audiographer/tests/sndfile/tmp_file_test.cc2
-rw-r--r--libs/audiographer/tests/utils.h16
-rw-r--r--libs/audiographer/tests/utils/identity_vertex_test.cc4
-rw-r--r--libs/evoral/src/Event.cpp2
-rw-r--r--libs/midi++2/channel.cc2
-rw-r--r--libs/midi++2/manager.cc2
-rw-r--r--libs/midi++2/midi++/channel.h2
-rw-r--r--libs/midi++2/midi++/manager.h4
-rw-r--r--libs/midi++2/midi++/mmc.h6
-rw-r--r--libs/midi++2/midi++/parser.h16
-rw-r--r--libs/midi++2/midi++/port.h12
-rw-r--r--libs/midi++2/midi++/types.h6
-rw-r--r--libs/midi++2/mmc.cc6
-rw-r--r--libs/midi++2/port.cc8
-rw-r--r--libs/surfaces/frontier/tranzport/tranzport_control_protocol.cc7
-rw-r--r--libs/surfaces/frontier/tranzport/tranzport_control_protocol.h6
-rw-r--r--libs/surfaces/mackie/mackie_control_protocol.cc8
-rw-r--r--libs/surfaces/mackie/mackie_control_protocol.h4
-rw-r--r--libs/surfaces/tranzport/show.cc7
-rw-r--r--libs/surfaces/tranzport/tranzport_control_protocol.h6
280 files changed, 1616 insertions, 1629 deletions
diff --git a/gtk2_ardour/analysis_window.cc b/gtk2_ardour/analysis_window.cc
index 6d858732ff..afa277e8e4 100644
--- a/gtk2_ardour/analysis_window.cc
+++ b/gtk2_ardour/analysis_window.cc
@@ -278,9 +278,9 @@ AnalysisWindow::analyze_data (Gtk::Button */*button*/)
int n;
for (int channel = 0; channel < n_inputs; channel++) {
- nframes_t x = 0;
+ framecnt_t x = 0;
- while ( x < (*j).length() ) {
+ while (x < j->length()) {
// TODO: What about stereo+ channels? composite all to one, I guess
n = fft_graph.windowSize();
@@ -322,11 +322,11 @@ AnalysisWindow::analyze_data (Gtk::Button */*button*/)
int n;
for (int channel = 0; channel < n_inputs; channel++) {
- nframes_t x = 0;
+ framecnt_t x = 0;
- nframes_t length = arv->region()->length();
+ framecnt_t length = arv->region()->length();
- while ( x < length ) {
+ while (x < length) {
// TODO: What about stereo+ channels? composite all to one, I guess
n = fft_graph.windowSize();
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc
index e969f31cf1..391db44976 100644
--- a/gtk2_ardour/ardour_ui.cc
+++ b/gtk2_ardour/ardour_ui.cc
@@ -121,7 +121,7 @@ UIConfiguration *ARDOUR_UI::ui_config = 0;
sigc::signal<void,bool> ARDOUR_UI::Blink;
sigc::signal<void> ARDOUR_UI::RapidScreenUpdate;
sigc::signal<void> ARDOUR_UI::SuperRapidScreenUpdate;
-sigc::signal<void,nframes_t, bool, nframes_t> ARDOUR_UI::Clock;
+sigc::signal<void, framepos_t, bool, framepos_t> ARDOUR_UI::Clock;
bool could_be_a_valid_path (const string& path);
@@ -952,7 +952,7 @@ ARDOUR_UI::every_point_zero_one_seconds ()
}
void
-ARDOUR_UI::update_sample_rate (nframes_t)
+ARDOUR_UI::update_sample_rate (framecnt_t)
{
char buf[32];
@@ -964,7 +964,7 @@ ARDOUR_UI::update_sample_rate (nframes_t)
} else {
- nframes_t rate = engine->frame_rate();
+ framecnt_t rate = engine->frame_rate();
if (fmod (rate, 1000.0) != 0.0) {
snprintf (buf, sizeof (buf), _("%.1f kHz / %4.1f ms"),
@@ -1024,7 +1024,7 @@ ARDOUR_UI::update_disk_space()
framecnt_t frames = _session->available_capture_duration();
char buf[64];
- nframes_t fr = _session->frame_rate();
+ framecnt_t fr = _session->frame_rate();
if (frames == max_framecnt) {
strcpy (buf, _("Disk: 24hrs+"));
@@ -1415,9 +1415,9 @@ restart JACK with more ports."), PROGRAM_NAME));
}
void
-ARDOUR_UI::do_transport_locate (nframes_t new_position, bool with_roll)
+ARDOUR_UI::do_transport_locate (framepos_t new_position, bool with_roll)
{
- nframes_t _preroll = 0;
+ framecnt_t _preroll = 0;
if (_session) {
// XXX CONFIG_CHANGE FIX - requires AnyTime handling
@@ -1497,7 +1497,7 @@ void
ARDOUR_UI::transport_goto_end ()
{
if (_session) {
- nframes_t const frame = _session->current_end_frame();
+ framepos_t const frame = _session->current_end_frame();
_session->request_locate (frame);
/* force displayed area in editor to start no matter
@@ -3257,7 +3257,7 @@ ARDOUR_UI::keyboard_settings () const
}
void
-ARDOUR_UI::create_xrun_marker(nframes_t where)
+ARDOUR_UI::create_xrun_marker (framepos_t where)
{
editor->mouse_add_new_marker (where, false, true);
}
@@ -3271,7 +3271,7 @@ ARDOUR_UI::halt_on_xrun_message ()
}
void
-ARDOUR_UI::xrun_handler(nframes_t where)
+ARDOUR_UI::xrun_handler (framepos_t where)
{
if (!_session) {
return;
@@ -3384,7 +3384,7 @@ what you would like to do.\n"));
}
int
-ARDOUR_UI::sr_mismatch_dialog (nframes_t desired, nframes_t actual)
+ARDOUR_UI::sr_mismatch_dialog (framecnt_t desired, framecnt_t actual)
{
HBox* hbox = new HBox();
Image* image = new Image (Stock::DIALOG_QUESTION, ICON_SIZE_DIALOG);
@@ -3451,7 +3451,7 @@ ARDOUR_UI::use_config ()
}
void
-ARDOUR_UI::update_transport_clocks (nframes_t pos)
+ARDOUR_UI::update_transport_clocks (framepos_t pos)
{
if (Config->get_primary_clock_delta_edit_cursor()) {
primary_clock.set (pos, false, editor->get_preferred_edit_position(), 1);
diff --git a/gtk2_ardour/ardour_ui.h b/gtk2_ardour/ardour_ui.h
index c7c38f8d5a..e2304b85cc 100644
--- a/gtk2_ardour/ardour_ui.h
+++ b/gtk2_ardour/ardour_ui.h
@@ -174,7 +174,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
static sigc::signal<void,bool> Blink;
static sigc::signal<void> RapidScreenUpdate;
static sigc::signal<void> SuperRapidScreenUpdate;
- static sigc::signal<void,nframes_t, bool, nframes_t> Clock;
+ static sigc::signal<void, framepos_t, bool, framepos_t> Clock;
XMLNode* editor_settings() const;
XMLNode* mixer_settings () const;
@@ -184,10 +184,10 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
void save_ardour_state ();
gboolean configure_handler (GdkEventConfigure* conf);
- void do_transport_locate (nframes_t, bool);
+ void do_transport_locate (framepos_t, bool);
void halt_on_xrun_message ();
- void xrun_handler (nframes_t);
- void create_xrun_marker (nframes_t);
+ void xrun_handler (framepos_t);
+ void create_xrun_marker (framepos_t);
AudioClock primary_clock;
AudioClock secondary_clock;
@@ -328,7 +328,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
void float_big_clock (Gtk::Window* parent);
bool main_window_state_event_handler (GdkEventWindowState*, bool window_was_editor);
- void update_transport_clocks (nframes_t pos);
+ void update_transport_clocks (framepos_t pos);
void record_state_changed ();
std::list<MidiTracer*> _midi_tracer_windows;
@@ -523,7 +523,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
Gtk::Label sample_rate_label;
Gtk::EventBox sample_rate_box;
- void update_sample_rate (nframes_t);
+ void update_sample_rate (ARDOUR::framecnt_t);
gint every_second ();
gint every_point_one_seconds ();
@@ -659,11 +659,11 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
void session_dialog (std::string);
int pending_state_dialog ();
- int sr_mismatch_dialog (nframes_t, nframes_t);
+ int sr_mismatch_dialog (ARDOUR::framecnt_t, ARDOUR::framecnt_t);
void disconnect_from_jack ();
void reconnect_to_jack ();
- void set_jack_buffer_size (nframes_t);
+ void set_jack_buffer_size (ARDOUR::pframes_t);
Gtk::MenuItem* jack_disconnect_item;
Gtk::MenuItem* jack_reconnect_item;
diff --git a/gtk2_ardour/ardour_ui_ed.cc b/gtk2_ardour/ardour_ui_ed.cc
index 6eb88ae940..e3698289f7 100644
--- a/gtk2_ardour/ardour_ui_ed.cc
+++ b/gtk2_ardour/ardour_ui_ed.cc
@@ -187,23 +187,23 @@ ARDOUR_UI::install_actions ()
RadioAction::Group jack_latency_group;
- act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency32"), X_("32"), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (nframes_t) 32));
+ act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency32"), X_("32"), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (pframes_t) 32));
ActionManager::jack_sensitive_actions.push_back (act);
- act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency64"), X_("64"), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (nframes_t) 64));
+ act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency64"), X_("64"), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (pframes_t) 64));
ActionManager::jack_sensitive_actions.push_back (act);
- act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency128"), X_("128"), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (nframes_t) 128));
+ act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency128"), X_("128"), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (pframes_t) 128));
ActionManager::jack_sensitive_actions.push_back (act);
- act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency256"), X_("256"), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (nframes_t) 256));
+ act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency256"), X_("256"), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (pframes_t) 256));
ActionManager::jack_sensitive_actions.push_back (act);
- act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency512"), X_("512"), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (nframes_t) 512));
+ act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency512"), X_("512"), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (pframes_t) 512));
ActionManager::jack_sensitive_actions.push_back (act);
- act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency1024"), X_("1024"), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (nframes_t) 1024));
+ act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency1024"), X_("1024"), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (pframes_t) 1024));
ActionManager::jack_sensitive_actions.push_back (act);
- act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency2048"), X_("2048"), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (nframes_t) 2048));
+ act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency2048"), X_("2048"), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (pframes_t) 2048));
ActionManager::jack_sensitive_actions.push_back (act);
- act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency4096"), X_("4096"), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (nframes_t) 4096));
+ act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency4096"), X_("4096"), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (pframes_t) 4096));
ActionManager::jack_sensitive_actions.push_back (act);
- act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency8192"), X_("8192"), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (nframes_t) 8192));
+ act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency8192"), X_("8192"), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (pframes_t) 8192));
ActionManager::jack_sensitive_actions.push_back (act);
/* these actions are intended to be shared across all windows */
@@ -441,7 +441,7 @@ ARDOUR_UI::install_actions ()
}
void
-ARDOUR_UI::set_jack_buffer_size (nframes_t nframes)
+ARDOUR_UI::set_jack_buffer_size (pframes_t nframes)
{
Glib::RefPtr<Action> action;
const char* action_name = 0;
diff --git a/gtk2_ardour/audio_clock.cc b/gtk2_ardour/audio_clock.cc
index 1c36391bb6..797d8551e1 100644
--- a/gtk2_ardour/audio_clock.cc
+++ b/gtk2_ardour/audio_clock.cc
@@ -414,7 +414,7 @@ AudioClock::on_realize ()
}
void
-AudioClock::set (nframes_t when, bool force, nframes_t offset, char which)
+AudioClock::set (framepos_t when, bool force, framecnt_t offset, char which)
{
if ((!force && !is_visible()) || _session == 0) {
@@ -479,12 +479,12 @@ AudioClock::session_configuration_changed (std::string p)
return;
}
- nframes_t current;
+ framecnt_t current;
switch (_mode) {
case Timecode:
if (is_duration) {
- current = current_duration();
+ current = current_duration ();
} else {
current = current_time ();
}
@@ -496,17 +496,17 @@ AudioClock::session_configuration_changed (std::string p)
}
void
-AudioClock::set_frames (nframes_t when, bool /*force*/)
+AudioClock::set_frames (framepos_t when, bool /*force*/)
{
char buf[32];
- snprintf (buf, sizeof (buf), "%u", when);
+ snprintf (buf, sizeof (buf), "%" PRId64, when);
audio_frames_label.set_text (buf);
if (frames_upper_info_label) {
- nframes_t rate = _session->frame_rate();
+ framecnt_t rate = _session->frame_rate();
if (fmod (rate, 1000.0) == 0.000) {
- sprintf (buf, "%uK", rate/1000);
+ sprintf (buf, "%" PRId64 "K", rate/1000);
} else {
sprintf (buf, "%.3fK", rate/1000.0f);
}
@@ -531,19 +531,19 @@ AudioClock::set_frames (nframes_t when, bool /*force*/)
}
void
-AudioClock::set_minsec (nframes_t when, bool force)
+AudioClock::set_minsec (framepos_t when, bool force)
{
char buf[32];
- nframes_t left;
+ framecnt_t left;
int hrs;
int mins;
float secs;
left = when;
hrs = (int) floor (left / (_session->frame_rate() * 60.0f * 60.0f));
- left -= (nframes_t) floor (hrs * _session->frame_rate() * 60.0f * 60.0f);
+ left -= (framecnt_t) floor (hrs * _session->frame_rate() * 60.0f * 60.0f);
mins = (int) floor (left / (_session->frame_rate() * 60.0f));
- left -= (nframes_t) floor (mins * _session->frame_rate() * 60.0f);
+ left -= (framecnt_t) floor (mins * _session->frame_rate() * 60.0f);
secs = left / (float) _session->frame_rate();
if (force || hrs != ms_last_hrs) {
@@ -566,7 +566,7 @@ AudioClock::set_minsec (nframes_t when, bool force)
}
void
-AudioClock::set_timecode (nframes_t when, bool force)
+AudioClock::set_timecode (framepos_t when, bool force)
{
char buf[32];
Timecode::Time timecode;
@@ -637,7 +637,7 @@ AudioClock::set_timecode (nframes_t when, bool force)
}
void
-AudioClock::set_bbt (nframes_t when, bool force)
+AudioClock::set_bbt (framepos_t when, bool force)
{
char buf[16];
BBT_Time bbt;
@@ -1198,7 +1198,7 @@ AudioClock::field_button_press_event (GdkEventButton *ev, Field /*field*/)
return false;
}
- nframes_t frames = 0;
+ framepos_t frames = 0;
switch (ev->button) {
case 1:
@@ -1244,7 +1244,7 @@ AudioClock::field_button_scroll_event (GdkEventScroll *ev, Field field)
return false;
}
- nframes_t frames = 0;
+ framepos_t frames = 0;
switch (ev->direction) {
@@ -1313,8 +1313,8 @@ AudioClock::field_motion_notify_event (GdkEventMotion *ev, Field field)
if (trunc(drag_accum) != 0) {
- nframes_t frames;
- nframes_t pos ;
+ framepos_t frames;
+ framepos_t pos;
int dir;
dir = (drag_accum < 0 ? 1:-1);
pos = current_time();
@@ -1322,7 +1322,7 @@ AudioClock::field_motion_notify_event (GdkEventMotion *ev, Field field)
if (frames != 0 && frames * drag_accum < current_time()) {
- set ((nframes_t) floor (pos - drag_accum * frames), false); // minus because up is negative in computer-land
+ set ((framepos_t) floor (pos - drag_accum * frames), false); // minus because up is negative in computer-land
} else {
set (0 , false);
@@ -1338,24 +1338,23 @@ AudioClock::field_motion_notify_event (GdkEventMotion *ev, Field field)
return true;
}
-nframes_t
-AudioClock::get_frames (Field field,nframes_t pos,int dir)
+framepos_t
+AudioClock::get_frames (Field field, framepos_t pos, int dir)
{
-
- nframes_t frames = 0;
+ framecnt_t frames = 0;
BBT_Time bbt;
switch (field) {
case Timecode_Hours:
- frames = (nframes_t) floor (3600.0 * _session->frame_rate());
+ frames = (framecnt_t) floor (3600.0 * _session->frame_rate());
break;
case Timecode_Minutes:
- frames = (nframes_t) floor (60.0 * _session->frame_rate());
+ frames = (framecnt_t) floor (60.0 * _session->frame_rate());
break;
case Timecode_Seconds:
frames = _session->frame_rate();
break;
case Timecode_Frames:
- frames = (nframes_t) floor (_session->frame_rate() / _session->timecode_frames_per_second());
+ frames = (framecnt_t) floor (_session->frame_rate() / _session->timecode_frames_per_second());
break;
case AudioFrames:
@@ -1363,10 +1362,10 @@ AudioClock::get_frames (Field field,nframes_t pos,int dir)
break;
case MS_Hours:
- frames = (nframes_t) floor (3600.0 * _session->frame_rate());
+ frames = (framecnt_t) floor (3600.0 * _session->frame_rate());
break;
case MS_Minutes:
- frames = (nframes_t) floor (60.0 * _session->frame_rate());
+ frames = (framecnt_t) floor (60.0 * _session->frame_rate());
break;
case MS_Seconds:
frames = _session->frame_rate();
@@ -1395,10 +1394,10 @@ AudioClock::get_frames (Field field,nframes_t pos,int dir)
return frames;
}
-nframes_t
-AudioClock::current_time (nframes_t pos) const
+framepos_t
+AudioClock::current_time (framepos_t pos) const
{
- nframes_t ret = 0;
+ framepos_t ret = 0;
switch (_mode) {
case Timecode:
@@ -1423,10 +1422,10 @@ AudioClock::current_time (nframes_t pos) const
return ret;
}
-nframes_t
-AudioClock::current_duration (nframes_t pos) const
+framepos_t
+AudioClock::current_duration (framepos_t pos) const
{
- nframes_t ret = 0;
+ framepos_t ret = 0;
switch (_mode) {
case Timecode:
@@ -1490,7 +1489,7 @@ AudioClock::timecode_sanitize_display()
}
}
-nframes_t
+framepos_t
AudioClock::timecode_frame_from_display () const
{
if (_session == 0) {
@@ -1883,7 +1882,7 @@ AudioClock::timecode_frame_from_display () const
return sample;
}
-nframes_t
+framepos_t
AudioClock::minsec_frame_from_display () const
{
if (_session == 0) {
@@ -1894,13 +1893,13 @@ AudioClock::minsec_frame_from_display () const
int mins = atoi (ms_minutes_label.get_text());
float secs = atof (ms_seconds_label.get_text());
- nframes_t sr = _session->frame_rate();
+ framecnt_t sr = _session->frame_rate();
- return (nframes_t) floor ((hrs * 60.0f * 60.0f * sr) + (mins * 60.0f * sr) + (secs * sr));
+ return (framepos_t) floor ((hrs * 60.0f * 60.0f * sr) + (mins * 60.0f * sr) + (secs * sr));
}
-nframes_t
-AudioClock::bbt_frame_from_display (nframes_t pos) const
+framepos_t
+AudioClock::bbt_frame_from_display (framepos_t pos) const
{
if (_session == 0) {
error << "AudioClock::current_time() called with BBT mode but without session!" << endmsg;
@@ -1919,14 +1918,12 @@ AudioClock::bbt_frame_from_display (nframes_t pos) const
any.bbt.beats++;
}
- nframes_t ret = _session->convert_to_frames_at (pos, any);
-
- return ret;
+ return _session->convert_to_frames_at (pos, any);
}
-nframes_t
-AudioClock::bbt_frame_duration_from_display (nframes_t pos) const
+framepos_t
+AudioClock::bbt_frame_duration_from_display (framepos_t pos) const
{
if (_session == 0) {
error << "AudioClock::current_time() called with BBT mode but without session!" << endmsg;
@@ -1943,10 +1940,10 @@ AudioClock::bbt_frame_duration_from_display (nframes_t pos) const
return _session->tempo_map().bbt_duration_at(pos,bbt,1);
}
-nframes_t
+framepos_t
AudioClock::audio_frame_from_display () const
{
- return (nframes_t) atoi (audio_frames_label.get_text());
+ return (framepos_t) atoi (audio_frames_label.get_text());
}
void
diff --git a/gtk2_ardour/audio_clock.h b/gtk2_ardour/audio_clock.h
index faab980bcc..f07b12d4c5 100644
--- a/gtk2_ardour/audio_clock.h
+++ b/gtk2_ardour/audio_clock.h
@@ -50,7 +50,7 @@ class AudioClock : public Gtk::HBox, public ARDOUR::SessionHandlePtr
void focus ();
- void set (nframes_t, bool force = false, nframes_t offset = 0, char which = 0);
+ void set (framepos_t, bool force = false, ARDOUR::framecnt_t offset = 0, char which = 0);
void set_from_playhead ();
void locate ();
void set_mode (Mode);
@@ -61,8 +61,8 @@ class AudioClock : public Gtk::HBox, public ARDOUR::SessionHandlePtr
std::string name() const { return _name; }
- nframes_t current_time (nframes_t position = 0) const;
- nframes_t current_duration (nframes_t position = 0) const;
+ framepos_t current_time (framepos_t position = 0) const;
+ framepos_t current_duration (framepos_t position = 0) const;
void set_session (ARDOUR::Session *s);
sigc::signal<void> ValueChanged;
@@ -164,7 +164,7 @@ class AudioClock : public Gtk::HBox, public ARDOUR::SessionHandlePtr
Gtk::Frame clock_frame;
framepos_t bbt_reference_time;
- nframes_t last_when;
+ framepos_t last_when;
bool last_pdelta;
bool last_sdelta;
@@ -195,19 +195,19 @@ class AudioClock : public Gtk::HBox, public ARDOUR::SessionHandlePtr
bool field_focus_out_event (GdkEventFocus *, Field);
bool drop_focus_handler (GdkEventFocus*);
- void set_timecode (nframes_t, bool);
- void set_bbt (nframes_t, bool);
- void set_minsec (nframes_t, bool);
- void set_frames (nframes_t, bool);
+ void set_timecode (framepos_t, bool);
+ void set_bbt (framepos_t, bool);
+ void set_minsec (framepos_t, bool);
+ void set_frames (framepos_t, bool);
- nframes_t get_frames (Field,nframes_t pos = 0,int dir=1);
+ framepos_t get_frames (Field, framepos_t pos = 0, int dir = 1);
void timecode_sanitize_display();
- nframes_t timecode_frame_from_display () const;
- nframes_t bbt_frame_from_display (nframes_t) const;
- nframes_t bbt_frame_duration_from_display (nframes_t) const;
- nframes_t minsec_frame_from_display () const;
- nframes_t audio_frame_from_display () const;
+ framepos_t timecode_frame_from_display () const;
+ framepos_t bbt_frame_from_display (framepos_t) const;
+ framepos_t bbt_frame_duration_from_display (framepos_t) const;
+ framepos_t minsec_frame_from_display () const;
+ framepos_t audio_frame_from_display () const;
void build_ops_menu ();
void setup_events ();
diff --git a/gtk2_ardour/audio_region_view.cc b/gtk2_ardour/audio_region_view.cc
index 9080276831..3b98e55151 100644
--- a/gtk2_ardour/audio_region_view.cc
+++ b/gtk2_ardour/audio_region_view.cc
@@ -573,11 +573,11 @@ AudioRegionView::reset_fade_shapes ()
void
AudioRegionView::reset_fade_in_shape ()
{
- reset_fade_in_shape_width ((nframes_t) audio_region()->fade_in()->back()->when);
+ reset_fade_in_shape_width ((framecnt_t) audio_region()->fade_in()->back()->when);
}
void
-AudioRegionView::reset_fade_in_shape_width (nframes_t width)
+AudioRegionView::reset_fade_in_shape_width (framecnt_t width)
{
if (fade_in_handle == 0) {
return;
@@ -585,7 +585,7 @@ AudioRegionView::reset_fade_in_shape_width (nframes_t width)
/* smallest size for a fade is 64 frames */
- width = std::max ((nframes_t) 64, width);
+ width = std::max ((framecnt_t) 64, width);
Points* points;
@@ -665,11 +665,11 @@ AudioRegionView::reset_fade_in_shape_width (nframes_t width)
void
AudioRegionView::reset_fade_out_shape ()
{
- reset_fade_out_shape_width ((nframes_t) audio_region()->fade_out()->back()->when);
+ reset_fade_out_shape_width ((framecnt_t) audio_region()->fade_out()->back()->when);
}
void
-AudioRegionView::reset_fade_out_shape_width (nframes_t width)
+AudioRegionView::reset_fade_out_shape_width (framecnt_t width)
{
if (fade_out_handle == 0) {
return;
@@ -677,7 +677,7 @@ AudioRegionView::reset_fade_out_shape_width (nframes_t width)
/* smallest size for a fade is 64 frames */
- width = std::max ((nframes_t) 64, width);
+ width = std::max ((framecnt_t) 64, width);
Points* points;
double pwidth = width / samples_per_unit;
@@ -1043,7 +1043,7 @@ AudioRegionView::add_gain_point_event (ArdourCanvas::Item *item, GdkEvent *ev)
item->w2i (x, y);
- nframes_t fx = trackview.editor().pixel_to_frame (x);
+ framepos_t fx = trackview.editor().pixel_to_frame (x);
if (fx > _region->length()) {
return;
diff --git a/gtk2_ardour/audio_region_view.h b/gtk2_ardour/audio_region_view.h
index d2593feaab..f7b8404d7b 100644
--- a/gtk2_ardour/audio_region_view.h
+++ b/gtk2_ardour/audio_region_view.h
@@ -100,8 +100,8 @@ class AudioRegionView : public RegionView
GhostRegion* add_ghost (TimeAxisView&);
- void reset_fade_in_shape_width (nframes_t);
- void reset_fade_out_shape_width (nframes_t);
+ void reset_fade_in_shape_width (framecnt_t);
+ void reset_fade_out_shape_width (framecnt_t);
void show_fade_line(framepos_t pos);
void hide_fade_line();
diff --git a/gtk2_ardour/audio_streamview.cc b/gtk2_ardour/audio_streamview.cc
index 1f1ee9d82c..abfa767c9c 100644
--- a/gtk2_ardour/audio_streamview.cc
+++ b/gtk2_ardour/audio_streamview.cc
@@ -471,7 +471,7 @@ AudioStreamView::setup_rec_box ()
// handle multi
- nframes_t start = 0;
+ framepos_t start = 0;
if (rec_regions.size() > 0) {
start = rec_regions.back().first->start()
+ _trackview.track()->get_captured_frames(rec_regions.size()-1);
@@ -600,7 +600,7 @@ AudioStreamView::foreach_crossfadeview (void (CrossfadeView::*pmf)(void))
}
void
-AudioStreamView::rec_peak_range_ready (nframes_t start, nframes_t cnt, boost::weak_ptr<Source> weak_src)
+AudioStreamView::rec_peak_range_ready (framepos_t start, framecnt_t cnt, boost::weak_ptr<Source> weak_src)
{
ENSURE_GUI_THREAD (*this, &AudioStreamView::rec_peak_range_ready, start, cnt, weak_src)
@@ -653,13 +653,13 @@ AudioStreamView::update_rec_regions (framepos_t start, framecnt_t cnt)
continue;
}
- nframes_t origlen = region->length();
+ framecnt_t origlen = region->length();
if (region == rec_regions.back().first && rec_active) {
if (last_rec_data_frame > region->start()) {
- nframes_t nlen = last_rec_data_frame - region->start();
+ framecnt_t nlen = last_rec_data_frame - region->start();
if (nlen != region->length()) {
@@ -684,7 +684,7 @@ AudioStreamView::update_rec_regions (framepos_t start, framecnt_t cnt)
} else {
- nframes_t nlen = _trackview.track()->get_captured_frames(n);
+ framecnt_t nlen = _trackview.track()->get_captured_frames(n);
if (nlen != region->length()) {
diff --git a/gtk2_ardour/audio_streamview.h b/gtk2_ardour/audio_streamview.h
index f7b11dcf97..0c50986f93 100644
--- a/gtk2_ardour/audio_streamview.h
+++ b/gtk2_ardour/audio_streamview.h
@@ -78,7 +78,7 @@ class AudioStreamView : public StreamView
private:
void setup_rec_box ();
- void rec_peak_range_ready (nframes_t start, nframes_t cnt, boost::weak_ptr<ARDOUR::Source> src);
+ void rec_peak_range_ready (framepos_t start, ARDOUR::framecnt_t cnt, boost::weak_ptr<ARDOUR::Source> src);
void update_rec_regions (ARDOUR::framepos_t, ARDOUR::framecnt_t);
RegionView* add_region_view_internal (boost::shared_ptr<ARDOUR::Region>, bool wait_for_waves, bool recording = false);
diff --git a/gtk2_ardour/automation_region_view.cc b/gtk2_ardour/automation_region_view.cc
index 1cda2051dd..c556d01848 100644
--- a/gtk2_ardour/automation_region_view.cc
+++ b/gtk2_ardour/automation_region_view.cc
@@ -126,7 +126,7 @@ AutomationRegionView::canvas_event(GdkEvent* ev)
* @param y y position, relative to our TimeAxisView.
*/
void
-AutomationRegionView::add_automation_event (GdkEvent *, nframes_t when, double y)
+AutomationRegionView::add_automation_event (GdkEvent *, framepos_t when, double y)
{
if (!_line) {
boost::shared_ptr<Evoral::Control> c = _region->control(_parameter, true);
diff --git a/gtk2_ardour/automation_region_view.h b/gtk2_ardour/automation_region_view.h
index 04dd308def..570b4edbfe 100644
--- a/gtk2_ardour/automation_region_view.h
+++ b/gtk2_ardour/automation_region_view.h
@@ -67,7 +67,7 @@ protected:
bool set_position(framepos_t pos, void* src, double* ignored);
void region_resized (const PBD::PropertyChange&);
bool canvas_event(GdkEvent* ev);
- void add_automation_event (GdkEvent* event, nframes_t when, double y);
+ void add_automation_event (GdkEvent* event, framepos_t when, double y);
void entered (bool);
void exited();
diff --git a/gtk2_ardour/automation_time_axis.cc b/gtk2_ardour/automation_time_axis.cc
index abfd83184c..e0a2cd0970 100644
--- a/gtk2_ardour/automation_time_axis.cc
+++ b/gtk2_ardour/automation_time_axis.cc
@@ -587,7 +587,7 @@ AutomationTimeAxisView::build_display_menu ()
}
void
-AutomationTimeAxisView::add_automation_event (ArdourCanvas::Item* /*item*/, GdkEvent* /*event*/, nframes_t when, double y)
+AutomationTimeAxisView::add_automation_event (ArdourCanvas::Item* /*item*/, GdkEvent* /*event*/, framepos_t when, double y)
{
if (!_line)
return;
diff --git a/gtk2_ardour/automation_time_axis.h b/gtk2_ardour/automation_time_axis.h
index 798a144cab..76e687da0d 100644
--- a/gtk2_ardour/automation_time_axis.h
+++ b/gtk2_ardour/automation_time_axis.h
@@ -72,7 +72,7 @@ class AutomationTimeAxisView : public TimeAxisView {
bool set_visibility (bool yn);
std::string name() const { return _name; }
- void add_automation_event (ArdourCanvas::Item *item, GdkEvent *event, nframes_t, double);
+ void add_automation_event (ArdourCanvas::Item *item, GdkEvent *event, framepos_t, double);
void clear_lines ();
@@ -86,7 +86,7 @@ class AutomationTimeAxisView : public TimeAxisView {
void get_selectables (ARDOUR::framepos_t start, ARDOUR::framepos_t end, double top, double bot, std::list<Selectable *>&);
void get_inverted_selectables (Selection&, std::list<Selectable*>& results);
- void show_timestretch (nframes_t /*start*/, nframes_t /*end*/) {}
+ void show_timestretch (framepos_t /*start*/, framepos_t /*end*/) {}
void hide_timestretch () {}
/* editing operations */
diff --git a/gtk2_ardour/crossfade_edit.cc b/gtk2_ardour/crossfade_edit.cc
index 987a3f2827..0c8daafb04 100644
--- a/gtk2_ardour/crossfade_edit.cc
+++ b/gtk2_ardour/crossfade_edit.cc
@@ -656,7 +656,7 @@ CrossfadeEditor::redraw ()
return;
}
- nframes_t len = xfade->length ();
+ framecnt_t len = xfade->length ();
fade[current].normative_curve.clear ();
fade[current].gain_curve.clear ();
@@ -1215,11 +1215,11 @@ void
CrossfadeEditor::audition (Audition which)
{
AudioPlaylist& pl (_session->the_auditioner()->prepare_playlist());
- nframes_t preroll;
- nframes_t postroll;
- nframes_t left_start_offset;
- nframes_t right_length;
- nframes_t left_length;
+ framecnt_t preroll;
+ framecnt_t postroll;
+ framecnt_t left_start_offset;
+ framecnt_t right_length;
+ framecnt_t left_length;
if (which != Right && preroll_button.get_active()) {
preroll = _session->frame_rate() * 2; //2 second hardcoded preroll for now
diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc
index b41282d0df..84cd70ee67 100644
--- a/gtk2_ardour/editor.cc
+++ b/gtk2_ardour/editor.cc
@@ -1105,7 +1105,7 @@ Editor::set_session (Session *t)
bbt.bars = 0;
bbt.beats = 0;
bbt.ticks = 120;
- nframes_t pos = _session->tempo_map().bbt_duration_at (0, bbt, 1);
+ framepos_t pos = _session->tempo_map().bbt_duration_at (0, bbt, 1);
nudge_clock.set_mode(AudioClock::BBT);
nudge_clock.set (pos, true, 0, AudioClock::BBT);
diff --git a/gtk2_ardour/editor.h b/gtk2_ardour/editor.h
index 3c3f56d2f1..0b90c16e0d 100644
--- a/gtk2_ardour/editor.h
+++ b/gtk2_ardour/editor.h
@@ -799,7 +799,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
MinsecRulerScale minsec_ruler_scale;
- nframes_t minsec_mark_interval;
+ framecnt_t minsec_mark_interval;
gint minsec_mark_modulo;
gint minsec_nmarks;
void set_minsec_ruler_scale (gdouble lower, gdouble upper);
@@ -814,7 +814,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
TimecodeRulerScale timecode_ruler_scale;
- nframes_t timecode_mark_interval;
+ framecnt_t timecode_mark_interval;
gint timecode_mark_modulo;
gint timecode_nmarks;
void set_timecode_ruler_scale (gdouble lower, gdouble upper);
@@ -1492,7 +1492,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
void remove_metric_marks ();
void draw_metric_marks (const ARDOUR::Metrics& metrics);
- void compute_current_bbt_points (nframes_t left, nframes_t right);
+ void compute_current_bbt_points (framepos_t left, framepos_t right);
void tempo_map_changed (const PBD::PropertyChange&);
void redisplay_tempo (bool immediate_redraw);
diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc
index 5bddc13891..6f2957b3ff 100644
--- a/gtk2_ardour/editor_ops.cc
+++ b/gtk2_ardour/editor_ops.cc
@@ -1752,13 +1752,13 @@ Editor::temporal_zoom_session ()
ENSURE_GUI_THREAD (*this, &Editor::temporal_zoom_session)
if (_session) {
- nframes_t const l = _session->current_end_frame() - _session->current_start_frame();
+ framecnt_t const l = _session->current_end_frame() - _session->current_start_frame();
double s = _session->current_start_frame() - l * 0.01;
if (s < 0) {
s = 0;
}
- nframes_t const e = _session->current_end_frame() + l * 0.01;
- temporal_zoom_by_frame (nframes_t (s), e, "zoom to _session");
+ framecnt_t const e = _session->current_end_frame() + l * 0.01;
+ temporal_zoom_by_frame (framecnt_t (s), e, "zoom to _session");
}
}
@@ -2207,7 +2207,7 @@ Editor::insert_route_list_drag (boost::shared_ptr<Route> route, int x, int y)
{
double wx, wy;
double cx, cy;
- nframes_t where;
+ framepos_t where;
RouteTimeAxisView *dest_rtv = 0;
RouteTimeAxisView *source_rtv = 0;
@@ -4188,8 +4188,8 @@ Editor::duplicate_some_regions (RegionSelection& regions, float times)
RegionSelection sel = regions; // clear (below) may clear the argument list if its the current region selection
RegionSelection foo;
- nframes_t const start_frame = regions.start ();
- nframes_t const end_frame = regions.end_frame ();
+ framepos_t const start_frame = regions.start ();
+ framepos_t const end_frame = regions.end_frame ();
begin_reversible_command (_("duplicate region"));
diff --git a/gtk2_ardour/editor_regions.cc b/gtk2_ardour/editor_regions.cc
index 9b56ad0433..30fce08a93 100644
--- a/gtk2_ardour/editor_regions.cc
+++ b/gtk2_ardour/editor_regions.cc
@@ -800,9 +800,9 @@ EditorRegions::format_position (framepos_t pos, char* buf, size_t bufsize)
left = pos;
hrs = (int) floor (left / (_session->frame_rate() * 60.0f * 60.0f));
- left -= (nframes_t) floor (hrs * _session->frame_rate() * 60.0f * 60.0f);
+ left -= (framecnt_t) floor (hrs * _session->frame_rate() * 60.0f * 60.0f);
mins = (int) floor (left / (_session->frame_rate() * 60.0f));
- left -= (nframes_t) floor (mins * _session->frame_rate() * 60.0f);
+ left -= (framecnt_t) floor (mins * _session->frame_rate() * 60.0f);
secs = left / (float) _session->frame_rate();
snprintf (buf, bufsize, "%02d:%02d:%06.3f", hrs, mins, secs);
break;
@@ -844,13 +844,13 @@ EditorRegions::populate_row (boost::shared_ptr<Region> region, TreeModel::Row co
#if 0
if (audioRegion && fades_in_seconds) {
- nframes_t left;
+ framepos_t left;
int mins;
int millisecs;
left = audioRegion->fade_in()->back()->when;
mins = (int) floor (left / (_session->frame_rate() * 60.0f));
- left -= (nframes_t) floor (mins * _session->frame_rate() * 60.0f);
+ left -= (framepos_t) floor (mins * _session->frame_rate() * 60.0f);
millisecs = (int) floor ((left * 1000.0f) / _session->frame_rate());
if (audioRegion->fade_in()->back()->when >= _session->frame_rate()) {
@@ -861,7 +861,7 @@ EditorRegions::populate_row (boost::shared_ptr<Region> region, TreeModel::Row co
left = audioRegion->fade_out()->back()->when;
mins = (int) floor (left / (_session->frame_rate() * 60.0f));
- left -= (nframes_t) floor (mins * _session->frame_rate() * 60.0f);
+ left -= (framepos_t) floor (mins * _session->frame_rate() * 60.0f);
millisecs = (int) floor ((left * 1000.0f) / _session->frame_rate());
if (audioRegion->fade_out()->back()->when >= _session->frame_rate()) {
diff --git a/gtk2_ardour/editor_rulers.cc b/gtk2_ardour/editor_rulers.cc
index 068be6d534..b367a55f25 100644
--- a/gtk2_ardour/editor_rulers.cc
+++ b/gtk2_ardour/editor_rulers.cc
@@ -1002,7 +1002,7 @@ Editor::metric_get_timecode (GtkCustomRulerMark **marks, gdouble lower, gdouble
lower = 0;
}
- pos = (nframes_t) floor (lower);
+ pos = (framecnt_t) floor (lower);
*marks = (GtkCustomRulerMark *) g_malloc (sizeof(GtkCustomRulerMark) * timecode_nmarks);
switch (timecode_ruler_scale) {
@@ -1150,8 +1150,8 @@ Editor::compute_bbt_ruler_scale (framepos_t lower, framepos_t upper)
TempoMap::BBTPointList::iterator i;
BBT_Time lower_beat, upper_beat; // the beats at each end of the ruler
- _session->bbt_time((jack_nframes_t) lower, lower_beat);
- _session->bbt_time((jack_nframes_t) upper, upper_beat);
+ _session->bbt_time (lower, lower_beat);
+ _session->bbt_time (upper, upper_beat);
uint32_t beats = 0;
bbt_accent_modulo = 1;
diff --git a/gtk2_ardour/editor_summary.cc b/gtk2_ardour/editor_summary.cc
index e55b53aeea..c097bfe049 100644
--- a/gtk2_ardour/editor_summary.cc
+++ b/gtk2_ardour/editor_summary.cc
@@ -147,7 +147,7 @@ EditorSummary::render (cairo_t* cr)
/* compute start and end points for the summary */
- nframes_t const session_length = _session->current_end_frame() - _session->current_start_frame ();
+ framecnt_t const session_length = _session->current_end_frame() - _session->current_start_frame ();
double const theoretical_start = _session->current_start_frame() - session_length * _overhang_fraction;
_start = theoretical_start > 0 ? theoretical_start : 0;
_end = _session->current_end_frame() + session_length * _overhang_fraction;
diff --git a/gtk2_ardour/editor_summary.h b/gtk2_ardour/editor_summary.h
index e9258a88fd..86f2e79390 100644
--- a/gtk2_ardour/editor_summary.h
+++ b/gtk2_ardour/editor_summary.h
@@ -80,8 +80,8 @@ private:
Position get_position (double, double) const;
void set_cursor (Position);
- nframes_t _start; ///< start frame of the overview
- nframes_t _end; ///< end frame of the overview
+ framepos_t _start; ///< start frame of the overview
+ framepos_t _end; ///< end frame of the overview
/** fraction of the session length by which the overview size should extend past the start and end markers */
double _overhang_fraction;
diff --git a/gtk2_ardour/editor_tempodisplay.cc b/gtk2_ardour/editor_tempodisplay.cc
index 0d0fd4e841..90fd6136cf 100644
--- a/gtk2_ardour/editor_tempodisplay.cc
+++ b/gtk2_ardour/editor_tempodisplay.cc
@@ -138,7 +138,7 @@ Editor::redisplay_tempo (bool immediate_redraw)
}
void
-Editor::compute_current_bbt_points (nframes_t leftmost, nframes_t rightmost)
+Editor::compute_current_bbt_points (framepos_t leftmost, framepos_t rightmost)
{
if (!_session) {
return;
diff --git a/gtk2_ardour/export_format_dialog.cc b/gtk2_ardour/export_format_dialog.cc
index caf76ac0de..f950e6ab18 100644
--- a/gtk2_ardour/export_format_dialog.cc
+++ b/gtk2_ardour/export_format_dialog.cc
@@ -210,7 +210,7 @@ ExportFormatDialog::set_session (ARDOUR::Session* s)
if (sample_rate_view.get_selection()->count_selected_rows() == 0) {
Gtk::ListStore::Children::iterator it;
for (it = sample_rate_list->children().begin(); it != sample_rate_list->children().end(); ++it) {
- if ((nframes_t) (*it)->get_value (sample_rate_cols.ptr)->rate == _session->nominal_frame_rate()) {
+ if ((framecnt_t) (*it)->get_value (sample_rate_cols.ptr)->rate == _session->nominal_frame_rate()) {
sample_rate_view.get_selection()->select (it);
break;
}
@@ -761,7 +761,7 @@ ExportFormatDialog::update_time (AnyTime & time, AudioClock const & clock)
return;
}
- nframes_t frames = clock.current_duration();
+ framecnt_t frames = clock.current_duration();
switch (clock.mode()) {
case AudioClock::Timecode:
diff --git a/gtk2_ardour/export_range_markers_dialog.cc b/gtk2_ardour/export_range_markers_dialog.cc
index f5c6c916d1..774a956d9e 100644
--- a/gtk2_ardour/export_range_markers_dialog.cc
+++ b/gtk2_ardour/export_range_markers_dialog.cc
@@ -171,7 +171,7 @@ ExportRangeMarkersDialog::init_progress_computing(Locations::LocationList& locat
// flush vector
range_markers_durations_aggregated.resize(0);
- nframes_t duration_before_current_location = 0;
+ framecnt_t duration_before_current_location = 0;
Locations::LocationList::iterator locationIter;
for (locationIter = locations.begin(); locationIter != locations.end(); ++locationIter) {
@@ -180,7 +180,7 @@ ExportRangeMarkersDialog::init_progress_computing(Locations::LocationList& locat
if(currentLocation->is_range_marker()){
range_markers_durations_aggregated.push_back (duration_before_current_location);
- nframes_t duration = currentLocation->end() - currentLocation->start();
+ framecnt_t duration = currentLocation->end() - currentLocation->start();
range_markers_durations.push_back (duration);
duration_before_current_location += duration;
diff --git a/gtk2_ardour/imageframe_socket_handler.cc b/gtk2_ardour/imageframe_socket_handler.cc
index dc9188db1b..da827b72df 100644
--- a/gtk2_ardour/imageframe_socket_handler.cc
+++ b/gtk2_ardour/imageframe_socket_handler.cc
@@ -537,7 +537,7 @@ ImageFrameSocketHandler::send_imageframe_time_axis_group_renamed(const string &
* @param item the time axis item whos position has changed
*/
void
-ImageFrameSocketHandler::send_imageframe_view_position_change(nframes_t pos, void* src, ImageFrameView* item)
+ImageFrameSocketHandler::send_imageframe_view_position_change (framepos_t pos, void* src, ImageFrameView* item)
{
// ENSURE_GUI_THREAD (*this, &ImageFrameSocketHandler::send_imageframe_view_position_change, pos, src, item)
@@ -573,7 +573,7 @@ ImageFrameSocketHandler::send_imageframe_view_position_change(nframes_t pos, voi
* @param item the item which has had a duration change
*/
void
-ImageFrameSocketHandler::send_imageframe_view_duration_change(nframes_t dur, void* src, ImageFrameView* item)
+ImageFrameSocketHandler::send_imageframe_view_duration_change (framecnt_t dur, void* src, ImageFrameView* item)
{
// ENSURE_GUI_THREAD (*this, &ImageFrameSocketHandler::send_imageframe_view_duration_change, dur, src, item)
@@ -687,7 +687,7 @@ ImageFrameSocketHandler::send_imageframe_view_removed(const string & item_id, vo
* @param item the time axis item whos position has changed
*/
void
-ImageFrameSocketHandler::send_marker_view_position_change(nframes_t pos, void* src, MarkerView* item)
+ImageFrameSocketHandler::send_marker_view_position_change (framepos_t pos, void* src, MarkerView* item)
{
if(this == src || src == 0)
{
@@ -721,7 +721,7 @@ ImageFrameSocketHandler::send_marker_view_position_change(nframes_t pos, void* s
* @param item the time axis item whos position has changed
*/
void
-ImageFrameSocketHandler::send_marker_view_duration_change(nframes_t dur, void* src, MarkerView* item)
+ImageFrameSocketHandler::send_marker_view_duration_change (framecnt_t dur, void* src, MarkerView* item)
{
if(this == src || src == 0)
{
@@ -1336,11 +1336,11 @@ ImageFrameSocketHandler::handle_insert_imageframe_view(const char* msg)
position += image_id_size ;
// get the start frame value
- nframes_t start = strtoul((get_message_part(position,10,msg).c_str()),0,10) ;
+ framepos_t start = strtoul((get_message_part(position,10,msg).c_str()),0,10) ;
position += 10 ;
// get the duration value
- nframes_t duration = strtoul((get_message_part(position,10,msg).c_str()),0,10) ;
+ framecnt_t duration = strtoul((get_message_part(position,10,msg).c_str()),0,10) ;
position += 10 ;
//get the named time axis view we about to add an image to
@@ -1672,7 +1672,7 @@ ImageFrameSocketHandler::handle_imageframe_view_position_update(const char* msg)
this->decompose_imageframe_item_desc(msg, position, track_id, track_id_size, scene_id, scene_id_size, item_id, item_id_size) ;
- nframes_t start_frame = strtoul(get_message_part(position, ardourvis::TIME_VALUE_CHARS, msg).c_str(), 0, 10) ;
+ framepos_t start_frame = strtoul(get_message_part(position, ardourvis::TIME_VALUE_CHARS, msg).c_str(), 0, 10) ;
position += ardourvis::TIME_VALUE_CHARS ;
// get the named time axis
@@ -1724,7 +1724,7 @@ ImageFrameSocketHandler::handle_imageframe_view_duration_update(const char* msg)
this->decompose_imageframe_item_desc(msg, position, track_id, track_id_size, scene_id, scene_id_size, item_id, item_id_size) ;
- nframes_t duration = strtoul(get_message_part(position,ardourvis::TIME_VALUE_CHARS,msg).c_str(),0,10) ;
+ framecnt_t duration = strtoul(get_message_part(position,ardourvis::TIME_VALUE_CHARS,msg).c_str(),0,10) ;
position += ardourvis::TIME_VALUE_CHARS ;
// get the named time axis
@@ -1827,7 +1827,7 @@ ImageFrameSocketHandler::handle_imageframe_view_max_duration_update(const char*
this->decompose_imageframe_item_desc(msg, position, track_id, track_id_size, group_id, group_id_size, item_id, item_id_size) ;
- nframes_t max_duration = strtoul(get_message_part(position,ardourvis::TIME_VALUE_CHARS,msg).c_str(),0,10) ;
+ framecnt_t max_duration = strtoul(get_message_part(position,ardourvis::TIME_VALUE_CHARS,msg).c_str(),0,10) ;
position += ardourvis::TIME_VALUE_CHARS ;
int errcode ;
@@ -1915,7 +1915,7 @@ ImageFrameSocketHandler::handle_imageframe_view_min_duration_update(const char*
this->decompose_imageframe_item_desc(msg, position, track_id, track_id_size, group_id, group_id_size, item_id, item_id_size) ;
- nframes_t min_duration = strtoul(get_message_part(position,ardourvis::TIME_VALUE_CHARS,msg).c_str(),0,10) ;
+ framecnt_t min_duration = strtoul(get_message_part(position,ardourvis::TIME_VALUE_CHARS,msg).c_str(),0,10) ;
position += ardourvis::TIME_VALUE_CHARS ;
int errcode ;
diff --git a/gtk2_ardour/imageframe_time_axis_group.cc b/gtk2_ardour/imageframe_time_axis_group.cc
index 1bff9a1572..301d0d2fdd 100644
--- a/gtk2_ardour/imageframe_time_axis_group.cc
+++ b/gtk2_ardour/imageframe_time_axis_group.cc
@@ -198,7 +198,7 @@ ImageFrameTimeAxisGroup::apply_item_color(Gdk::Color& color)
* @param src the identity of the object that initiated the change
*/
ImageFrameView*
-ImageFrameTimeAxisGroup::add_imageframe_item(const string & frame_id, nframes_t start, nframes_t duration, unsigned char* rgb_data, uint32_t width, uint32_t height, uint32_t num_channels, void* src)
+ImageFrameTimeAxisGroup::add_imageframe_item(const string & frame_id, framepos_t start, framecnt_t duration, unsigned char* rgb_data, uint32_t width, uint32_t height, uint32_t num_channels, void* src)
{
ImageFrameView* ifv = 0;
diff --git a/gtk2_ardour/imageframe_time_axis_view.cc b/gtk2_ardour/imageframe_time_axis_view.cc
index b78ce58b08..bbec156efd 100644
--- a/gtk2_ardour/imageframe_time_axis_view.cc
+++ b/gtk2_ardour/imageframe_time_axis_view.cc
@@ -406,9 +406,8 @@ ImageFrameTimeAxisView::get_selected_imageframe_view() const
void
ImageFrameTimeAxisView::set_imageframe_duration_sec(double sec)
{
- if(selected_imageframe_group && selected_imageframe_view)
- {
- selected_imageframe_view->set_duration((nframes_t) (sec * _trackview.editor.session()->frame_rate()), this) ;
+ if (selected_imageframe_group && selected_imageframe_view) {
+ selected_imageframe_view->set_duration ((sec * _trackview.editor.session()->frame_rate()), this);
}
}
diff --git a/gtk2_ardour/imageframe_view.cc b/gtk2_ardour/imageframe_view.cc
index 04dde574c6..817088124c 100644
--- a/gtk2_ardour/imageframe_view.cc
+++ b/gtk2_ardour/imageframe_view.cc
@@ -60,8 +60,8 @@ ImageFrameView::ImageFrameView(const string & item_id,
ImageFrameTimeAxisGroup* item_group,
double spu,
Gdk::Color& basic_color,
- nframes_t start,
- nframes_t duration,
+ framepos_t start,
+ framecnt_t duration,
unsigned char* rgb_data,
uint32_t width,
uint32_t height,
diff --git a/gtk2_ardour/imageframe_view.h b/gtk2_ardour/imageframe_view.h
index ac8a3b3bb0..49b29038c4 100644
--- a/gtk2_ardour/imageframe_view.h
+++ b/gtk2_ardour/imageframe_view.h
@@ -65,8 +65,8 @@ class ImageFrameView : public TimeAxisViewItem
ImageFrameTimeAxisGroup* group,
double spu,
Gdk::Color& base_color,
- nframes_t start,
- nframes_t duration,
+ framepos_t start,
+ framecnt_t duration,
unsigned char* rgb_data,
uint32_t width,
uint32_t height,
diff --git a/gtk2_ardour/location_ui.cc b/gtk2_ardour/location_ui.cc
index aadbbfc5b7..0284921ba5 100644
--- a/gtk2_ardour/location_ui.cc
+++ b/gtk2_ardour/location_ui.cc
@@ -934,7 +934,7 @@ LocationUI::add_new_location()
string markername;
if (_session) {
- nframes_t where = _session->audible_frame();
+ framepos_t where = _session->audible_frame();
_session->locations()->next_available_name(markername,"mark");
Location *location = new Location (*_session, where, where, markername, Location::IsMark);
if (Config->get_name_new_markers()) {
@@ -956,7 +956,7 @@ LocationUI::add_new_range()
string rangename;
if (_session) {
- nframes_t where = _session->audible_frame();
+ framepos_t where = _session->audible_frame();
_session->locations()->next_available_name(rangename,"unnamed");
Location *location = new Location (*_session, where, where, rangename, Location::IsRangeMarker);
_session->begin_reversible_command (_("add range marker"));
diff --git a/gtk2_ardour/marker.cc b/gtk2_ardour/marker.cc
index ca4cfbf4c5..6f0898d5dc 100644
--- a/gtk2_ardour/marker.cc
+++ b/gtk2_ardour/marker.cc
@@ -46,7 +46,7 @@ using namespace Gtkmm2ext;
PBD::Signal1<void,Marker*> Marker::CatchDeletion;
Marker::Marker (PublicEditor& ed, ArdourCanvas::Group& parent, ArdourCanvas::Group& line_parent, guint32 rgba, const string& annotation,
- Type type, nframes_t frame, bool handle_events)
+ Type type, framepos_t frame, bool handle_events)
: editor (ed)
, _parent (&parent)
diff --git a/gtk2_ardour/marker.h b/gtk2_ardour/marker.h
index c17af63134..fbc7e18a50 100644
--- a/gtk2_ardour/marker.h
+++ b/gtk2_ardour/marker.h
@@ -57,7 +57,7 @@ class Marker : public sigc::trackable
Marker (PublicEditor& editor, ArdourCanvas::Group &, ArdourCanvas::Group &, guint32 rgba, const std::string& text, Type,
- nframes_t frame = 0, bool handle_events = true);
+ framepos_t frame = 0, bool handle_events = true);
virtual ~Marker ();
diff --git a/gtk2_ardour/marker_time_axis_view.cc b/gtk2_ardour/marker_time_axis_view.cc
index c901f9ba52..124aac0852 100644
--- a/gtk2_ardour/marker_time_axis_view.cc
+++ b/gtk2_ardour/marker_time_axis_view.cc
@@ -192,7 +192,7 @@ MarkerTimeAxisView::apply_color(Gdk::Color& color)
* @param src the identity of the object that initiated the change
*/
MarkerView*
-MarkerTimeAxisView::add_marker_view(ImageFrameView* ifv, std::string mark_type, std::string mark_id, nframes_t start, nframes_t dur, void* src)
+MarkerTimeAxisView::add_marker_view(ImageFrameView* ifv, std::string mark_type, std::string mark_id, framepos_t start, framecnt_t dur, void* src)
{
if(ifv->has_marker_view_item(mark_id))
{
@@ -335,7 +335,7 @@ MarkerTimeAxisView::set_marker_duration_sec(double sec)
{
if(get_selected_time_axis_item() != 0)
{
- get_selected_time_axis_item()->set_duration((nframes_t) (sec * _trackview.editor.session()->frame_rate()), this) ;
+ get_selected_time_axis_item()->set_duration((sec * _trackview.editor.session()->frame_rate()), this);
}
}
diff --git a/gtk2_ardour/marker_view.cc b/gtk2_ardour/marker_view.cc
index a0e8f2bbf0..4bd842341b 100644
--- a/gtk2_ardour/marker_view.cc
+++ b/gtk2_ardour/marker_view.cc
@@ -52,8 +52,8 @@ MarkerView::MarkerView(ArdourCanvas::Group *parent,
Gdk::Color& basic_color,
std::string mark_type,
std::string mark_id,
- nframes_t start,
- nframes_t duration)
+ framepos_t start,
+ framecnt_t duration)
: TimeAxisViewItem(mark_id, *parent,*tv,spu,basic_color,start,duration)
{
mark_type_text = mark_type ;
diff --git a/gtk2_ardour/midi_streamview.cc b/gtk2_ardour/midi_streamview.cc
index 293bb6503a..723b522202 100644
--- a/gtk2_ardour/midi_streamview.cc
+++ b/gtk2_ardour/midi_streamview.cc
@@ -437,7 +437,7 @@ MidiStreamView::setup_rec_box ()
// handle multi
- nframes_t start = 0;
+ framepos_t start = 0;
if (rec_regions.size() > 0) {
start = rec_regions.back().first->start()
+ _trackview.track()->get_captured_frames(rec_regions.size()-1);
diff --git a/gtk2_ardour/plugin_eq_gui.cc b/gtk2_ardour/plugin_eq_gui.cc
index a95c0891d0..21ec837992 100644
--- a/gtk2_ardour/plugin_eq_gui.cc
+++ b/gtk2_ardour/plugin_eq_gui.cc
@@ -35,6 +35,8 @@
#include <iostream>
#include <cmath>
+using namespace ARDOUR;
+
PluginEqGui::PluginEqGui(boost::shared_ptr<ARDOUR::PluginInsert> pluginInsert)
: _min_dB(-12.0),
_max_dB(+12.0),
@@ -315,8 +317,8 @@ PluginEqGui::run_impulse_analysis()
ARDOUR::ChanMapping in_map(_plugin->get_info()->n_inputs);
ARDOUR::ChanMapping out_map(_plugin->get_info()->n_outputs);
- _plugin->connect_and_run(_bufferset, in_map, out_map, _buffer_size, (nframes_t)0);
- nframes_t f = _plugin->signal_latency();
+ _plugin->connect_and_run(_bufferset, in_map, out_map, _buffer_size, 0);
+ framecnt_t f = _plugin->signal_latency ();
// Adding user_latency() could be interesting
// Gather all output, taking latency into account.
@@ -338,8 +340,8 @@ PluginEqGui::run_impulse_analysis()
} else {
//int C = 0;
//std::cerr << (++C) << ": latency is " << f << " frames, doing split processing.." << std::endl;
- nframes_t target_offset = 0;
- nframes_t frames_left = _buffer_size; // refaktoroi
+ framecnt_t target_offset = 0;
+ framecnt_t frames_left = _buffer_size; // refaktoroi
do {
if (f >= _buffer_size) {
//std::cerr << (++C) << ": f (=" << f << ") is larger than buffer_size, still trying to reach the actual output" << std::endl;
@@ -351,7 +353,7 @@ PluginEqGui::run_impulse_analysis()
// we start at output offset "f"
// .. and copy "buffer size" - "f" - "offset" frames
- nframes_t length = _buffer_size - f - target_offset;
+ framecnt_t length = _buffer_size - f - target_offset;
//std::cerr << (++C) << ": copying " << length << " frames to _collect_bufferset.get_audio(i)+" << target_offset << " from bufferset at offset " << f << std::endl;
for (uint32_t i = 0; i < outputs; ++i) {
@@ -374,7 +376,7 @@ PluginEqGui::run_impulse_analysis()
in_map = ARDOUR::ChanMapping(_plugin->get_info()->n_inputs);
out_map = ARDOUR::ChanMapping(_plugin->get_info()->n_outputs);
- _plugin->connect_and_run(_bufferset, in_map, out_map, _buffer_size, (nframes_t)0);
+ _plugin->connect_and_run(_bufferset, in_map, out_map, _buffer_size, 0);
}
} while ( frames_left > 0);
diff --git a/gtk2_ardour/plugin_eq_gui.h b/gtk2_ardour/plugin_eq_gui.h
index 26a0777ba3..24ffd45656 100644
--- a/gtk2_ardour/plugin_eq_gui.h
+++ b/gtk2_ardour/plugin_eq_gui.h
@@ -89,8 +89,8 @@ class PluginEqGui : public Gtk::Table
float _log_coeff;
float _log_max;
- nframes_t _buffer_size;
- nframes_t _signal_buffer_size;
+ ARDOUR::framecnt_t _buffer_size;
+ ARDOUR::framecnt_t _signal_buffer_size;
// buffers
ARDOUR::BufferSet _bufferset;
diff --git a/gtk2_ardour/plugin_ui.cc b/gtk2_ardour/plugin_ui.cc
index b08b5a3a0f..ce36b8a414 100644
--- a/gtk2_ardour/plugin_ui.cc
+++ b/gtk2_ardour/plugin_ui.cc
@@ -471,8 +471,8 @@ void
PlugUIBase::set_latency_label ()
{
char buf[64];
- nframes_t l = insert->effective_latency ();
- nframes_t sr = insert->session().frame_rate();
+ framecnt_t const l = insert->effective_latency ();
+ framecnt_t const sr = insert->session().frame_rate ();
if (l < sr / 1000) {
snprintf (buf, sizeof (buf), "latency (%d samples)", l);
diff --git a/gtk2_ardour/port_insert_ui.cc b/gtk2_ardour/port_insert_ui.cc
index 84d2eea155..5546fd533b 100644
--- a/gtk2_ardour/port_insert_ui.cc
+++ b/gtk2_ardour/port_insert_ui.cc
@@ -71,7 +71,7 @@ PortInsertUI::PortInsertUI (Gtk::Window* parent, ARDOUR::Session* sess, boost::s
void
PortInsertUI::update_latency_display ()
{
- nframes_t sample_rate = input_selector.session()->engine().frame_rate();
+ framecnt_t const sample_rate = input_selector.session()->engine().frame_rate();
if (sample_rate == 0) {
latency_display.set_text (_("Disconnected from audio engine"));
} else {
@@ -98,7 +98,7 @@ PortInsertUI::check_latency_measurement ()
}
char buf[128];
- nframes_t sample_rate = AudioEngine::instance()->frame_rate();
+ framecnt_t const sample_rate = AudioEngine::instance()->frame_rate();
if (sample_rate == 0) {
latency_display.set_text (_("Disconnected from audio engine"));
@@ -121,7 +121,7 @@ PortInsertUI::check_latency_measurement ()
}
if (solid) {
- _pi->set_measured_latency ((nframes_t) rint (mtdm->del()));
+ _pi->set_measured_latency (rint (mtdm->del()));
latency_button.set_active (false);
strcat (buf, " (set)");
}
diff --git a/gtk2_ardour/public_editor.h b/gtk2_ardour/public_editor.h
index 1be9879cd7..f0c2ca3f91 100644
--- a/gtk2_ardour/public_editor.h
+++ b/gtk2_ardour/public_editor.h
@@ -196,10 +196,6 @@ class PublicEditor : public Gtk::Window, public PBD::StatefulDestructible {
virtual void transition_to_rolling (bool fwd) = 0;
virtual framepos_t unit_to_frame (double unit) const = 0;
- // XXX remove me when libardour goes framepos_t
- double frame_to_unit (nframes_t frame) const {
- return frame_to_unit ((framepos_t) frame);
- }
virtual double frame_to_unit (framepos_t frame) const = 0;
virtual double frame_to_unit (double frame) const = 0;
virtual framepos_t pixel_to_frame (double pixel) const = 0;
diff --git a/gtk2_ardour/region_editor.cc b/gtk2_ardour/region_editor.cc
index 61e2939c09..c95d9bbd20 100755
--- a/gtk2_ardour/region_editor.cc
+++ b/gtk2_ardour/region_editor.cc
@@ -291,7 +291,7 @@ RegionEditor::end_clock_changed ()
void
RegionEditor::length_clock_changed ()
{
- nframes_t frames = length_clock.current_time();
+ framecnt_t frames = length_clock.current_time();
_session->begin_reversible_command (_("change region length"));
@@ -343,7 +343,7 @@ RegionEditor::bounds_changed (const PropertyChange& what_changed)
if (what_changed.contains (ARDOUR::Properties::sync_position) || what_changed.contains (ARDOUR::Properties::position)) {
int dir;
- nframes_t off = _region->sync_offset (dir);
+ frameoffset_t off = _region->sync_offset (dir);
if (dir == -1) {
off = -off;
}
diff --git a/gtk2_ardour/region_view.cc b/gtk2_ardour/region_view.cc
index d722976861..51ec002931 100644
--- a/gtk2_ardour/region_view.cc
+++ b/gtk2_ardour/region_view.cc
@@ -468,7 +468,7 @@ void
RegionView::region_sync_changed ()
{
int sync_dir;
- nframes_t sync_offset;
+ framecnt_t sync_offset;
sync_offset = _region->sync_offset (sync_dir);
@@ -595,7 +595,7 @@ RegionView::set_height (double h)
if (sync_line) {
Points points;
int sync_dir;
- nframes_t sync_offset;
+ framecnt_t sync_offset;
sync_offset = _region->sync_offset (sync_dir);
double offset = sync_offset / samples_per_unit;
@@ -631,9 +631,9 @@ RegionView::update_coverage_frames (LayerDisplay d)
return;
}
- nframes_t const position = _region->first_frame ();
- nframes_t t = position;
- nframes_t const end = _region->last_frame ();
+ framepos_t const position = _region->first_frame ();
+ framepos_t t = position;
+ framepos_t const end = _region->last_frame ();
ArdourCanvas::SimpleRect* cr = 0;
bool me = false;
diff --git a/gtk2_ardour/route_params_ui.cc b/gtk2_ardour/route_params_ui.cc
index d947fbeb15..1cba72ebda 100644
--- a/gtk2_ardour/route_params_ui.cc
+++ b/gtk2_ardour/route_params_ui.cc
@@ -260,7 +260,7 @@ RouteParams_UI::refresh_latency ()
latency_widget->refresh();
char buf[128];
- snprintf (buf, sizeof (buf), _("Playback delay: %u samples"), _route->initial_delay());
+ snprintf (buf, sizeof (buf), _("Playback delay: %" PRId64 " samples"), _route->initial_delay());
delay_label.set_text (buf);
}
}
@@ -288,7 +288,7 @@ RouteParams_UI::setup_latency_frame ()
latency_widget = new LatencyGUI (*(_route->output()), _session->frame_rate(), _session->engine().frames_per_cycle());
char buf[128];
- snprintf (buf, sizeof (buf), _("Playback delay: %u samples"), _route->initial_delay());
+ snprintf (buf, sizeof (buf), _("Playback delay: %" PRId64 " samples"), _route->initial_delay());
delay_label.set_text (buf);
latency_packer.pack_start (*latency_widget, false, false);
diff --git a/gtk2_ardour/route_time_axis.cc b/gtk2_ardour/route_time_axis.cc
index 31966681df..b6cea2a11a 100644
--- a/gtk2_ardour/route_time_axis.cc
+++ b/gtk2_ardour/route_time_axis.cc
@@ -672,7 +672,7 @@ RouteTimeAxisView::track_mode_changed ()
}
void
-RouteTimeAxisView::show_timestretch (nframes_t start, nframes_t end)
+RouteTimeAxisView::show_timestretch (framepos_t start, framepos_t end)
{
double x1;
double x2;
@@ -1208,8 +1208,8 @@ RouteTimeAxisView::get_selectables (framepos_t start, framepos_t end, double top
speed = track()->speed();
}
- nframes_t start_adjusted = session_frame_to_track_frame(start, speed);
- nframes_t end_adjusted = session_frame_to_track_frame(end, speed);
+ framepos_t const start_adjusted = session_frame_to_track_frame(start, speed);
+ framepos_t const end_adjusted = session_frame_to_track_frame(end, speed);
if ((_view && ((top < 0.0 && bot < 0.0))) || touched (top, bot)) {
_view->get_selectables (start_adjusted, end_adjusted, top, bot, results);
@@ -1295,7 +1295,7 @@ RouteTimeAxisView::name_entry_changed ()
}
boost::shared_ptr<Region>
-RouteTimeAxisView::find_next_region (nframes_t pos, RegionPoint point, int32_t dir)
+RouteTimeAxisView::find_next_region (framepos_t pos, RegionPoint point, int32_t dir)
{
boost::shared_ptr<Playlist> pl = playlist ();
diff --git a/gtk2_ardour/route_time_axis.h b/gtk2_ardour/route_time_axis.h
index edc752d630..8515f375b9 100644
--- a/gtk2_ardour/route_time_axis.h
+++ b/gtk2_ardour/route_time_axis.h
@@ -78,7 +78,7 @@ public:
void set_samples_per_unit (double);
void set_height (uint32_t h);
- void show_timestretch (nframes_t start, nframes_t end);
+ void show_timestretch (framepos_t start, framepos_t end);
void hide_timestretch ();
void selection_click (GdkEventButton*);
void set_selected_points (PointSelection&);
@@ -88,7 +88,7 @@ public:
void set_layer_display (LayerDisplay d);
LayerDisplay layer_display () const;
- boost::shared_ptr<ARDOUR::Region> find_next_region (nframes_t pos, ARDOUR::RegionPoint, int32_t dir);
+ boost::shared_ptr<ARDOUR::Region> find_next_region (framepos_t pos, ARDOUR::RegionPoint, int32_t dir);
framepos_t find_next_region_boundary (framepos_t pos, int32_t dir);
/* Editing operations */
@@ -232,7 +232,7 @@ protected:
virtual void show_existing_automation ();
virtual void hide_all_automation ();
- void timestretch (nframes_t start, nframes_t end);
+ void timestretch (framepos_t start, framepos_t end);
void speed_changed ();
diff --git a/gtk2_ardour/selection.cc b/gtk2_ardour/selection.cc
index 63ece47e6a..b135593a62 100644
--- a/gtk2_ardour/selection.cc
+++ b/gtk2_ardour/selection.cc
@@ -304,7 +304,7 @@ Selection::toggle (vector<RegionView*>& r)
}
long
-Selection::toggle (nframes_t start, nframes_t end)
+Selection::toggle (framepos_t start, framepos_t end)
{
AudioRangeComparator cmp;
@@ -462,7 +462,7 @@ Selection::add (MidiRegionView* mrv)
}
long
-Selection::add (nframes_t start, nframes_t end)
+Selection::add (framepos_t start, framepos_t end)
{
AudioRangeComparator cmp;
@@ -478,7 +478,7 @@ Selection::add (nframes_t start, nframes_t end)
}
void
-Selection::replace (uint32_t sid, nframes_t start, nframes_t end)
+Selection::replace (uint32_t sid, framepos_t start, framepos_t end)
{
for (list<AudioRange>::iterator i = time.begin(); i != time.end(); ++i) {
if ((*i).id == sid) {
@@ -654,7 +654,7 @@ Selection::remove (uint32_t selection_id)
}
void
-Selection::remove (nframes_t /*start*/, nframes_t /*end*/)
+Selection::remove (framepos_t /*start*/, framepos_t /*end*/)
{
}
@@ -744,7 +744,7 @@ Selection::set (vector<RegionView*>& v)
* the list of tracks it applies to.
*/
long
-Selection::set (nframes_t start, nframes_t end)
+Selection::set (framepos_t start, framepos_t end)
{
if ((start == 0 && end == 0) || end < start) {
return 0;
diff --git a/gtk2_ardour/selection.h b/gtk2_ardour/selection.h
index 81bb54b9df..0a73ae275e 100644
--- a/gtk2_ardour/selection.h
+++ b/gtk2_ardour/selection.h
@@ -121,7 +121,7 @@ class Selection : public sigc::trackable, public PBD::ScopedConnectionList
void set (RegionView*, bool also_clear_tracks = true);
void set (MidiRegionView*);
void set (std::vector<RegionView*>&);
- long set (nframes_t, nframes_t);
+ long set (framepos_t, framepos_t);
void set (boost::shared_ptr<Evoral::ControlList>);
void set (boost::shared_ptr<ARDOUR::Playlist>);
void set (const std::list<boost::shared_ptr<ARDOUR::Playlist> >&);
@@ -136,7 +136,7 @@ class Selection : public sigc::trackable, public PBD::ScopedConnectionList
void toggle (MidiRegionView*);
void toggle (MidiCutBuffer*);
void toggle (std::vector<RegionView*>&);
- long toggle (nframes_t, nframes_t);
+ long toggle (framepos_t, framepos_t);
void toggle (ARDOUR::AutomationList*);
void toggle (boost::shared_ptr<ARDOUR::Playlist>);
void toggle (const std::list<boost::shared_ptr<ARDOUR::Playlist> >&);
@@ -151,7 +151,7 @@ class Selection : public sigc::trackable, public PBD::ScopedConnectionList
void add (MidiRegionView*);
void add (MidiCutBuffer*);
void add (std::vector<RegionView*>&);
- long add (nframes_t, nframes_t);
+ long add (framepos_t, framepos_t);
void add (boost::shared_ptr<Evoral::ControlList>);
void add (boost::shared_ptr<ARDOUR::Playlist>);
void add (const std::list<boost::shared_ptr<ARDOUR::Playlist> >&);
@@ -167,14 +167,14 @@ class Selection : public sigc::trackable, public PBD::ScopedConnectionList
void remove (MidiRegionView*);
void remove (MidiCutBuffer*);
void remove (uint32_t selection_id);
- void remove (nframes_t, nframes_t);
+ void remove (framepos_t, framepos_t);
void remove (boost::shared_ptr<ARDOUR::AutomationList>);
void remove (boost::shared_ptr<ARDOUR::Playlist>);
void remove (const std::list<boost::shared_ptr<ARDOUR::Playlist> >&);
void remove (const std::list<Selectable*>&);
void remove (Marker*);
- void replace (uint32_t time_index, nframes_t start, nframes_t end);
+ void replace (uint32_t time_index, framepos_t start, framepos_t end);
void clear_regions();
void clear_tracks ();
diff --git a/gtk2_ardour/sfdb_ui.cc b/gtk2_ardour/sfdb_ui.cc
index aed3d52089..bd19db31f0 100644
--- a/gtk2_ardour/sfdb_ui.cc
+++ b/gtk2_ardour/sfdb_ui.cc
@@ -268,7 +268,7 @@ SoundFileBox::setup_labels (const string& filename)
samplerate.set_name ("NewSessionSR2Label");
}
- nframes_t const nfr = _session ? _session->nominal_frame_rate() : 25;
+ framecnt_t const nfr = _session ? _session->nominal_frame_rate() : 25;
double src_coef = (double) nfr / sf_info.samplerate;
length_clock.set (sf_info.length * src_coef + 0.5, true);
@@ -1128,7 +1128,7 @@ SoundFileOmega::check_info (const vector<string>& paths, bool& same_size, bool&
}
}
- if ((nframes_t) info.samplerate != _session->frame_rate()) {
+ if (info.samplerate != _session->frame_rate()) {
src_needed = true;
}
diff --git a/gtk2_ardour/step_editor.cc b/gtk2_ardour/step_editor.cc
index 5e7969bb3a..c4d62def90 100644
--- a/gtk2_ardour/step_editor.cc
+++ b/gtk2_ardour/step_editor.cc
@@ -158,14 +158,14 @@ StepEditor::stop_step_editing ()
void
StepEditor::check_step_edit ()
{
- MidiRingBuffer<nframes_t>& incoming (_track->step_edit_ring_buffer());
+ MidiRingBuffer<framepos_t>& incoming (_track->step_edit_ring_buffer());
uint8_t* buf;
uint32_t bufsize = 32;
buf = new uint8_t[bufsize];
while (incoming.read_space()) {
- nframes_t time;
+ framepos_t time;
Evoral::EventType type;
uint32_t size;
diff --git a/gtk2_ardour/streamview.h b/gtk2_ardour/streamview.h
index 366bc8d4bf..769255408a 100644
--- a/gtk2_ardour/streamview.h
+++ b/gtk2_ardour/streamview.h
@@ -43,9 +43,9 @@ namespace ARDOUR {
}
struct RecBoxInfo {
- ArdourCanvas::SimpleRect* rectangle;
- nframes_t start;
- nframes_t length;
+ ArdourCanvas::SimpleRect* rectangle;
+ framepos_t start;
+ ARDOUR::framecnt_t length;
};
class Selectable;
@@ -171,7 +171,7 @@ protected:
double height;
PBD::ScopedConnectionList rec_data_ready_connections;
- nframes_t last_rec_data_frame;
+ framepos_t last_rec_data_frame;
/* When recording, the session time at which a new layer must be created for the region
being recorded, or max_framepos if not applicable.
diff --git a/gtk2_ardour/strip_silence_dialog.cc b/gtk2_ardour/strip_silence_dialog.cc
index c43a962e4d..9103f72cba 100644
--- a/gtk2_ardour/strip_silence_dialog.cc
+++ b/gtk2_ardour/strip_silence_dialog.cc
@@ -493,13 +493,13 @@ StripSilenceDialog::update_stats (const SilenceResult& res)
}
}
-nframes_t
+framecnt_t
StripSilenceDialog::minimum_length () const
{
return _minimum_length.current_duration (_waves.front()->region->position());
}
-nframes_t
+framecnt_t
StripSilenceDialog::fade_length () const
{
return _minimum_length.current_duration (_waves.front()->region->position());
diff --git a/gtk2_ardour/strip_silence_dialog.h b/gtk2_ardour/strip_silence_dialog.h
index 15e6b206c1..625e9b65fd 100644
--- a/gtk2_ardour/strip_silence_dialog.h
+++ b/gtk2_ardour/strip_silence_dialog.h
@@ -41,8 +41,8 @@ public:
return _threshold.get_value ();
}
- nframes_t minimum_length () const;
- nframes_t fade_length () const;
+ ARDOUR::framecnt_t minimum_length () const;
+ ARDOUR::framecnt_t fade_length () const;
private:
typedef std::list<std::pair<ARDOUR::frameoffset_t,ARDOUR::framecnt_t> > SilenceResult;
diff --git a/gtk2_ardour/tempo_dialog.cc b/gtk2_ardour/tempo_dialog.cc
index 71fd5b40b4..1190251fa1 100644
--- a/gtk2_ardour/tempo_dialog.cc
+++ b/gtk2_ardour/tempo_dialog.cc
@@ -33,7 +33,7 @@ using namespace Gtkmm2ext;
using namespace ARDOUR;
using namespace PBD;
-TempoDialog::TempoDialog (TempoMap& map, nframes_t frame, const string & action)
+TempoDialog::TempoDialog (TempoMap& map, framepos_t frame, const string & action)
: ArdourDialog (_("New Tempo")),
bpm_adjustment (60.0, 1.0, 999.9, 0.1, 1.0),
bpm_spinner (bpm_adjustment),
@@ -239,7 +239,7 @@ TempoDialog::note_types_change ()
}
-MeterDialog::MeterDialog (TempoMap& map, nframes_t frame, const string & action)
+MeterDialog::MeterDialog (TempoMap& map, framepos_t frame, const string & action)
: ArdourDialog ("New Meter"),
ok_button (action),
cancel_button (_("Cancel"))
diff --git a/gtk2_ardour/tempo_dialog.h b/gtk2_ardour/tempo_dialog.h
index c1a88367ca..ebb700e3e9 100644
--- a/gtk2_ardour/tempo_dialog.h
+++ b/gtk2_ardour/tempo_dialog.h
@@ -38,7 +38,7 @@
class TempoDialog : public ArdourDialog
{
public:
- TempoDialog (ARDOUR::TempoMap&, nframes_t, const std::string & action);
+ TempoDialog (ARDOUR::TempoMap&, framepos_t, const std::string & action);
TempoDialog (ARDOUR::TempoSection&, const std::string & action);
double get_bpm ();
@@ -70,7 +70,7 @@ class MeterDialog : public ArdourDialog
{
public:
- MeterDialog (ARDOUR::TempoMap&, nframes_t, const std::string & action);
+ MeterDialog (ARDOUR::TempoMap&, framepos_t, const std::string & action);
MeterDialog (ARDOUR::MeterSection&, const std::string & action);
double get_bpb ();
diff --git a/gtk2_ardour/time_axis_view.cc b/gtk2_ardour/time_axis_view.cc
index 29cb3e613b..a206b1a231 100644
--- a/gtk2_ardour/time_axis_view.cc
+++ b/gtk2_ardour/time_axis_view.cc
@@ -672,7 +672,7 @@ TimeAxisView::set_samples_per_unit (double spu)
}
void
-TimeAxisView::show_timestretch (nframes_t start, nframes_t end)
+TimeAxisView::show_timestretch (framepos_t start, framepos_t end)
{
for (Children::iterator i = children.begin(); i != children.end(); ++i) {
(*i)->show_timestretch (start, end);
@@ -714,7 +714,8 @@ TimeAxisView::show_selection (TimeSelection& ts)
selection_group->raise_to_top();
for (list<AudioRange>::iterator i = ts.begin(); i != ts.end(); ++i) {
- nframes_t start, end, cnt;
+ framepos_t start, end;
+ framecnt_t cnt;
start = (*i).start;
end = (*i).end;
diff --git a/gtk2_ardour/time_axis_view.h b/gtk2_ardour/time_axis_view.h
index 94d3bb16ce..b376ba2aba 100644
--- a/gtk2_ardour/time_axis_view.h
+++ b/gtk2_ardour/time_axis_view.h
@@ -169,7 +169,7 @@ class TimeAxisView : public virtual AxisView, public PBD::Stateful
virtual void show_selection (TimeSelection&);
virtual void hide_selection ();
virtual void reshow_selection (TimeSelection&);
- virtual void show_timestretch (nframes_t start, nframes_t end);
+ virtual void show_timestretch (framepos_t start, framepos_t end);
virtual void hide_timestretch ();
virtual void hide_dependent_views (TimeAxisViewItem&) {}
@@ -183,7 +183,7 @@ class TimeAxisView : public virtual AxisView, public PBD::Stateful
virtual void set_selected_regionviews (RegionSelection&) {}
virtual void set_selected_points (PointSelection&) {}
- virtual boost::shared_ptr<ARDOUR::Region> find_next_region (nframes_t /*pos*/, ARDOUR::RegionPoint, int32_t /*dir*/) {
+ virtual boost::shared_ptr<ARDOUR::Region> find_next_region (framepos_t /*pos*/, ARDOUR::RegionPoint, int32_t /*dir*/) {
return boost::shared_ptr<ARDOUR::Region> ();
}
diff --git a/gtk2_ardour/visual_time_axis.cc b/gtk2_ardour/visual_time_axis.cc
index 23daba7f7f..10c8513ec8 100644
--- a/gtk2_ardour/visual_time_axis.cc
+++ b/gtk2_ardour/visual_time_axis.cc
@@ -409,15 +409,15 @@ VisualTimeAxis::name_entry_key_release_handler(GdkEventKey* ev)
// Super class methods not handled by VisualTimeAxis
void
-VisualTimeAxis::show_timestretch (nframes_t start, nframes_t end)
+VisualTimeAxis::show_timestretch (framepos_t start, framepos_t end)
{
- // Not handled by purely visual TimeAxis
+ // Not handled by purely visual TimeAxis
}
void
VisualTimeAxis::hide_timestretch()
{
- // Not handled by purely visual TimeAxis
+ // Not handled by purely visual TimeAxis
}
diff --git a/libs/ardour/amp.cc b/libs/ardour/amp.cc
index 7f0b397703..230b9f0d6b 100644
--- a/libs/ardour/amp.cc
+++ b/libs/ardour/amp.cc
@@ -71,7 +71,7 @@ Amp::configure_io (ChanCount in, ChanCount out)
}
void
-Amp::run (BufferSet& bufs, framepos_t /*start_frame*/, framepos_t /*end_frame*/, nframes_t nframes, bool)
+Amp::run (BufferSet& bufs, framepos_t /*start_frame*/, framepos_t /*end_frame*/, pframes_t nframes, bool)
{
if (!_active && !_pending_active) {
return;
@@ -85,7 +85,7 @@ Amp::run (BufferSet& bufs, framepos_t /*start_frame*/, framepos_t /*end_frame*/,
for (BufferSet::audio_iterator i = bufs.audio_begin(); i != bufs.audio_end(); ++i) {
Sample* const sp = i->data();
- for (nframes_t nx = 0; nx < nframes; ++nx) {
+ for (pframes_t nx = 0; nx < nframes; ++nx) {
sp[nx] *= gab[nx];
}
}
@@ -129,7 +129,7 @@ Amp::run (BufferSet& bufs, framepos_t /*start_frame*/, framepos_t /*end_frame*/,
}
void
-Amp::apply_gain (BufferSet& bufs, nframes_t nframes, gain_t initial, gain_t target)
+Amp::apply_gain (BufferSet& bufs, framecnt_t nframes, gain_t initial, gain_t target)
{
/** Apply a (potentially) declicked gain to the buffers of @a bufs
*/
@@ -144,7 +144,7 @@ Amp::apply_gain (BufferSet& bufs, nframes_t nframes, gain_t initial, gain_t targ
return;
}
- const nframes_t declick = std::min ((nframes_t)128, nframes);
+ const framecnt_t declick = std::min ((framecnt_t) 128, nframes);
gain_t delta;
double fractional_shift = -1.0/declick;
double fractional_pos;
@@ -180,7 +180,7 @@ Amp::apply_gain (BufferSet& bufs, nframes_t nframes, gain_t initial, gain_t targ
fractional_pos = 1.0;
- for (nframes_t nx = 0; nx < declick; ++nx) {
+ for (pframes_t nx = 0; nx < declick; ++nx) {
buffer[nx] *= (initial + (delta * (0.5 + 0.5 * cos (M_PI * fractional_pos))));
fractional_pos += fractional_shift;
}
@@ -199,7 +199,7 @@ Amp::apply_gain (BufferSet& bufs, nframes_t nframes, gain_t initial, gain_t targ
}
void
-Amp::declick (BufferSet& bufs, nframes_t nframes, int dir)
+Amp::declick (BufferSet& bufs, framecnt_t nframes, int dir)
{
/* Almost exactly like ::apply_gain() but skips MIDI buffers and has fixed initial+target
values.
@@ -209,7 +209,7 @@ Amp::declick (BufferSet& bufs, nframes_t nframes, int dir)
return;
}
- const nframes_t declick = std::min ((nframes_t)128, nframes);
+ const framecnt_t declick = std::min ((framecnt_t) 128, nframes);
gain_t delta, initial, target;
double fractional_shift = -1.0/declick;
double fractional_pos;
@@ -233,7 +233,7 @@ Amp::declick (BufferSet& bufs, nframes_t nframes, int dir)
fractional_pos = 1.0;
- for (nframes_t nx = 0; nx < declick; ++nx) {
+ for (pframes_t nx = 0; nx < declick; ++nx) {
buffer[nx] *= (initial + (delta * (0.5 + 0.5 * cos (M_PI * fractional_pos))));
fractional_pos += fractional_shift;
}
@@ -252,7 +252,7 @@ Amp::declick (BufferSet& bufs, nframes_t nframes, int dir)
}
void
-Amp::apply_gain (AudioBuffer& buf, nframes_t nframes, gain_t initial, gain_t target)
+Amp::apply_gain (AudioBuffer& buf, framecnt_t nframes, gain_t initial, gain_t target)
{
/** Apply a (potentially) declicked gain to the contents of @a buf
*/
@@ -267,7 +267,7 @@ Amp::apply_gain (AudioBuffer& buf, nframes_t nframes, gain_t initial, gain_t tar
return;
}
- const nframes_t declick = std::min ((nframes_t)128, nframes);
+ const framecnt_t declick = std::min ((framecnt_t) 128, nframes);
gain_t delta;
double fractional_shift = -1.0/declick;
double fractional_pos;
@@ -285,7 +285,7 @@ Amp::apply_gain (AudioBuffer& buf, nframes_t nframes, gain_t initial, gain_t tar
fractional_pos = 1.0;
- for (nframes_t nx = 0; nx < declick; ++nx) {
+ for (pframes_t nx = 0; nx < declick; ++nx) {
buffer[nx] *= (initial + (delta * (0.5 + 0.5 * cos (M_PI * fractional_pos))));
fractional_pos += fractional_shift;
}
@@ -303,7 +303,7 @@ Amp::apply_gain (AudioBuffer& buf, nframes_t nframes, gain_t initial, gain_t tar
}
void
-Amp::apply_simple_gain (BufferSet& bufs, nframes_t nframes, gain_t target)
+Amp::apply_simple_gain (BufferSet& bufs, framecnt_t nframes, gain_t target)
{
if (target == 0.0) {
@@ -342,7 +342,7 @@ Amp::apply_simple_gain (BufferSet& bufs, nframes_t nframes, gain_t target)
}
void
-Amp::apply_simple_gain (AudioBuffer& buf, nframes_t nframes, gain_t target)
+Amp::apply_simple_gain (AudioBuffer& buf, framecnt_t nframes, gain_t target)
{
if (target == 0.0) {
memset (buf.data(), 0, sizeof (Sample) * nframes);
@@ -412,8 +412,9 @@ void
Amp::GainControl::set_value (double val)
{
// max gain at about +6dB (10.0 ^ ( 6 dB * 0.05))
- if (val > 1.99526231f)
+ if (val > 1.99526231f) {
val = 1.99526231f;
+ }
_amp->set_gain (val, this);
@@ -427,7 +428,7 @@ Amp::GainControl::get_value (void) const
}
void
-Amp::setup_gain_automation (framepos_t start_frame, framepos_t end_frame, nframes_t nframes)
+Amp::setup_gain_automation (framepos_t start_frame, framepos_t end_frame, framecnt_t nframes)
{
Glib::Mutex::Lock am (control_lock(), Glib::TRY_LOCK);
diff --git a/libs/ardour/ardour/amp.h b/libs/ardour/ardour/amp.h
index 0ec493e8ce..711cc5489f 100644
--- a/libs/ardour/ardour/amp.h
+++ b/libs/ardour/ardour/amp.h
@@ -43,12 +43,12 @@ public:
bool can_support_io_configuration (const ChanCount& in, ChanCount& out) const;
bool configure_io (ChanCount in, ChanCount out);
- void run (BufferSet& bufs, framepos_t start_frame, framepos_t end_frame, nframes_t nframes, bool);
+ void run (BufferSet& bufs, framepos_t start_frame, framepos_t end_frame, pframes_t nframes, bool);
- bool apply_gain() const { return _apply_gain; }
- void apply_gain(bool yn) { _apply_gain = yn; }
+ bool apply_gain () const { return _apply_gain; }
+ void apply_gain (bool yn) { _apply_gain = yn; }
- void setup_gain_automation (framepos_t start_frame, framepos_t end_frame, nframes_t nframes);
+ void setup_gain_automation (framepos_t start_frame, framepos_t end_frame, framecnt_t nframes);
bool apply_gain_automation() const { return _apply_gain_automation; }
void apply_gain_automation(bool yn) { _apply_gain_automation = yn; }
@@ -56,13 +56,13 @@ public:
XMLNode& state (bool full);
int set_state (const XMLNode&, int version);
- static void apply_gain (BufferSet& bufs, nframes_t nframes, gain_t initial, gain_t target);
- static void apply_simple_gain(BufferSet& bufs, nframes_t nframes, gain_t target);
+ static void apply_gain (BufferSet& bufs, framecnt_t nframes, gain_t initial, gain_t target);
+ static void apply_simple_gain(BufferSet& bufs, framecnt_t nframes, gain_t target);
- static void apply_gain (AudioBuffer& buf, nframes_t nframes, gain_t initial, gain_t target);
- static void apply_simple_gain(AudioBuffer& buf, nframes_t nframes, gain_t target);
+ static void apply_gain (AudioBuffer& buf, framecnt_t nframes, gain_t initial, gain_t target);
+ static void apply_simple_gain(AudioBuffer& buf, framecnt_t nframes, gain_t target);
- static void declick (BufferSet& bufs, nframes_t nframes, int dir);
+ static void declick (BufferSet& bufs, framecnt_t nframes, int dir);
gain_t gain () const { return _gain_control->user_double(); }
diff --git a/libs/ardour/ardour/audio_buffer.h b/libs/ardour/ardour/audio_buffer.h
index 65eb38d6db..6c5a0a0832 100644
--- a/libs/ardour/ardour/audio_buffer.h
+++ b/libs/ardour/ardour/audio_buffer.h
@@ -30,7 +30,7 @@ public:
AudioBuffer(size_t capacity);
~AudioBuffer();
- void silence (nframes_t len, nframes_t offset = 0) {
+ void silence (framecnt_t len, framecnt_t offset = 0) {
if (!_silent) {
assert(_capacity > 0);
assert(offset + len <= _capacity);
@@ -43,7 +43,7 @@ public:
}
/** Read @a len frames @a src starting at @a src_offset into self starting at @ dst_offset*/
- void read_from (const Buffer& src, nframes_t len, nframes_t dst_offset = 0, nframes_t src_offset = 0) {
+ void read_from (const Buffer& src, framecnt_t len, framecnt_t dst_offset = 0, framecnt_t src_offset = 0) {
assert(&src != this);
assert(_capacity > 0);
assert(src.type() == DataType::AUDIO);
@@ -58,14 +58,14 @@ public:
}
/** Acumulate (add) @a len frames @a src starting at @a src_offset into self starting at @ dst_offset*/
- void merge_from (const Buffer& src, nframes_t len, nframes_t dst_offset = 0, nframes_t src_offset = 0) {
+ void merge_from (const Buffer& src, framecnt_t len, framecnt_t dst_offset = 0, framecnt_t src_offset = 0) {
const AudioBuffer* ab = dynamic_cast<const AudioBuffer*>(&src);
assert (ab);
accumulate_from (*ab, len, dst_offset, src_offset);
}
/** Acumulate (add) @a len frames @a src starting at @a src_offset into self starting at @ dst_offset*/
- void accumulate_from (const AudioBuffer& src, nframes_t len, nframes_t dst_offset = 0, nframes_t src_offset = 0) {
+ void accumulate_from (const AudioBuffer& src, framecnt_t len, framecnt_t dst_offset = 0, framecnt_t src_offset = 0) {
assert(_capacity > 0);
assert(len <= _capacity);
@@ -80,7 +80,7 @@ public:
/** Acumulate (add) @a len frames @a src starting at @a src_offset into self starting at @ dst_offset
* scaling by @a gain_coeff */
- void accumulate_with_gain_from (const AudioBuffer& src, nframes_t len, gain_t gain_coeff, nframes_t dst_offset = 0, nframes_t src_offset = 0) {
+ void accumulate_with_gain_from (const AudioBuffer& src, framecnt_t len, gain_t gain_coeff, framecnt_t dst_offset = 0, framecnt_t src_offset = 0) {
assert(_capacity > 0);
assert(len <= _capacity);
@@ -100,7 +100,7 @@ public:
/** Accumulate (add) @a len frames FROM THE START OF @a src into self
* scaling by @a gain_coeff */
- void accumulate_with_gain_from (const Sample* src_raw, nframes_t len, gain_t gain_coeff, nframes_t dst_offset = 0) {
+ void accumulate_with_gain_from (const Sample* src_raw, framecnt_t len, gain_t gain_coeff, framecnt_t dst_offset = 0) {
assert(_capacity > 0);
assert(len <= _capacity);
@@ -113,7 +113,7 @@ public:
_written = true;
}
- void apply_gain (gain_t gain, nframes_t len) {
+ void apply_gain (gain_t gain, framecnt_t len) {
apply_gain_to_buffer (_data, len, gain);
}
@@ -137,12 +137,12 @@ public:
void resize (size_t nframes);
- const Sample* data (nframes_t offset = 0) const {
+ const Sample* data (framecnt_t offset = 0) const {
assert(offset <= _capacity);
return _data + offset;
}
- Sample* data (nframes_t offset = 0) {
+ Sample* data (framecnt_t offset = 0) {
assert(offset <= _capacity);
return _data + offset;
}
diff --git a/libs/ardour/ardour/audio_diskstream.h b/libs/ardour/ardour/audio_diskstream.h
index 4106602b63..2bd44d62a6 100644
--- a/libs/ardour/ardour/audio_diskstream.h
+++ b/libs/ardour/ardour/audio_diskstream.h
@@ -139,7 +139,7 @@ class AudioDiskstream : public Diskstream
}
}
- static void swap_by_ptr (Sample *first, Sample *last, nframes_t n) {
+ static void swap_by_ptr (Sample *first, Sample *last, framecnt_t n) {
while (n--) {
Sample tmp = *first;
*first++ = *last;
@@ -161,7 +161,7 @@ class AudioDiskstream : public Diskstream
void set_pending_overwrite(bool);
int overwrite_existing_buffers ();
- void set_block_size (nframes_t);
+ void set_block_size (pframes_t);
int internal_playback_seek (framecnt_t distance);
int can_internal_playback_seek (framecnt_t distance);
int rename_write_sources ();
@@ -177,17 +177,17 @@ class AudioDiskstream : public Diskstream
protected:
friend class AudioTrack;
- int process (framepos_t transport_frame, nframes_t nframes, bool can_record, bool rec_monitors_input, bool& need_butler);
- bool commit (nframes_t nframes);
+ int process (framepos_t transport_frame, pframes_t nframes, bool can_record, bool rec_monitors_input, bool& need_butler);
+ bool commit (framecnt_t nframes);
private:
struct ChannelInfo : public boost::noncopyable {
- ChannelInfo (nframes_t playback_buffer_size,
- nframes_t capture_buffer_size,
- nframes_t speed_buffer_size,
- nframes_t wrap_buffer_size);
+ ChannelInfo (framecnt_t playback_buffer_size,
+ framecnt_t capture_buffer_size,
+ framecnt_t speed_buffer_size,
+ framecnt_t wrap_buffer_size);
~ChannelInfo ();
Sample *playback_wrap_buffer;
@@ -216,15 +216,15 @@ class AudioDiskstream : public Diskstream
RingBufferNPT<CaptureTransition> * capture_transition_buf;
// the following are used in the butler thread only
- nframes_t curr_capture_cnt;
+ framecnt_t curr_capture_cnt;
- void resize_playback (nframes_t);
- void resize_capture (nframes_t);
+ void resize_playback (framecnt_t);
+ void resize_capture (framecnt_t);
};
typedef std::vector<ChannelInfo*> ChannelList;
- void process_varispeed_playback(nframes_t nframes, boost::shared_ptr<ChannelList> c);
+ void process_varispeed_playback (pframes_t nframes, boost::shared_ptr<ChannelList> c);
/* The two central butler operations */
int do_flush (RunContext context, bool force = false);
@@ -233,7 +233,7 @@ class AudioDiskstream : public Diskstream
int do_refill_with_alloc ();
int read (Sample* buf, Sample* mixdown_buffer, float* gain_buffer,
- framepos_t& start, nframes_t cnt,
+ framepos_t& start, framecnt_t cnt,
ChannelInfo* channel_info, int channel, bool reversed);
void finish_capture (bool rec_monitors_input, boost::shared_ptr<ChannelList>);
diff --git a/libs/ardour/ardour/audio_port.h b/libs/ardour/ardour/audio_port.h
index 895cae99a6..748ef8263b 100644
--- a/libs/ardour/ardour/audio_port.h
+++ b/libs/ardour/ardour/audio_port.h
@@ -35,25 +35,25 @@ class AudioPort : public Port
return DataType::AUDIO;
}
- void cycle_start (nframes_t);
- void cycle_end (nframes_t);
+ void cycle_start (pframes_t);
+ void cycle_end (pframes_t);
void cycle_split ();
- size_t raw_buffer_size(jack_nframes_t nframes) const;
+ size_t raw_buffer_size (pframes_t nframes) const;
- Buffer& get_buffer (nframes_t nframes, nframes_t offset = 0) {
+ Buffer& get_buffer (framecnt_t nframes, framecnt_t offset = 0) {
return get_audio_buffer (nframes, offset);
}
- AudioBuffer& get_audio_buffer (nframes_t nframes, nframes_t offset = 0);
+ AudioBuffer& get_audio_buffer (framecnt_t nframes, framecnt_t offset = 0);
- static nframes_t port_offset() { return _port_offset; }
+ static framecnt_t port_offset() { return _port_offset; }
- static void set_port_offset (nframes_t off) {
+ static void set_port_offset (framecnt_t off) {
_port_offset = off;
}
- static void increment_port_offset (nframes_t n) {
+ static void increment_port_offset (framecnt_t n) {
_port_offset += n;
}
@@ -65,7 +65,7 @@ class AudioPort : public Port
private:
AudioBuffer* _buffer;
- static nframes_t _port_offset;
+ static framecnt_t _port_offset;
};
} // namespace ARDOUR
diff --git a/libs/ardour/ardour/audio_track.h b/libs/ardour/ardour/audio_track.h
index 8e31db34fd..b9c60d5107 100644
--- a/libs/ardour/ardour/audio_track.h
+++ b/libs/ardour/ardour/audio_track.h
@@ -39,7 +39,7 @@ class AudioTrack : public Track
int set_mode (TrackMode m);
bool can_use_mode (TrackMode m, bool& bounce_required);
- int roll (nframes_t nframes, framepos_t start_frame, framepos_t end_frame,
+ int roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame,
int declick, bool can_record, bool rec_monitors_input, bool& need_butler);
void use_new_diskstream ();
@@ -55,7 +55,7 @@ class AudioTrack : public Track
void unfreeze ();
boost::shared_ptr<Region> bounce (InterThreadInfo&);
- boost::shared_ptr<Region> bounce_range (nframes_t start, nframes_t end, InterThreadInfo&, bool enable_processing);
+ boost::shared_ptr<Region> bounce_range (framepos_t start, framepos_t end, InterThreadInfo&, bool enable_processing);
int set_state(const XMLNode&, int version);
diff --git a/libs/ardour/ardour/audio_unit.h b/libs/ardour/ardour/audio_unit.h
index 048e6b978b..b00c23b1dc 100644
--- a/libs/ardour/ardour/audio_unit.h
+++ b/libs/ardour/ardour/audio_unit.h
@@ -71,7 +71,7 @@ class AUPlugin : public ARDOUR::Plugin
const char * maker () const { return _info->creator.c_str(); }
uint32_t parameter_count () const;
float default_value (uint32_t port);
- nframes_t signal_latency() const;
+ framecnt_t signal_latency() const;
void set_parameter (uint32_t which, float val);
float get_parameter (uint32_t which) const;
@@ -80,11 +80,11 @@ class AUPlugin : public ARDOUR::Plugin
void activate ();
void deactivate ();
void flush ();
- int set_block_size (nframes_t nframes);
+ int set_block_size (pframes_t nframes);
int connect_and_run (BufferSet& bufs,
ChanMapping in, ChanMapping out,
- nframes_t nframes, nframes_t offset);
+ pframes_t nframes, framecnt_t offset);
std::set<Evoral::Parameter> automatable() const;
std::string describe_parameter (Evoral::Parameter);
std::string state_node_name () const { return "audiounit"; }
@@ -150,8 +150,8 @@ class AUPlugin : public ARDOUR::Plugin
int32_t input_channels;
int32_t output_channels;
std::vector<std::pair<int,int> > io_configs;
- nframes_t _current_block_size;
- nframes_t _last_nframes;
+ pframes_t _current_block_size;
+ framecnt_t _last_nframes;
bool _requires_fixed_size_buffers;
AudioBufferList* buffers;
bool _has_midi_input;
@@ -181,10 +181,10 @@ class AUPlugin : public ARDOUR::Plugin
std::vector<std::pair<uint32_t, uint32_t> > parameter_map;
uint32_t current_maxbuf;
- nframes_t current_offset;
- nframes_t cb_offset;
+ framecnt_t current_offset;
+ framecnt_t cb_offset;
BufferSet* current_buffers;
- nframes_t frames_processed;
+ framecnt_t frames_processed;
std::vector<AUParameterDescriptor> descriptors;
void init ();
diff --git a/libs/ardour/ardour/audioanalyser.h b/libs/ardour/ardour/audioanalyser.h
index f16a2b1e49..27a03ce805 100644
--- a/libs/ardour/ardour/audioanalyser.h
+++ b/libs/ardour/ardour/audioanalyser.h
@@ -56,8 +56,8 @@ class AudioAnalyser : public boost::noncopyable {
AnalysisPlugin* plugin;
AnalysisPluginKey plugin_key;
- nframes_t bufsize;
- nframes_t stepsize;
+ framecnt_t bufsize;
+ framecnt_t stepsize;
int initialize_plugin (AnalysisPluginKey name, float sample_rate);
int analyse (const std::string& path, Readable*, uint32_t channel);
diff --git a/libs/ardour/ardour/audioengine.h b/libs/ardour/ardour/audioengine.h
index 523a05b4c1..f55a7e334e 100644
--- a/libs/ardour/ardour/audioengine.h
+++ b/libs/ardour/ardour/audioengine.h
@@ -91,46 +91,57 @@ class AudioEngine : public SessionHandlePtr
Glib::Mutex& process_lock() { return _process_lock; }
- nframes_t frame_rate() const;
- nframes_t frames_per_cycle() const;
+ framecnt_t frame_rate () const;
+ framecnt_t frames_per_cycle () const;
size_t raw_buffer_size(DataType t);
int usecs_per_cycle () const { return _usecs_per_cycle; }
- bool get_sync_offset (nframes_t& offset) const;
+ bool get_sync_offset (pframes_t & offset) const;
- nframes_t frames_since_cycle_start () {
+ pframes_t frames_since_cycle_start () {
jack_client_t* _priv_jack = _jack;
- if (!_running || !_priv_jack) return 0;
+ if (!_running || !_priv_jack) {
+ return 0;
+ }
return jack_frames_since_cycle_start (_priv_jack);
}
- nframes_t frame_time () {
+
+ pframes_t frame_time () {
jack_client_t* _priv_jack = _jack;
- if (!_running || !_priv_jack) return 0;
+ if (!_running || !_priv_jack) {
+ return 0;
+ }
return jack_frame_time (_priv_jack);
}
- nframes_t frame_time_at_cycle_start () {
+ pframes_t frame_time_at_cycle_start () {
jack_client_t* _priv_jack = _jack;
- if (!_running || !_priv_jack) return 0;
+ if (!_running || !_priv_jack) {
+ return 0;
+ }
return jack_last_frame_time (_priv_jack);
}
- nframes_t transport_frame () const {
+ pframes_t transport_frame () const {
const jack_client_t* _priv_jack = _jack;
- if (!_running || !_priv_jack) return 0;
+ if (!_running || !_priv_jack) {
+ return 0;
+ }
return jack_get_current_transport_frame (_priv_jack);
}
- int request_buffer_size (nframes_t);
+ int request_buffer_size (pframes_t);
- nframes_t set_monitor_check_interval (nframes_t);
- nframes_t processed_frames() const { return _processed_frames; }
+ framecnt_t set_monitor_check_interval (framecnt_t);
+ framecnt_t processed_frames() const { return _processed_frames; }
float get_cpu_load() {
jack_client_t* _priv_jack = _jack;
- if (!_running || !_priv_jack) return 0;
+ if (!_running || !_priv_jack) {
+ return 0;
+ }
return jack_cpu_load (_priv_jack);
}
@@ -159,7 +170,7 @@ class AudioEngine : public SessionHandlePtr
Port *register_output_port (DataType, const std::string& portname);
int unregister_port (Port &);
- void split_cycle (nframes_t offset);
+ void split_cycle (pframes_t offset);
int connect (const std::string& source, const std::string& destination);
int disconnect (const std::string& source, const std::string& destination);
@@ -189,7 +200,7 @@ class AudioEngine : public SessionHandlePtr
void transport_start ();
void transport_stop ();
- void transport_locate (nframes_t);
+ void transport_locate (framepos_t);
TransportState transport_state ();
int reset_timebase ();
@@ -203,7 +214,7 @@ class AudioEngine : public SessionHandlePtr
_ the regular process() call to session->process() is not made.
*/
- PBD::Signal1<int,nframes_t> Freewheel;
+ PBD::Signal1<int, pframes_t> Freewheel;
PBD::Signal0<void> Xrun;
@@ -218,7 +229,7 @@ _ the regular process() call to session->process() is not made.
/* this signal is emitted if the sample rate changes */
- PBD::Signal1<void,nframes_t> SampleRateChanged;
+ PBD::Signal1<void, framecnt_t> SampleRateChanged;
/* this signal is sent if JACK ever disconnects us */
@@ -255,18 +266,18 @@ _ the regular process() call to session->process() is not made.
bool session_remove_pending;
bool _running;
bool _has_run;
- mutable nframes_t _buffer_size;
+ mutable framecnt_t _buffer_size;
std::map<DataType,size_t> _raw_buffer_sizes;
- mutable nframes_t _frame_rate;
+ mutable framecnt_t _frame_rate;
/// number of frames between each check for changes in monitor input
- nframes_t monitor_check_interval;
+ framecnt_t monitor_check_interval;
/// time of the last monitor check in frames
- nframes_t last_monitor_check;
+ framecnt_t last_monitor_check;
/// the number of frames processed since start() was called
- nframes_t _processed_frames;
+ framecnt_t _processed_frames;
bool _freewheeling;
bool _freewheel_pending;
- boost::function<int(nframes_t)> freewheel_action;
+ boost::function<int(framecnt_t)> freewheel_action;
bool reconnect_on_halt;
int _usecs_per_cycle;
@@ -274,7 +285,7 @@ _ the regular process() call to session->process() is not made.
Port *register_port (DataType type, const std::string& portname, bool input);
- int process_callback (nframes_t nframes);
+ int process_callback (pframes_t nframes);
void* process_thread ();
void finish_process_cycle (int status);
void remove_all_ports ();
@@ -289,20 +300,20 @@ _ the regular process() call to session->process() is not made.
static void _session_callback (jack_session_event_t *event, void *arg);
#endif
static int _graph_order_callback (void *arg);
- static int _process_callback (nframes_t nframes, void *arg);
+ static int _process_callback (pframes_t nframes, void *arg);
static void* _process_thread (void *arg);
- static int _sample_rate_callback (nframes_t nframes, void *arg);
- static int _bufsize_callback (nframes_t nframes, void *arg);
- static void _jack_timebase_callback (jack_transport_state_t, nframes_t, jack_position_t*, int, void*);
+ static int _sample_rate_callback (pframes_t nframes, void *arg);
+ static int _bufsize_callback (pframes_t nframes, void *arg);
+ static void _jack_timebase_callback (jack_transport_state_t, pframes_t, jack_position_t*, int, void*);
static int _jack_sync_callback (jack_transport_state_t, jack_position_t*, void *arg);
static void _freewheel_callback (int , void *arg);
static void _registration_callback (jack_port_id_t, int, void *);
static void _connect_callback (jack_port_id_t, jack_port_id_t, int, void *);
- void jack_timebase_callback (jack_transport_state_t, nframes_t, jack_position_t*, int);
+ void jack_timebase_callback (jack_transport_state_t, pframes_t, jack_position_t*, int);
int jack_sync_callback (jack_transport_state_t, jack_position_t*);
- int jack_bufsize_callback (nframes_t);
- int jack_sample_rate_callback (nframes_t);
+ int jack_bufsize_callback (pframes_t);
+ int jack_sample_rate_callback (pframes_t);
int connect_to_jack (std::string client_name, std::string session_uuid);
diff --git a/libs/ardour/ardour/audiofilesource.h b/libs/ardour/ardour/audiofilesource.h
index 4f01bf4182..3bd4bbd34c 100644
--- a/libs/ardour/ardour/audiofilesource.h
+++ b/libs/ardour/ardour/audiofilesource.h
@@ -82,7 +82,7 @@ public:
static bool is_empty (Session&, std::string path);
static void set_bwf_serial_number (int);
- static void set_header_position_offset (nframes_t offset );
+ static void set_header_position_offset (framecnt_t offset);
static PBD::Signal0<void> HeaderPositionOffsetChanged;
@@ -104,7 +104,7 @@ protected:
int move_dependents_to_trash();
- static Sample* get_interleave_buffer (nframes_t size);
+ static Sample* get_interleave_buffer (framecnt_t size);
static std::string peak_dir;
diff --git a/libs/ardour/ardour/audioplaylist.h b/libs/ardour/ardour/audioplaylist.h
index 253329b38e..6c3169070f 100644
--- a/libs/ardour/ardour/audioplaylist.h
+++ b/libs/ardour/ardour/audioplaylist.h
@@ -72,7 +72,7 @@ public:
AudioPlaylist (Session&, const XMLNode&, bool hidden = false);
AudioPlaylist (Session&, std::string name, bool hidden = false);
AudioPlaylist (boost::shared_ptr<const AudioPlaylist>, std::string name, bool hidden = false);
- AudioPlaylist (boost::shared_ptr<const AudioPlaylist>, nframes_t start, nframes_t cnt, std::string name, bool hidden = false);
+ AudioPlaylist (boost::shared_ptr<const AudioPlaylist>, framepos_t start, framecnt_t cnt, std::string name, bool hidden = false);
~AudioPlaylist ();
@@ -85,7 +85,7 @@ public:
PBD::Signal1<void,boost::shared_ptr<Crossfade> > NewCrossfade;
void foreach_crossfade (boost::function<void (boost::shared_ptr<Crossfade>)>);
- void crossfades_at (nframes_t frame, Crossfades&);
+ void crossfades_at (framepos_t frame, Crossfades&);
bool destroy_region (boost::shared_ptr<Region>);
diff --git a/libs/ardour/ardour/audioregion.h b/libs/ardour/ardour/audioregion.h
index 902e7eb934..a5791c8b30 100644
--- a/libs/ardour/ardour/audioregion.h
+++ b/libs/ardour/ardour/audioregion.h
@@ -93,8 +93,8 @@ class AudioRegion : public Region
boost::shared_ptr<AutomationList> fade_out() { return _fade_out; }
boost::shared_ptr<AutomationList> envelope() { return _envelope; }
- virtual nframes_t read_peaks (PeakData *buf, nframes_t npeaks,
- nframes_t offset, nframes_t cnt,
+ virtual framecnt_t read_peaks (PeakData *buf, framecnt_t npeaks,
+ framecnt_t offset, framecnt_t cnt,
uint32_t chan_n=0, double samples_per_unit= 1.0) const;
/* Readable interface */
diff --git a/libs/ardour/ardour/audiosource.h b/libs/ardour/ardour/audiosource.h
index 08c879d926..22d5d1a724 100644
--- a/libs/ardour/ardour/audiosource.h
+++ b/libs/ardour/ardour/audiosource.h
@@ -69,7 +69,7 @@ class AudioSource : virtual public Source,
uint32_t read_data_count() const { return _read_data_count; }
uint32_t write_data_count() const { return _write_data_count; }
- void dec_read_data_count(nframes_t);
+ void dec_read_data_count (framecnt_t);
int read_peaks (PeakData *peaks, framecnt_t npeaks,
framepos_t start, framecnt_t cnt, double samples_per_visual_peak) const;
diff --git a/libs/ardour/ardour/auditioner.h b/libs/ardour/ardour/auditioner.h
index e7d3347cb6..25a7b91158 100644
--- a/libs/ardour/ardour/auditioner.h
+++ b/libs/ardour/ardour/auditioner.h
@@ -46,7 +46,7 @@ class Auditioner : public AudioTrack
ARDOUR::AudioPlaylist& prepare_playlist ();
void audition_current_playlist ();
- int play_audition (nframes_t nframes);
+ int play_audition (framecnt_t nframes);
void cancel_audition () {
g_atomic_int_set (&_auditioning, 0);
@@ -57,10 +57,10 @@ class Auditioner : public AudioTrack
private:
boost::shared_ptr<AudioRegion> the_region;
- nframes_t current_frame;
+ framepos_t current_frame;
mutable gint _auditioning;
Glib::Mutex lock;
- nframes_t length;
+ framecnt_t length;
bool via_monitor;
void drop_ports ();
diff --git a/libs/ardour/ardour/automatable.h b/libs/ardour/ardour/automatable.h
index f90f1dec48..541e9d562d 100644
--- a/libs/ardour/ardour/automatable.h
+++ b/libs/ardour/ardour/automatable.h
@@ -60,7 +60,7 @@ public:
virtual void add_control(boost::shared_ptr<Evoral::Control>);
void clear_controls ();
- virtual void automation_snapshot(nframes_t now, bool force);
+ virtual void automation_snapshot (framepos_t now, bool force);
virtual void transport_stopped (framepos_t now);
virtual std::string describe_parameter(Evoral::Parameter param);
@@ -78,16 +78,16 @@ public:
void mark_automation_visible(Evoral::Parameter, bool);
- inline bool should_snapshot (nframes_t now) {
+ inline bool should_snapshot (framepos_t now) {
return (_last_automation_snapshot > now
|| (now - _last_automation_snapshot) > _automation_interval);
}
- static void set_automation_interval (jack_nframes_t frames) {
+ static void set_automation_interval (framecnt_t frames) {
_automation_interval = frames;
}
- static jack_nframes_t automation_interval() {
+ static framecnt_t automation_interval() {
return _automation_interval;
}
@@ -109,8 +109,8 @@ public:
std::set<Evoral::Parameter> _visible_controls;
std::set<Evoral::Parameter> _can_automate_list;
- nframes_t _last_automation_snapshot;
- static nframes_t _automation_interval;
+ framepos_t _last_automation_snapshot;
+ static framecnt_t _automation_interval;
private:
PBD::ScopedConnectionList _control_connections; ///< connections to our controls' signals
diff --git a/libs/ardour/ardour/buffer.h b/libs/ardour/ardour/buffer.h
index 48fd7f099b..5b76aafca6 100644
--- a/libs/ardour/ardour/buffer.h
+++ b/libs/ardour/ardour/buffer.h
@@ -71,13 +71,13 @@ public:
virtual void resize (size_t) = 0;
/** Clear (eg zero, or empty) buffer */
- virtual void silence (nframes_t len, nframes_t offset = 0) = 0;
+ virtual void silence (framecnt_t len, framecnt_t offset = 0) = 0;
/** Clear the entire buffer */
virtual void clear() { silence(_capacity, 0); }
- virtual void read_from (const Buffer& src, nframes_t len, nframes_t dst_offset = 0, nframes_t src_offset = 0) = 0;
- virtual void merge_from (const Buffer& src, nframes_t len, nframes_t dst_offset = 0, nframes_t src_offset = 0) = 0;
+ virtual void read_from (const Buffer& src, framecnt_t len, framecnt_t dst_offset = 0, framecnt_t src_offset = 0) = 0;
+ virtual void merge_from (const Buffer& src, framecnt_t len, framecnt_t dst_offset = 0, framecnt_t src_offset = 0) = 0;
protected:
Buffer(DataType type, size_t capacity)
diff --git a/libs/ardour/ardour/buffer_set.h b/libs/ardour/ardour/buffer_set.h
index 711e2350fd..c3358f4436 100644
--- a/libs/ardour/ardour/buffer_set.h
+++ b/libs/ardour/ardour/buffer_set.h
@@ -66,7 +66,7 @@ public:
void clear();
- void attach_buffers(PortSet& ports, nframes_t nframes, nframes_t offset = 0);
+ void attach_buffers(PortSet& ports, framecnt_t nframes, framecnt_t offset = 0);
/* the capacity here is a size_t and has a different interpretation depending
on the DataType of the buffers. for audio, its a frame count. for MIDI
@@ -83,7 +83,7 @@ public:
ChanCount& count() { return _count; }
void is_silent(bool yn);
- void silence (nframes_t nframes, nframes_t offset);
+ void silence (framecnt_t nframes, framecnt_t offset);
bool is_mirror() const { return _is_mirror; }
void set_count(const ChanCount& count) { assert(count <= _available); _count = count; }
@@ -115,8 +115,8 @@ public:
VstEvents* get_vst_midi (size_t);
#endif
- void read_from(const BufferSet& in, nframes_t nframes);
- void merge_from(const BufferSet& in, nframes_t nframes);
+ void read_from(const BufferSet& in, framecnt_t nframes);
+ void merge_from(const BufferSet& in, framecnt_t nframes);
template <typename BS, typename B>
class iterator_base {
@@ -176,7 +176,7 @@ private:
~VSTBuffer ();
void clear ();
- void push_back (Evoral::MIDIEvent<nframes_t> const &);
+ void push_back (Evoral::MIDIEvent<framepos_t> const &);
VstEvents* events () const {
return _events;
}
diff --git a/libs/ardour/ardour/butler.h b/libs/ardour/ardour/butler.h
index 6ad96dc704..6751f3dcca 100644
--- a/libs/ardour/ardour/butler.h
+++ b/libs/ardour/ardour/butler.h
@@ -54,8 +54,8 @@ class Butler : public SessionHandleRef
float read_data_rate() const; ///< in usec
float write_data_rate() const;
- nframes_t audio_diskstream_capture_buffer_size() const { return audio_dstream_capture_buffer_size; }
- nframes_t audio_diskstream_playback_buffer_size() const { return audio_dstream_playback_buffer_size; }
+ framecnt_t audio_diskstream_capture_buffer_size() const { return audio_dstream_capture_buffer_size; }
+ framecnt_t audio_diskstream_playback_buffer_size() const { return audio_dstream_playback_buffer_size; }
uint32_t midi_diskstream_buffer_size() const { return midi_dstream_buffer_size; }
static void* _thread_work(void *arg);
@@ -76,8 +76,8 @@ class Butler : public SessionHandleRef
bool should_run;
mutable gint should_do_transport_work;
int request_pipe[2];
- nframes_t audio_dstream_capture_buffer_size;
- nframes_t audio_dstream_playback_buffer_size;
+ framecnt_t audio_dstream_capture_buffer_size;
+ framecnt_t audio_dstream_playback_buffer_size;
uint32_t midi_dstream_buffer_size;
RingBuffer<CrossThreadPool*> pool_trash;
diff --git a/libs/ardour/ardour/click.h b/libs/ardour/ardour/click.h
index 5ee1d50194..783588c8ab 100644
--- a/libs/ardour/ardour/click.h
+++ b/libs/ardour/ardour/click.h
@@ -29,34 +29,34 @@
namespace ARDOUR {
struct Click {
- nframes_t start;
- nframes_t duration;
- nframes_t offset;
- const Sample *data;
-
- Click (nframes_t s, nframes_t d, const Sample *b) : start (s), duration (d), offset (0), data (b) {}
+ framepos_t start;
+ framecnt_t duration;
+ framecnt_t offset;
+ const Sample *data;
+
+ Click (framepos_t s, framecnt_t d, const Sample *b) : start (s), duration (d), offset (0), data (b) {}
- void *operator new (size_t) {
- return pool.alloc ();
+ void *operator new (size_t) {
+ return pool.alloc ();
};
-
- void operator delete(void *ptr, size_t /*size*/) {
- pool.release (ptr);
- }
-
+
+ void operator delete(void *ptr, size_t /*size*/) {
+ pool.release (ptr);
+ }
+
private:
- static Pool pool;
+ static Pool pool;
};
typedef std::list<Click*> Clicks;
class ClickIO : public IO
{
- public:
+public:
ClickIO (Session& s, const std::string& name) : IO (s, name, IO::Output) {}
~ClickIO() {}
- protected:
+protected:
uint32_t pans_required () const { return 1; }
};
diff --git a/libs/ardour/ardour/delivery.h b/libs/ardour/ardour/delivery.h
index c920fadc2c..e1aa389df7 100644
--- a/libs/ardour/ardour/delivery.h
+++ b/libs/ardour/ardour/delivery.h
@@ -66,21 +66,21 @@ public:
bool can_support_io_configuration (const ChanCount& in, ChanCount& out) const;
bool configure_io (ChanCount in, ChanCount out);
- void run (BufferSet& bufs, framepos_t start_frame, framepos_t end_frame, nframes_t nframes, bool);
+ void run (BufferSet& bufs, framepos_t start_frame, framepos_t end_frame, pframes_t nframes, bool);
/* supplemental method used with MIDI */
- void flush_buffers (nframes_t nframes, framepos_t time);
+ void flush_buffers (framecnt_t nframes, framepos_t time);
void no_outs_cuz_we_no_monitor(bool);
- void cycle_start (nframes_t);
- void increment_output_offset (nframes_t);
+ void cycle_start (pframes_t);
+ void increment_output_offset (framecnt_t);
void transport_stopped (framepos_t frame);
BufferSet& output_buffers() { return *_output_buffers; }
PBD::Signal0<void> MuteChange;
- static PBD::Signal1<void,nframes_t> CycleStart;
+ static PBD::Signal1<void, pframes_t> CycleStart;
XMLNode& state (bool full);
int set_state (const XMLNode&, int version);
@@ -104,7 +104,7 @@ public:
Role _role;
BufferSet* _output_buffers;
gain_t _current_gain;
- nframes_t _output_offset;
+ framecnt_t _output_offset;
bool _no_outs_cuz_we_no_monitor;
boost::shared_ptr<MuteMaster> _mute_master;
bool no_panner_reset;
diff --git a/libs/ardour/ardour/diskstream.h b/libs/ardour/ardour/diskstream.h
index 4eabe29d85..cd5932b3e5 100644
--- a/libs/ardour/ardour/diskstream.h
+++ b/libs/ardour/ardour/diskstream.h
@@ -79,8 +79,8 @@ class Diskstream : public SessionObject, public PublicDiskstream
void set_align_style (AlignStyle);
void set_persistent_align_style (AlignStyle a) { _persistent_alignment_style = a; }
- nframes_t roll_delay() const { return _roll_delay; }
- void set_roll_delay (nframes_t);
+ framecnt_t roll_delay() const { return _roll_delay; }
+ void set_roll_delay (framecnt_t);
bool record_enabled() const { return g_atomic_int_get (&_record_enabled); }
virtual void set_record_enabled (bool yn) = 0;
@@ -118,8 +118,8 @@ class Diskstream : public SessionObject, public PublicDiskstream
ChanCount n_channels() { return _n_channels; }
- static nframes_t disk_io_frames() { return disk_io_chunk_frames; }
- static void set_disk_io_chunk_frames (uint32_t n) { disk_io_chunk_frames = n; }
+ static framecnt_t disk_io_frames() { return disk_io_chunk_frames; }
+ static void set_disk_io_chunk_frames (framecnt_t n) { disk_io_chunk_frames = n; }
/* Stateful */
virtual XMLNode& get_state(void) = 0;
@@ -127,7 +127,7 @@ class Diskstream : public SessionObject, public PublicDiskstream
virtual void monitor_input (bool) {}
- nframes_t capture_offset() const { return _capture_offset; }
+ framecnt_t capture_offset() const { return _capture_offset; }
virtual void set_capture_offset ();
bool slaved() const { return _slaved; }
@@ -144,7 +144,7 @@ class Diskstream : public SessionObject, public PublicDiskstream
/** For non-butler contexts (allocates temporary working buffers) */
virtual int do_refill_with_alloc() = 0;
- virtual void set_block_size (nframes_t) = 0;
+ virtual void set_block_size (pframes_t) = 0;
bool pending_overwrite () const {
return _pending_overwrite;
@@ -186,8 +186,8 @@ class Diskstream : public SessionObject, public PublicDiskstream
protected:
friend class Track;
- virtual int process (framepos_t transport_frame, nframes_t nframes, bool can_record, bool rec_monitors_input, bool& need_butler) = 0;
- virtual bool commit (nframes_t nframes) = 0;
+ virtual int process (framepos_t transport_frame, pframes_t nframes, bool can_record, bool rec_monitors_input, bool& need_butler) = 0;
+ virtual bool commit (framecnt_t nframes) = 0;
//private:
@@ -239,9 +239,9 @@ class Diskstream : public SessionObject, public PublicDiskstream
virtual void prepare_to_stop (framepos_t pos);
void calculate_record_range(OverlapType ot, framepos_t transport_frame, framecnt_t nframes,
- nframes_t& rec_nframes, nframes_t& rec_offset);
+ framecnt_t& rec_nframes, framecnt_t& rec_offset);
- static nframes_t disk_io_chunk_frames;
+ static framecnt_t disk_io_chunk_frames;
std::vector<CaptureInfo*> capture_info;
mutable Glib::Mutex capture_info_lock;
@@ -265,9 +265,9 @@ class Diskstream : public SessionObject, public PublicDiskstream
framepos_t capture_start_frame;
framecnt_t capture_captured;
bool was_recording;
- nframes_t adjust_capture_position;
- nframes_t _capture_offset;
- nframes_t _roll_delay;
+ framecnt_t adjust_capture_position;
+ framecnt_t _capture_offset;
+ framecnt_t _roll_delay;
framepos_t first_recordable_frame;
framepos_t last_recordable_frame;
int last_possibly_recording;
@@ -280,8 +280,8 @@ class Diskstream : public SessionObject, public PublicDiskstream
bool _pending_overwrite;
bool overwrite_queued;
IOChange input_change_pending;
- nframes_t wrap_buffer_size;
- nframes_t speed_buffer_size;
+ framecnt_t wrap_buffer_size;
+ framecnt_t speed_buffer_size;
double _speed;
double _target_speed;
@@ -299,10 +299,6 @@ class Diskstream : public SessionObject, public PublicDiskstream
Glib::Mutex state_lock;
- framepos_t scrub_start;
- nframes_t scrub_buffer_size;
- nframes_t scrub_offset;
-
PBD::ScopedConnectionList playlist_connections;
PBD::ScopedConnection ic_connection;
diff --git a/libs/ardour/ardour/element_importer.h b/libs/ardour/ardour/element_importer.h
index 8ffa3b90ba..8c25fd380d 100644
--- a/libs/ardour/ardour/element_importer.h
+++ b/libs/ardour/ardour/element_importer.h
@@ -109,13 +109,13 @@ class ElementImporter
std::string name;
/// The sample rate of the session from which we are importing
- nframes_t sample_rate;
+ framecnt_t sample_rate;
/// Converts timecode time to a string
std::string timecode_to_string (Timecode::Time & time) const;
/// Converts samples so that times match the sessions sample rate
- nframes_t rate_convert_samples (nframes_t samples) const;
+ framecnt_t rate_convert_samples (framecnt_t samples) const;
/// Converts samples so that times match the sessions sample rate (for straight use in XML)
std::string rate_convert_samples (std::string const & samples) const;
diff --git a/libs/ardour/ardour/export_channel.h b/libs/ardour/ardour/export_channel.h
index 51ecabee25..96b9c1eda2 100644
--- a/libs/ardour/ardour/export_channel.h
+++ b/libs/ardour/ardour/export_channel.h
@@ -43,7 +43,7 @@ class ExportChannel : public boost::less_than_comparable<ExportChannel>
virtual ~ExportChannel () {}
- virtual void read (Sample * data, nframes_t frames) const = 0;
+ virtual void read (Sample * data, framecnt_t frames) const = 0;
virtual bool empty () const = 0;
/// Adds state to node passed
@@ -75,7 +75,7 @@ class PortExportChannel : public ExportChannel
PortExportChannel () {}
- void read (Sample * data, nframes_t frames) const;
+ void read (Sample * data, framecnt_t frames) const;
bool empty () const { return ports.empty(); }
void get_state (XMLNode * node) const;
@@ -104,23 +104,23 @@ class RegionExportChannelFactory
~RegionExportChannelFactory ();
ExportChannelPtr create (uint32_t channel);
- void read (uint32_t channel, Sample * data, nframes_t frames_to_read);
+ void read (uint32_t channel, Sample * data, framecnt_t frames_to_read);
private:
- int new_cycle_started (nframes_t) { buffers_up_to_date = false; return 0; }
- void update_buffers (nframes_t frames);
+ int new_cycle_started (framecnt_t) { buffers_up_to_date = false; return 0; }
+ void update_buffers (framecnt_t frames);
AudioRegion const & region;
AudioTrack & track;
Type type;
- nframes_t frames_per_cycle;
+ framecnt_t frames_per_cycle;
size_t n_channels;
BufferSet buffers;
bool buffers_up_to_date;
- nframes_t region_start;
- nframes_t position;
+ framecnt_t region_start;
+ framecnt_t position;
Sample * mixdown_buffer;
Sample * gain_buffer;
@@ -134,7 +134,7 @@ class RegionExportChannel : public ExportChannel
friend class RegionExportChannelFactory;
public:
- void read (Sample * data, nframes_t frames_to_read) const { factory.read (channel, data, frames_to_read); }
+ void read (Sample * data, framecnt_t frames_to_read) const { factory.read (channel, data, frames_to_read); }
void get_state (XMLNode * /*node*/) const {};
void set_state (XMLNode * /*node*/, Session & /*session*/) {};
bool empty () const { return false; }
diff --git a/libs/ardour/ardour/export_format_specification.h b/libs/ardour/ardour/export_format_specification.h
index 9594485a91..52ed9769a7 100644
--- a/libs/ardour/ardour/export_format_specification.h
+++ b/libs/ardour/ardour/export_format_specification.h
@@ -47,7 +47,7 @@ class ExportFormatSpecification : public ExportFormatBase {
Time (Session & session) : AnyTime (), session (session) {}
Time & operator= (AnyTime const & other);
- nframes_t get_frames (nframes_t target_rate) const;
+ framecnt_t get_frames (framecnt_t target_rate) const;
/* Serialization */
@@ -123,11 +123,11 @@ class ExportFormatSpecification : public ExportFormatBase {
bool tag () const { return _tag && supports_tagging; }
- nframes_t silence_beginning () const { return _silence_beginning.get_frames (sample_rate()); }
- nframes_t silence_end () const { return _silence_end.get_frames (sample_rate()); }
+ framecnt_t silence_beginning () const { return _silence_beginning.get_frames (sample_rate()); }
+ framecnt_t silence_end () const { return _silence_end.get_frames (sample_rate()); }
- nframes_t silence_beginning (nframes_t samplerate) const { return _silence_beginning.get_frames (samplerate); }
- nframes_t silence_end (nframes_t samplerate) const { return _silence_end.get_frames (samplerate); }
+ framecnt_t silence_beginning (framecnt_t samplerate) const { return _silence_beginning.get_frames (samplerate); }
+ framecnt_t silence_end (framecnt_t samplerate) const { return _silence_end.get_frames (samplerate); }
AnyTime silence_beginning_time () const { return _silence_beginning; }
AnyTime silence_end_time () const { return _silence_end; }
diff --git a/libs/ardour/ardour/export_graph_builder.h b/libs/ardour/ardour/export_graph_builder.h
index 55fa7133fc..1c49eccd9d 100644
--- a/libs/ardour/ardour/export_graph_builder.h
+++ b/libs/ardour/ardour/export_graph_builder.h
@@ -62,7 +62,7 @@ class ExportGraphBuilder
ExportGraphBuilder (Session const & session);
~ExportGraphBuilder ();
- int process (nframes_t frames, bool last_cycle);
+ int process (framecnt_t frames, bool last_cycle);
bool process_normalize (); // returns true when finished
void reset ();
@@ -102,7 +102,7 @@ class ExportGraphBuilder
class SFC {
public:
// This constructor so that this can be constructed like a Normalizer
- SFC (ExportGraphBuilder &, FileSpec const & new_config, nframes_t max_frames);
+ SFC (ExportGraphBuilder &, FileSpec const & new_config, framecnt_t max_frames);
FloatSinkPtr sink ();
void add_child (FileSpec const & new_config);
bool operator== (FileSpec const & other_config) const;
@@ -124,7 +124,7 @@ class ExportGraphBuilder
class Normalizer {
public:
- Normalizer (ExportGraphBuilder & parent, FileSpec const & new_config, nframes_t max_frames);
+ Normalizer (ExportGraphBuilder & parent, FileSpec const & new_config, framecnt_t max_frames);
FloatSinkPtr sink ();
void add_child (FileSpec const & new_config);
bool operator== (FileSpec const & other_config) const;
@@ -144,7 +144,7 @@ class ExportGraphBuilder
ExportGraphBuilder & parent;
FileSpec config;
- nframes_t max_frames_out;
+ framecnt_t max_frames_out;
BufferPtr buffer;
PeakReaderPtr peak_reader;
@@ -159,7 +159,7 @@ class ExportGraphBuilder
// sample rate converter
class SRC {
public:
- SRC (ExportGraphBuilder & parent, FileSpec const & new_config, nframes_t max_frames);
+ SRC (ExportGraphBuilder & parent, FileSpec const & new_config, framecnt_t max_frames);
FloatSinkPtr sink ();
void add_child (FileSpec const & new_config);
bool operator== (FileSpec const & other_config) const;
@@ -175,13 +175,13 @@ class ExportGraphBuilder
boost::ptr_list<SFC> children;
boost::ptr_list<Normalizer> normalized_children;
SRConverterPtr converter;
- nframes_t max_frames_out;
+ framecnt_t max_frames_out;
};
// Silence trimmer + adder
class SilenceHandler {
public:
- SilenceHandler (ExportGraphBuilder & parent, FileSpec const & new_config, nframes_t max_frames);
+ SilenceHandler (ExportGraphBuilder & parent, FileSpec const & new_config, framecnt_t max_frames);
FloatSinkPtr sink ();
void add_child (FileSpec const & new_config);
bool operator== (FileSpec const & other_config) const;
@@ -193,7 +193,7 @@ class ExportGraphBuilder
FileSpec config;
boost::ptr_list<SRC> children;
SilenceTrimmerPtr silence_trimmer;
- nframes_t max_frames_in;
+ framecnt_t max_frames_in;
};
// channel configuration
@@ -210,7 +210,7 @@ class ExportGraphBuilder
FileSpec config;
boost::ptr_list<SilenceHandler> children;
InterleaverPtr interleaver;
- nframes_t max_frames;
+ framecnt_t max_frames;
};
Session const & session;
@@ -223,7 +223,7 @@ class ExportGraphBuilder
ChannelMap channels;
Sample * process_buffer;
- nframes_t process_buffer_frames;
+ framecnt_t process_buffer_frames;
std::list<Normalizer *> normalizers;
diff --git a/libs/ardour/ardour/export_handler.h b/libs/ardour/ardour/export_handler.h
index f826e09bf5..dbc8213eed 100644
--- a/libs/ardour/ardour/export_handler.h
+++ b/libs/ardour/ardour/export_handler.h
@@ -119,7 +119,7 @@ class ExportHandler : public ExportElementFactory
private:
- int process (nframes_t frames);
+ int process (framecnt_t frames);
Session & session;
GraphBuilderPtr graph_builder;
@@ -132,7 +132,7 @@ class ExportHandler : public ExportElementFactory
/* Timespan management */
void start_timespan ();
- int process_timespan (nframes_t frames);
+ int process_timespan (framecnt_t frames);
int process_normalize ();
void finish_timespan ();
diff --git a/libs/ardour/ardour/export_profile_manager.h b/libs/ardour/ardour/export_profile_manager.h
index b8e86d11df..67ebe2b316 100644
--- a/libs/ardour/ardour/export_profile_manager.h
+++ b/libs/ardour/ardour/export_profile_manager.h
@@ -136,8 +136,8 @@ class ExportProfileManager
typedef boost::shared_ptr<TimespanState> TimespanStatePtr;
typedef std::list<TimespanStatePtr> TimespanStateList;
- void set_selection_range (nframes_t start = 0, nframes_t end = 0);
- std::string set_single_range (nframes_t start, nframes_t end, std::string name);
+ void set_selection_range (framepos_t start = 0, framepos_t end = 0);
+ std::string set_single_range (framepos_t start, framepos_t end, std::string name);
TimespanStateList const & get_timespans () { return check_list (timespans); }
private:
diff --git a/libs/ardour/ardour/export_timespan.h b/libs/ardour/ardour/export_timespan.h
index 592f36b1a9..ba31fd6f6a 100644
--- a/libs/ardour/ardour/export_timespan.h
+++ b/libs/ardour/ardour/export_timespan.h
@@ -42,7 +42,7 @@ class ExportTimespan
private:
friend class ExportElementFactory;
- ExportTimespan (ExportStatusPtr status, nframes_t frame_rate);
+ ExportTimespan (ExportStatusPtr status, framecnt_t frame_rate);
public:
~ExportTimespan ();
@@ -53,19 +53,19 @@ class ExportTimespan
std::string range_id () const { return _range_id; }
void set_range_id (std::string range_id) { _range_id = range_id; }
- void set_range (nframes_t start, nframes_t end);
- nframes_t get_length () const { return end_frame - start_frame; }
- nframes_t get_start () const { return start_frame; }
- nframes_t get_end () const { return end_frame; }
+ void set_range (framepos_t start, framepos_t end);
+ framecnt_t get_length () const { return end_frame - start_frame; }
+ framepos_t get_start () const { return start_frame; }
+ framepos_t get_end () const { return end_frame; }
private:
ExportStatusPtr status;
- nframes_t start_frame;
- nframes_t end_frame;
- nframes_t position;
- nframes_t frame_rate;
+ framepos_t start_frame;
+ framepos_t end_frame;
+ framepos_t position;
+ framecnt_t frame_rate;
std::string _name;
std::string _range_id;
diff --git a/libs/ardour/ardour/gain.h b/libs/ardour/ardour/gain.h
index 785475444a..71706a2837 100644
--- a/libs/ardour/ardour/gain.h
+++ b/libs/ardour/ardour/gain.h
@@ -31,10 +31,10 @@ struct Gain : public AutomationList {
Gain (const Gain&);
Gain& operator= (const Gain&);
- static void fill_linear_fade_in (Gain& curve, nframes_t frames);
- static void fill_linear_volume_fade_in (Gain& curve, nframes_t frames);
- static void fill_linear_fade_out (Gain& curve, nframes_t frames);
- static void fill_linear_volume_fade_out (Gain& curve, nframes_t frames);
+ static void fill_linear_fade_in (Gain& curve, framecnt_t frames);
+ static void fill_linear_volume_fade_in (Gain& curve, framecnt_t frames);
+ static void fill_linear_fade_out (Gain& curve, framecnt_t frames);
+ static void fill_linear_volume_fade_out (Gain& curve, framecnt_t frames);
};
diff --git a/libs/ardour/ardour/graph.h b/libs/ardour/ardour/graph.h
index bb51c99237..6893c08d9d 100644
--- a/libs/ardour/ardour/graph.h
+++ b/libs/ardour/ardour/graph.h
@@ -71,14 +71,14 @@ class Graph : public SessionHandleRef
void helper_thread();
void main_thread();
- int silent_process_routes (nframes_t nframes, framepos_t start_frame, framepos_t end_frame,
- bool can_record, bool rec_monitors_input, bool& need_butler);
+ int silent_process_routes (pframes_t nframes, framepos_t start_frame, framepos_t end_frame,
+ bool can_record, bool rec_monitors_input, bool& need_butler);
- int process_routes (nframes_t nframes, framepos_t start_frame, framepos_t end_frame, int declick,
- bool can_record, bool rec_monitors_input, bool& need_butler);
+ int process_routes (pframes_t nframes, framepos_t start_frame, framepos_t end_frame, int declick,
+ bool can_record, bool rec_monitors_input, bool& need_butler);
- int routes_no_roll (nframes_t nframes, framepos_t start_frame, framepos_t end_frame,
- bool non_rt_pending, bool can_record, int declick);
+ int routes_no_roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame,
+ bool non_rt_pending, bool can_record, int declick);
void process_one_route (Route * route);
@@ -118,7 +118,7 @@ class Graph : public SessionHandleRef
volatile int _setup_chain;
// parameter caches.
- nframes_t _process_nframes;
+ pframes_t _process_nframes;
framepos_t _process_start_frame;
framepos_t _process_end_frame;
bool _process_can_record;
diff --git a/libs/ardour/ardour/importable_source.h b/libs/ardour/ardour/importable_source.h
index c610d546f2..804b062969 100644
--- a/libs/ardour/ardour/importable_source.h
+++ b/libs/ardour/ardour/importable_source.h
@@ -30,12 +30,12 @@ public:
ImportableSource () {}
virtual ~ImportableSource() {}
- virtual nframes_t read (Sample* buffer, nframes_t nframes) = 0;
+ virtual framecnt_t read (Sample* buffer, framecnt_t nframes) = 0;
virtual float ratio() const { return 1.0f; }
virtual uint32_t channels() const = 0;
virtual framecnt_t length() const = 0;
- virtual nframes_t samplerate() const = 0;
- virtual void seek (nframes_t pos) = 0;
+ virtual framecnt_t samplerate() const = 0;
+ virtual void seek (framecnt_t pos) = 0;
virtual framepos_t natural_position() const = 0;
virtual bool clamped_at_unity () const = 0;
diff --git a/libs/ardour/ardour/internal_return.h b/libs/ardour/ardour/internal_return.h
index d05e764592..41d09b2805 100644
--- a/libs/ardour/ardour/internal_return.h
+++ b/libs/ardour/ardour/internal_return.h
@@ -36,21 +36,21 @@ XMLNode& state(bool full);
XMLNode& get_state(void);
int set_state(const XMLNode&, int version);
- void run (BufferSet& bufs, framepos_t start_frame, framepos_t end_frame, nframes_t nframes, bool);
+ void run (BufferSet& bufs, framepos_t start_frame, framepos_t end_frame, pframes_t nframes, bool);
bool configure_io (ChanCount in, ChanCount out);
bool can_support_io_configuration (const ChanCount& in, ChanCount& out) const;
- int set_block_size (nframes_t);
+ int set_block_size (pframes_t);
BufferSet* get_buffers();
void release_buffers();
- static PBD::Signal1<void,nframes_t> CycleStart;
+ static PBD::Signal1<void, pframes_t> CycleStart;
private:
BufferSet buffers;
gint user_count; /* atomic */
- void allocate_buffers (nframes_t);
- void cycle_start (nframes_t);
+ void allocate_buffers (pframes_t);
+ void cycle_start (pframes_t);
};
} // namespace ARDOUR
diff --git a/libs/ardour/ardour/internal_send.h b/libs/ardour/ardour/internal_send.h
index d2a769982c..903e4673df 100644
--- a/libs/ardour/ardour/internal_send.h
+++ b/libs/ardour/ardour/internal_send.h
@@ -39,11 +39,11 @@ class InternalSend : public Send
XMLNode& get_state(void);
int set_state(const XMLNode& node, int version);
- void run (BufferSet& bufs, framepos_t start_frame, framepos_t end_frame, nframes_t nframes, bool);
+ void run (BufferSet& bufs, framepos_t start_frame, framepos_t end_frame, pframes_t nframes, bool);
bool feeds (boost::shared_ptr<Route> other) const;
bool can_support_io_configuration (const ChanCount& in, ChanCount& out) const;
bool configure_io (ChanCount in, ChanCount out);
- int set_block_size (nframes_t);
+ int set_block_size (pframes_t);
boost::shared_ptr<Route> target_route() const { return _send_to; }
const PBD::ID& target_id() const { return _send_to_id; }
diff --git a/libs/ardour/ardour/interpolation.h b/libs/ardour/ardour/interpolation.h
index 21a47cfcdc..0d79b01d14 100644
--- a/libs/ardour/ardour/interpolation.h
+++ b/libs/ardour/ardour/interpolation.h
@@ -39,13 +39,13 @@ class Interpolation {
};
class LinearInterpolation : public Interpolation {
- public:
- nframes_t interpolate (int channel, nframes_t nframes, Sample* input, Sample* output);
+public:
+ framecnt_t interpolate (int channel, framecnt_t nframes, Sample* input, Sample* output);
};
class CubicInterpolation : public Interpolation {
- public:
- nframes_t interpolate (int channel, nframes_t nframes, Sample* input, Sample* output);
+public:
+ framecnt_t interpolate (int channel, framecnt_t nframes, Sample* input, Sample* output);
};
} // namespace ARDOUR
diff --git a/libs/ardour/ardour/io.h b/libs/ardour/ardour/io.h
index 9d423f55a5..fd7cb563fd 100644
--- a/libs/ardour/ardour/io.h
+++ b/libs/ardour/ardour/io.h
@@ -89,7 +89,7 @@ class IO : public SessionObject, public Latent
bool set_name (const std::string& str);
- virtual void silence (nframes_t);
+ virtual void silence (framecnt_t);
int ensure_io (ChanCount cnt, bool clear, void *src);
@@ -109,9 +109,9 @@ class IO : public SessionObject, public Latent
bool connected () const;
bool physically_connected () const;
- nframes_t signal_latency() const { return _own_latency; }
- nframes_t latency() const;
- void set_port_latency (nframes_t);
+ framecnt_t signal_latency () const { return _own_latency; }
+ framecnt_t latency () const;
+ void set_port_latency (framecnt_t);
void update_port_total_latencies ();
@@ -188,9 +188,9 @@ class IO : public SessionObject, public Latent
/* three utility functions - this just seems to be simplest place to put them */
- void collect_input (BufferSet& bufs, nframes_t nframes, ChanCount offset);
- void process_input (boost::shared_ptr<Processor>, framepos_t start_frame, framepos_t end_frame, nframes_t nframes);
- void copy_to_outputs (BufferSet& bufs, DataType type, nframes_t nframes, nframes_t offset);
+ void collect_input (BufferSet& bufs, pframes_t nframes, ChanCount offset);
+ void process_input (boost::shared_ptr<Processor>, framepos_t start_frame, framepos_t end_frame, pframes_t nframes);
+ void copy_to_outputs (BufferSet& bufs, DataType type, pframes_t nframes, framecnt_t offset);
/* AudioTrack::deprecated_use_diskstream_connections() needs these */
diff --git a/libs/ardour/ardour/io_processor.h b/libs/ardour/ardour/io_processor.h
index 7d1854ced0..cb80b74351 100644
--- a/libs/ardour/ardour/io_processor.h
+++ b/libs/ardour/ardour/io_processor.h
@@ -62,7 +62,7 @@ class IOProcessor : public Processor
void set_input (boost::shared_ptr<IO>);
void set_output (boost::shared_ptr<IO>);
- void silence (nframes_t nframes);
+ void silence (framecnt_t nframes);
void disconnect ();
virtual bool feeds (boost::shared_ptr<Route> other) const;
diff --git a/libs/ardour/ardour/ladspa_plugin.h b/libs/ardour/ardour/ladspa_plugin.h
index f4da2bf0a0..968342a909 100644
--- a/libs/ardour/ardour/ladspa_plugin.h
+++ b/libs/ardour/ardour/ladspa_plugin.h
@@ -39,7 +39,7 @@ class Session;
class LadspaPlugin : public ARDOUR::Plugin
{
public:
- LadspaPlugin (void *module, ARDOUR::AudioEngine&, ARDOUR::Session&, uint32_t index, nframes_t sample_rate);
+ LadspaPlugin (void *module, ARDOUR::AudioEngine&, ARDOUR::Session&, uint32_t index, framecnt_t sample_rate);
LadspaPlugin (const LadspaPlugin &);
~LadspaPlugin ();
@@ -51,7 +51,7 @@ class LadspaPlugin : public ARDOUR::Plugin
const char* maker() const { return _descriptor->Maker; }
uint32_t parameter_count() const { return _descriptor->PortCount; }
float default_value (uint32_t port);
- nframes_t signal_latency() const;
+ framecnt_t signal_latency() const;
void set_parameter (uint32_t port, float val);
float get_parameter (uint32_t port) const;
int get_parameter_descriptor (uint32_t which, ParameterDescriptor&) const;
@@ -81,11 +81,11 @@ class LadspaPlugin : public ARDOUR::Plugin
_descriptor->cleanup (_handle);
}
- int set_block_size (nframes_t /*nframes*/) { return 0; }
+ int set_block_size (pframes_t /*nframes*/) { return 0; }
int connect_and_run (BufferSet& bufs,
ChanMapping in, ChanMapping out,
- nframes_t nframes, nframes_t offset);
+ pframes_t nframes, framecnt_t offset);
std::string describe_parameter (Evoral::Parameter);
std::string state_node_name() const { return "ladspa"; }
@@ -122,15 +122,15 @@ class LadspaPlugin : public ARDOUR::Plugin
void* _module;
const LADSPA_Descriptor* _descriptor;
LADSPA_Handle _handle;
- nframes_t _sample_rate;
+ framecnt_t _sample_rate;
LADSPA_Data* _control_data;
LADSPA_Data* _shadow_data;
LADSPA_Data* _latency_control_port;
uint32_t _index;
bool _was_activated;
- void init (void *mod, uint32_t index, nframes_t rate);
- void run_in_place (nframes_t nsamples);
+ void init (void *mod, uint32_t index, framecnt_t rate);
+ void run_in_place (pframes_t nsamples);
void latency_compute_run ();
int set_state_2X (const XMLNode&, int version);
};
diff --git a/libs/ardour/ardour/latent.h b/libs/ardour/ardour/latent.h
index d1e62aaf45..ba2f91d2a2 100644
--- a/libs/ardour/ardour/latent.h
+++ b/libs/ardour/ardour/latent.h
@@ -10,10 +10,10 @@ class Latent {
Latent() : _own_latency (0), _user_latency (0) {}
virtual ~Latent() {}
- virtual nframes_t signal_latency() const = 0;
- nframes_t user_latency () const { return _user_latency; }
+ virtual framecnt_t signal_latency() const = 0;
+ framecnt_t user_latency () const { return _user_latency; }
- nframes_t effective_latency() const {
+ framecnt_t effective_latency() const {
if (_user_latency) {
return _user_latency;
} else {
@@ -21,12 +21,12 @@ class Latent {
}
}
- virtual void set_latency_delay (nframes_t val) { _own_latency = val; }
- virtual void set_user_latency (nframes_t val) { _user_latency = val; }
+ virtual void set_latency_delay (framecnt_t val) { _own_latency = val; }
+ virtual void set_user_latency (framecnt_t val) { _user_latency = val; }
protected:
- nframes_t _own_latency;
- nframes_t _user_latency;
+ framecnt_t _own_latency;
+ framecnt_t _user_latency;
};
}
diff --git a/libs/ardour/ardour/lv2_plugin.h b/libs/ardour/ardour/lv2_plugin.h
index 0c8b3e511c..821922903b 100644
--- a/libs/ardour/ardour/lv2_plugin.h
+++ b/libs/ardour/ardour/lv2_plugin.h
@@ -41,7 +41,7 @@ struct LV2World;
class LV2Plugin : public ARDOUR::Plugin
{
public:
- LV2Plugin (ARDOUR::AudioEngine&, ARDOUR::Session&, ARDOUR::LV2World&, SLV2Plugin plugin, nframes_t sample_rate);
+ LV2Plugin (ARDOUR::AudioEngine&, ARDOUR::Session&, ARDOUR::LV2World&, SLV2Plugin plugin, framecnt_t sample_rate);
LV2Plugin (const LV2Plugin &);
~LV2Plugin ();
@@ -53,7 +53,7 @@ class LV2Plugin : public ARDOUR::Plugin
const char* maker() const { return _author ? slv2_value_as_string(_author) : "Unknown"; }
uint32_t parameter_count() const { return slv2_plugin_get_num_ports(_plugin); }
float default_value (uint32_t port);
- nframes_t signal_latency() const;
+ framecnt_t signal_latency () const;
void set_parameter (uint32_t port, float val);
float get_parameter (uint32_t port) const;
int get_parameter_descriptor (uint32_t which, ParameterDescriptor&) const;
@@ -93,11 +93,11 @@ class LV2Plugin : public ARDOUR::Plugin
_instance = NULL;
}
- int set_block_size (nframes_t /*nframes*/) { return 0; }
+ int set_block_size (pframes_t /*nframes*/) { return 0; }
int connect_and_run (BufferSet& bufs,
ChanMapping in, ChanMapping out,
- nframes_t nframes, nframes_t offset);
+ pframes_t nframes, framecnt_t offset);
std::string describe_parameter (Evoral::Parameter);
std::string state_node_name() const { return "lv2"; }
@@ -129,7 +129,7 @@ class LV2Plugin : public ARDOUR::Plugin
SLV2Value _name;
SLV2Value _author;
SLV2Instance _instance;
- nframes_t _sample_rate;
+ framecnt_t _sample_rate;
float* _control_data;
float* _shadow_data;
float* _defaults;
@@ -149,8 +149,8 @@ class LV2Plugin : public ARDOUR::Plugin
static URIMap _uri_map;
static uint32_t _midi_event_type;
- void init (LV2World& world, SLV2Plugin plugin, nframes_t rate);
- void run (nframes_t nsamples);
+ void init (LV2World& world, SLV2Plugin plugin, framecnt_t rate);
+ void run (pframes_t nsamples);
void latency_compute_run ();
};
diff --git a/libs/ardour/ardour/meter.h b/libs/ardour/ardour/meter.h
index dad86d5185..7ff910a91b 100644
--- a/libs/ardour/ardour/meter.h
+++ b/libs/ardour/ardour/meter.h
@@ -68,7 +68,7 @@ public:
void reflect_inputs (const ChanCount& in);
/** Compute peaks */
- void run (BufferSet& bufs, framepos_t start_frame, framepos_t end_frame, nframes_t nframes, bool);
+ void run (BufferSet& bufs, framepos_t start_frame, framepos_t end_frame, pframes_t nframes, bool);
ChanCount input_streams () const { return current_meters; }
ChanCount output_streams () const { return current_meters; }
diff --git a/libs/ardour/ardour/midi_buffer.h b/libs/ardour/ardour/midi_buffer.h
index b3ed093df7..18a95e9347 100644
--- a/libs/ardour/ardour/midi_buffer.h
+++ b/libs/ardour/ardour/midi_buffer.h
@@ -32,14 +32,14 @@ namespace ARDOUR {
class MidiBuffer : public Buffer
{
public:
- typedef nframes_t TimeType;
+ typedef framepos_t TimeType;
MidiBuffer(size_t capacity);
~MidiBuffer();
- void silence (nframes_t nframes, nframes_t offset = 0);
- void read_from (const Buffer& src, nframes_t nframes, nframes_t dst_offset = 0, nframes_t src_offset = 0);
- void merge_from (const Buffer& src, nframes_t nframes, nframes_t dst_offset = 0, nframes_t src_offset = 0);
+ void silence (framecnt_t nframes, framecnt_t offset = 0);
+ void read_from (const Buffer& src, framecnt_t nframes, framecnt_t dst_offset = 0, framecnt_t src_offset = 0);
+ void merge_from (const Buffer& src, framecnt_t nframes, framecnt_t dst_offset = 0, framecnt_t src_offset = 0);
void copy(const MidiBuffer& copy);
@@ -55,7 +55,7 @@ public:
template<typename BufferType, typename EventType>
struct iterator_base {
- iterator_base<BufferType, EventType>(BufferType& b, nframes_t o) : buffer(b), offset(o) {}
+ iterator_base<BufferType, EventType>(BufferType& b, framecnt_t o) : buffer(b), offset(o) {}
inline EventType operator*() const {
uint8_t* ev_start = buffer._data + offset + sizeof(TimeType);
int event_size = Evoral::midi_event_size(ev_start);
diff --git a/libs/ardour/ardour/midi_diskstream.h b/libs/ardour/ardour/midi_diskstream.h
index 126857a858..aea60dc3bf 100644
--- a/libs/ardour/ardour/midi_diskstream.h
+++ b/libs/ardour/ardour/midi_diskstream.h
@@ -124,7 +124,7 @@ class MidiDiskstream : public Diskstream
void set_pending_overwrite(bool);
int overwrite_existing_buffers ();
- void set_block_size (nframes_t);
+ void set_block_size (pframes_t);
int internal_playback_seek (framecnt_t distance);
int can_internal_playback_seek (framecnt_t distance);
int rename_write_sources ();
@@ -133,7 +133,7 @@ class MidiDiskstream : public Diskstream
void non_realtime_input_change ();
void non_realtime_locate (framepos_t location);
- static void set_readahead_frames(nframes_t frames_ahead) { midi_readahead = frames_ahead; }
+ static void set_readahead_frames (framecnt_t frames_ahead) { midi_readahead = frames_ahead; }
protected:
int seek (framepos_t which_sample, bool complete_refill = false);
@@ -141,9 +141,9 @@ class MidiDiskstream : public Diskstream
protected:
friend class MidiTrack;
- int process (framepos_t transport_frame, nframes_t nframes, bool can_record, bool rec_monitors_input, bool& need_butler);
- bool commit (nframes_t nframes);
- static nframes_t midi_readahead;
+ int process (framepos_t transport_frame, pframes_t nframes, bool can_record, bool rec_monitors_input, bool& need_butler);
+ bool commit (framecnt_t nframes);
+ static framecnt_t midi_readahead;
private:
@@ -153,7 +153,7 @@ class MidiDiskstream : public Diskstream
int do_refill_with_alloc();
- int read (framepos_t& start, nframes_t cnt, bool reversed);
+ int read (framepos_t& start, framecnt_t cnt, bool reversed);
void finish_capture (bool rec_monitors_input);
void transport_stopped_wallclock (struct tm&, time_t, bool abort);
@@ -181,11 +181,11 @@ class MidiDiskstream : public Diskstream
void engage_record_enable ();
void disengage_record_enable ();
- MidiRingBuffer<nframes_t>* _playback_buf;
- MidiRingBuffer<nframes_t>* _capture_buf;
+ MidiRingBuffer<framepos_t>* _playback_buf;
+ MidiRingBuffer<framepos_t>* _capture_buf;
MidiPort* _source_port;
boost::shared_ptr<SMFSource> _write_source;
- nframes_t _last_flush_frame;
+ framepos_t _last_flush_frame;
NoteMode _note_mode;
volatile gint _frames_written_to_ringbuffer;
volatile gint _frames_read_from_ringbuffer;
diff --git a/libs/ardour/ardour/midi_playlist.h b/libs/ardour/ardour/midi_playlist.h
index ccadb39e92..6170e9271f 100644
--- a/libs/ardour/ardour/midi_playlist.h
+++ b/libs/ardour/ardour/midi_playlist.h
@@ -43,13 +43,13 @@ public:
MidiPlaylist (Session&, const XMLNode&, bool hidden = false);
MidiPlaylist (Session&, std::string name, bool hidden = false);
MidiPlaylist (boost::shared_ptr<const MidiPlaylist> other, std::string name, bool hidden = false);
- MidiPlaylist (boost::shared_ptr<const MidiPlaylist> other, nframes_t start, nframes_t cnt,
+ MidiPlaylist (boost::shared_ptr<const MidiPlaylist> other, framepos_t start, framecnt_t cnt,
std::string name, bool hidden = false);
~MidiPlaylist ();
- nframes_t read (MidiRingBuffer<nframes_t>& buf,
- nframes_t start, nframes_t cnt, uint32_t chan_n=0);
+ framecnt_t read (MidiRingBuffer<framepos_t>& buf,
+ framepos_t start, framecnt_t cnt, uint32_t chan_n = 0);
int set_state (const XMLNode&, int version);
diff --git a/libs/ardour/ardour/midi_port.h b/libs/ardour/ardour/midi_port.h
index 8b6095c470..7a019e5a20 100644
--- a/libs/ardour/ardour/midi_port.h
+++ b/libs/ardour/ardour/midi_port.h
@@ -37,20 +37,20 @@ class MidiPort : public Port {
return DataType::MIDI;
}
- void cycle_start (nframes_t nframes);
- void cycle_end (nframes_t nframes);
+ void cycle_start (pframes_t nframes);
+ void cycle_end (pframes_t nframes);
void cycle_split ();
- void flush_buffers (nframes_t nframes, framepos_t time, nframes_t offset = 0);
+ void flush_buffers (pframes_t nframes, framepos_t time, framecnt_t offset = 0);
void transport_stopped ();
- size_t raw_buffer_size(jack_nframes_t nframes) const;
+ size_t raw_buffer_size (pframes_t nframes) const;
- Buffer& get_buffer (nframes_t nframes, nframes_t offset = 0) {
+ Buffer& get_buffer (framecnt_t nframes, framecnt_t offset = 0) {
return get_midi_buffer (nframes, offset);
}
- MidiBuffer& get_midi_buffer (nframes_t nframes, nframes_t offset = 0);
+ MidiBuffer& get_midi_buffer (framecnt_t nframes, framecnt_t offset = 0);
protected:
friend class AudioEngine;
diff --git a/libs/ardour/ardour/midi_region.h b/libs/ardour/ardour/midi_region.h
index dbbf6d80d1..853272d349 100644
--- a/libs/ardour/ardour/midi_region.h
+++ b/libs/ardour/ardour/midi_region.h
@@ -70,14 +70,14 @@ class MidiRegion : public Region
virtual framecnt_t read (Sample*, framepos_t /*pos*/, framecnt_t /*cnt*/, int /*channel*/) const { return 0; }
virtual framecnt_t readable_length() const { return length(); }
- framecnt_t read_at (Evoral::EventSink<nframes_t>& dst,
+ framecnt_t read_at (Evoral::EventSink<framepos_t>& dst,
framepos_t position,
framecnt_t dur,
uint32_t chan_n = 0,
NoteMode mode = Sustained,
MidiStateTracker* tracker = 0) const;
- framepos_t master_read_at (MidiRingBuffer<nframes_t>& dst,
+ framepos_t master_read_at (MidiRingBuffer<framepos_t>& dst,
framepos_t position,
framecnt_t dur,
uint32_t chan_n = 0,
@@ -114,7 +114,7 @@ class MidiRegion : public Region
MidiRegion (boost::shared_ptr<const MidiRegion>, frameoffset_t offset = 0, bool offset_relative = true);
private:
- framecnt_t _read_at (const SourceList&, Evoral::EventSink<nframes_t>& dst,
+ framecnt_t _read_at (const SourceList&, Evoral::EventSink<framepos_t>& dst,
framepos_t position,
framecnt_t dur,
uint32_t chan_n = 0,
diff --git a/libs/ardour/ardour/midi_ring_buffer.h b/libs/ardour/ardour/midi_ring_buffer.h
index 2de611f4d6..a809226a30 100644
--- a/libs/ardour/ardour/midi_ring_buffer.h
+++ b/libs/ardour/ardour/midi_ring_buffer.h
@@ -50,7 +50,7 @@ public:
inline bool read_prefix(T* time, Evoral::EventType* type, uint32_t* size);
inline bool read_contents(uint32_t size, uint8_t* buf);
- size_t read(MidiBuffer& dst, nframes_t start, nframes_t end, nframes_t offset=0);
+ size_t read(MidiBuffer& dst, framepos_t start, framepos_t end, framecnt_t offset=0);
void dump(std::ostream& dst);
/** Set the channel filtering mode.
diff --git a/libs/ardour/ardour/midi_source.h b/libs/ardour/ardour/midi_source.h
index 0c2759b96d..e40ccff291 100644
--- a/libs/ardour/ardour/midi_source.h
+++ b/libs/ardour/ardour/midi_source.h
@@ -58,19 +58,19 @@ class MidiSource : virtual public Source
* \param cnt Length of range to be read (in audio frames)
* \param tracker an optional pointer to MidiStateTracker object, for note on/off tracking
*/
- virtual nframes_t midi_read (Evoral::EventSink<nframes_t>& dst,
- framepos_t source_start,
- framepos_t start, nframes_t cnt,
- MidiStateTracker*,
- std::set<Evoral::Parameter> const &) const;
+ virtual framecnt_t midi_read (Evoral::EventSink<framepos_t>& dst,
+ framepos_t source_start,
+ framepos_t start, framecnt_t cnt,
+ MidiStateTracker*,
+ std::set<Evoral::Parameter> const &) const;
- virtual nframes_t midi_write (MidiRingBuffer<nframes_t>& src,
- framepos_t source_start,
- nframes_t cnt);
+ virtual framecnt_t midi_write (MidiRingBuffer<framepos_t>& src,
+ framepos_t source_start,
+ framecnt_t cnt);
virtual void append_event_unlocked_beats(const Evoral::Event<Evoral::MusicalTime>& ev) = 0;
- virtual void append_event_unlocked_frames(const Evoral::Event<nframes_t>& ev,
+ virtual void append_event_unlocked_frames(const Evoral::Event<framepos_t>& ev,
framepos_t source_start) = 0;
virtual bool empty () const;
@@ -130,14 +130,14 @@ class MidiSource : virtual public Source
protected:
virtual void flush_midi() = 0;
- virtual nframes_t read_unlocked (Evoral::EventSink<nframes_t>& dst,
- framepos_t position,
- framepos_t start, nframes_t cnt,
- MidiStateTracker* tracker) const = 0;
+ virtual framepos_t read_unlocked (Evoral::EventSink<framepos_t>& dst,
+ framepos_t position,
+ framepos_t start, framecnt_t cnt,
+ MidiStateTracker* tracker) const = 0;
- virtual nframes_t write_unlocked (MidiRingBuffer<nframes_t>& dst,
- framepos_t position,
- nframes_t cnt) = 0;
+ virtual framepos_t write_unlocked (MidiRingBuffer<framepos_t>& dst,
+ framepos_t position,
+ framecnt_t cnt) = 0;
std::string _captured_for;
mutable uint32_t _read_data_count; ///< modified in read()
diff --git a/libs/ardour/ardour/midi_state_tracker.h b/libs/ardour/ardour/midi_state_tracker.h
index 9720649a10..f6acb88f23 100644
--- a/libs/ardour/ardour/midi_state_tracker.h
+++ b/libs/ardour/ardour/midi_state_tracker.h
@@ -42,7 +42,7 @@ public:
void add (uint8_t note, uint8_t chn);
void remove (uint8_t note, uint8_t chn);
void resolve_notes (MidiBuffer& buffer, framepos_t time);
- void resolve_notes (Evoral::EventSink<nframes_t>& buffer, framepos_t time);
+ void resolve_notes (Evoral::EventSink<framepos_t>& buffer, framepos_t time);
void resolve_notes (MidiSource& src, Evoral::MusicalTime time);
void dump (std::ostream&);
void reset ();
diff --git a/libs/ardour/ardour/midi_track.h b/libs/ardour/ardour/midi_track.h
index 91ccc4b1fe..554f5b3385 100644
--- a/libs/ardour/ardour/midi_track.h
+++ b/libs/ardour/ardour/midi_track.h
@@ -39,7 +39,7 @@ public:
MidiTrack (Session&, string name, Route::Flag f = Route::Flag (0), TrackMode m = Normal);
~MidiTrack ();
- int roll (nframes_t nframes, framepos_t start_frame, framepos_t end_frame,
+ int roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame,
int declick, bool can_record, bool rec_monitors_input, bool& need_butler);
void handle_transport_stopped (bool abort, bool did_locate, bool flush_processors);
@@ -52,16 +52,17 @@ public:
return DataType::MIDI;
}
- void set_latency_delay (nframes_t);
+ void set_latency_delay (framecnt_t);
- int export_stuff (BufferSet& bufs, nframes_t nframes, framepos_t end_frame);
+ int export_stuff (BufferSet& bufs, framecnt_t nframes, framepos_t end_frame);
void freeze_me (InterThreadInfo&);
void unfreeze ();
boost::shared_ptr<Region> bounce (InterThreadInfo&);
- boost::shared_ptr<Region> bounce_range (
- nframes_t start, nframes_t end, InterThreadInfo&, bool enable_processing);
+ boost::shared_ptr<Region> bounce_range (
+ framepos_t start, framepos_t end, InterThreadInfo&, bool enable_processing
+ );
int set_state(const XMLNode&, int version);
@@ -86,7 +87,7 @@ public:
bool step_editing() const { return _step_editing; }
void set_step_editing (bool yn);
- MidiRingBuffer<nframes_t>& step_edit_ring_buffer() { return _step_edit_ring_buffer; }
+ MidiRingBuffer<framepos_t>& step_edit_ring_buffer() { return _step_edit_ring_buffer; }
PBD::Signal1<void,bool> StepEditStatusChange;
@@ -112,21 +113,21 @@ protected:
private:
boost::shared_ptr<MidiDiskstream> midi_diskstream () const;
- void write_out_of_band_data (BufferSet& bufs, framepos_t start_frame, framepos_t end_frame, nframes_t nframes);
+ void write_out_of_band_data (BufferSet& bufs, framepos_t start_frame, framepos_t end_frame, framecnt_t nframes);
void set_state_part_two ();
void set_state_part_three ();
- MidiRingBuffer<nframes_t> _immediate_events;
- MidiRingBuffer<nframes_t> _step_edit_ring_buffer;
+ MidiRingBuffer<framepos_t> _immediate_events;
+ MidiRingBuffer<framepos_t> _step_edit_ring_buffer;
NoteMode _note_mode;
bool _step_editing;
uint8_t _default_channel;
bool _midi_thru;
- int no_roll (nframes_t nframes, framepos_t start_frame, framepos_t end_frame,
+ int no_roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame,
bool state_changing, bool can_record, bool rec_monitors_input);
- void push_midi_input_to_step_edit_ringbuffer (nframes_t nframes);
+ void push_midi_input_to_step_edit_ringbuffer (framecnt_t nframes);
void diskstream_data_recorded (boost::shared_ptr<MidiBuffer>, boost::weak_ptr<MidiSource>);
PBD::ScopedConnection _diskstream_data_recorded_connection;
diff --git a/libs/ardour/ardour/mix.h b/libs/ardour/ardour/mix.h
index 72b414d09c..2118b819b5 100644
--- a/libs/ardour/ardour/mix.h
+++ b/libs/ardour/ardour/mix.h
@@ -26,39 +26,39 @@
extern "C" {
/* SSE functions */
- float x86_sse_compute_peak (const ARDOUR::Sample * buf, ARDOUR::nframes_t nsamples, float current);
- void x86_sse_apply_gain_to_buffer (ARDOUR::Sample * buf, ARDOUR::nframes_t nframes, float gain);
- void x86_sse_mix_buffers_with_gain(ARDOUR::Sample * dst, const ARDOUR::Sample * src, ARDOUR::nframes_t nframes, float gain);
- void x86_sse_mix_buffers_no_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, ARDOUR::nframes_t nframes);
+ float x86_sse_compute_peak (const ARDOUR::Sample * buf, ARDOUR::pframes_t nsamples, float current);
+ void x86_sse_apply_gain_to_buffer (ARDOUR::Sample * buf, ARDOUR::pframes_t nframes, float gain);
+ void x86_sse_mix_buffers_with_gain(ARDOUR::Sample * dst, const ARDOUR::Sample * src, ARDOUR::pframes_t nframes, float gain);
+ void x86_sse_mix_buffers_no_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, ARDOUR::pframes_t nframes);
}
-void x86_sse_find_peaks (const ARDOUR::Sample * buf, ARDOUR::nframes_t nsamples, float *min, float *max);
+void x86_sse_find_peaks (const ARDOUR::Sample * buf, ARDOUR::pframes_t nsamples, float *min, float *max);
/* debug wrappers for SSE functions */
-float debug_compute_peak (const ARDOUR::Sample * buf, ARDOUR::nframes_t nsamples, float current);
-void debug_apply_gain_to_buffer (ARDOUR::Sample * buf, ARDOUR::nframes_t nframes, float gain);
-void debug_mix_buffers_with_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, ARDOUR::nframes_t nframes, float gain);
-void debug_mix_buffers_no_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, ARDOUR::nframes_t nframes);
+float debug_compute_peak (const ARDOUR::Sample * buf, ARDOUR::pframes_t nsamples, float current);
+void debug_apply_gain_to_buffer (ARDOUR::Sample * buf, ARDOUR::pframes_t nframes, float gain);
+void debug_mix_buffers_with_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, ARDOUR::pframes_t nframes, float gain);
+void debug_mix_buffers_no_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, ARDOUR::pframes_t nframes);
#endif
#if defined (__APPLE__)
-float veclib_compute_peak (const ARDOUR::Sample * buf, ARDOUR::nframes_t nsamples, float current);
-void veclib_find_peaks (const ARDOUR::Sample * buf, ARDOUR::nframes_t nsamples, float *min, float *max);
-void veclib_apply_gain_to_buffer (ARDOUR::Sample * buf, ARDOUR::nframes_t nframes, float gain);
-void veclib_mix_buffers_with_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, ARDOUR::nframes_t nframes, float gain);
-void veclib_mix_buffers_no_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, ARDOUR::nframes_t nframes);
+float veclib_compute_peak (const ARDOUR::Sample * buf, ARDOUR::pframes_t nsamples, float current);
+void veclib_find_peaks (const ARDOUR::Sample * buf, ARDOUR::pframes_t nsamples, float *min, float *max);
+void veclib_apply_gain_to_buffer (ARDOUR::Sample * buf, ARDOUR::pframes_t nframes, float gain);
+void veclib_mix_buffers_with_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, ARDOUR::pframes_t nframes, float gain);
+void veclib_mix_buffers_no_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, ARDOUR::pframes_t nframes);
#endif
/* non-optimized functions */
-float default_compute_peak (const ARDOUR::Sample * buf, ARDOUR::nframes_t nsamples, float current);
-void default_find_peaks (const ARDOUR::Sample * buf, ARDOUR::nframes_t nsamples, float *min, float *max);
-void default_apply_gain_to_buffer (ARDOUR::Sample * buf, ARDOUR::nframes_t nframes, float gain);
-void default_mix_buffers_with_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, ARDOUR::nframes_t nframes, float gain);
-void default_mix_buffers_no_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, ARDOUR::nframes_t nframes);
+float default_compute_peak (const ARDOUR::Sample * buf, ARDOUR::pframes_t nsamples, float current);
+void default_find_peaks (const ARDOUR::Sample * buf, ARDOUR::pframes_t nsamples, float *min, float *max);
+void default_apply_gain_to_buffer (ARDOUR::Sample * buf, ARDOUR::pframes_t nframes, float gain);
+void default_mix_buffers_with_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, ARDOUR::pframes_t nframes, float gain);
+void default_mix_buffers_no_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, ARDOUR::pframes_t nframes);
#endif /* __ardour_mix_h__ */
diff --git a/libs/ardour/ardour/monitor_processor.h b/libs/ardour/ardour/monitor_processor.h
index 0f23d7029f..f8675bde2e 100644
--- a/libs/ardour/ardour/monitor_processor.h
+++ b/libs/ardour/ardour/monitor_processor.h
@@ -110,7 +110,7 @@ class MonitorProcessor : public Processor
bool display_to_user() const;
- void run (BufferSet& /*bufs*/, framepos_t /*start_frame*/, framepos_t /*end_frame*/, nframes_t /*nframes*/, bool /*result_required*/);
+ void run (BufferSet& /*bufs*/, framepos_t /*start_frame*/, framepos_t /*end_frame*/, pframes_t /*nframes*/, bool /*result_required*/);
XMLNode& state (bool full);
int set_state (const XMLNode&, int /* version */);
diff --git a/libs/ardour/ardour/panner.h b/libs/ardour/ardour/panner.h
index 3bfe2cf713..4550aab5a5 100644
--- a/libs/ardour/ardour/panner.h
+++ b/libs/ardour/ardour/panner.h
@@ -56,8 +56,8 @@ class StreamPanner : public PBD::Stateful
void set_position (const PBD::AngularVector&, bool link_call = false);
void set_diffusion (double);
- void distribute (AudioBuffer &, BufferSet &, gain_t, nframes_t);
- void distribute_automated (AudioBuffer &, BufferSet &, nframes_t, nframes_t, nframes_t, pan_t **);
+ void distribute (AudioBuffer &, BufferSet &, gain_t, pframes_t);
+ void distribute_automated (AudioBuffer &, BufferSet &, framepos_t, framepos_t, pframes_t, pan_t **);
/* the basic StreamPanner API */
@@ -69,9 +69,9 @@ class StreamPanner : public PBD::Stateful
* @param gain_coeff Gain coefficient to apply to output samples.
* @param nframes Number of frames in the input.
*/
- virtual void do_distribute (AudioBuffer& src, BufferSet& obufs, gain_t gain_coeff, nframes_t nframes) = 0;
+ virtual void do_distribute (AudioBuffer& src, BufferSet& obufs, gain_t gain_coeff, pframes_t nframes) = 0;
virtual void do_distribute_automated (AudioBuffer& src, BufferSet& obufs,
- nframes_t start, nframes_t end, nframes_t nframes,
+ framepos_t start, framepos_t end, pframes_t nframes,
pan_t** buffers) = 0;
boost::shared_ptr<AutomationControl> pan_control() { return _control; }
@@ -135,7 +135,7 @@ class BaseStereoPanner : public StreamPanner
and a type name. See EqualPowerStereoPanner as an example.
*/
- void do_distribute (AudioBuffer& src, BufferSet& obufs, gain_t gain_coeff, nframes_t nframes);
+ void do_distribute (AudioBuffer& src, BufferSet& obufs, gain_t gain_coeff, pframes_t nframes);
static double azimuth_to_lr_fract (double azi) {
/* 180.0 degrees=> left => 0.0 */
@@ -169,7 +169,7 @@ class EqualPowerStereoPanner : public BaseStereoPanner
~EqualPowerStereoPanner ();
void do_distribute_automated (AudioBuffer& src, BufferSet& obufs,
- nframes_t start, nframes_t end, nframes_t nframes,
+ framepos_t start, framepos_t end, pframes_t nframes,
pan_t** buffers);
void get_current_coefficients (pan_t*) const;
@@ -219,7 +219,7 @@ public:
bool can_support_io_configuration (const ChanCount& /*in*/, ChanCount& /*out*/) const { return true; };
/// The fundamental Panner function
- void run (BufferSet& src, BufferSet& dest, framepos_t start_frame, framepos_t end_frames, nframes_t nframes);
+ void run (BufferSet& src, BufferSet& dest, framepos_t start_frame, framepos_t end_frames, pframes_t nframes);
bool bypassed() const { return _bypassed; }
void set_bypassed (bool yn);
@@ -300,7 +300,7 @@ public:
/* disallow copy construction */
Panner (Panner const &);
- void distribute_no_automation(BufferSet& src, BufferSet& dest, nframes_t nframes, gain_t gain_coeff);
+ void distribute_no_automation(BufferSet& src, BufferSet& dest, pframes_t nframes, gain_t gain_coeff);
std::vector<StreamPanner*> _streampanners; ///< one StreamPanner per input
std::vector<Output> outputs;
uint32_t current_outs;
diff --git a/libs/ardour/ardour/peak.h b/libs/ardour/ardour/peak.h
index 2283f50118..ab99889dd3 100644
--- a/libs/ardour/ardour/peak.h
+++ b/libs/ardour/ardour/peak.h
@@ -25,9 +25,9 @@
#include "ardour/utils.h"
static inline float
-default_compute_peak (const ARDOUR::Sample * const buf, ARDOUR::nframes_t nsamples, float current)
+default_compute_peak (const ARDOUR::Sample * const buf, ARDOUR::pframes_t nsamples, float current)
{
- for (ARDOUR::nframes_t i = 0; i < nsamples; ++i) {
+ for (ARDOUR::pframes_t i = 0; i < nsamples; ++i) {
current = f_max (current, fabsf (buf[i]));
}
return current;
diff --git a/libs/ardour/ardour/playlist_factory.h b/libs/ardour/ardour/playlist_factory.h
index 17645ad8a3..8b5d9d6a23 100644
--- a/libs/ardour/ardour/playlist_factory.h
+++ b/libs/ardour/ardour/playlist_factory.h
@@ -36,7 +36,7 @@ class PlaylistFactory {
static boost::shared_ptr<Playlist> create (Session&, const XMLNode&, bool hidden = false, bool unused = false);
static boost::shared_ptr<Playlist> create (DataType type, Session&, std::string name, bool hidden = false);
static boost::shared_ptr<Playlist> create (boost::shared_ptr<const Playlist>, std::string name, bool hidden = false);
- static boost::shared_ptr<Playlist> create (boost::shared_ptr<const Playlist>, nframes_t start, nframes_t cnt, std::string name, bool hidden = false);
+ static boost::shared_ptr<Playlist> create (boost::shared_ptr<const Playlist>, framepos_t start, framecnt_t cnt, std::string name, bool hidden = false);
};
}
diff --git a/libs/ardour/ardour/plugin.h b/libs/ardour/ardour/plugin.h
index 3d7c8d9c33..bab2b71f31 100644
--- a/libs/ardour/ardour/plugin.h
+++ b/libs/ardour/ardour/plugin.h
@@ -112,11 +112,11 @@ class Plugin : public PBD::StatefulDestructible, public Latent
virtual void deactivate () = 0;
virtual void flush () { deactivate(); activate(); }
- virtual int set_block_size (nframes_t nframes) = 0;
+ virtual int set_block_size (pframes_t nframes) = 0;
virtual int connect_and_run (BufferSet& bufs,
ChanMapping in, ChanMapping out,
- nframes_t nframes, nframes_t offset) = 0;
+ pframes_t nframes, framecnt_t offset) = 0;
virtual std::set<Evoral::Parameter> automatable() const = 0;
virtual std::string describe_parameter (Evoral::Parameter) = 0;
diff --git a/libs/ardour/ardour/plugin_insert.h b/libs/ardour/ardour/plugin_insert.h
index 9b65ba41f5..e4a42d8165 100644
--- a/libs/ardour/ardour/plugin_insert.h
+++ b/libs/ardour/ardour/plugin_insert.h
@@ -52,14 +52,14 @@ class PluginInsert : public Processor
XMLNode& get_state(void);
int set_state(const XMLNode&, int version);
- void run (BufferSet& in, framepos_t start_frame, framepos_t end_frame, nframes_t nframes, bool);
- void silence (nframes_t nframes);
+ void run (BufferSet& in, framepos_t start_frame, framepos_t end_frame, pframes_t nframes, bool);
+ void silence (framecnt_t nframes);
void activate ();
void deactivate ();
void flush ();
- int set_block_size (nframes_t nframes);
+ int set_block_size (pframes_t nframes);
ChanCount output_streams() const;
ChanCount input_streams() const;
@@ -101,11 +101,11 @@ class PluginInsert : public Processor
std::string describe_parameter (Evoral::Parameter param);
- nframes_t signal_latency() const;
+ framecnt_t signal_latency () const;
boost::shared_ptr<Plugin> get_impulse_analysis_plugin();
- void collect_signal_for_analysis(nframes_t nframes);
+ void collect_signal_for_analysis (framecnt_t nframes);
PBD::Signal2<void,BufferSet*, BufferSet*> AnalysisDataGathered;
@@ -125,14 +125,14 @@ class PluginInsert : public Processor
boost::weak_ptr<Plugin> _impulseAnalysisPlugin;
- nframes_t _signal_analysis_collected_nframes;
- nframes_t _signal_analysis_collect_nframes_max;
+ framecnt_t _signal_analysis_collected_nframes;
+ framecnt_t _signal_analysis_collect_nframes_max;
BufferSet _signal_analysis_inputs;
BufferSet _signal_analysis_outputs;
- void automation_run (BufferSet& bufs, nframes_t nframes);
- void connect_and_run (BufferSet& bufs, nframes_t nframes, nframes_t offset, bool with_auto, nframes_t now = 0);
+ void automation_run (BufferSet& bufs, pframes_t nframes);
+ void connect_and_run (BufferSet& bufs, pframes_t nframes, framecnt_t offset, bool with_auto, framepos_t now = 0);
void set_automatable ();
void control_list_automation_state_changed (Evoral::Parameter, AutoState);
diff --git a/libs/ardour/ardour/port.h b/libs/ardour/ardour/port.h
index 23b42a55ea..ffdc1d4721 100644
--- a/libs/ardour/ardour/port.h
+++ b/libs/ardour/ardour/port.h
@@ -45,7 +45,7 @@ public:
virtual ~Port ();
- static void set_buffer_size (nframes_t sz) {
+ static void set_buffer_size (pframes_t sz) {
_buffer_size = sz;
}
static void set_connecting_blocked( bool yn ) {
@@ -93,24 +93,24 @@ public:
void ensure_monitor_input (bool);
bool monitoring_input () const;
- nframes_t total_latency () const;
+ framecnt_t total_latency () const;
int reestablish ();
int reconnect ();
void request_monitor_input (bool);
- void set_latency (nframes_t);
+ void set_latency (framecnt_t);
virtual void reset ();
/** @return the size of the raw buffer (bytes) for duration @a nframes (audio frames) */
- virtual size_t raw_buffer_size(jack_nframes_t nframes) const = 0;
+ virtual size_t raw_buffer_size (pframes_t nframes) const = 0;
virtual DataType type () const = 0;
- virtual void cycle_start (nframes_t) = 0;
- virtual void cycle_end (nframes_t) = 0;
+ virtual void cycle_start (pframes_t) = 0;
+ virtual void cycle_end (pframes_t) = 0;
virtual void cycle_split () = 0;
- virtual Buffer& get_buffer (nframes_t nframes, nframes_t offset = 0) = 0;
- virtual void flush_buffers (nframes_t nframes, framepos_t /*time*/, nframes_t offset = 0) {
- assert(offset < nframes);
+ virtual Buffer& get_buffer (framecnt_t nframes, framecnt_t offset = 0) = 0;
+ virtual void flush_buffers (pframes_t nframes, framepos_t /*time*/, framecnt_t offset = 0) {
+ assert (offset < nframes);
}
virtual void transport_stopped () {}
@@ -126,8 +126,8 @@ protected:
jack_port_t* _jack_port; ///< JACK port
- static nframes_t _buffer_size;
- static bool _connecting_blocked;
+ static pframes_t _buffer_size;
+ static bool _connecting_blocked;
static AudioEngine* _engine; ///< the AudioEngine
diff --git a/libs/ardour/ardour/port_insert.h b/libs/ardour/ardour/port_insert.h
index f4e20a8045..d460aa5546 100644
--- a/libs/ardour/ardour/port_insert.h
+++ b/libs/ardour/ardour/port_insert.h
@@ -50,9 +50,9 @@ class PortInsert : public IOProcessor
XMLNode& get_state(void);
int set_state (const XMLNode&, int version);
- void run (BufferSet& bufs, framepos_t start_frame, framepos_t end_frame, nframes_t nframes, bool);
+ void run (BufferSet& bufs, framepos_t start_frame, framepos_t end_frame, pframes_t nframes, bool);
- nframes_t signal_latency() const;
+ framecnt_t signal_latency () const;
bool set_name (const std::string& name);
@@ -68,8 +68,8 @@ class PortInsert : public IOProcessor
void stop_latency_detection ();
MTDM* mtdm () const { return _mtdm; }
- void set_measured_latency (nframes_t);
- nframes_t latency() const;
+ void set_measured_latency (framecnt_t);
+ framecnt_t latency () const;
private:
/* disallow copy construction */
@@ -77,11 +77,12 @@ class PortInsert : public IOProcessor
boost::shared_ptr<Delivery> _out;
- uint32_t bitslot;
- MTDM* _mtdm;
- bool _latency_detect;
- nframes_t _latency_flush_frames;
- nframes_t _measured_latency;};
+ uint32_t bitslot;
+ MTDM* _mtdm;
+ bool _latency_detect;
+ framecnt_t _latency_flush_frames;
+ framecnt_t _measured_latency;
+};
} // namespace ARDOUR
diff --git a/libs/ardour/ardour/processor.h b/libs/ardour/ardour/processor.h
index 09505e3f72..182208e560 100644
--- a/libs/ardour/ardour/processor.h
+++ b/libs/ardour/ardour/processor.h
@@ -61,16 +61,16 @@ class Processor : public SessionObject, public Automatable, public Latent
bool get_next_ab_is_active () const { return _next_ab_is_active; }
void set_next_ab_is_active (bool yn) { _next_ab_is_active = yn; }
- virtual nframes_t signal_latency() const { return 0; }
+ virtual framecnt_t signal_latency() const { return 0; }
- virtual int set_block_size (nframes_t /*nframes*/) { return 0; }
+ virtual int set_block_size (pframes_t /*nframes*/) { return 0; }
virtual bool requires_fixed_sized_buffers() const { return false; }
/** @param result_required true if, on return from this method, bufs is required to contain valid data;
* if false, the method need not bother writing to bufs if it doesn't want to.
*/
- virtual void run (BufferSet& /*bufs*/, framepos_t /*start_frame*/, framepos_t /*end_frame*/, nframes_t /*nframes*/, bool /*result_required*/) {}
- virtual void silence (nframes_t /*nframes*/) {}
+ virtual void run (BufferSet& /*bufs*/, framepos_t /*start_frame*/, framepos_t /*end_frame*/, pframes_t /*nframes*/, bool /*result_required*/) {}
+ virtual void silence (framecnt_t /*nframes*/) {}
virtual void activate () { _pending_active = true; ActiveChanged(); }
virtual void deactivate () { _pending_active = false; ActiveChanged(); }
diff --git a/libs/ardour/ardour/rc_configuration_vars.h b/libs/ardour/ardour/rc_configuration_vars.h
index 9348544c27..d06edac230 100644
--- a/libs/ardour/ardour/rc_configuration_vars.h
+++ b/libs/ardour/ardour/rc_configuration_vars.h
@@ -102,8 +102,8 @@ CONFIG_VARIABLE (bool, stop_recording_on_xrun, "stop-recording-on-xrun", false)
CONFIG_VARIABLE (bool, create_xrun_marker, "create-xrun-marker", true)
CONFIG_VARIABLE (bool, stop_at_session_end, "stop-at-session-end", true)
CONFIG_VARIABLE (bool, seamless_loop, "seamless-loop", false)
-CONFIG_VARIABLE (nframes_t, preroll, "preroll", 0)
-CONFIG_VARIABLE (nframes_t, postroll, "postroll", 0)
+CONFIG_VARIABLE (framecnt_t, preroll, "preroll", 0)
+CONFIG_VARIABLE (framecnt_t, postroll, "postroll", 0)
CONFIG_VARIABLE (float, rf_speed, "rf-speed", 2.0f)
CONFIG_VARIABLE (float, shuttle_speed_factor, "shuttle-speed-factor", 1.0f)
CONFIG_VARIABLE (float, shuttle_speed_threshold, "shuttle-speed-threshold", 5.0f)
diff --git a/libs/ardour/ardour/region.h b/libs/ardour/ardour/region.h
index ef86dce4b2..3ad61919b1 100644
--- a/libs/ardour/ardour/region.h
+++ b/libs/ardour/ardour/region.h
@@ -193,8 +193,8 @@ class Region
void trim_end (framepos_t new_position, void *src);
void trim_to (framepos_t position, framecnt_t length, void *src);
- void cut_front (nframes_t new_position, void *src);
- void cut_end (nframes_t new_position, void *src);
+ void cut_front (framepos_t new_position, void *src);
+ void cut_end (framepos_t new_position, void *src);
void set_layer (layer_t l); /* ONLY Playlist can call this */
void raise ();
@@ -321,8 +321,8 @@ class Region
void trim_to_internal (framepos_t position, framecnt_t length, void *src);
virtual void set_position_internal (framepos_t pos, bool allow_bbt_recompute);
- void modify_front (nframes_t new_position, bool reset_fade, void* src);
- void modify_end (nframes_t new_position, bool reset_fade, void* src);
+ void modify_front (framepos_t new_position, bool reset_fade, void* src);
+ void modify_end (framepos_t new_position, bool reset_fade, void* src);
void maybe_uncopy ();
void first_edit ();
diff --git a/libs/ardour/ardour/resampled_source.h b/libs/ardour/ardour/resampled_source.h
index 6d630bc44b..b315430b46 100644
--- a/libs/ardour/ardour/resampled_source.h
+++ b/libs/ardour/ardour/resampled_source.h
@@ -30,16 +30,16 @@ namespace ARDOUR {
class ResampledImportableSource : public ImportableSource
{
public:
- ResampledImportableSource (boost::shared_ptr<ImportableSource>, nframes_t rate, SrcQuality);
+ ResampledImportableSource (boost::shared_ptr<ImportableSource>, framecnt_t rate, SrcQuality);
~ResampledImportableSource ();
- nframes_t read (Sample* buffer, nframes_t nframes);
+ framecnt_t read (Sample* buffer, framecnt_t nframes);
float ratio() const { return src_data.src_ratio; }
uint32_t channels() const { return source->channels(); }
framecnt_t length() const { return source->length(); }
- nframes_t samplerate() const { return source->samplerate(); }
- void seek (nframes_t);
+ framecnt_t samplerate() const { return source->samplerate(); }
+ void seek (framecnt_t);
framepos_t natural_position() const;
bool clamped_at_unity () const {
diff --git a/libs/ardour/ardour/return.h b/libs/ardour/ardour/return.h
index cf709ed2f2..8ec4c9b8b5 100644
--- a/libs/ardour/ardour/return.h
+++ b/libs/ardour/ardour/return.h
@@ -42,7 +42,7 @@ public:
uint32_t bit_slot() const { return _bitslot; }
- void run (BufferSet& bufs, framepos_t start_frame, framepos_t end_frame, nframes_t nframes, bool);
+ void run (BufferSet& bufs, framepos_t start_frame, framepos_t end_frame, pframes_t nframes, bool);
boost::shared_ptr<Amp> amp() const { return _amp; }
boost::shared_ptr<PeakMeter> meter() const { return _meter; }
@@ -71,10 +71,10 @@ private:
/* disallow copy construction */
Return (const Return&);
- uint32_t _bitslot;
+ uint32_t _bitslot;
- void collect_input (BufferSet& bufs, nframes_t nframes, ChanCount offset=ChanCount::ZERO);
- void just_meter_input (framepos_t start_frame, framepos_t end_frame, nframes_t nframes);
+ void collect_input (BufferSet& bufs, pframes_t nframes, ChanCount offset = ChanCount::ZERO);
+ void just_meter_input (framepos_t start_frame, framepos_t end_frame, pframes_t nframes);
};
} // namespace ARDOUR
diff --git a/libs/ardour/ardour/route.h b/libs/ardour/ardour/route.h
index 7702901523..afa6c0e527 100644
--- a/libs/ardour/ardour/route.h
+++ b/libs/ardour/ardour/route.h
@@ -102,13 +102,13 @@ class Route : public SessionObject, public Automatable, public RouteGroupMember,
/* these are the core of the API of a Route. see the protected sections as well */
- virtual int roll (nframes_t nframes, framepos_t start_frame, framepos_t end_frame,
+ virtual int roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame,
int declick, bool can_record, bool rec_monitors_input, bool& need_butler);
- virtual int no_roll (nframes_t nframes, framepos_t start_frame, framepos_t end_frame,
+ virtual int no_roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame,
bool state_changing, bool can_record, bool rec_monitors_input);
- virtual int silent_roll (nframes_t nframes, framepos_t start_frame, framepos_t end_frame,
+ virtual int silent_roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame,
bool can_record, bool rec_monitors_input, bool& need_butler);
virtual void toggle_monitor_input ();
@@ -243,10 +243,10 @@ class Route : public SessionObject, public Automatable, public RouteGroupMember,
void all_processors_flip();
void all_processors_active (Placement, bool state);
- virtual nframes_t update_total_latency();
- void set_latency_delay (nframes_t);
- void set_user_latency (nframes_t);
- nframes_t initial_delay() const { return _initial_delay; }
+ virtual framecnt_t update_total_latency();
+ void set_latency_delay (framecnt_t);
+ void set_user_latency (framecnt_t);
+ framecnt_t initial_delay() const { return _initial_delay; }
PBD::Signal0<void> active_changed;
PBD::Signal0<void> phase_invert_changed;
@@ -365,7 +365,7 @@ class Route : public SessionObject, public Automatable, public RouteGroupMember,
boost::shared_ptr<Panner> panner() const;
boost::shared_ptr<AutomationControl> gain_control() const;
- void automation_snapshot (nframes_t now, bool force=false);
+ void automation_snapshot (framepos_t now, bool force=false);
void protect_automation ();
void set_remote_control_id (uint32_t id, bool notify_class_listeners = true);
@@ -390,28 +390,28 @@ class Route : public SessionObject, public Automatable, public RouteGroupMember,
void mod_solo_by_others_downstream (int32_t);
bool has_external_redirects() const;
void curve_reallocate ();
- void just_meter_input (framepos_t start_frame, framepos_t end_frame, nframes_t nframes);
- virtual void set_block_size (nframes_t nframes);
+ void just_meter_input (framepos_t start_frame, framepos_t end_frame, pframes_t nframes);
+ virtual void set_block_size (pframes_t nframes);
protected:
- nframes_t check_initial_delay (nframes_t, nframes_t&);
+ framecnt_t check_initial_delay (framecnt_t, framecnt_t&);
void passthru (framepos_t start_frame, framepos_t end_frame,
- nframes_t nframes, int declick);
+ pframes_t nframes, int declick);
virtual void write_out_of_band_data (BufferSet& /* bufs */, framepos_t /* start_frame */, framepos_t /* end_frame */,
- nframes_t /* nframes */) {}
+ framecnt_t /* nframes */) {}
virtual void process_output_buffers (BufferSet& bufs,
framepos_t start_frame, framepos_t end_frame,
- nframes_t nframes, bool with_processors, int declick);
+ pframes_t nframes, bool with_processors, int declick);
boost::shared_ptr<IO> _input;
boost::shared_ptr<IO> _output;
bool _active;
- nframes_t _initial_delay;
- nframes_t _roll_delay;
+ framecnt_t _initial_delay;
+ framecnt_t _roll_delay;
ProcessorList _processors;
mutable Glib::RWLock _processor_lock;
@@ -453,10 +453,10 @@ class Route : public SessionObject, public Automatable, public RouteGroupMember,
int configure_processors (ProcessorStreams*);
void passthru_silence (framepos_t start_frame, framepos_t end_frame,
- nframes_t nframes, int declick);
+ pframes_t nframes, int declick);
- void silence (nframes_t);
- void silence_unlocked (nframes_t);
+ void silence (framecnt_t);
+ void silence_unlocked (framecnt_t);
ChanCount processor_max_streams;
uint32_t _remote_control_id;
diff --git a/libs/ardour/ardour/runtime_functions.h b/libs/ardour/ardour/runtime_functions.h
index 147d697fca..8882d721d7 100644
--- a/libs/ardour/ardour/runtime_functions.h
+++ b/libs/ardour/ardour/runtime_functions.h
@@ -24,11 +24,11 @@
namespace ARDOUR {
- typedef float (*compute_peak_t) (const ARDOUR::Sample *, nframes_t, float);
- typedef void (*find_peaks_t) (const ARDOUR::Sample *, nframes_t, float *, float*);
- typedef void (*apply_gain_to_buffer_t) (ARDOUR::Sample *, nframes_t, float);
- typedef void (*mix_buffers_with_gain_t) (ARDOUR::Sample *, const ARDOUR::Sample *, nframes_t, float);
- typedef void (*mix_buffers_no_gain_t) (ARDOUR::Sample *, const ARDOUR::Sample *, nframes_t);
+ typedef float (*compute_peak_t) (const ARDOUR::Sample *, pframes_t, float);
+ typedef void (*find_peaks_t) (const ARDOUR::Sample *, pframes_t, float *, float*);
+ typedef void (*apply_gain_to_buffer_t) (ARDOUR::Sample *, pframes_t, float);
+ typedef void (*mix_buffers_with_gain_t) (ARDOUR::Sample *, const ARDOUR::Sample *, pframes_t, float);
+ typedef void (*mix_buffers_no_gain_t) (ARDOUR::Sample *, const ARDOUR::Sample *, pframes_t);
extern compute_peak_t compute_peak;
extern find_peaks_t find_peaks;
diff --git a/libs/ardour/ardour/send.h b/libs/ardour/ardour/send.h
index e66c72367a..bf5c5d7370 100644
--- a/libs/ardour/ardour/send.h
+++ b/libs/ardour/ardour/send.h
@@ -55,7 +55,7 @@ class Send : public Delivery
uint32_t pans_required() const { return _configured_input.n_audio(); }
- void run (BufferSet& bufs, framepos_t start_frame, framepos_t end_frame, nframes_t nframes, bool);
+ void run (BufferSet& bufs, framepos_t start_frame, framepos_t end_frame, pframes_t nframes, bool);
bool can_support_io_configuration (const ChanCount& in, ChanCount& out) const;
bool configure_io (ChanCount in, ChanCount out);
diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h
index f1a79ba4f3..4966c19b69 100644
--- a/libs/ardour/ardour/session.h
+++ b/libs/ardour/ardour/session.h
@@ -190,7 +190,7 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
std::string new_source_path_from_name (DataType type, const std::string&, bool as_stub = false);
RouteList new_route_from_template (uint32_t how_many, const std::string& template_path);
- void process (nframes_t nframes);
+ void process (pframes_t nframes);
BufferSet& get_silent_buffers (ChanCount count = ChanCount::ZERO);
BufferSet& get_scratch_buffers (ChanCount count = ChanCount::ZERO);
@@ -297,7 +297,7 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
void request_play_loop (bool yn, bool leave_rolling = false);
bool get_play_loop () const { return play_loop; }
- nframes_t last_transport_start() const { return _last_roll_location; }
+ framepos_t last_transport_start () const { return _last_roll_location; }
void goto_end ();
void goto_start ();
void use_rf_shuttle_speed ();
@@ -317,14 +317,14 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
std::pair<framepos_t, framepos_t> get_extent () const;
framepos_t current_end_frame () const;
framepos_t current_start_frame () const;
- /// "actual" sample rate of session, set by current audioengine rate, pullup/down etc.
- nframes_t frame_rate() const { return _current_frame_rate; }
- /// "native" sample rate of session, regardless of current audioengine rate, pullup/down etc
- nframes_t nominal_frame_rate() const { return _nominal_frame_rate; }
- nframes_t frames_per_hour() const { return _frames_per_hour; }
+ /** "actual" sample rate of session, set by current audioengine rate, pullup/down etc. */
+ framecnt_t frame_rate () const { return _current_frame_rate; }
+ /** "native" sample rate of session, regardless of current audioengine rate, pullup/down etc */
+ framecnt_t nominal_frame_rate () const { return _nominal_frame_rate; }
+ framecnt_t frames_per_hour () const { return _frames_per_hour; }
double frames_per_timecode_frame() const { return _frames_per_timecode_frame; }
- nframes_t timecode_frames_per_hour() const { return _timecode_frames_per_hour; }
+ framecnt_t timecode_frames_per_hour() const { return _timecode_frames_per_hour; }
MIDI::byte get_mtc_timecode_bits() const {
return mtc_timecode_bits; /* encoding of SMTPE type for MTC */
@@ -347,10 +347,10 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
void reset_input_monitor_state ();
- nframes_t get_block_size() const { return current_block_size; }
- nframes_t worst_output_latency () const { return _worst_output_latency; }
- nframes_t worst_input_latency () const { return _worst_input_latency; }
- nframes_t worst_track_latency () const { return _worst_track_latency; }
+ pframes_t get_block_size() const { return current_block_size; }
+ framecnt_t worst_output_latency () const { return _worst_output_latency; }
+ framecnt_t worst_input_latency () const { return _worst_input_latency; }
+ framecnt_t worst_track_latency () const { return _worst_track_latency; }
#ifdef HAVE_JACK_SESSION
void jack_session_event (jack_session_event_t* event);
@@ -449,17 +449,17 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
void sync_time_vars();
- void bbt_time (nframes_t when, BBT_Time&);
+ void bbt_time (framepos_t when, BBT_Time&);
void timecode_to_sample(Timecode::Time& timecode, framepos_t& sample, bool use_offset, bool use_subframes) const;
void sample_to_timecode(framepos_t sample, Timecode::Time& timecode, bool use_offset, bool use_subframes) const;
void timecode_time (Timecode::Time &);
- void timecode_time (nframes_t when, Timecode::Time&);
- void timecode_time_subframes (nframes_t when, Timecode::Time&);
+ void timecode_time (framepos_t when, Timecode::Time&);
+ void timecode_time_subframes (framepos_t when, Timecode::Time&);
void timecode_duration (framecnt_t, Timecode::Time&) const;
void timecode_duration_string (char *, framecnt_t) const;
- nframes_t convert_to_frames_at (nframes_t position, AnyTime const &);
+ framecnt_t convert_to_frames_at (framepos_t position, AnyTime const &);
static PBD::Signal1<void, framepos_t> StartTimeChanged;
static PBD::Signal1<void, framepos_t> EndTimeChanged;
@@ -475,12 +475,10 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
void set_silent (bool yn);
bool silent () { return _silent; }
- int jack_slave_sync (nframes_t);
-
TempoMap& tempo_map() { return *_tempo_map; }
/// signals the current transport position in frames, bbt and timecode time (in that order)
- PBD::Signal3<void,const nframes_t&, const BBT_Time&, const Timecode::Time&> tick;
+ PBD::Signal3<void, const framepos_t &, const BBT_Time&, const Timecode::Time&> tick;
/* region info */
@@ -501,9 +499,9 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
boost::shared_ptr<ExportHandler> get_export_handler ();
boost::shared_ptr<ExportStatus> get_export_status ();
- int start_audio_export (nframes_t position, bool realtime);
+ int start_audio_export (framepos_t position, bool realtime);
- PBD::Signal1<int,nframes_t> ProcessExport;
+ PBD::Signal1<int, framecnt_t> ProcessExport;
static PBD::Signal2<void,std::string, std::string> Exported;
void add_source (boost::shared_ptr<Source>);
@@ -525,7 +523,7 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
/** handlers should return 0 for "ignore the rate mismatch",
!0 for "do not use this session"
*/
- static PBD::Signal2<int,nframes_t, nframes_t> AskAboutSampleRateMismatch;
+ static PBD::Signal2<int, framecnt_t, framecnt_t> AskAboutSampleRateMismatch;
/** handlers should return !0 for use pending state, 0 for ignore it.
*/
@@ -641,14 +639,6 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
void midi_panic ();
- /* Scrubbing */
-
- void start_scrub (nframes_t where);
- void stop_scrub ();
- void set_scrub_speed (float);
- nframes_t scrub_buffer_size() const;
- PBD::Signal0<void> ScrubReady;
-
/* History (for editors, mixers, UIs etc.) */
/** Undo some transactions.
@@ -809,8 +799,8 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
protected:
friend class AudioEngine;
- void set_block_size (nframes_t nframes);
- void set_frame_rate (nframes_t nframes);
+ void set_block_size (pframes_t nframes);
+ void set_frame_rate (framecnt_t nframes);
protected:
friend class Route;
@@ -832,16 +822,16 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
maximise cache hits
*/
- typedef void (Session::*process_function_type)(nframes_t);
+ typedef void (Session::*process_function_type)(pframes_t);
AudioEngine& _engine;
mutable gint processing_prohibited;
process_function_type process_function;
process_function_type last_process_function;
bool waiting_for_sync_offset;
- nframes_t _base_frame_rate;
- nframes_t _current_frame_rate; //this includes video pullup offset
- nframes_t _nominal_frame_rate; //ignores audioengine setting, "native" SR
+ framecnt_t _base_frame_rate;
+ framecnt_t _current_frame_rate; //this includes video pullup offset
+ framecnt_t _nominal_frame_rate; //ignores audioengine setting, "native" SR
int transport_sub_state;
mutable gint _record_status;
framepos_t _transport_frame;
@@ -857,12 +847,12 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
bool auto_play_legal;
framepos_t _last_slave_transport_frame;
- nframes_t maximum_output_latency;
+ framecnt_t maximum_output_latency;
framepos_t _requested_return_frame;
- nframes_t current_block_size;
- nframes_t _worst_output_latency;
- nframes_t _worst_input_latency;
- nframes_t _worst_track_latency;
+ pframes_t current_block_size;
+ framecnt_t _worst_output_latency;
+ framecnt_t _worst_input_latency;
+ framecnt_t _worst_track_latency;
bool _have_captured;
float _meter_hold;
float _meter_falloff;
@@ -881,12 +871,12 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
void ensure_buffers (ChanCount howmany = ChanCount::ZERO);
- void process_scrub (nframes_t);
- void process_without_events (nframes_t);
- void process_with_events (nframes_t);
- void process_audition (nframes_t);
- void process_export (nframes_t);
- int process_export_fw (nframes_t);
+ void process_scrub (pframes_t);
+ void process_without_events (pframes_t);
+ void process_with_events (pframes_t);
+ void process_audition (pframes_t);
+ void process_export (pframes_t);
+ int process_export_fw (pframes_t);
void block_processing() { g_atomic_int_set (&processing_prohibited, 1); }
void unblock_processing() { g_atomic_int_set (&processing_prohibited, 0); }
@@ -905,20 +895,20 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
bool have_first_delta_accumulator;
SlaveState _slave_state;
- nframes_t slave_wait_end;
+ framepos_t slave_wait_end;
void reset_slave_state ();
- bool follow_slave (nframes_t);
- void calculate_moving_average_of_slave_delta(int dir, nframes_t this_delta);
- void track_slave_state(float slave_speed, nframes_t slave_transport_frame, nframes_t this_delta);
- void follow_slave_silently(nframes_t nframes, float slave_speed);
+ bool follow_slave (pframes_t);
+ void calculate_moving_average_of_slave_delta (int dir, framecnt_t this_delta);
+ void track_slave_state (float slave_speed, framepos_t slave_transport_frame, framecnt_t this_delta);
+ void follow_slave_silently (pframes_t nframes, float slave_speed);
void switch_to_sync_source (SyncSource); /* !RT context */
void drop_sync_source (); /* !RT context */
void use_sync_source (Slave*); /* RT context */
bool post_export_sync;
- nframes_t post_export_position;
+ framepos_t post_export_position;
bool _exporting;
bool _export_rolling;
@@ -933,8 +923,8 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
PBD::ScopedConnection export_freewheel_connection;
void get_track_statistics ();
- int process_routes (nframes_t, bool& need_butler);
- int silent_process_routes (nframes_t, bool& need_butler);
+ int process_routes (pframes_t, bool& need_butler);
+ int silent_process_routes (pframes_t, bool& need_butler);
bool get_rec_monitors_input () {
if (actively_recording()) {
@@ -959,8 +949,8 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
}
}
- bool maybe_stop (nframes_t limit);
- bool maybe_sync_start (nframes_t&);
+ bool maybe_stop (framepos_t limit);
+ bool maybe_sync_start (pframes_t &);
void check_declick_out ();
@@ -971,7 +961,7 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
bool session_midi_feedback;
bool play_loop;
bool loop_changing;
- nframes_t last_loopend;
+ framepos_t last_loopend;
boost::scoped_ptr<SessionDirectory> _session_dir;
@@ -989,12 +979,12 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
int load_options (const XMLNode&);
int load_state (std::string snapshot_name);
- nframes_t _last_roll_location;
- nframes_t _last_roll_or_reversal_location;
- nframes_t _last_record_location;
+ framepos_t _last_roll_location;
+ framepos_t _last_roll_or_reversal_location;
+ framepos_t _last_record_location;
bool pending_locate_roll;
- nframes_t pending_locate_frame;
+ framepos_t pending_locate_frame;
bool pending_locate_flush;
bool pending_abort;
bool pending_auto_loop;
@@ -1045,7 +1035,7 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
uint32_t rf_scale;
void set_rf_speed (float speed);
- void reset_rf_scale (nframes_t frames_moved);
+ void reset_rf_scale (framecnt_t frames_moved);
Locations* _locations;
void locations_changed ();
@@ -1099,9 +1089,9 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
/* MIDI Machine Control */
- void spp_start (MIDI::Parser&, nframes_t timestamp);
- void spp_continue (MIDI::Parser&, nframes_t timestamp);
- void spp_stop (MIDI::Parser&, nframes_t timestamp);
+ void spp_start (MIDI::Parser&, framepos_t timestamp);
+ void spp_continue (MIDI::Parser&, framepos_t timestamp);
+ void spp_stop (MIDI::Parser&, framepos_t timestamp);
void mmc_deferred_play (MIDI::MachineControl &);
void mmc_stop (MIDI::MachineControl &);
@@ -1129,30 +1119,28 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
MIDI::byte mtc_msg[16];
MIDI::byte mtc_timecode_bits; /* encoding of SMTPE type for MTC */
MIDI::byte midi_msg[16];
- nframes_t outbound_mtc_timecode_frame;
+ framepos_t outbound_mtc_timecode_frame;
Timecode::Time transmitting_timecode_time;
int next_quarter_frame_to_send;
double _frames_per_timecode_frame; /* has to be floating point because of drop frame */
- nframes_t _frames_per_hour;
- nframes_t _timecode_frames_per_hour;
+ framecnt_t _frames_per_hour;
+ framecnt_t _timecode_frames_per_hour;
/* cache the most-recently requested time conversions. This helps when we
* have multiple clocks showing the same time (e.g. the transport frame) */
- bool last_timecode_valid;
- nframes_t last_timecode_when;
- Timecode::Time last_timecode;
+ bool last_timecode_valid;
+ framepos_t last_timecode_when;
+ Timecode::Time last_timecode;
bool _send_timecode_update; ///< Flag to send a full frame (Timecode) MTC message this cycle
- int send_midi_time_code_for_cycle(nframes_t nframes);
-
- nframes_t adjust_apparent_position (nframes_t frames);
+ int send_midi_time_code_for_cycle (pframes_t nframes);
void reset_record_status ();
- int no_roll (nframes_t nframes);
- int fail_roll (nframes_t nframes);
+ int no_roll (pframes_t nframes);
+ int fail_roll (pframes_t nframes);
bool non_realtime_work_pending() const { return static_cast<bool>(post_transport_work()); }
bool process_can_proceed() const { return !(post_transport_work() & ProcessCannotProceedMask); }
@@ -1166,7 +1154,7 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
void unset_play_loop ();
void overwrite_some_buffers (Track *);
void flush_all_inserts ();
- int micro_locate (nframes_t distance);
+ int micro_locate (framecnt_t distance);
void locate (framepos_t, bool with_roll, bool with_flush, bool with_loop=false, bool force=false, bool with_mmc=true);
void start_locate (framepos_t, bool with_roll, bool with_flush, bool with_loop=false, bool force=false);
void force_locate (framepos_t frame, bool with_roll = false);
@@ -1294,7 +1282,7 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
/* FLATTEN */
- int flatten_one_track (AudioTrack&, nframes_t start, nframes_t cnt);
+ int flatten_one_track (AudioTrack&, framepos_t start, framecnt_t cnt);
/* INSERT AND SEND MANAGEMENT */
@@ -1344,7 +1332,7 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
UndoHistory _history;
std::stack<UndoTransaction*> _current_trans;
- void jack_timebase_callback (jack_transport_state_t, nframes_t, jack_position_t*, int);
+ void jack_timebase_callback (jack_transport_state_t, pframes_t, jack_position_t*, int);
int jack_sync_callback (jack_transport_state_t, jack_position_t*);
void reset_jack_connection (jack_client_t* jack);
void process_rtop (SessionEvent*);
@@ -1358,19 +1346,19 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
boost::shared_ptr<IO> _click_io;
Sample* click_data;
Sample* click_emphasis_data;
- nframes_t click_length;
- nframes_t click_emphasis_length;
+ framecnt_t click_length;
+ framecnt_t click_emphasis_length;
mutable Glib::RWLock click_lock;
- static const Sample default_click[];
- static const nframes_t default_click_length;
- static const Sample default_click_emphasis[];
- static const nframes_t default_click_emphasis_length;
+ static const Sample default_click[];
+ static const framecnt_t default_click_length;
+ static const Sample default_click_emphasis[];
+ static const framecnt_t default_click_emphasis_length;
Click *get_click();
void setup_click_sounds (int which);
void clear_clicks ();
- void click (nframes_t start, nframes_t nframes);
+ void click (framepos_t start, framecnt_t nframes);
std::vector<Route*> master_outs;
@@ -1448,7 +1436,7 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
/** temporary list of Diskstreams used only during load of 2.X sessions */
std::list<boost::shared_ptr<Diskstream> > _diskstreams_2X;
- void add_session_range_location (nframes_t, nframes_t);
+ void add_session_range_location (framepos_t, framepos_t);
void setup_midi_machine_control ();
void cleanup_stubfiles ();
diff --git a/libs/ardour/ardour/session_event.h b/libs/ardour/ardour/session_event.h
index 5c31217045..738de46a86 100644
--- a/libs/ardour/ardour/session_event.h
+++ b/libs/ardour/ardour/session_event.h
@@ -83,7 +83,7 @@ struct SessionEvent {
boost::shared_ptr<Region> region;
- SessionEvent (Type t, Action a, nframes_t when, nframes_t where, double spd, bool yn = false, bool yn2 = false)
+ SessionEvent (Type t, Action a, framepos_t when, framepos_t where, double spd, bool yn = false, bool yn2 = false)
: type (t)
, action (a)
, action_frame (when)
@@ -112,7 +112,7 @@ struct SessionEvent {
void* operator new (size_t);
void operator delete (void *ptr, size_t /*size*/);
- static const nframes_t Immediate = 0;
+ static const framepos_t Immediate = 0;
static void create_per_thread_pool (const std::string& n, uint32_t nitems);
static void init_event_pool ();
diff --git a/libs/ardour/ardour/silentfilesource.h b/libs/ardour/ardour/silentfilesource.h
index d24aa9d136..46ddda3985 100644
--- a/libs/ardour/ardour/silentfilesource.h
+++ b/libs/ardour/ardour/silentfilesource.h
@@ -31,7 +31,7 @@ public:
int flush_header () { return 0; }
float sample_rate () const { return _sample_rate; }
- void set_length (nframes_t len) { _length = len; }
+ void set_length (framecnt_t len) { _length = len; }
bool destructive() const { return false; }
bool can_be_analysed() const { return false; }
diff --git a/libs/ardour/ardour/slave.h b/libs/ardour/ardour/slave.h
index 74cf4371b0..45ab00a44f 100644
--- a/libs/ardour/ardour/slave.h
+++ b/libs/ardour/ardour/slave.h
@@ -143,7 +143,7 @@ class Slave {
* @return - the timing resolution of the Slave - If the distance of ARDOURs transport
* to the slave becomes greater than the resolution, sound will stop
*/
- virtual nframes_t resolution() const = 0;
+ virtual framecnt_t resolution() const = 0;
/**
* @return - when returning true, ARDOUR will wait for seekahead_distance() before transport
@@ -174,11 +174,11 @@ class Slave {
class ISlaveSessionProxy {
public:
virtual ~ISlaveSessionProxy() {}
- virtual TempoMap& tempo_map() const { return *((TempoMap *) 0); }
- virtual nframes_t frame_rate() const { return 0; }
+ virtual TempoMap& tempo_map() const { return *((TempoMap *) 0); }
+ virtual framecnt_t frame_rate() const { return 0; }
virtual framepos_t audible_frame () const { return 0; }
virtual framepos_t transport_frame () const { return 0; }
- virtual nframes_t frames_since_cycle_start () const { return 0; }
+ virtual pframes_t frames_since_cycle_start () const { return 0; }
virtual framepos_t frame_time () const { return 0; }
virtual void request_locate (framepos_t /*frame*/, bool with_roll = false) {
@@ -195,11 +195,11 @@ class SlaveSessionProxy : public ISlaveSessionProxy {
public:
SlaveSessionProxy(Session &s) : session(s) {}
- TempoMap& tempo_map() const;
- nframes_t frame_rate() const;
+ TempoMap& tempo_map() const;
+ framecnt_t frame_rate() const;
framepos_t audible_frame () const;
framepos_t transport_frame () const;
- nframes_t frames_since_cycle_start () const;
+ pframes_t frames_since_cycle_start () const;
framepos_t frame_time () const;
void request_locate (framepos_t frame, bool with_roll = false);
@@ -234,7 +234,7 @@ class MTC_Slave : public Slave {
bool ok() const;
void handle_locate (const MIDI::byte*);
- nframes_t resolution() const;
+ framecnt_t resolution () const;
bool requires_seekahead () const { return true; }
framepos_t seekahead_distance() const;
bool give_slave_full_control_over_transport_speed() const;
@@ -271,8 +271,8 @@ class MTC_Slave : public Slave {
void queue_reset (bool with_pos);
void maybe_reset ();
- void update_mtc_qtr (MIDI::Parser&, int, nframes_t);
- void update_mtc_time (const MIDI::byte *, bool, nframes_t);
+ void update_mtc_qtr (MIDI::Parser&, int, framepos_t);
+ void update_mtc_time (const MIDI::byte *, bool, framepos_t);
void update_mtc_status (MIDI::MTC_Status);
void read_current (SafeTime *) const;
void reset_window (framepos_t);
@@ -295,7 +295,7 @@ class MIDIClock_Slave : public Slave {
bool ok() const;
bool starting() const;
- nframes_t resolution() const;
+ framecnt_t resolution () const;
bool requires_seekahead () const { return false; }
bool give_slave_full_control_over_transport_speed() const { return true; }
@@ -313,10 +313,10 @@ class MIDIClock_Slave : public Slave {
double one_ppqn_in_frames;
/// the timestamp of the first MIDI clock message
- nframes_t first_timestamp;
+ framepos_t first_timestamp;
/// the time stamp and should-be transport position of the last inbound MIDI clock message
- nframes_t last_timestamp;
+ framepos_t last_timestamp;
double should_be_position;
/// the number of midi clock messages received (zero-based)
@@ -375,7 +375,7 @@ class JACK_Slave : public Slave
bool starting() const { return _starting; }
bool locked() const;
bool ok() const;
- nframes_t resolution() const { return 1; }
+ framecnt_t resolution () const { return 1; }
bool requires_seekahead () const { return false; }
void reset_client (jack_client_t* jack);
bool is_always_synced() const { return true; }
diff --git a/libs/ardour/ardour/smf_source.h b/libs/ardour/ardour/smf_source.h
index bd1428a129..32163551a0 100644
--- a/libs/ardour/ardour/smf_source.h
+++ b/libs/ardour/ardour/smf_source.h
@@ -52,7 +52,7 @@ public:
bool set_name (const std::string& newname) { return (set_source_name(newname, false) == 0); }
void append_event_unlocked_beats (const Evoral::Event<Evoral::MusicalTime>& ev);
- void append_event_unlocked_frames (const Evoral::Event<nframes_t>& ev, framepos_t source_start);
+ void append_event_unlocked_frames (const Evoral::Event<framepos_t>& ev, framepos_t source_start);
void mark_streaming_midi_write_started (NoteMode mode, framepos_t start_time);
void mark_streaming_write_completed ();
@@ -65,7 +65,7 @@ public:
void flush_midi ();
- static void set_header_position_offset (nframes_t offset, bool negative);
+ static void set_header_position_offset (framecnt_t offset, bool negative);
static bool safe_midi_file_extension (const std::string& path);
@@ -73,15 +73,15 @@ public:
void set_path (const std::string& newpath);
private:
- nframes_t read_unlocked (Evoral::EventSink<nframes_t>& dst,
- framepos_t position,
- framepos_t start,
- nframes_t cnt,
- MidiStateTracker* tracker) const;
-
- nframes_t write_unlocked (MidiRingBuffer<nframes_t>& src,
- framepos_t position,
- nframes_t cnt);
+ framecnt_t read_unlocked (Evoral::EventSink<framepos_t>& dst,
+ framepos_t position,
+ framepos_t start,
+ framecnt_t cnt,
+ MidiStateTracker* tracker) const;
+
+ framecnt_t write_unlocked (MidiRingBuffer<framepos_t>& src,
+ framepos_t position,
+ framecnt_t cnt);
double _last_ev_time_beats;
framepos_t _last_ev_time_frames;
diff --git a/libs/ardour/ardour/sndfileimportable.h b/libs/ardour/ardour/sndfileimportable.h
index aab8b6ac59..2b5535e29f 100644
--- a/libs/ardour/ardour/sndfileimportable.h
+++ b/libs/ardour/ardour/sndfileimportable.h
@@ -33,11 +33,11 @@ class SndFileImportableSource : public ImportableSource {
SndFileImportableSource (const std::string& path);
virtual ~SndFileImportableSource();
- nframes_t read (Sample* buffer, nframes_t nframes);
+ framecnt_t read (Sample* buffer, framecnt_t nframes);
uint32_t channels() const;
framecnt_t length() const;
- nframes_t samplerate() const;
- void seek (nframes_t pos);
+ framecnt_t samplerate() const;
+ void seek (framecnt_t pos);
framepos_t natural_position() const;
bool clamped_at_unity () const;
diff --git a/libs/ardour/ardour/sndfilesource.h b/libs/ardour/ardour/sndfilesource.h
index ff15608d70..f08b0be4c0 100644
--- a/libs/ardour/ardour/sndfilesource.h
+++ b/libs/ardour/ardour/sndfilesource.h
@@ -35,7 +35,7 @@ class SndFileSource : public AudioFileSource {
/* Constructor to be called for new in-session files */
SndFileSource (Session&, const std::string& path, const std::string& origin,
- SampleFormat samp_format, HeaderFormat hdr_format, nframes_t rate,
+ SampleFormat samp_format, HeaderFormat hdr_format, framecnt_t rate,
Flag flags = SndFileSource::default_writable_flags);
/** Constructor to be called for existing in-session files */
@@ -60,7 +60,7 @@ class SndFileSource : public AudioFileSource {
bool clamped_at_unity () const;
- static void setup_standard_crossfades (Session const &, nframes_t sample_rate);
+ static void setup_standard_crossfades (Session const &, framecnt_t sample_rate);
static const Source::Flag default_writable_flags;
static int get_soundfile_info (const std::string& path, SoundFileInfo& _info, std::string& error_msg);
diff --git a/libs/ardour/ardour/source_factory.h b/libs/ardour/ardour/source_factory.h
index c59dab9223..c5994027ce 100644
--- a/libs/ardour/ardour/source_factory.h
+++ b/libs/ardour/ardour/source_factory.h
@@ -49,7 +49,7 @@ class SourceFactory {
static boost::shared_ptr<Source> createWritable (DataType type, Session&,
const std::string& path, const std::string& origin,
- bool destructive, nframes_t rate, bool announce = true, bool async = false);
+ bool destructive, framecnt_t rate, bool announce = true, bool async = false);
static Glib::Cond* PeaksToBuild;
static Glib::StaticMutex peak_building_lock;
diff --git a/libs/ardour/ardour/strip_silence.h b/libs/ardour/ardour/strip_silence.h
index e77aa7111c..91374be88a 100644
--- a/libs/ardour/ardour/strip_silence.h
+++ b/libs/ardour/ardour/strip_silence.h
@@ -25,14 +25,14 @@ namespace ARDOUR {
class StripSilence : public Filter {
public:
- StripSilence (Session &, double, nframes_t, nframes_t);
+ StripSilence (Session &, double, framecnt_t, framecnt_t);
int run (boost::shared_ptr<ARDOUR::Region>, Progress* progress = 0);
private:
double _threshold; ///< silence threshold, in dBFS
- nframes_t _minimum_length; ///< minimum length to be considered silence, in samples
- nframes_t _fade_length; ///< fade in/out to use on trimmed regions, in samples
+ framecnt_t _minimum_length; ///< minimum length to be considered silence, in samples
+ framecnt_t _fade_length; ///< fade in/out to use on trimmed regions, in samples
};
}
diff --git a/libs/ardour/ardour/tempo.h b/libs/ardour/ardour/tempo.h
index e692334234..a1ad8d1f31 100644
--- a/libs/ardour/ardour/tempo.h
+++ b/libs/ardour/ardour/tempo.h
@@ -44,7 +44,7 @@ class Tempo {
double beats_per_minute () const { return _beats_per_minute;}
double note_type () const { return _note_type;}
- double frames_per_beat (nframes_t sr, const Meter& meter) const;
+ double frames_per_beat (framecnt_t sr, const Meter& meter) const;
protected:
double _beats_per_minute;
@@ -61,7 +61,7 @@ class Meter {
double beats_per_bar () const { return _beats_per_bar; }
double note_divisor() const { return _note_type; }
- double frames_per_bar (const Tempo&, nframes_t sr) const;
+ double frames_per_bar (const Tempo&, framecnt_t sr) const;
protected:
/** The number of beats in a bar. This is a real value because
@@ -168,7 +168,7 @@ class TempoMetric {
class TempoMap : public PBD::StatefulDestructible
{
public:
- TempoMap (nframes_t frame_rate);
+ TempoMap (framecnt_t frame_rate);
~TempoMap();
/* measure-based stuff */
@@ -258,15 +258,15 @@ class TempoMap : public PBD::StatefulDestructible
int n_tempos () const;
int n_meters () const;
- nframes_t frame_rate () const { return _frame_rate; }
+ framecnt_t frame_rate () const { return _frame_rate; }
private:
static Tempo _default_tempo;
static Meter _default_meter;
Metrics* metrics;
- nframes_t _frame_rate;
- framepos_t last_bbt_when;
+ framecnt_t _frame_rate;
+ framepos_t last_bbt_when;
bool last_bbt_valid;
BBT_Time last_bbt;
mutable Glib::RWLock lock;
diff --git a/libs/ardour/ardour/thread_buffers.h b/libs/ardour/ardour/thread_buffers.h
index 3c312176a8..8e927471a0 100644
--- a/libs/ardour/ardour/thread_buffers.h
+++ b/libs/ardour/ardour/thread_buffers.h
@@ -25,7 +25,7 @@ class ThreadBuffers {
uint32_t npan_buffers;
private:
- void allocate_pan_automation_buffers (nframes_t nframes, uint32_t howmany, bool force);
+ void allocate_pan_automation_buffers (framecnt_t nframes, uint32_t howmany, bool force);
};
} // namespace
diff --git a/libs/ardour/ardour/ticker.h b/libs/ardour/ardour/ticker.h
index f5cda677ed..0a24070608 100644
--- a/libs/ardour/ardour/ticker.h
+++ b/libs/ardour/ardour/ticker.h
@@ -43,8 +43,8 @@ public:
Ticker() {};
virtual ~Ticker() {}
- virtual void tick(
- const nframes_t& transport_frames,
+ virtual void tick (
+ const framepos_t& transport_frames,
const BBT_Time& transport_bbt,
const Timecode::Time& transport_timecode) = 0;
@@ -68,7 +68,7 @@ public:
}
void tick(
- const nframes_t& transport_frames,
+ const framepos_t& transport_frames,
const BBT_Time& transport_bbt,
const Timecode::Time& transport_timecode);
@@ -82,7 +82,7 @@ public:
void transport_state_changed();
/// slot for the signal session::PositionChanged
- void position_changed(nframes_t position);
+ void position_changed (framepos_t position);
/// slot for the signal session::TransportLooped
void transport_looped();
@@ -95,12 +95,12 @@ private:
int _ppqn;
double _last_tick;
- double one_ppqn_in_frames(nframes_t transport_position);
+ double one_ppqn_in_frames (framepos_t transport_position);
- void send_midi_clock_event(nframes_t offset);
- void send_start_event(nframes_t offset);
- void send_continue_event(nframes_t offset);
- void send_stop_event(nframes_t offset);
+ void send_midi_clock_event (framecnt_t offset);
+ void send_start_event (framecnt_t offset);
+ void send_continue_event (framecnt_t offset);
+ void send_stop_event (framecnt_t offset);
};
}
diff --git a/libs/ardour/ardour/track.h b/libs/ardour/ardour/track.h
index ff1b57950a..5087ddda3a 100644
--- a/libs/ardour/ardour/track.h
+++ b/libs/ardour/ardour/track.h
@@ -48,13 +48,13 @@ class Track : public Route, public PublicDiskstream
virtual bool can_use_mode (TrackMode /*m*/, bool& /*bounce_required*/) { return false; }
PBD::Signal0<void> TrackModeChanged;
- virtual int no_roll (nframes_t nframes, framepos_t start_frame, framepos_t end_frame,
+ virtual int no_roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame,
bool state_changing, bool can_record, bool rec_monitors_input);
- int silent_roll (nframes_t nframes, framepos_t start_frame, framepos_t end_frame,
+ int silent_roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame,
bool can_record, bool rec_monitors_input, bool& need_butler);
- virtual int roll (nframes_t nframes, framepos_t start_frame, framepos_t end_frame,
+ virtual int roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame,
int declick, bool can_record, bool rec_monitors_input, bool& need_butler) = 0;
bool needs_butler() const { return _needs_butler; }
@@ -67,8 +67,8 @@ class Track : public Route, public PublicDiskstream
virtual void use_new_diskstream () = 0;
virtual void set_diskstream (boost::shared_ptr<Diskstream>);
- nframes_t update_total_latency();
- void set_latency_delay (nframes_t);
+ framecnt_t update_total_latency();
+ void set_latency_delay (framecnt_t);
enum FreezeState {
NoFreeze,
@@ -82,7 +82,7 @@ class Track : public Route, public PublicDiskstream
virtual void unfreeze () = 0;
virtual boost::shared_ptr<Region> bounce (InterThreadInfo&) = 0;
- virtual boost::shared_ptr<Region> bounce_range (nframes_t start, nframes_t end, InterThreadInfo&, bool enable_processing = true) = 0;
+ virtual boost::shared_ptr<Region> bounce_range (framepos_t start, framepos_t end, InterThreadInfo&, bool enable_processing = true) = 0;
XMLNode& get_state();
XMLNode& get_template();
@@ -97,7 +97,7 @@ class Track : public Route, public PublicDiskstream
/* XXX: unfortunate that this is exposed */
PBD::ID const & diskstream_id () const;
- void set_block_size (nframes_t);
+ void set_block_size (pframes_t);
/* PublicDiskstream interface */
boost::shared_ptr<Playlist> playlist ();
diff --git a/libs/ardour/ardour/types.h b/libs/ardour/ardour/types.h
index d452cd6b54..1f16ce6313 100644
--- a/libs/ardour/ardour/types.h
+++ b/libs/ardour/ardour/types.h
@@ -52,7 +52,7 @@ namespace ARDOUR {
typedef float gain_t;
typedef uint32_t layer_t;
typedef uint64_t microseconds_t;
- typedef uint32_t nframes_t;
+ typedef jack_nframes_t pframes_t;
/* Any position measured in audio frames.
Assumed to be non-negative but not enforced.
@@ -213,7 +213,7 @@ namespace ARDOUR {
BBT_Time bbt;
union {
- nframes_t frames;
+ framecnt_t frames;
double seconds;
};
@@ -221,13 +221,13 @@ namespace ARDOUR {
};
struct AudioRange {
- nframes_t start;
- nframes_t end;
+ framepos_t start;
+ framepos_t end;
uint32_t id;
- AudioRange (nframes_t s, nframes_t e, uint32_t i) : start (s), end (e) , id (i) {}
+ AudioRange (framepos_t s, framepos_t e, uint32_t i) : start (s), end (e) , id (i) {}
- nframes_t length() { return end - start + 1; }
+ framecnt_t length() { return end - start + 1; }
bool operator== (const AudioRange& other) const {
return start == other.start && end == other.end && id == other.id;
@@ -237,7 +237,7 @@ namespace ARDOUR {
return start == other.start && end == other.end;
}
- OverlapType coverage (nframes_t s, nframes_t e) const {
+ OverlapType coverage (framepos_t s, framepos_t e) const {
return ARDOUR::coverage (start, end, s, e);
}
};
@@ -560,9 +560,8 @@ track_frame_to_session_frame (ARDOUR::framepos_t track_frame, double speed)
return (ARDOUR::framepos_t)( (double)track_frame / speed );
}
-/* for now, break the rules and use "using" to make these "global" */
+/* for now, break the rules and use "using" to make this "global" */
-using ARDOUR::nframes_t;
using ARDOUR::framepos_t;
diff --git a/libs/ardour/ardour/utils.h b/libs/ardour/ardour/utils.h
index 8c3145a28b..06dc6d6bd9 100644
--- a/libs/ardour/ardour/utils.h
+++ b/libs/ardour/ardour/utils.h
@@ -62,7 +62,7 @@ std::string path_expand (std::string);
std::string region_name_from_path (std::string path, bool strip_channels, bool add_channel_suffix = false, uint32_t total = 0, uint32_t this_one = 0);
bool path_is_paired (std::string path, std::string& pair_base);
-void compute_equal_power_fades (ARDOUR::nframes_t nframes, float* in, float* out);
+void compute_equal_power_fades (ARDOUR::framecnt_t nframes, float* in, float* out);
const char* sync_source_to_string (ARDOUR::SyncSource src);
ARDOUR::SyncSource string_to_sync_source (std::string str);
diff --git a/libs/ardour/ardour/vbap.h b/libs/ardour/ardour/vbap.h
index 4b6b42e732..063bcb82d6 100644
--- a/libs/ardour/ardour/vbap.h
+++ b/libs/ardour/ardour/vbap.h
@@ -37,9 +37,9 @@ public:
static StreamPanner* factory (Panner& parent, Evoral::Parameter param, Speakers& s);
static std::string name;
- void do_distribute (AudioBuffer&, BufferSet& obufs, gain_t gain_coeff, nframes_t nframes);
+ void do_distribute (AudioBuffer&, BufferSet& obufs, gain_t gain_coeff, pframes_t nframes);
void do_distribute_automated (AudioBuffer& src, BufferSet& obufs,
- nframes_t start, nframes_t end, nframes_t nframes, pan_t** buffers);
+ framepos_t start, framepos_t end, pframes_t nframes, pan_t** buffers);
void set_azimuth_elevation (double azimuth, double elevation);
diff --git a/libs/ardour/audio_diskstream.cc b/libs/ardour/audio_diskstream.cc
index c6caf4ddc5..7b271b2e73 100644
--- a/libs/ardour/audio_diskstream.cc
+++ b/libs/ardour/audio_diskstream.cc
@@ -421,14 +421,14 @@ AudioDiskstream::prepare_record_status(framepos_t capture_start_frame)
}
int
-AudioDiskstream::process (framepos_t transport_frame, nframes_t nframes, bool can_record, bool rec_monitors_input, bool& need_butler)
+AudioDiskstream::process (framepos_t transport_frame, pframes_t nframes, bool can_record, bool rec_monitors_input, bool& need_butler)
{
uint32_t n;
boost::shared_ptr<ChannelList> c = channels.reader();
ChannelList::iterator chan;
int ret = -1;
- nframes_t rec_offset = 0;
- nframes_t rec_nframes = 0;
+ framecnt_t rec_offset = 0;
+ framecnt_t rec_nframes = 0;
bool collect_playback = false;
playback_distance = 0;
@@ -519,7 +519,7 @@ AudioDiskstream::process (framepos_t transport_frame, nframes_t nframes, bool ca
} else {
- nframes_t total = chaninfo->capture_vector.len[0] + chaninfo->capture_vector.len[1];
+ framecnt_t total = chaninfo->capture_vector.len[0] + chaninfo->capture_vector.len[1];
if (rec_nframes > total) {
DiskOverrun ();
@@ -530,7 +530,7 @@ AudioDiskstream::process (framepos_t transport_frame, nframes_t nframes, bool ca
assert(ap);
Sample* buf = ap->get_audio_buffer(nframes).data();
- nframes_t first = chaninfo->capture_vector.len[0];
+ framecnt_t first = chaninfo->capture_vector.len[0];
memcpy (chaninfo->capture_wrap_buffer, buf, sizeof (Sample) * first);
memcpy (chaninfo->capture_vector.buf[0], buf, sizeof (Sample) * first);
@@ -593,12 +593,12 @@ AudioDiskstream::process (framepos_t transport_frame, nframes_t nframes, bool ca
/* we're doing playback */
- nframes_t necessary_samples;
+ framecnt_t necessary_samples;
/* no varispeed playback if we're recording, because the output .... TBD */
if (rec_nframes == 0 && _actual_speed != 1.0f) {
- necessary_samples = (nframes_t) floor ((nframes * fabs (_actual_speed))) + 1;
+ necessary_samples = (framecnt_t) floor ((nframes * fabs (_actual_speed))) + 1;
} else {
necessary_samples = nframes;
}
@@ -618,7 +618,7 @@ AudioDiskstream::process (framepos_t transport_frame, nframes_t nframes, bool ca
chaninfo->current_playback_buffer = chaninfo->playback_vector.buf[0];
} else {
- nframes_t total = chaninfo->playback_vector.len[0] + chaninfo->playback_vector.len[1];
+ framecnt_t total = chaninfo->playback_vector.len[0] + chaninfo->playback_vector.len[1];
if (necessary_samples > total) {
cerr << _name << " Need " << necessary_samples << " total = " << total << endl;
@@ -662,7 +662,7 @@ AudioDiskstream::process (framepos_t transport_frame, nframes_t nframes, bool ca
}
void
-AudioDiskstream::process_varispeed_playback(nframes_t nframes, boost::shared_ptr<ChannelList> c)
+AudioDiskstream::process_varispeed_playback (pframes_t nframes, boost::shared_ptr<ChannelList> c)
{
ChannelList::iterator chan;
@@ -680,7 +680,7 @@ AudioDiskstream::process_varispeed_playback(nframes_t nframes, boost::shared_ptr
}
bool
-AudioDiskstream::commit (nframes_t /* nframes */)
+AudioDiskstream::commit (framecnt_t /* nframes */)
{
bool need_butler = false;
@@ -750,7 +750,7 @@ AudioDiskstream::overwrite_existing_buffers ()
overwrite_queued = false;
/* assume all are the same size */
- nframes_t size = c->front()->playback_buf->bufsize();
+ framecnt_t size = c->front()->playback_buf->bufsize();
mixdown_buffer = new Sample[size];
gain_buffer = new float[size];
@@ -764,7 +764,7 @@ AudioDiskstream::overwrite_existing_buffers ()
for (ChannelList::iterator chan = c->begin(); chan != c->end(); ++chan, ++n) {
start = overwrite_frame;
- nframes_t cnt = size;
+ framecnt_t cnt = size;
/* to fill the buffer without resetting the playback sample, we need to
do it one or two chunks (normally two).
@@ -777,7 +777,7 @@ AudioDiskstream::overwrite_existing_buffers ()
*/
- nframes_t to_read = size - overwrite_offset;
+ framecnt_t to_read = size - overwrite_offset;
if (read ((*chan)->playback_buf->buffer() + overwrite_offset, mixdown_buffer, gain_buffer, start, to_read, *chan, n, reversed)) {
error << string_compose(_("AudioDiskstream %1: when refilling, cannot read %2 from playlist at frame %3"),
@@ -874,14 +874,14 @@ AudioDiskstream::internal_playback_seek (framecnt_t distance)
int
AudioDiskstream::read (Sample* buf, Sample* mixdown_buffer, float* gain_buffer,
- framepos_t& start, nframes_t cnt,
+ framepos_t& start, framecnt_t cnt,
ChannelInfo* /*channel_info*/, int channel, bool reversed)
{
- nframes_t this_read = 0;
+ framecnt_t this_read = 0;
bool reloop = false;
framepos_t loop_end = 0;
framepos_t loop_start = 0;
- nframes_t offset = 0;
+ framecnt_t offset = 0;
Location *loc = 0;
/* XXX we don't currently play loops in reverse. not sure why */
@@ -988,15 +988,15 @@ int
AudioDiskstream::_do_refill (Sample* mixdown_buffer, float* gain_buffer)
{
int32_t ret = 0;
- nframes_t to_read;
+ framecnt_t to_read;
RingBufferNPT<Sample>::rw_vector vector;
bool reversed = (_visible_speed * _session.transport_speed()) < 0.0f;
- nframes_t total_space;
- nframes_t zero_fill;
+ framecnt_t total_space;
+ framecnt_t zero_fill;
uint32_t chan_n;
ChannelList::iterator i;
boost::shared_ptr<ChannelList> c = channels.reader();
- nframes_t ts;
+ framecnt_t ts;
if (c->empty()) {
return 0;
@@ -1121,7 +1121,7 @@ AudioDiskstream::_do_refill (Sample* mixdown_buffer, float* gain_buffer)
ChannelInfo* chan (*i);
Sample* buf1;
Sample* buf2;
- nframes_t len1, len2;
+ framecnt_t len1, len2;
chan->playback_buf->get_write_vector (&vector);
@@ -1216,7 +1216,7 @@ AudioDiskstream::do_flush (RunContext /*context*/, bool force_flush)
int32_t ret = 0;
RingBufferNPT<Sample>::rw_vector vector;
RingBufferNPT<CaptureTransition>::rw_vector transvec;
- nframes_t total;
+ framecnt_t total;
_write_data_count = 0;
@@ -1251,7 +1251,7 @@ AudioDiskstream::do_flush (RunContext /*context*/, bool force_flush)
ret = 1;
}
- to_write = min (disk_io_chunk_frames, (nframes_t) vector.len[0]);
+ to_write = min (disk_io_chunk_frames, (framecnt_t) vector.len[0]);
// check the transition buffer when recording destructive
// important that we get this after the capture buf
@@ -1321,7 +1321,7 @@ AudioDiskstream::do_flush (RunContext /*context*/, bool force_flush)
of vector.len[1] to be flushed to disk as well.
*/
- to_write = min ((nframes_t)(disk_io_chunk_frames - to_write), (nframes_t) vector.len[1]);
+ to_write = min ((framecnt_t)(disk_io_chunk_frames - to_write), (framecnt_t) vector.len[1]);
if ((*chan)->write_source->write (vector.buf[1], to_write) != to_write) {
error << string_compose(_("AudioDiskstream %1: cannot write to disk"), _id) << endmsg;
@@ -1346,7 +1346,7 @@ AudioDiskstream::transport_stopped_wallclock (struct tm& when, time_t twhen, boo
bool more_work = true;
int err = 0;
boost::shared_ptr<AudioRegion> region;
- nframes_t total_capture;
+ framecnt_t total_capture;
SourceList srcs;
SourceList::iterator src;
ChannelList::iterator chan;
@@ -2002,7 +2002,7 @@ AudioDiskstream::rename_write_sources ()
}
void
-AudioDiskstream::set_block_size (nframes_t /*nframes*/)
+AudioDiskstream::set_block_size (pframes_t /*nframes*/)
{
if (_session.get_block_size() > speed_buffer_size) {
speed_buffer_size = _session.get_block_size();
@@ -2026,7 +2026,7 @@ AudioDiskstream::allocate_temporary_buffers ()
*/
double const sp = max (fabsf (_actual_speed), 1.2f);
- nframes_t required_wrap_size = (nframes_t) floor (_session.get_block_size() * sp) + 1;
+ framecnt_t required_wrap_size = (framecnt_t) floor (_session.get_block_size() * sp) + 1;
if (required_wrap_size > wrap_buffer_size) {
@@ -2350,7 +2350,7 @@ AudioDiskstream::adjust_capture_buffering ()
}
}
-AudioDiskstream::ChannelInfo::ChannelInfo (nframes_t playback_bufsize, nframes_t capture_bufsize, nframes_t speed_size, nframes_t wrap_size)
+AudioDiskstream::ChannelInfo::ChannelInfo (framecnt_t playback_bufsize, framecnt_t capture_bufsize, framecnt_t speed_size, framecnt_t wrap_size)
{
peak_power = 0.0f;
source = 0;
@@ -2378,7 +2378,7 @@ AudioDiskstream::ChannelInfo::ChannelInfo (nframes_t playback_bufsize, nframes_t
}
void
-AudioDiskstream::ChannelInfo::resize_playback (nframes_t playback_bufsize)
+AudioDiskstream::ChannelInfo::resize_playback (framecnt_t playback_bufsize)
{
delete playback_buf;
playback_buf = new RingBufferNPT<Sample> (playback_bufsize);
@@ -2386,7 +2386,7 @@ AudioDiskstream::ChannelInfo::resize_playback (nframes_t playback_bufsize)
}
void
-AudioDiskstream::ChannelInfo::resize_capture (nframes_t capture_bufsize)
+AudioDiskstream::ChannelInfo::resize_capture (framecnt_t capture_bufsize)
{
delete capture_buf;
diff --git a/libs/ardour/audio_playlist.cc b/libs/ardour/audio_playlist.cc
index 1fa9c5adc4..4976672152 100644
--- a/libs/ardour/audio_playlist.cc
+++ b/libs/ardour/audio_playlist.cc
@@ -164,7 +164,7 @@ AudioPlaylist::AudioPlaylist (boost::shared_ptr<const AudioPlaylist> other, stri
}
}
-AudioPlaylist::AudioPlaylist (boost::shared_ptr<const AudioPlaylist> other, nframes_t start, nframes_t cnt, string name, bool hidden)
+AudioPlaylist::AudioPlaylist (boost::shared_ptr<const AudioPlaylist> other, framepos_t start, framecnt_t cnt, string name, bool hidden)
: Playlist (other, start, cnt, name, hidden)
, _crossfades (*this)
{
@@ -838,15 +838,13 @@ AudioPlaylist::region_changed (const PropertyChange& what_changed, boost::shared
}
void
-AudioPlaylist::crossfades_at (nframes_t frame, Crossfades& clist)
+AudioPlaylist::crossfades_at (framepos_t frame, Crossfades& clist)
{
RegionLock rlock (this);
for (Crossfades::iterator i = _crossfades.begin(); i != _crossfades.end(); ++i) {
- nframes_t start, end;
-
- start = (*i)->position();
- end = start + (*i)->overlap_length(); // not length(), important difference
+ framepos_t const start = (*i)->position ();
+ framepos_t const end = start + (*i)->overlap_length(); // not length(), important difference
if (frame >= start && frame <= end) {
clist.push_back (*i);
diff --git a/libs/ardour/audio_port.cc b/libs/ardour/audio_port.cc
index c7e920dfb6..aad56748c3 100644
--- a/libs/ardour/audio_port.cc
+++ b/libs/ardour/audio_port.cc
@@ -25,7 +25,7 @@
using namespace ARDOUR;
using namespace std;
-nframes_t AudioPort::_port_offset = 0;
+framecnt_t AudioPort::_port_offset = 0;
AudioPort::AudioPort (const std::string& name, Flags flags)
: Port (name, DataType::AUDIO, flags)
@@ -40,7 +40,7 @@ AudioPort::~AudioPort ()
}
void
-AudioPort::cycle_start (nframes_t nframes)
+AudioPort::cycle_start (pframes_t nframes)
{
/* caller must hold process lock */
@@ -65,7 +65,7 @@ AudioPort::cycle_start (nframes_t nframes)
}
void
-AudioPort::cycle_end (nframes_t nframes)
+AudioPort::cycle_end (pframes_t nframes)
{
if (sends_output() && !_buffer->written()) {
_buffer->silence (nframes);
@@ -78,7 +78,7 @@ AudioPort::cycle_split ()
}
AudioBuffer&
-AudioPort::get_audio_buffer (nframes_t nframes, nframes_t offset)
+AudioPort::get_audio_buffer (framecnt_t nframes, framecnt_t offset)
{
/* caller must hold process lock */
@@ -100,7 +100,7 @@ AudioPort::get_audio_buffer (nframes_t nframes, nframes_t offset)
}
size_t
-AudioPort::raw_buffer_size (nframes_t nframes) const
+AudioPort::raw_buffer_size (pframes_t nframes) const
{
return nframes * sizeof (Sample);
}
diff --git a/libs/ardour/audio_region_importer.cc b/libs/ardour/audio_region_importer.cc
index 2cade745f2..775bd0119f 100644
--- a/libs/ardour/audio_region_importer.cc
+++ b/libs/ardour/audio_region_importer.cc
@@ -126,7 +126,7 @@ AudioRegionImporter::~AudioRegionImporter ()
string
AudioRegionImporter::get_info () const
{
- nframes_t length, position;
+ framecnt_t length, position;
Timecode::Time length_time, position_time;
std::ostringstream oss;
diff --git a/libs/ardour/audio_track.cc b/libs/ardour/audio_track.cc
index ca2291902d..182fdccd26 100644
--- a/libs/ardour/audio_track.cc
+++ b/libs/ardour/audio_track.cc
@@ -354,7 +354,7 @@ AudioTrack::set_state_part_two ()
}
int
-AudioTrack::roll (nframes_t nframes, framepos_t start_frame, framepos_t end_frame, int declick,
+AudioTrack::roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame, int declick,
bool can_record, bool rec_monitors_input, bool& need_butler)
{
Glib::RWLock::ReaderLock lm (_processor_lock, Glib::TRY_LOCK);
@@ -365,7 +365,7 @@ AudioTrack::roll (nframes_t nframes, framepos_t start_frame, framepos_t end_fram
int dret;
Sample* b;
Sample* tmpb;
- nframes_t transport_frame;
+ framepos_t transport_frame;
boost::shared_ptr<AudioDiskstream> diskstream = audio_diskstream();
automation_snapshot (start_frame, false);
@@ -453,7 +453,7 @@ AudioTrack::roll (nframes_t nframes, framepos_t start_frame, framepos_t end_fram
Sample* bb = bufs.get_audio (i).data();
- for (nframes_t xx = 0; xx < nframes; ++xx) {
+ for (pframes_t xx = 0; xx < nframes; ++xx) {
bb[xx] = b[xx] * scaling;
}
@@ -595,7 +595,7 @@ AudioTrack::bounce (InterThreadInfo& itt)
}
boost::shared_ptr<Region>
-AudioTrack::bounce_range (nframes_t start, nframes_t end, InterThreadInfo& itt, bool enable_processing)
+AudioTrack::bounce_range (framepos_t start, framepos_t end, InterThreadInfo& itt, bool enable_processing)
{
vector<boost::shared_ptr<Source> > srcs;
return _session.write_one_track (*this, start, end, false, srcs, itt, enable_processing);
diff --git a/libs/ardour/audio_track_importer.cc b/libs/ardour/audio_track_importer.cc
index b29384b201..a831e480db 100644
--- a/libs/ardour/audio_track_importer.cc
+++ b/libs/ardour/audio_track_importer.cc
@@ -357,7 +357,7 @@ AudioTrackImporter::rate_convert_events (XMLNode & node)
std::stringstream str (content_node->content());
std::ostringstream new_content;
- nframes_t x;
+ framecnt_t x;
double y;
bool ok = true;
diff --git a/libs/ardour/audio_unit.cc b/libs/ardour/audio_unit.cc
index 517c5f150c..daace03de1 100644
--- a/libs/ardour/audio_unit.cc
+++ b/libs/ardour/audio_unit.cc
@@ -758,7 +758,7 @@ AUPlugin::default_value (uint32_t port)
return 0;
}
-nframes_t
+framecnt_t
AUPlugin::signal_latency () const
{
return unit->Latency() * _session.frame_rate();
@@ -858,7 +858,7 @@ AUPlugin::requires_fixed_size_buffers() const
int
-AUPlugin::set_block_size (nframes_t nframes)
+AUPlugin::set_block_size (pframes_t nframes)
{
bool was_initialized = initialized;
UInt32 numFrames = nframes;
@@ -1252,7 +1252,7 @@ AUPlugin::render_callback(AudioUnitRenderActionFlags*,
}
int
-AUPlugin::connect_and_run (BufferSet& bufs, ChanMapping, ChanMapping, nframes_t nframes, nframes_t offset)
+AUPlugin::connect_and_run (BufferSet& bufs, ChanMapping, ChanMapping, pframes_t nframes, framecnt_t offset)
{
AudioUnitRenderActionFlags flags = 0;
AudioTimeStamp ts;
diff --git a/libs/ardour/audioanalyser.cc b/libs/ardour/audioanalyser.cc
index 7b649aae89..cb46c45def 100644
--- a/libs/ardour/audioanalyser.cc
+++ b/libs/ardour/audioanalyser.cc
@@ -111,7 +111,7 @@ AudioAnalyser::analyse (const string& path, Readable* src, uint32_t channel)
while (!done) {
- nframes_t to_read;
+ framecnt_t to_read;
/* read from source */
diff --git a/libs/ardour/audioengine.cc b/libs/ardour/audioengine.cc
index 32ebe1643e..cb5374eabb 100644
--- a/libs/ardour/audioengine.cc
+++ b/libs/ardour/audioengine.cc
@@ -176,7 +176,7 @@ AudioEngine::start ()
if (!_running) {
- nframes_t blocksize = jack_get_buffer_size (_priv_jack);
+ pframes_t blocksize = jack_get_buffer_size (_priv_jack);
if (_session) {
BootMessage (_("Connect session to engine"));
@@ -274,7 +274,7 @@ AudioEngine::stop (bool forever)
bool
-AudioEngine::get_sync_offset (nframes_t& offset) const
+AudioEngine::get_sync_offset (pframes_t& offset) const
{
#ifdef HAVE_JACK_VIDEO_SUPPORT
@@ -300,14 +300,14 @@ AudioEngine::get_sync_offset (nframes_t& offset) const
}
void
-AudioEngine::_jack_timebase_callback (jack_transport_state_t state, nframes_t nframes,
+AudioEngine::_jack_timebase_callback (jack_transport_state_t state, pframes_t nframes,
jack_position_t* pos, int new_position, void *arg)
{
static_cast<AudioEngine*> (arg)->jack_timebase_callback (state, nframes, pos, new_position);
}
void
-AudioEngine::jack_timebase_callback (jack_transport_state_t state, nframes_t nframes,
+AudioEngine::jack_timebase_callback (jack_transport_state_t state, pframes_t nframes,
jack_position_t* pos, int new_position)
{
if (_jack && _session && _session->synced_to_jack()) {
@@ -368,7 +368,7 @@ AudioEngine::_graph_order_callback (void *arg)
* @param arg User argument passed by JACK, which will be the AudioEngine*.
*/
int
-AudioEngine::_process_callback (nframes_t nframes, void *arg)
+AudioEngine::_process_callback (pframes_t nframes, void *arg)
{
return static_cast<AudioEngine *> (arg)->process_callback (nframes);
}
@@ -400,7 +400,7 @@ AudioEngine::_connect_callback (jack_port_id_t /*id_a*/, jack_port_id_t /*id_b*/
}
void
-AudioEngine::split_cycle (nframes_t offset)
+AudioEngine::split_cycle (pframes_t offset)
{
/* caller must hold process lock */
@@ -434,7 +434,7 @@ AudioEngine::process_thread ()
while (1) {
GET_PRIVATE_JACK_POINTER_RET(_jack,0);
- jack_nframes_t nframes = jack_cycle_wait (_jack);
+ pframes_t nframes = jack_cycle_wait (_jack);
if (process_callback (nframes)) {
cerr << "--- process\n";
@@ -452,14 +452,14 @@ AudioEngine::process_thread ()
* @param nframes Number of frames to process.
*/
int
-AudioEngine::process_callback (nframes_t nframes)
+AudioEngine::process_callback (pframes_t nframes)
{
GET_PRIVATE_JACK_POINTER_RET(_jack,0);
// CycleTimer ct ("AudioEngine::process");
Glib::Mutex::Lock tm (_process_lock, Glib::TRY_LOCK);
/// The number of frames that will have been processed when we've finished
- nframes_t next_processed_frames;
+ pframes_t next_processed_frames;
/* handle wrap around of total frames counter */
@@ -571,13 +571,13 @@ AudioEngine::process_callback (nframes_t nframes)
}
int
-AudioEngine::_sample_rate_callback (nframes_t nframes, void *arg)
+AudioEngine::_sample_rate_callback (pframes_t nframes, void *arg)
{
return static_cast<AudioEngine *> (arg)->jack_sample_rate_callback (nframes);
}
int
-AudioEngine::jack_sample_rate_callback (nframes_t nframes)
+AudioEngine::jack_sample_rate_callback (pframes_t nframes)
{
_frame_rate = nframes;
_usecs_per_cycle = (int) floor ((((double) frames_per_cycle() / nframes)) * 1000000.0);
@@ -597,13 +597,13 @@ AudioEngine::jack_sample_rate_callback (nframes_t nframes)
}
int
-AudioEngine::_bufsize_callback (nframes_t nframes, void *arg)
+AudioEngine::_bufsize_callback (pframes_t nframes, void *arg)
{
return static_cast<AudioEngine *> (arg)->jack_bufsize_callback (nframes);
}
int
-AudioEngine::jack_bufsize_callback (nframes_t nframes)
+AudioEngine::jack_bufsize_callback (pframes_t nframes)
{
bool need_midi_size = true;
bool need_audio_size = true;
@@ -694,7 +694,7 @@ AudioEngine::set_session (Session *s)
start_metering_thread ();
- nframes_t blocksize = jack_get_buffer_size (_jack);
+ pframes_t blocksize = jack_get_buffer_size (_jack);
/* page in as much of the session process code as we
can before we really start running.
@@ -933,14 +933,14 @@ AudioEngine::disconnect (Port& port)
return port.disconnect_all ();
}
-ARDOUR::nframes_t
+ARDOUR::framecnt_t
AudioEngine::frame_rate () const
{
- GET_PRIVATE_JACK_POINTER_RET (_jack,0);
+ GET_PRIVATE_JACK_POINTER_RET (_jack, 0);
if (_frame_rate == 0) {
- return (_frame_rate = jack_get_sample_rate (_priv_jack));
+ return (_frame_rate = jack_get_sample_rate (_priv_jack));
} else {
- return _frame_rate;
+ return _frame_rate;
}
}
@@ -951,14 +951,14 @@ AudioEngine::raw_buffer_size (DataType t)
return (s != _raw_buffer_sizes.end()) ? s->second : 0;
}
-ARDOUR::nframes_t
+ARDOUR::framecnt_t
AudioEngine::frames_per_cycle () const
{
GET_PRIVATE_JACK_POINTER_RET (_jack,0);
if (_buffer_size == 0) {
- return (_buffer_size = jack_get_buffer_size (_jack));
+ return (_buffer_size = jack_get_buffer_size (_jack));
} else {
- return _buffer_size;
+ return _buffer_size;
}
}
@@ -1196,7 +1196,7 @@ AudioEngine::transport_start ()
}
void
-AudioEngine::transport_locate (nframes_t where)
+AudioEngine::transport_locate (framepos_t where)
{
GET_PRIVATE_JACK_POINTER (_jack);
// cerr << "tell JACK to locate to " << where << endl;
@@ -1401,7 +1401,7 @@ AudioEngine::reconnect_to_jack ()
}
int
-AudioEngine::request_buffer_size (nframes_t nframes)
+AudioEngine::request_buffer_size (pframes_t nframes)
{
GET_PRIVATE_JACK_POINTER_RET (_jack, -1);
diff --git a/libs/ardour/audiofilesource.cc b/libs/ardour/audiofilesource.cc
index 39701f24cc..63f7b55016 100644
--- a/libs/ardour/audiofilesource.cc
+++ b/libs/ardour/audiofilesource.cc
@@ -77,16 +77,16 @@ uint64_t AudioFileSource::header_position_offset = 0;
char AudioFileSource::bwf_serial_number[13] = "000000000000";
struct SizedSampleBuffer {
- nframes_t size;
- Sample* buf;
+ framecnt_t size;
+ Sample* buf;
- SizedSampleBuffer (nframes_t sz) : size (sz) {
- buf = new Sample[size];
- }
+ SizedSampleBuffer (framecnt_t sz) : size (sz) {
+ buf = new Sample[size];
+ }
- ~SizedSampleBuffer() {
- delete [] buf;
- }
+ ~SizedSampleBuffer() {
+ delete [] buf;
+ }
};
Glib::StaticPrivate<SizedSampleBuffer> thread_interleave_buffer = GLIBMM_STATIC_PRIVATE_INIT;
@@ -302,7 +302,7 @@ AudioFileSource::move_dependents_to_trash()
}
void
-AudioFileSource::set_header_position_offset (nframes_t offset)
+AudioFileSource::set_header_position_offset (framecnt_t offset)
{
header_position_offset = offset;
HeaderPositionOffsetChanged ();
@@ -385,7 +385,7 @@ AudioFileSource::safe_audio_file_extension(const string& file)
}
Sample*
-AudioFileSource::get_interleave_buffer (nframes_t size)
+AudioFileSource::get_interleave_buffer (framecnt_t size)
{
SizedSampleBuffer* ssb;
diff --git a/libs/ardour/audioregion.cc b/libs/ardour/audioregion.cc
index 9d94651eb0..f3ae05f1b1 100644
--- a/libs/ardour/audioregion.cc
+++ b/libs/ardour/audioregion.cc
@@ -297,8 +297,8 @@ AudioRegion::set_envelope_active (bool yn)
}
}
-ARDOUR::nframes_t
-AudioRegion::read_peaks (PeakData *buf, nframes_t npeaks, nframes_t offset, nframes_t cnt, uint32_t chan_n, double samples_per_unit) const
+ARDOUR::framecnt_t
+AudioRegion::read_peaks (PeakData *buf, framecnt_t npeaks, framecnt_t offset, framecnt_t cnt, uint32_t chan_n, double samples_per_unit) const
{
if (chan_n >= _sources.size()) {
return 0;
@@ -308,7 +308,7 @@ AudioRegion::read_peaks (PeakData *buf, nframes_t npeaks, nframes_t offset, nfra
return 0;
} else {
if (_scale_amplitude != 1.0f) {
- for (nframes_t n = 0; n < npeaks; ++n) {
+ for (framecnt_t n = 0; n < npeaks; ++n) {
buf[n].max *= _scale_amplitude;
buf[n].min *= _scale_amplitude;
}
@@ -438,20 +438,19 @@ AudioRegion::_read_at (const SourceList& /*srcs*/, framecnt_t limit,
if (_fade_in_active && _session.config.get_use_region_fades()) {
- nframes_t fade_in_length = (nframes_t) _fade_in->back()->when;
+ framecnt_t fade_in_length = (framecnt_t) _fade_in->back()->when;
/* see if this read is within the fade in */
if (internal_offset < fade_in_length) {
- nframes_t fi_limit;
+ framecnt_t fi_limit;
fi_limit = min (to_read, fade_in_length - internal_offset);
-
_fade_in->curve().get_vector (internal_offset, internal_offset+fi_limit, gain_buffer, fi_limit);
- for (nframes_t n = 0; n < fi_limit; ++n) {
+ for (framecnt_t n = 0; n < fi_limit; ++n) {
mixdown_buffer[n] *= gain_buffer[n];
}
}
@@ -480,20 +479,20 @@ AudioRegion::_read_at (const SourceList& /*srcs*/, framecnt_t limit,
*/
- nframes_t fade_out_length = (nframes_t) _fade_out->back()->when;
- nframes_t fade_interval_start = max(internal_offset, limit-fade_out_length);
- nframes_t fade_interval_end = min(internal_offset + to_read, limit);
+ framecnt_t fade_out_length = (framecnt_t) _fade_out->back()->when;
+ framecnt_t fade_interval_start = max(internal_offset, limit-fade_out_length);
+ framecnt_t fade_interval_end = min(internal_offset + to_read, limit);
if (fade_interval_end > fade_interval_start) {
/* (part of the) the fade out is in this buffer */
- nframes_t fo_limit = fade_interval_end - fade_interval_start;
- nframes_t curve_offset = fade_interval_start - (limit-fade_out_length);
- nframes_t fade_offset = fade_interval_start - internal_offset;
+ framecnt_t fo_limit = fade_interval_end - fade_interval_start;
+ framecnt_t curve_offset = fade_interval_start - (limit-fade_out_length);
+ framecnt_t fade_offset = fade_interval_start - internal_offset;
_fade_out->curve().get_vector (curve_offset, curve_offset+fo_limit, gain_buffer, fo_limit);
- for (nframes_t n = 0, m = fade_offset; n < fo_limit; ++n, ++m) {
+ for (framecnt_t n = 0, m = fade_offset; n < fo_limit; ++n, ++m) {
mixdown_buffer[m] *= gain_buffer[n];
}
}
@@ -507,11 +506,11 @@ AudioRegion::_read_at (const SourceList& /*srcs*/, framecnt_t limit,
_envelope->curve().get_vector (internal_offset, internal_offset + to_read, gain_buffer, to_read);
if ((rops & ReadOpsOwnScaling) && _scale_amplitude != 1.0f) {
- for (nframes_t n = 0; n < to_read; ++n) {
+ for (framecnt_t n = 0; n < to_read; ++n) {
mixdown_buffer[n] *= gain_buffer[n] * _scale_amplitude;
}
} else {
- for (nframes_t n = 0; n < to_read; ++n) {
+ for (framecnt_t n = 0; n < to_read; ++n) {
mixdown_buffer[n] *= gain_buffer[n];
}
}
@@ -520,7 +519,7 @@ AudioRegion::_read_at (const SourceList& /*srcs*/, framecnt_t limit,
// XXX this should be using what in 2.0 would have been:
// Session::apply_gain_to_buffer (mixdown_buffer, to_read, _scale_amplitude);
- for (nframes_t n = 0; n < to_read; ++n) {
+ for (framecnt_t n = 0; n < to_read; ++n) {
mixdown_buffer[n] *= _scale_amplitude;
}
}
@@ -532,7 +531,7 @@ AudioRegion::_read_at (const SourceList& /*srcs*/, framecnt_t limit,
buf += buf_offset;
- for (nframes_t n = 0; n < to_read; ++n) {
+ for (framecnt_t n = 0; n < to_read; ++n) {
buf[n] += mixdown_buffer[n];
}
}
@@ -713,13 +712,13 @@ AudioRegion::set_state (const XMLNode& node, int version)
void
AudioRegion::set_fade_in_shape (FadeShape shape)
{
- set_fade_in (shape, (nframes_t) _fade_in->back()->when);
+ set_fade_in (shape, (framecnt_t) _fade_in->back()->when);
}
void
AudioRegion::set_fade_out_shape (FadeShape shape)
{
- set_fade_out (shape, (nframes_t) _fade_out->back()->when);
+ set_fade_out (shape, (framecnt_t) _fade_out->back()->when);
}
void
@@ -1063,8 +1062,8 @@ int
AudioRegion::exportme (Session& /*session*/, ARDOUR::ExportSpecification& /*spec*/)
{
// TODO EXPORT
-// const nframes_t blocksize = 4096;
-// nframes_t to_read;
+// const framecnt_t blocksize = 4096;
+// framecnt_t to_read;
// int status = -1;
//
// spec.channels = _sources.size();
@@ -1099,7 +1098,7 @@ AudioRegion::exportme (Session& /*session*/, ARDOUR::ExportSpecification& /*spec
// goto out;
// }
//
-// for (nframes_t x = 0; x < to_read; ++x) {
+// for (framecnt_t x = 0; x < to_read; ++x) {
// spec.dataF[chan+(x*spec.channels)] = buf[x];
// }
// }
diff --git a/libs/ardour/audiosource.cc b/libs/ardour/audiosource.cc
index c61fb72ae2..38261f3cbb 100644
--- a/libs/ardour/audiosource.cc
+++ b/libs/ardour/audiosource.cc
@@ -238,7 +238,7 @@ AudioSource::initialize_peakfile (bool newfile, string audio_path)
/* we found it in the peaks dir, so check it out */
- if (statbuf.st_size == 0 || ((nframes_t) statbuf.st_size < ((length(_timeline_position) / _FPP) * sizeof (PeakData)))) {
+ if (statbuf.st_size == 0 || ((framecnt_t) statbuf.st_size < ((length(_timeline_position) / _FPP) * sizeof (PeakData)))) {
// empty
_peaks_built = false;
} else {
@@ -938,7 +938,7 @@ AudioSource::available_peaks (double zoom_factor) const
}
void
-AudioSource::dec_read_data_count (nframes_t cnt)
+AudioSource::dec_read_data_count (framecnt_t cnt)
{
uint32_t val = cnt * sizeof (Sample);
diff --git a/libs/ardour/auditioner.cc b/libs/ardour/auditioner.cc
index 37df6297da..d7605f26e1 100644
--- a/libs/ardour/auditioner.cc
+++ b/libs/ardour/auditioner.cc
@@ -193,7 +193,7 @@ Auditioner::audition_region (boost::shared_ptr<Region> region)
length = the_region->length();
int dir;
- nframes_t offset = the_region->sync_offset (dir);
+ framecnt_t offset = the_region->sync_offset (dir);
/* can't audition from a negative sync point */
@@ -208,10 +208,10 @@ Auditioner::audition_region (boost::shared_ptr<Region> region)
}
int
-Auditioner::play_audition (nframes_t nframes)
+Auditioner::play_audition (framecnt_t nframes)
{
bool need_butler = false;
- nframes_t this_nframes;
+ framecnt_t this_nframes;
int ret;
if (g_atomic_int_get (&_auditioning) == 0) {
diff --git a/libs/ardour/automatable.cc b/libs/ardour/automatable.cc
index 903ae5df75..248bb96b52 100644
--- a/libs/ardour/automatable.cc
+++ b/libs/ardour/automatable.cc
@@ -45,7 +45,7 @@ using namespace std;
using namespace ARDOUR;
using namespace PBD;
-nframes_t Automatable::_automation_interval = 0;
+framecnt_t Automatable::_automation_interval = 0;
Automatable::Automatable(Session& session)
: _a_session(session)
@@ -387,7 +387,7 @@ Automatable::protect_automation ()
}
void
-Automatable::automation_snapshot (nframes_t now, bool force)
+Automatable::automation_snapshot (framepos_t now, bool force)
{
if (force || _last_automation_snapshot > now || (now - _last_automation_snapshot) > _automation_interval) {
diff --git a/libs/ardour/automation_list.cc b/libs/ardour/automation_list.cc
index c8f5d18aec..f4f4f95238 100644
--- a/libs/ardour/automation_list.cc
+++ b/libs/ardour/automation_list.cc
@@ -392,7 +392,7 @@ AutomationList::set_state (const XMLNode& node, int version)
const XMLNodeList& elist = node.children();
XMLNodeConstIterator i;
XMLProperty* prop;
- nframes_t x;
+ pframes_t x;
double y;
ControlList::freeze ();
diff --git a/libs/ardour/buffer_set.cc b/libs/ardour/buffer_set.cc
index 4c802b1443..c60c0ac2b9 100644
--- a/libs/ardour/buffer_set.cc
+++ b/libs/ardour/buffer_set.cc
@@ -85,7 +85,7 @@ BufferSet::clear()
/** Make this BufferSet a direct mirror of a PortSet's buffers.
*/
void
-BufferSet::attach_buffers(PortSet& ports, nframes_t nframes, nframes_t offset)
+BufferSet::attach_buffers (PortSet& ports, framecnt_t nframes, framecnt_t offset)
{
clear();
@@ -224,7 +224,7 @@ BufferSet::get_lv2_midi(bool input, size_t i)
ebuf->reset();
if (input) {
for (MidiBuffer::iterator e = mbuf.begin(); e != mbuf.end(); ++e) {
- const Evoral::MIDIEvent<nframes_t> ev(*e, false);
+ const Evoral::MIDIEvent<framepos_t> ev(*e, false);
uint32_t type = LV2Plugin::midi_event_type();
ebuf->append(ev.time(), 0, type, ev.size(), ev.buffer());
}
@@ -299,7 +299,7 @@ BufferSet::VSTBuffer::clear ()
}
void
-BufferSet::VSTBuffer::push_back (Evoral::MIDIEvent<nframes_t> const & ev)
+BufferSet::VSTBuffer::push_back (Evoral::MIDIEvent<framepos_t> const & ev)
{
if (ev.size() > 3) {
/* XXX: this will silently drop MIDI messages longer than 3 bytes, so
@@ -333,7 +333,7 @@ BufferSet::VSTBuffer::push_back (Evoral::MIDIEvent<nframes_t> const & ev)
#endif /* VST_SUPPORT */
void
-BufferSet::read_from (const BufferSet& in, nframes_t nframes)
+BufferSet::read_from (const BufferSet& in, framecnt_t nframes)
{
assert(available() >= in.count());
@@ -349,7 +349,7 @@ BufferSet::read_from (const BufferSet& in, nframes_t nframes)
}
void
-BufferSet::merge_from (const BufferSet& in, nframes_t nframes)
+BufferSet::merge_from (const BufferSet& in, framecnt_t nframes)
{
/* merge all input buffers into out existing buffers.
@@ -367,7 +367,7 @@ BufferSet::merge_from (const BufferSet& in, nframes_t nframes)
}
void
-BufferSet::silence (nframes_t nframes, nframes_t offset)
+BufferSet::silence (framecnt_t nframes, framecnt_t offset)
{
for (std::vector<BufferVec>::iterator i = _buffers.begin(); i != _buffers.end(); ++i) {
for (BufferVec::iterator b = i->begin(); b != i->end(); ++b) {
diff --git a/libs/ardour/butler.cc b/libs/ardour/butler.cc
index a77c11b983..72f2a0971d 100644
--- a/libs/ardour/butler.cc
+++ b/libs/ardour/butler.cc
@@ -87,7 +87,7 @@ Butler::start_thread()
*/
midi_dstream_buffer_size = (uint32_t) floor (Config->get_midi_track_buffer_seconds() * rate);
- MidiDiskstream::set_readahead_frames ((nframes_t)(Config->get_midi_readahead() * rate));
+ MidiDiskstream::set_readahead_frames ((framecnt_t) (Config->get_midi_readahead() * rate));
Crossfade::set_buffer_size (audio_dstream_playback_buffer_size);
diff --git a/libs/ardour/caimportable.cc b/libs/ardour/caimportable.cc
index e78691a1dd..149f213222 100644
--- a/libs/ardour/caimportable.cc
+++ b/libs/ardour/caimportable.cc
@@ -36,12 +36,12 @@ CAImportableSource::~CAImportableSource ()
{
}
-nframes_t
-CAImportableSource::read (Sample* buffer, nframes_t nframes)
+framecnt_t
+CAImportableSource::read (Sample* buffer, framecnt_t nframes)
{
- nframes_t nread = 0;
+ framecnt_t nread = 0;
AudioBufferList abl;
- nframes_t per_channel;
+ framecnt_t per_channel;
bool at_end = false;
abl.mNumberBuffers = 1;
@@ -91,8 +91,8 @@ CAImportableSource::length () const
return af.GetNumberFrames();
}
-nframes_t
-CAImportableSource::samplerate() const
+framecnt_t
+CAImportableSource::samplerate () const
{
CAStreamBasicDescription client_asbd;
@@ -107,7 +107,7 @@ CAImportableSource::samplerate() const
}
void
-CAImportableSource::seek (nframes_t pos)
+CAImportableSource::seek (framepos_t pos)
{
try {
af.Seek (pos);
diff --git a/libs/ardour/coreaudiosource.cc b/libs/ardour/coreaudiosource.cc
index d1038faf62..09e06a49bc 100644
--- a/libs/ardour/coreaudiosource.cc
+++ b/libs/ardour/coreaudiosource.cc
@@ -92,7 +92,7 @@ CoreAudioSource::~CoreAudioSource ()
}
int
-CoreAudioSource::safe_read (Sample* dst, nframes_t start, framecnt_t cnt, AudioBufferList& abl) const
+CoreAudioSource::safe_read (Sample* dst, framepos_t start, framecnt_t cnt, AudioBufferList& abl) const
{
framecnt_t nread = 0;
diff --git a/libs/ardour/default_click.cc b/libs/ardour/default_click.cc
index b1f4772852..242e5c2918 100644
--- a/libs/ardour/default_click.cc
+++ b/libs/ardour/default_click.cc
@@ -555,7 +555,7 @@ const Sample Session::default_click_emphasis[] = {
0, 0,
};
-const nframes_t Session::default_click_emphasis_length = sizeof (default_click_emphasis) / sizeof (default_click_emphasis[0]);
+const framecnt_t Session::default_click_emphasis_length = sizeof (default_click_emphasis) / sizeof (default_click_emphasis[0]);
const Sample Session::default_click[] = {
0, -0.014312744, -0.03338623, 0.019165039, 0.042541504,
@@ -1171,4 +1171,4 @@ const Sample Session::default_click[] = {
0, 0, 0, 0, 0, 0, 0, 0,
};
-const nframes_t Session::default_click_length = sizeof (default_click) / sizeof (default_click[0]);
+const framecnt_t Session::default_click_length = sizeof (default_click) / sizeof (default_click[0]);
diff --git a/libs/ardour/delivery.cc b/libs/ardour/delivery.cc
index 700efd8ac1..9bf597ef66 100644
--- a/libs/ardour/delivery.cc
+++ b/libs/ardour/delivery.cc
@@ -43,9 +43,9 @@ using namespace std;
using namespace PBD;
using namespace ARDOUR;
-PBD::Signal1<void,nframes_t> Delivery::CycleStart;
-PBD::Signal0<int> Delivery::PannersLegal;
-bool Delivery::panners_legal = false;
+PBD::Signal1<void, pframes_t> Delivery::CycleStart;
+PBD::Signal0<int> Delivery::PannersLegal;
+bool Delivery::panners_legal = false;
/* deliver to an existing IO object */
@@ -115,14 +115,14 @@ Delivery::display_name () const
}
void
-Delivery::cycle_start (nframes_t /*nframes*/)
+Delivery::cycle_start (pframes_t /*nframes*/)
{
_output_offset = 0;
_no_outs_cuz_we_no_monitor = false;
}
void
-Delivery::increment_output_offset (nframes_t n)
+Delivery::increment_output_offset (framecnt_t n)
{
_output_offset += n;
}
@@ -226,7 +226,7 @@ Delivery::configure_io (ChanCount in, ChanCount out)
}
void
-Delivery::run (BufferSet& bufs, framepos_t start_frame, framepos_t end_frame, nframes_t nframes, bool result_required)
+Delivery::run (BufferSet& bufs, framepos_t start_frame, framepos_t end_frame, pframes_t nframes, bool result_required)
{
assert (_output);
@@ -441,7 +441,7 @@ Delivery::end_pan_touch (uint32_t which, bool mark, double when)
void
-Delivery::flush_buffers (nframes_t nframes, framepos_t time)
+Delivery::flush_buffers (framecnt_t nframes, framepos_t time)
{
/* io_lock, not taken: function must be called from Session::process() calltree */
diff --git a/libs/ardour/diskstream.cc b/libs/ardour/diskstream.cc
index 5b3fe34870..bf77d7d6ad 100644
--- a/libs/ardour/diskstream.cc
+++ b/libs/ardour/diskstream.cc
@@ -66,7 +66,7 @@ using namespace PBD;
* default from configuration_vars.h). 0 is not a good value for
* allocating buffer sizes..
*/
-ARDOUR::nframes_t Diskstream::disk_io_chunk_frames = 1024 * 256;
+ARDOUR::framecnt_t Diskstream::disk_io_chunk_frames = 1024 * 256;
PBD::Signal0<void> Diskstream::DiskOverrun;
PBD::Signal0<void> Diskstream::DiskUnderrun;
@@ -110,9 +110,6 @@ Diskstream::Diskstream (Session &sess, const string &name, Flag flag)
, in_set_state (false)
, _persistent_alignment_style (ExistingMaterial)
, first_input_change (true)
- , scrub_start (0)
- , scrub_buffer_size (0)
- , scrub_offset (0)
, _flags (flag)
{
@@ -157,9 +154,6 @@ Diskstream::Diskstream (Session& sess, const XMLNode& /*node*/)
, in_set_state (false)
, _persistent_alignment_style (ExistingMaterial)
, first_input_change (true)
- , scrub_start (0)
- , scrub_buffer_size (0)
- , scrub_offset (0)
, _flags (Recordable)
{
}
@@ -238,7 +232,7 @@ Diskstream::realtime_set_speed (double sp, bool global)
if (new_speed != _actual_speed) {
- nframes_t required_wrap_size = (nframes_t) floor (_session.get_block_size() *
+ framecnt_t required_wrap_size = (framecnt_t) floor (_session.get_block_size() *
fabs (new_speed)) + 1;
if (required_wrap_size > wrap_buffer_size) {
@@ -329,7 +323,7 @@ Diskstream::get_captured_frames (uint32_t n) const
}
void
-Diskstream::set_roll_delay (ARDOUR::nframes_t nframes)
+Diskstream::set_roll_delay (ARDOUR::framecnt_t nframes)
{
_roll_delay = nframes;
}
@@ -639,7 +633,7 @@ Diskstream::route_going_away ()
void
Diskstream::calculate_record_range(OverlapType ot, framepos_t transport_frame, framecnt_t nframes,
- nframes_t& rec_nframes, nframes_t& rec_offset)
+ framecnt_t & rec_nframes, framecnt_t & rec_offset)
{
switch (ot) {
case OverlapNone:
diff --git a/libs/ardour/element_importer.cc b/libs/ardour/element_importer.cc
index 9f217c2cd9..4f635f1693 100644
--- a/libs/ardour/element_importer.cc
+++ b/libs/ardour/element_importer.cc
@@ -95,15 +95,15 @@ ElementImporter::timecode_to_string(Timecode::Time & time) const
return oss.str();
}
-nframes_t
-ElementImporter::rate_convert_samples (nframes_t samples) const
+framecnt_t
+ElementImporter::rate_convert_samples (framecnt_t samples) const
{
if (sample_rate == session.frame_rate()) {
return samples;
}
// +0.5 for proper rounding
- return static_cast<nframes_t> (samples * (static_cast<double> (session.nominal_frame_rate()) / sample_rate) + 0.5);
+ return static_cast<framecnt_t> (samples * (static_cast<double> (session.nominal_frame_rate()) / sample_rate) + 0.5);
}
string
diff --git a/libs/ardour/export_channel.cc b/libs/ardour/export_channel.cc
index f94ee13257..0f2548dd00 100644
--- a/libs/ardour/export_channel.cc
+++ b/libs/ardour/export_channel.cc
@@ -39,7 +39,7 @@ PortExportChannel::operator< (ExportChannel const & other) const
}
void
-PortExportChannel::read (Sample * data, nframes_t frames) const
+PortExportChannel::read (Sample * data, framecnt_t frames) const
{
memset (data, 0, frames * sizeof (float));
@@ -128,7 +128,7 @@ RegionExportChannelFactory::create (uint32_t channel)
}
void
-RegionExportChannelFactory::read (uint32_t channel, Sample * data, nframes_t frames_to_read)
+RegionExportChannelFactory::read (uint32_t channel, Sample * data, framecnt_t frames_to_read)
{
assert (channel < n_channels);
assert (frames_to_read <= frames_per_cycle);
@@ -142,7 +142,7 @@ RegionExportChannelFactory::read (uint32_t channel, Sample * data, nframes_t fra
}
void
-RegionExportChannelFactory::update_buffers (nframes_t frames)
+RegionExportChannelFactory::update_buffers (framecnt_t frames)
{
assert (frames <= frames_per_cycle);
diff --git a/libs/ardour/export_format_specification.cc b/libs/ardour/export_format_specification.cc
index 1658e8cffc..315da339d4 100644
--- a/libs/ardour/export_format_specification.cc
+++ b/libs/ardour/export_format_specification.cc
@@ -55,11 +55,11 @@ ExportFormatSpecification::Time::operator= (AnyTime const & other)
return *this;
}
-nframes_t
-ExportFormatSpecification::Time::get_frames (nframes_t target_rate) const
+framecnt_t
+ExportFormatSpecification::Time::get_frames (framecnt_t target_rate) const
{
//TODO position
- nframes_t duration = session.convert_to_frames_at (0, *this);
+ framecnt_t duration = session.convert_to_frames_at (0, *this);
return ((double) target_rate / session.frame_rate()) * duration + 0.5;
}
diff --git a/libs/ardour/export_graph_builder.cc b/libs/ardour/export_graph_builder.cc
index 1cd3118eae..ba7491c976 100644
--- a/libs/ardour/export_graph_builder.cc
+++ b/libs/ardour/export_graph_builder.cc
@@ -38,7 +38,7 @@ ExportGraphBuilder::~ExportGraphBuilder ()
}
int
-ExportGraphBuilder::process (nframes_t frames, bool last_cycle)
+ExportGraphBuilder::process (framecnt_t frames, bool last_cycle)
{
assert(frames <= process_buffer_frames);
@@ -187,7 +187,7 @@ ExportGraphBuilder::Encoder::copy_files (std::string orig_path)
/* 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;
@@ -252,7 +252,7 @@ ExportGraphBuilder::SFC::operator== (FileSpec const & other_config) const
/* 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;
@@ -306,7 +306,7 @@ ExportGraphBuilder::Normalizer::operator== (FileSpec const & other_config) const
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();
}
@@ -321,7 +321,7 @@ ExportGraphBuilder::Normalizer::start_post_processing()
/* 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;
@@ -371,12 +371,12 @@ ExportGraphBuilder::SRC::operator== (FileSpec const & other_config) const
}
/* 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());
@@ -457,7 +457,7 @@ ExportGraphBuilder::ChannelConfig::add_child (FileSpec const & new_config)
}
}
- 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 ());
}
diff --git a/libs/ardour/export_handler.cc b/libs/ardour/export_handler.cc
index 9ffb7c1778..59a023c4d8 100644
--- a/libs/ardour/export_handler.cc
+++ b/libs/ardour/export_handler.cc
@@ -178,7 +178,7 @@ ExportHandler::start_timespan ()
}
int
-ExportHandler::process (nframes_t frames)
+ExportHandler::process (framecnt_t frames)
{
if (!export_status->running) {
return 0;
@@ -190,11 +190,11 @@ ExportHandler::process (nframes_t frames)
}
int
-ExportHandler::process_timespan (nframes_t frames)
+ExportHandler::process_timespan (framecnt_t frames)
{
/* update position */
- nframes_t frames_to_read = 0;
+ framecnt_t frames_to_read = 0;
framepos_t const start = current_timespan->get_start();
framepos_t const end = current_timespan->get_end();
@@ -538,7 +538,7 @@ void
ExportHandler::frames_to_cd_frames_string (char* buf, framepos_t when)
{
framecnt_t remainder;
- nframes_t fr = session.nominal_frame_rate();
+ framecnt_t fr = session.nominal_frame_rate();
int mins, secs, frames;
mins = when / (60 * fr);
diff --git a/libs/ardour/export_profile_manager.cc b/libs/ardour/export_profile_manager.cc
index d745b1f94c..1b6f4406a5 100644
--- a/libs/ardour/export_profile_manager.cc
+++ b/libs/ardour/export_profile_manager.cc
@@ -290,7 +290,7 @@ ExportProfileManager::find_file (std::string const & pattern)
}
void
-ExportProfileManager::set_selection_range (nframes_t start, nframes_t end)
+ExportProfileManager::set_selection_range (framepos_t start, framepos_t end)
{
if (start || end) {
@@ -307,7 +307,7 @@ ExportProfileManager::set_selection_range (nframes_t start, nframes_t end)
}
std::string
-ExportProfileManager::set_single_range (nframes_t start, nframes_t end, string name)
+ExportProfileManager::set_single_range (framepos_t start, framepos_t end, string name)
{
single_range_mode = true;
diff --git a/libs/ardour/export_timespan.cc b/libs/ardour/export_timespan.cc
index 948bf768d5..5b62c7dfcc 100644
--- a/libs/ardour/export_timespan.cc
+++ b/libs/ardour/export_timespan.cc
@@ -27,13 +27,14 @@
namespace ARDOUR
{
-ExportTimespan::ExportTimespan (ExportStatusPtr status, nframes_t frame_rate) :
- status (status),
- start_frame (0),
- end_frame (0),
- position (0),
- frame_rate (frame_rate)
+ExportTimespan::ExportTimespan (ExportStatusPtr status, framecnt_t frame_rate) :
+ status (status),
+ start_frame (0),
+ end_frame (0),
+ position (0),
+ frame_rate (frame_rate)
{
+
}
ExportTimespan::~ExportTimespan ()
@@ -41,7 +42,7 @@ ExportTimespan::~ExportTimespan ()
}
void
-ExportTimespan::set_range (nframes_t start, nframes_t end)
+ExportTimespan::set_range (framepos_t start, framepos_t end)
{
start_frame = start;
position = start_frame;
diff --git a/libs/ardour/gain.cc b/libs/ardour/gain.cc
index 6f2161f578..a3c27f4260 100644
--- a/libs/ardour/gain.cc
+++ b/libs/ardour/gain.cc
@@ -41,21 +41,21 @@ Gain::operator= (const Gain& other)
}
void
-Gain::fill_linear_volume_fade_in (Gain& /*gain*/, nframes_t /*frames*/)
+Gain::fill_linear_volume_fade_in (Gain& /*gain*/, framecnt_t /*frames*/)
{
}
void
-Gain::fill_linear_volume_fade_out (Gain& /*gain*/, nframes_t /*frames*/)
+Gain::fill_linear_volume_fade_out (Gain& /*gain*/, framecnt_t /*frames*/)
{
}
void
-Gain::fill_linear_fade_in (Gain& /*gain*/, nframes_t /*frames*/)
+Gain::fill_linear_fade_in (Gain& /*gain*/, framecnt_t /*frames*/)
{
}
void
-Gain::fill_linear_fade_out (Gain& /*gain*/, nframes_t /*frames*/)
+Gain::fill_linear_fade_out (Gain& /*gain*/, framecnt_t /*frames*/)
{
}
diff --git a/libs/ardour/graph.cc b/libs/ardour/graph.cc
index a24fcad8ce..9549a9dcc9 100644
--- a/libs/ardour/graph.cc
+++ b/libs/ardour/graph.cc
@@ -445,7 +445,7 @@ Graph::dump (int chain)
}
int
-Graph::silent_process_routes (nframes_t nframes, framepos_t start_frame, framepos_t end_frame,
+Graph::silent_process_routes (pframes_t nframes, framepos_t start_frame, framepos_t end_frame,
bool can_record, bool rec_monitors_input, bool& need_butler)
{
_process_nframes = nframes;
@@ -471,7 +471,7 @@ Graph::silent_process_routes (nframes_t nframes, framepos_t start_frame, framepo
}
int
-Graph::process_routes (nframes_t nframes, framepos_t start_frame, framepos_t end_frame, int declick,
+Graph::process_routes (pframes_t nframes, framepos_t start_frame, framepos_t end_frame, int declick,
bool can_record, bool rec_monitors_input, bool& need_butler)
{
DEBUG_TRACE (DEBUG::Graph, string_compose ("graph execution from %1 to %2 = %3\n", start_frame, end_frame, nframes));
@@ -500,7 +500,7 @@ Graph::process_routes (nframes_t nframes, framepos_t start_frame, framepos_t end
}
int
-Graph::routes_no_roll (nframes_t nframes, framepos_t start_frame, framepos_t end_frame,
+Graph::routes_no_roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame,
bool non_rt_pending, bool can_record, int declick)
{
DEBUG_TRACE (DEBUG::Graph, string_compose ("no-roll graph execution from %1 to %2 = %3\n", start_frame, end_frame, nframes));
diff --git a/libs/ardour/import.cc b/libs/ardour/import.cc
index 3dd2a99ee1..deba3efb05 100644
--- a/libs/ardour/import.cc
+++ b/libs/ardour/import.cc
@@ -73,7 +73,7 @@ using namespace ARDOUR;
using namespace PBD;
static boost::shared_ptr<ImportableSource>
-open_importable_source (const string& path, nframes_t samplerate, ARDOUR::SrcQuality quality)
+open_importable_source (const string& path, framecnt_t samplerate, ARDOUR::SrcQuality quality)
{
/* try libsndfile first, because it can get BWF info from .wav, which ExtAudioFile cannot.
We don't necessarily need that information in an ImportableSource, but it keeps the
@@ -274,7 +274,7 @@ static void
write_audio_data_to_new_files (ImportableSource* source, ImportStatus& status,
vector<boost::shared_ptr<Source> >& newfiles)
{
- const nframes_t nframes = ResampledImportableSource::blocksize;
+ const framecnt_t nframes = ResampledImportableSource::blocksize;
boost::shared_ptr<AudioFileSource> afs;
uint channels = source->channels();
@@ -305,7 +305,7 @@ write_audio_data_to_new_files (ImportableSource* source, ImportStatus& status,
uint read_count = 0;
while (!status.cancel) {
- nframes_t const nread = source->read (data.get(), nframes);
+ framecnt_t const nread = source->read (data.get(), nframes);
if (nread == 0) {
break;
}
@@ -330,7 +330,7 @@ write_audio_data_to_new_files (ImportableSource* source, ImportStatus& status,
while (!status.cancel) {
- nframes_t nread, nfread;
+ framecnt_t nread, nfread;
uint x;
uint chn;
@@ -349,7 +349,7 @@ write_audio_data_to_new_files (ImportableSource* source, ImportStatus& status,
for (chn = 0; chn < channels; ++chn) {
- nframes_t n;
+ framecnt_t n;
for (x = chn, n = 0; n < nfread; x += channels, ++n) {
channel_data[chn][n] = (Sample) data[x];
}
diff --git a/libs/ardour/internal_return.cc b/libs/ardour/internal_return.cc
index 1d135cc44f..8e058b69b1 100644
--- a/libs/ardour/internal_return.cc
+++ b/libs/ardour/internal_return.cc
@@ -27,7 +27,7 @@
using namespace std;
using namespace ARDOUR;
-PBD::Signal1<void,nframes_t> InternalReturn::CycleStart;
+PBD::Signal1<void, pframes_t> InternalReturn::CycleStart;
InternalReturn::InternalReturn (Session& s)
: Return (s, true)
@@ -38,7 +38,7 @@ InternalReturn::InternalReturn (Session& s)
}
void
-InternalReturn::run (BufferSet& bufs, framepos_t /*start_frame*/, framepos_t /*end_frame*/, nframes_t nframes, bool)
+InternalReturn::run (BufferSet& bufs, framepos_t /*start_frame*/, framepos_t /*end_frame*/, pframes_t nframes, bool)
{
if (!_active && !_pending_active) {
return;
@@ -64,14 +64,14 @@ InternalReturn::configure_io (ChanCount in, ChanCount out)
}
int
-InternalReturn::set_block_size (nframes_t nframes)
+InternalReturn::set_block_size (pframes_t nframes)
{
allocate_buffers (nframes);
return 0;
}
void
-InternalReturn::allocate_buffers (nframes_t nframes)
+InternalReturn::allocate_buffers (pframes_t nframes)
{
buffers.ensure_buffers (_configured_input, nframes);
buffers.set_count (_configured_input);
@@ -101,7 +101,7 @@ InternalReturn::release_buffers ()
}
void
-InternalReturn::cycle_start (nframes_t nframes)
+InternalReturn::cycle_start (pframes_t nframes)
{
/* called from process cycle - no lock necessary */
if (user_count) {
diff --git a/libs/ardour/internal_send.cc b/libs/ardour/internal_send.cc
index 8ec5430308..43276516dd 100644
--- a/libs/ardour/internal_send.cc
+++ b/libs/ardour/internal_send.cc
@@ -81,7 +81,7 @@ InternalSend::send_to_going_away ()
}
void
-InternalSend::run (BufferSet& bufs, framepos_t start_frame, framepos_t end_frame, nframes_t nframes, bool)
+InternalSend::run (BufferSet& bufs, framepos_t start_frame, framepos_t end_frame, pframes_t nframes, bool)
{
if ((!_active && !_pending_active) || !target || !_send_to) {
_meter->reset ();
@@ -147,7 +147,7 @@ InternalSend::run (BufferSet& bufs, framepos_t start_frame, framepos_t end_frame
}
int
-InternalSend::set_block_size (nframes_t nframes)
+InternalSend::set_block_size (pframes_t nframes)
{
mixbufs.ensure_buffers (_configured_input, nframes);
diff --git a/libs/ardour/interpolation.cc b/libs/ardour/interpolation.cc
index 1393d8aae8..0a9bbc3a7d 100644
--- a/libs/ardour/interpolation.cc
+++ b/libs/ardour/interpolation.cc
@@ -6,11 +6,11 @@
using namespace ARDOUR;
-nframes_t
-LinearInterpolation::interpolate (int channel, nframes_t nframes, Sample *input, Sample *output)
+framecnt_t
+LinearInterpolation::interpolate (int channel, framecnt_t nframes, Sample *input, Sample *output)
{
// index in the input buffers
- nframes_t i = 0;
+ framecnt_t i = 0;
double acceleration;
double distance = 0.0;
@@ -22,7 +22,7 @@ LinearInterpolation::interpolate (int channel, nframes_t nframes, Sample *input,
}
distance = phase[channel];
- for (nframes_t outsample = 0; outsample < nframes; ++outsample) {
+ for (framecnt_t outsample = 0; outsample < nframes; ++outsample) {
i = floor(distance);
Sample fractional_phase_part = distance - i;
if (fractional_phase_part >= 1.0) {
@@ -45,11 +45,11 @@ LinearInterpolation::interpolate (int channel, nframes_t nframes, Sample *input,
return i;
}
-nframes_t
-CubicInterpolation::interpolate (int channel, nframes_t nframes, Sample *input, Sample *output)
+framecnt_t
+CubicInterpolation::interpolate (int channel, framecnt_t nframes, Sample *input, Sample *output)
{
// index in the input buffers
- nframes_t i = 0;
+ framecnt_t i = 0;
double acceleration;
double distance = 0.0;
@@ -87,7 +87,7 @@ CubicInterpolation::interpolate (int channel, nframes_t nframes, Sample *input,
inm1 = input[i-1];
}
- for (nframes_t outsample = 0; outsample < nframes; ++outsample) {
+ for (framecnt_t outsample = 0; outsample < nframes; ++outsample) {
float f = floor (distance);
float fractional_phase_part = distance - f;
@@ -124,7 +124,7 @@ CubicInterpolation::interpolate (int channel, nframes_t nframes, Sample *input,
/* not sure that this is ever utilized - it implies that one of the input/output buffers is missing */
- for (nframes_t outsample = 0; outsample < nframes; ++outsample) {
+ for (framecnt_t outsample = 0; outsample < nframes; ++outsample) {
distance += _speed + acceleration;
}
}
diff --git a/libs/ardour/io.cc b/libs/ardour/io.cc
index ebed41fd64..c29ee51a58 100644
--- a/libs/ardour/io.cc
+++ b/libs/ardour/io.cc
@@ -96,7 +96,7 @@ IO::~IO ()
}
void
-IO::silence (nframes_t nframes)
+IO::silence (framecnt_t nframes)
{
/* io_lock, not taken: function must be called from Session::process() calltree */
@@ -1133,7 +1133,7 @@ IO::set_name (const string& requested_name)
}
void
-IO::set_port_latency (nframes_t nframes)
+IO::set_port_latency (framecnt_t nframes)
{
Glib::Mutex::Lock lm (io_lock);
@@ -1142,11 +1142,11 @@ IO::set_port_latency (nframes_t nframes)
}
}
-nframes_t
+framecnt_t
IO::latency () const
{
- nframes_t max_latency;
- nframes_t latency;
+ framecnt_t max_latency;
+ framecnt_t latency;
max_latency = 0;
@@ -1521,7 +1521,7 @@ IO::connected_to (boost::shared_ptr<const IO> other) const
}
void
-IO::process_input (boost::shared_ptr<Processor> proc, framepos_t start_frame, framepos_t end_frame, nframes_t nframes)
+IO::process_input (boost::shared_ptr<Processor> proc, framepos_t start_frame, framepos_t end_frame, pframes_t nframes)
{
BufferSet bufs;
@@ -1532,7 +1532,7 @@ IO::process_input (boost::shared_ptr<Processor> proc, framepos_t start_frame, fr
}
void
-IO::collect_input (BufferSet& bufs, nframes_t nframes, ChanCount offset)
+IO::collect_input (BufferSet& bufs, pframes_t nframes, ChanCount offset)
{
assert(bufs.available() >= _ports.count());
@@ -1560,7 +1560,7 @@ IO::collect_input (BufferSet& bufs, nframes_t nframes, ChanCount offset)
}
void
-IO::copy_to_outputs (BufferSet& bufs, DataType type, nframes_t nframes, nframes_t offset)
+IO::copy_to_outputs (BufferSet& bufs, DataType type, pframes_t nframes, framecnt_t offset)
{
// Copy any buffers 1:1 to outputs
diff --git a/libs/ardour/io_processor.cc b/libs/ardour/io_processor.cc
index 877e0422fa..8cad0ba6cb 100644
--- a/libs/ardour/io_processor.cc
+++ b/libs/ardour/io_processor.cc
@@ -242,7 +242,7 @@ IOProcessor::set_state_2X (const XMLNode& node, int version)
}
void
-IOProcessor::silence (nframes_t nframes)
+IOProcessor::silence (framecnt_t nframes)
{
if (_own_output && _output) {
_output->silence (nframes);
diff --git a/libs/ardour/ladspa_plugin.cc b/libs/ardour/ladspa_plugin.cc
index 027c16e78c..fb5a88e5f8 100644
--- a/libs/ardour/ladspa_plugin.cc
+++ b/libs/ardour/ladspa_plugin.cc
@@ -53,7 +53,7 @@ using namespace std;
using namespace ARDOUR;
using namespace PBD;
-LadspaPlugin::LadspaPlugin (void *mod, AudioEngine& e, Session& session, uint32_t index, nframes_t rate)
+LadspaPlugin::LadspaPlugin (void *mod, AudioEngine& e, Session& session, uint32_t index, framecnt_t rate)
: Plugin (e, session)
{
init (mod, index, rate);
@@ -71,7 +71,7 @@ LadspaPlugin::LadspaPlugin (const LadspaPlugin &other)
}
void
-LadspaPlugin::init (void *mod, uint32_t index, nframes_t rate)
+LadspaPlugin::init (void *mod, uint32_t index, framecnt_t rate)
{
LADSPA_Descriptor_Function dfunc;
uint32_t i, port_cnt;
@@ -530,7 +530,7 @@ LadspaPlugin::describe_parameter (Evoral::Parameter which)
}
}
-ARDOUR::nframes_t
+ARDOUR::framecnt_t
LadspaPlugin::signal_latency () const
{
if (_user_latency) {
@@ -538,7 +538,7 @@ LadspaPlugin::signal_latency () const
}
if (_latency_control_port) {
- return (nframes_t) floor (*_latency_control_port);
+ return (framecnt_t) floor (*_latency_control_port);
} else {
return 0;
}
@@ -563,7 +563,7 @@ LadspaPlugin::automatable () const
int
LadspaPlugin::connect_and_run (BufferSet& bufs,
ChanMapping in_map, ChanMapping out_map,
- nframes_t nframes, nframes_t offset)
+ pframes_t nframes, framecnt_t offset)
{
cycles_t now;
cycles_t then = get_cycles ();
@@ -626,7 +626,7 @@ LadspaPlugin::print_parameter (uint32_t param, char *buf, uint32_t len) const
}
void
-LadspaPlugin::run_in_place (nframes_t nframes)
+LadspaPlugin::run_in_place (pframes_t nframes)
{
for (uint32_t i = 0; i < parameter_count(); ++i) {
if (LADSPA_IS_PORT_INPUT(port_descriptor (i)) && LADSPA_IS_PORT_CONTROL(port_descriptor (i))) {
@@ -655,7 +655,7 @@ LadspaPlugin::latency_compute_run ()
uint32_t port_index = 0;
uint32_t in_index = 0;
uint32_t out_index = 0;
- const nframes_t bufsize = 1024;
+ const framecnt_t bufsize = 1024;
LADSPA_Data buffer[bufsize];
memset(buffer,0,sizeof(LADSPA_Data)*bufsize);
diff --git a/libs/ardour/location_importer.cc b/libs/ardour/location_importer.cc
index 1674616096..281e045ae3 100644
--- a/libs/ardour/location_importer.cc
+++ b/libs/ardour/location_importer.cc
@@ -104,7 +104,7 @@ LocationImporter::~LocationImporter ()
string
LocationImporter::get_info () const
{
- nframes_t start, end;
+ framepos_t start, end;
Timecode::Time start_time, end_time;
// Get sample positions
diff --git a/libs/ardour/lv2_plugin.cc b/libs/ardour/lv2_plugin.cc
index d8f83c98e9..9edd929aad 100644
--- a/libs/ardour/lv2_plugin.cc
+++ b/libs/ardour/lv2_plugin.cc
@@ -55,7 +55,7 @@ uint32_t LV2Plugin::_midi_event_type = _uri_map.uri_to_id(
"http://lv2plug.in/ns/ext/event",
"http://lv2plug.in/ns/ext/midi#MidiEvent");
-LV2Plugin::LV2Plugin (AudioEngine& e, Session& session, LV2World& world, SLV2Plugin plugin, nframes_t rate)
+LV2Plugin::LV2Plugin (AudioEngine& e, Session& session, LV2World& world, SLV2Plugin plugin, framecnt_t rate)
: Plugin (e, session)
, _world(world)
, _features(NULL)
@@ -77,7 +77,7 @@ LV2Plugin::LV2Plugin (const LV2Plugin &other)
}
void
-LV2Plugin::init (LV2World& world, SLV2Plugin plugin, nframes_t rate)
+LV2Plugin::init (LV2World& world, SLV2Plugin plugin, framecnt_t rate)
{
_world = world;
_plugin = plugin;
@@ -501,11 +501,11 @@ LV2Plugin::describe_parameter (Evoral::Parameter which)
}
}
-nframes_t
+framecnt_t
LV2Plugin::signal_latency () const
{
if (_latency_control_port) {
- return (nframes_t) floor (*_latency_control_port);
+ return (framecnt_t) floor (*_latency_control_port);
} else {
return 0;
}
@@ -528,7 +528,7 @@ LV2Plugin::automatable () const
int
LV2Plugin::connect_and_run (BufferSet& bufs,
ChanMapping in_map, ChanMapping out_map,
- nframes_t nframes, nframes_t offset)
+ pframes_t nframes, framecnt_t offset)
{
cycles_t then = get_cycles ();
@@ -632,7 +632,7 @@ LV2Plugin::print_parameter (uint32_t param, char *buf, uint32_t len) const
}
void
-LV2Plugin::run (nframes_t nframes)
+LV2Plugin::run (pframes_t nframes)
{
for (uint32_t i = 0; i < parameter_count(); ++i) {
if (parameter_is_control(i) && parameter_is_input(i)) {
@@ -660,7 +660,7 @@ LV2Plugin::latency_compute_run ()
uint32_t in_index = 0;
uint32_t out_index = 0;
- const nframes_t bufsize = 1024;
+ const framecnt_t bufsize = 1024;
float buffer[bufsize];
memset(buffer, 0, sizeof(float) * bufsize);
diff --git a/libs/ardour/meter.cc b/libs/ardour/meter.cc
index 443146cf13..226cf417f3 100644
--- a/libs/ardour/meter.cc
+++ b/libs/ardour/meter.cc
@@ -39,7 +39,7 @@ PBD::Signal0<void> Metering::Meter;
* be set to 0.
*/
void
-PeakMeter::run (BufferSet& bufs, framepos_t /*start_frame*/, framepos_t /*end_frame*/, nframes_t nframes, bool)
+PeakMeter::run (BufferSet& bufs, framepos_t /*start_frame*/, framepos_t /*end_frame*/, pframes_t nframes, bool)
{
if (!_active && !_pending_active) {
return;
@@ -54,7 +54,7 @@ PeakMeter::run (BufferSet& bufs, framepos_t /*start_frame*/, framepos_t /*end_fr
for (uint32_t i = 0; i < n_midi; ++i, ++n) {
float val = 0.0f;
for (MidiBuffer::iterator e = bufs.get_midi(i).begin(); e != bufs.get_midi(i).end(); ++e) {
- const Evoral::MIDIEvent<nframes_t> ev(*e, false);
+ const Evoral::MIDIEvent<framepos_t> ev(*e, false);
if (ev.is_note_on()) {
const float this_vel = log(ev.buffer()[2] / 127.0 * (M_E*M_E-M_E) + M_E) - 1.0;
if (this_vel > val) {
diff --git a/libs/ardour/midi_buffer.cc b/libs/ardour/midi_buffer.cc
index 2eb9df8c5c..c65ba58288 100644
--- a/libs/ardour/midi_buffer.cc
+++ b/libs/ardour/midi_buffer.cc
@@ -79,7 +79,7 @@ MidiBuffer::copy(const MidiBuffer& copy)
* Note that offset and nframes refer to sample time, NOT buffer offsets or event counts.
*/
void
-MidiBuffer::read_from (const Buffer& src, nframes_t nframes, nframes_t dst_offset, nframes_t src_offset)
+MidiBuffer::read_from (const Buffer& src, framecnt_t nframes, framecnt_t dst_offset, framecnt_t src_offset)
{
assert (src.type() == DataType::MIDI);
assert (&src != this);
@@ -109,7 +109,7 @@ MidiBuffer::read_from (const Buffer& src, nframes_t nframes, nframes_t dst_offse
}
void
-MidiBuffer::merge_from (const Buffer& src, nframes_t /*nframes*/, nframes_t /*dst_offset*/, nframes_t /*src_offset*/)
+MidiBuffer::merge_from (const Buffer& src, framecnt_t /*nframes*/, framecnt_t /*dst_offset*/, framecnt_t /*src_offset*/)
{
const MidiBuffer* mbuf = dynamic_cast<const MidiBuffer*>(&src);
assert (mbuf);
@@ -253,7 +253,7 @@ MidiBuffer::reserve(TimeType time, size_t size)
void
-MidiBuffer::silence (nframes_t /*nframes*/, nframes_t /*offset*/)
+MidiBuffer::silence (framecnt_t /*nframes*/, framecnt_t /*offset*/)
{
/* XXX iterate over existing events, find all in range given by offset & nframes,
and delete them.
diff --git a/libs/ardour/midi_clock_slave.cc b/libs/ardour/midi_clock_slave.cc
index f6fe0d0930..5dfd63fe1a 100644
--- a/libs/ardour/midi_clock_slave.cc
+++ b/libs/ardour/midi_clock_slave.cc
@@ -355,10 +355,10 @@ MIDIClock_Slave::speed_and_position (double& speed, framepos_t& pos)
return true;
}
-ARDOUR::nframes_t
+ARDOUR::framecnt_t
MIDIClock_Slave::resolution() const
{
// one beat
- return (nframes_t) one_ppqn_in_frames * ppqn;
+ return (framecnt_t) one_ppqn_in_frames * ppqn;
}
diff --git a/libs/ardour/midi_diskstream.cc b/libs/ardour/midi_diskstream.cc
index f5b9cb5345..29217d9e5e 100644
--- a/libs/ardour/midi_diskstream.cc
+++ b/libs/ardour/midi_diskstream.cc
@@ -67,7 +67,7 @@ using namespace std;
using namespace ARDOUR;
using namespace PBD;
-nframes_t MidiDiskstream::midi_readahead = 4096;
+framecnt_t MidiDiskstream::midi_readahead = 4096;
MidiDiskstream::MidiDiskstream (Session &sess, const string &name, Diskstream::Flag flag)
: Diskstream(sess, name, flag)
@@ -128,8 +128,8 @@ MidiDiskstream::init ()
allocate_temporary_buffers ();
const size_t size = _session.butler()->midi_diskstream_buffer_size();
- _playback_buf = new MidiRingBuffer<nframes_t>(size);
- _capture_buf = new MidiRingBuffer<nframes_t>(size);
+ _playback_buf = new MidiRingBuffer<framepos_t>(size);
+ _capture_buf = new MidiRingBuffer<framepos_t>(size);
_n_channels = ChanCount(DataType::MIDI, 1);
@@ -488,11 +488,11 @@ trace_midi (ostream& o, MIDI::byte *msg, size_t len)
#endif
int
-MidiDiskstream::process (framepos_t transport_frame, nframes_t nframes, bool can_record, bool rec_monitors_input, bool& need_butler)
+MidiDiskstream::process (framepos_t transport_frame, pframes_t nframes, bool can_record, bool rec_monitors_input, bool& need_butler)
{
int ret = -1;
- nframes_t rec_offset = 0;
- nframes_t rec_nframes = 0;
+ framecnt_t rec_offset = 0;
+ framecnt_t rec_nframes = 0;
bool nominally_recording;
bool re = record_enabled ();
@@ -588,7 +588,7 @@ MidiDiskstream::process (framepos_t transport_frame, nframes_t nframes, bool can
}
bool
-MidiDiskstream::commit (nframes_t nframes)
+MidiDiskstream::commit (framecnt_t nframes)
{
bool need_butler = false;
@@ -678,9 +678,9 @@ MidiDiskstream::internal_playback_seek (framecnt_t distance)
/** @a start is set to the new frame position (TIME) read up to */
int
-MidiDiskstream::read (framepos_t& start, nframes_t dur, bool reversed)
+MidiDiskstream::read (framepos_t& start, framecnt_t dur, bool reversed)
{
- nframes_t this_read = 0;
+ framecnt_t this_read = 0;
bool reloop = false;
framepos_t loop_end = 0;
framepos_t loop_start = 0;
@@ -812,12 +812,12 @@ MidiDiskstream::do_refill ()
return 0;
}
- nframes_t to_read = midi_readahead - (frames_written - frames_read);
+ framecnt_t to_read = midi_readahead - (frames_written - frames_read);
//cout << "MDS read for midi_readahead " << to_read << " rb_contains: "
// << frames_written - frames_read << endl;
- to_read = (nframes_t) min ((framecnt_t) to_read, (framecnt_t) (max_framepos - file_frame));
+ to_read = (framecnt_t) min ((framecnt_t) to_read, (framecnt_t) (max_framepos - file_frame));
if (read (file_frame, to_read, reversed)) {
ret = -1;
@@ -841,7 +841,7 @@ MidiDiskstream::do_flush (RunContext /*context*/, bool force_flush)
{
uint32_t to_write;
int32_t ret = 0;
- nframes_t total;
+ framecnt_t total;
_write_data_count = 0;
@@ -941,7 +941,7 @@ MidiDiskstream::transport_stopped_wallclock (struct tm& /*when*/, time_t /*twhen
assert(_write_source);
- nframes_t total_capture = 0;
+ framecnt_t total_capture = 0;
for (ci = capture_info.begin(); ci != capture_info.end(); ++ci) {
total_capture += (*ci)->frames;
}
@@ -1408,7 +1408,7 @@ MidiDiskstream::rename_write_sources ()
}
void
-MidiDiskstream::set_block_size (nframes_t /*nframes*/)
+MidiDiskstream::set_block_size (pframes_t /*nframes*/)
{
}
diff --git a/libs/ardour/midi_playlist.cc b/libs/ardour/midi_playlist.cc
index abc0d682ba..9986d9750c 100644
--- a/libs/ardour/midi_playlist.cc
+++ b/libs/ardour/midi_playlist.cc
@@ -68,7 +68,7 @@ MidiPlaylist::MidiPlaylist (boost::shared_ptr<const MidiPlaylist> other, string
{
}
-MidiPlaylist::MidiPlaylist (boost::shared_ptr<const MidiPlaylist> other, nframes_t start, nframes_t dur, string name, bool hidden)
+MidiPlaylist::MidiPlaylist (boost::shared_ptr<const MidiPlaylist> other, framepos_t start, framecnt_t dur, string name, bool hidden)
: Playlist (other, start, dur, name, hidden)
, _note_mode(other->_note_mode)
{
@@ -87,8 +87,8 @@ struct EventsSortByTime {
};
/** Returns the number of frames in time duration read (eg could be large when 0 events are read) */
-nframes_t
-MidiPlaylist::read (MidiRingBuffer<nframes_t>& dst, nframes_t start, nframes_t dur, unsigned chan_n)
+framecnt_t
+MidiPlaylist::read (MidiRingBuffer<framepos_t>& dst, framepos_t start, framecnt_t dur, unsigned chan_n)
{
/* this function is never called from a realtime thread, so
its OK to block (for short intervals).
@@ -97,7 +97,7 @@ MidiPlaylist::read (MidiRingBuffer<nframes_t>& dst, nframes_t start, nframes_t d
Glib::RecMutex::Lock rm (region_lock);
DEBUG_TRACE (DEBUG::MidiPlaylistIO, string_compose ("++++++ %1 .. %2 +++++++++++++++++++++++++++++++++++++++++++++++\n", start, start + dur));
- nframes_t end = start + dur - 1;
+ framepos_t end = start + dur - 1;
_read_data_count = 0;
@@ -190,7 +190,7 @@ MidiPlaylist::read (MidiRingBuffer<nframes_t>& dst, nframes_t start, nframes_t d
DEBUG_TRACE (DEBUG::MidiPlaylistIO, string_compose ("%1 regions to read, plus %2 trackers\n", regs.size(), tracker_info.size()));
- Evoral::EventList<nframes_t> evlist;
+ Evoral::EventList<framepos_t> evlist;
for (vector<TrackerInfo>::iterator t = tracker_info.begin(); t != tracker_info.end(); ++t) {
DEBUG_TRACE (DEBUG::MidiPlaylistIO, string_compose ("Resolve %1 notes\n", (*t).first->on()));
@@ -200,7 +200,7 @@ MidiPlaylist::read (MidiRingBuffer<nframes_t>& dst, nframes_t start, nframes_t d
#ifndef NDEBUG
DEBUG_TRACE (DEBUG::MidiPlaylistIO, string_compose ("After resolution we now have %1 events\n", evlist.size()));
- for (Evoral::EventList<nframes_t>::iterator x = evlist.begin(); x != evlist.end(); ++x) {
+ for (Evoral::EventList<framepos_t>::iterator x = evlist.begin(); x != evlist.end(); ++x) {
DEBUG_TRACE (DEBUG::MidiPlaylistIO, string_compose ("\t%1\n", **x));
}
#endif
@@ -235,7 +235,7 @@ MidiPlaylist::read (MidiRingBuffer<nframes_t>& dst, nframes_t start, nframes_t d
#ifndef NDEBUG
DEBUG_TRACE (DEBUG::MidiPlaylistIO, string_compose ("After %1 (%2 .. %3) we now have %4\n", mr->name(), mr->position(), mr->last_frame(), evlist.size()));
- for (Evoral::EventList<nframes_t>::iterator x = evlist.begin(); x != evlist.end(); ++x) {
+ for (Evoral::EventList<framepos_t>::iterator x = evlist.begin(); x != evlist.end(); ++x) {
DEBUG_TRACE (DEBUG::MidiPlaylistIO, string_compose ("\t%1\n", **x));
}
DEBUG_TRACE (DEBUG::MidiPlaylistIO, string_compose ("\tAFTER: tracker says there are %1 on notes\n", tracker->on()));
@@ -253,18 +253,18 @@ MidiPlaylist::read (MidiRingBuffer<nframes_t>& dst, nframes_t start, nframes_t d
if (!evlist.empty()) {
/* sort the event list */
- EventsSortByTime<nframes_t> time_cmp;
+ EventsSortByTime<framepos_t> time_cmp;
evlist.sort (time_cmp);
#ifndef NDEBUG
DEBUG_TRACE (DEBUG::MidiPlaylistIO, string_compose ("Final we now have %1 events\n", evlist.size()));
- for (Evoral::EventList<nframes_t>::iterator x = evlist.begin(); x != evlist.end(); ++x) {
+ for (Evoral::EventList<framepos_t>::iterator x = evlist.begin(); x != evlist.end(); ++x) {
DEBUG_TRACE (DEBUG::MidiPlaylistIO, string_compose ("\t%1\n", **x));
}
#endif
/* write into dst */
- for (Evoral::EventList<nframes_t>::iterator e = evlist.begin(); e != evlist.end(); ++e) {
- Evoral::Event<nframes_t>* ev (*e);
+ for (Evoral::EventList<framepos_t>::iterator e = evlist.begin(); e != evlist.end(); ++e) {
+ Evoral::Event<framepos_t>* ev (*e);
dst.write (ev->time(), ev->event_type(), ev->size(), ev->buffer());
delete ev;
}
diff --git a/libs/ardour/midi_port.cc b/libs/ardour/midi_port.cc
index adf24c2eaf..5f18810122 100644
--- a/libs/ardour/midi_port.cc
+++ b/libs/ardour/midi_port.cc
@@ -39,7 +39,7 @@ MidiPort::~MidiPort()
}
void
-MidiPort::cycle_start (nframes_t nframes)
+MidiPort::cycle_start (pframes_t nframes)
{
_buffer->clear ();
assert (_buffer->size () == 0);
@@ -50,7 +50,7 @@ MidiPort::cycle_start (nframes_t nframes)
}
MidiBuffer &
-MidiPort::get_midi_buffer (nframes_t nframes, nframes_t offset)
+MidiPort::get_midi_buffer (framecnt_t nframes, framecnt_t offset)
{
if (_has_been_mixed_down) {
return *_buffer;
@@ -59,7 +59,7 @@ MidiPort::get_midi_buffer (nframes_t nframes, nframes_t offset)
if (receives_input ()) {
void* jack_buffer = jack_port_get_buffer (_jack_port, nframes);
- const nframes_t event_count = jack_midi_get_event_count(jack_buffer);
+ const pframes_t event_count = jack_midi_get_event_count(jack_buffer);
assert (event_count < _buffer->capacity());
@@ -67,7 +67,7 @@ MidiPort::get_midi_buffer (nframes_t nframes, nframes_t offset)
into our MidiBuffer
*/
- for (nframes_t i = 0; i < event_count; ++i) {
+ for (pframes_t i = 0; i < event_count; ++i) {
jack_midi_event_t ev;
@@ -102,7 +102,7 @@ MidiPort::get_midi_buffer (nframes_t nframes, nframes_t offset)
void
-MidiPort::cycle_end (nframes_t /*nframes*/)
+MidiPort::cycle_end (pframes_t /*nframes*/)
{
_has_been_mixed_down = false;
}
@@ -114,7 +114,7 @@ MidiPort::cycle_split ()
}
void
-MidiPort::flush_buffers (nframes_t nframes, framepos_t time, nframes_t offset)
+MidiPort::flush_buffers (pframes_t nframes, framepos_t time, framecnt_t offset)
{
if (sends_output ()) {
@@ -133,7 +133,7 @@ MidiPort::flush_buffers (nframes_t nframes, framepos_t time, nframes_t offset)
_resolve_in_process = false;
for (MidiBuffer::iterator i = _buffer->begin(); i != _buffer->end(); ++i) {
- const Evoral::Event<nframes_t>& ev = *i;
+ const Evoral::Event<framepos_t>& ev = *i;
// event times are in frames, relative to cycle start
@@ -157,8 +157,8 @@ MidiPort::transport_stopped ()
}
size_t
-MidiPort::raw_buffer_size (nframes_t nframes) const
+MidiPort::raw_buffer_size (pframes_t nframes) const
{
- return jack_midi_max_event_size(jack_port_get_buffer(_jack_port, nframes));
+ return jack_midi_max_event_size (jack_port_get_buffer (_jack_port, nframes));
}
diff --git a/libs/ardour/midi_region.cc b/libs/ardour/midi_region.cc
index e8d6229e91..f9fb791bad 100644
--- a/libs/ardour/midi_region.cc
+++ b/libs/ardour/midi_region.cc
@@ -129,19 +129,19 @@ MidiRegion::set_position_internal (framepos_t pos, bool allow_bbt_recompute)
}
framecnt_t
-MidiRegion::read_at (Evoral::EventSink<nframes_t>& out, framepos_t position, framecnt_t dur, uint32_t chan_n, NoteMode mode, MidiStateTracker* tracker) const
+MidiRegion::read_at (Evoral::EventSink<framepos_t>& out, framepos_t position, framecnt_t dur, uint32_t chan_n, NoteMode mode, MidiStateTracker* tracker) const
{
return _read_at (_sources, out, position, dur, chan_n, mode, tracker);
}
framecnt_t
-MidiRegion::master_read_at (MidiRingBuffer<nframes_t>& out, framepos_t position, framecnt_t dur, uint32_t chan_n, NoteMode mode) const
+MidiRegion::master_read_at (MidiRingBuffer<framepos_t>& out, framepos_t position, framecnt_t dur, uint32_t chan_n, NoteMode mode) const
{
return _read_at (_master_sources, out, position, dur, chan_n, mode); /* no tracker */
}
framecnt_t
-MidiRegion::_read_at (const SourceList& /*srcs*/, Evoral::EventSink<nframes_t>& dst, framepos_t position, framecnt_t dur, uint32_t chan_n,
+MidiRegion::_read_at (const SourceList& /*srcs*/, Evoral::EventSink<framepos_t>& dst, framepos_t position, framecnt_t dur, uint32_t chan_n,
NoteMode mode, MidiStateTracker* tracker) const
{
frameoffset_t internal_offset = 0;
diff --git a/libs/ardour/midi_ring_buffer.cc b/libs/ardour/midi_ring_buffer.cc
index eb83d41645..b25154fefb 100644
--- a/libs/ardour/midi_ring_buffer.cc
+++ b/libs/ardour/midi_ring_buffer.cc
@@ -34,7 +34,7 @@ using namespace PBD;
*/
template<typename T>
size_t
-MidiRingBuffer<T>::read(MidiBuffer& dst, nframes_t start, nframes_t end, nframes_t offset)
+MidiRingBuffer<T>::read(MidiBuffer& dst, framepos_t start, framepos_t end, framecnt_t offset)
{
if (this->read_space() == 0) {
return 0;
@@ -97,7 +97,7 @@ MidiRingBuffer<T>::read(MidiBuffer& dst, nframes_t start, nframes_t end, nframes
// This event marks a loop end (i.e. the next event's timestamp will be non-monotonic)
if (ev_type == LoopEventType) {
assert (ev_size == sizeof (framepos_t));
- nframes_t loop_start;
+ framepos_t loop_start;
read_contents (ev_size, (uint8_t *) &loop_start);
loop_offset = ev_time - loop_start;
@@ -240,5 +240,5 @@ MidiRingBuffer<T>::dump(ostream& str)
}
-template class MidiRingBuffer<nframes_t>;
+template class MidiRingBuffer<framepos_t>;
diff --git a/libs/ardour/midi_source.cc b/libs/ardour/midi_source.cc
index 5a703f6772..120ee29e8e 100644
--- a/libs/ardour/midi_source.cc
+++ b/libs/ardour/midi_source.cc
@@ -196,9 +196,9 @@ MidiSource::invalidate ()
}
/** @param filtered A set of parameters whose MIDI messages will not be returned */
-nframes_t
-MidiSource::midi_read (Evoral::EventSink<nframes_t>& dst, framepos_t source_start,
- framepos_t start, nframes_t cnt,
+framecnt_t
+MidiSource::midi_read (Evoral::EventSink<framepos_t>& dst, framepos_t source_start,
+ framepos_t start, framecnt_t cnt,
MidiStateTracker* tracker,
std::set<Evoral::Parameter> const & filtered) const
{
@@ -255,11 +255,11 @@ MidiSource::midi_read (Evoral::EventSink<nframes_t>& dst, framepos_t source_star
* @param source Source to read from.
* @param source_start This source's start position in session frames.
*/
-nframes_t
-MidiSource::midi_write (MidiRingBuffer<nframes_t>& source, framepos_t source_start, nframes_t duration)
+framecnt_t
+MidiSource::midi_write (MidiRingBuffer<framepos_t>& source, framepos_t source_start, framecnt_t duration)
{
Glib::Mutex::Lock lm (_lock);
- const nframes_t ret = write_unlocked (source, source_start, duration);
+ const framecnt_t ret = write_unlocked (source, source_start, duration);
_last_write_end += duration;
return ret;
}
diff --git a/libs/ardour/midi_state_tracker.cc b/libs/ardour/midi_state_tracker.cc
index 24c9d2884c..cbbf73b682 100644
--- a/libs/ardour/midi_state_tracker.cc
+++ b/libs/ardour/midi_state_tracker.cc
@@ -111,7 +111,7 @@ MidiStateTracker::resolve_notes (MidiBuffer &dst, framepos_t time)
}
void
-MidiStateTracker::resolve_notes (Evoral::EventSink<nframes_t> &dst, framepos_t time)
+MidiStateTracker::resolve_notes (Evoral::EventSink<framepos_t> &dst, framepos_t time)
{
uint8_t buf[3];
diff --git a/libs/ardour/midi_stretch.cc b/libs/ardour/midi_stretch.cc
index ee1ccc31ae..e5b773465f 100644
--- a/libs/ardour/midi_stretch.cc
+++ b/libs/ardour/midi_stretch.cc
@@ -110,7 +110,7 @@ MidiStretch::run (boost::shared_ptr<Region> r, Progress* progress)
const int ret = finish (region, nsrcs, new_name);
- results[0]->set_length((nframes_t) floor (r->length() * _request.time_fraction), NULL);
+ results[0]->set_length((framecnt_t) floor (r->length() * _request.time_fraction), NULL);
return ret;
}
diff --git a/libs/ardour/midi_track.cc b/libs/ardour/midi_track.cc
index 6e4f07cf15..c994350ebc 100644
--- a/libs/ardour/midi_track.cc
+++ b/libs/ardour/midi_track.cc
@@ -298,7 +298,7 @@ MidiTrack::set_state_part_two ()
}
int
-MidiTrack::roll (nframes_t nframes, framepos_t start_frame, framepos_t end_frame, int declick,
+MidiTrack::roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame, int declick,
bool can_record, bool rec_monitors_input, bool& needs_butler)
{
Glib::RWLock::ReaderLock lm (_processor_lock, Glib::TRY_LOCK);
@@ -320,8 +320,7 @@ MidiTrack::roll (nframes_t nframes, framepos_t start_frame, framepos_t end_frame
return 0;
}
- nframes_t transport_frame = _session.transport_frame();
-
+ framepos_t transport_frame = _session.transport_frame();
if ((nframes = check_initial_delay (nframes, transport_frame)) == 0) {
/* need to do this so that the diskstream sets its
@@ -391,7 +390,7 @@ MidiTrack::roll (nframes_t nframes, framepos_t start_frame, framepos_t end_frame
}
int
-MidiTrack::no_roll (nframes_t nframes, framepos_t start_frame, framepos_t end_frame,
+MidiTrack::no_roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame,
bool state_changing, bool can_record, bool rec_monitors_input)
{
int ret = Track::no_roll (nframes, start_frame, end_frame, state_changing, can_record, rec_monitors_input);
@@ -410,7 +409,7 @@ MidiTrack::handle_transport_stopped (bool abort, bool did_locate, bool flush_pro
}
void
-MidiTrack::push_midi_input_to_step_edit_ringbuffer (nframes_t nframes)
+MidiTrack::push_midi_input_to_step_edit_ringbuffer (framecnt_t nframes)
{
PortSet& ports (_input->ports());
@@ -422,7 +421,7 @@ MidiTrack::push_midi_input_to_step_edit_ringbuffer (nframes_t nframes)
for (MidiBuffer::const_iterator e = mb->begin(); e != mb->end(); ++e) {
- const Evoral::MIDIEvent<nframes_t> ev(*e, false);
+ const Evoral::MIDIEvent<framepos_t> ev(*e, false);
/* note on, since for step edit, note length is determined
elsewhere
@@ -437,7 +436,7 @@ MidiTrack::push_midi_input_to_step_edit_ringbuffer (nframes_t nframes)
}
void
-MidiTrack::write_out_of_band_data (BufferSet& bufs, framepos_t /*start*/, framepos_t /*end*/, nframes_t nframes)
+MidiTrack::write_out_of_band_data (BufferSet& bufs, framepos_t /*start*/, framepos_t /*end*/, framecnt_t nframes)
{
// Append immediate events
MidiBuffer& buf (bufs.get_midi (0));
@@ -454,13 +453,13 @@ MidiTrack::write_out_of_band_data (BufferSet& bufs, framepos_t /*start*/, framep
}
int
-MidiTrack::export_stuff (BufferSet& /*bufs*/, nframes_t /*nframes*/, framepos_t /*end_frame*/)
+MidiTrack::export_stuff (BufferSet& /*bufs*/, framecnt_t /*nframes*/, framepos_t /*end_frame*/)
{
return -1;
}
void
-MidiTrack::set_latency_delay (nframes_t longest_session_latency)
+MidiTrack::set_latency_delay (framecnt_t longest_session_latency)
{
Route::set_latency_delay (longest_session_latency);
_diskstream->set_roll_delay (_roll_delay);
@@ -477,7 +476,7 @@ MidiTrack::bounce (InterThreadInfo& /*itt*/)
boost::shared_ptr<Region>
-MidiTrack::bounce_range (nframes_t /*start*/, nframes_t /*end*/, InterThreadInfo& /*itt*/, bool /*enable_processing*/)
+MidiTrack::bounce_range (framepos_t /*start*/, framepos_t /*end*/, InterThreadInfo& /*itt*/, bool /*enable_processing*/)
{
throw;
//vector<MidiSource*> srcs;
diff --git a/libs/ardour/mix.cc b/libs/ardour/mix.cc
index c058dec06b..3a873a8e50 100644
--- a/libs/ardour/mix.cc
+++ b/libs/ardour/mix.cc
@@ -30,7 +30,7 @@ using namespace ARDOUR;
// Debug wrappers
float
-debug_compute_peak (ARDOUR::Sample *buf, nframes_t nsamples, float current)
+debug_compute_peak (ARDOUR::Sample *buf, pframes_t nsamples, float current)
{
if ( ((intptr_t)buf % 16) != 0) {
std::cerr << "compute_peak(): buffer unaligned!" << std::endl;
@@ -40,7 +40,7 @@ debug_compute_peak (ARDOUR::Sample *buf, nframes_t nsamples, float current)
}
void
-debug_apply_gain_to_buffer (ARDOUR::Sample *buf, nframes_t nframes, float gain)
+debug_apply_gain_to_buffer (ARDOUR::Sample *buf, pframes_t nframes, float gain)
{
if ( ((intptr_t)buf % 16) != 0) {
std::cerr << "apply_gain_to_buffer(): buffer unaligned!" << std::endl;
@@ -50,7 +50,7 @@ debug_apply_gain_to_buffer (ARDOUR::Sample *buf, nframes_t nframes, float gain)
}
void
-debug_mix_buffers_with_gain (ARDOUR::Sample *dst, ARDOUR::Sample *src, nframes_t nframes, float gain)
+debug_mix_buffers_with_gain (ARDOUR::Sample *dst, ARDOUR::Sample *src, pframes_t nframes, float gain)
{
if ( ((intptr_t)dst & 15) != 0) {
std::cerr << "mix_buffers_with_gain(): dst unaligned!" << std::endl;
@@ -65,7 +65,7 @@ debug_mix_buffers_with_gain (ARDOUR::Sample *dst, ARDOUR::Sample *src, nframes_t
}
void
-debug_mix_buffers_no_gain (ARDOUR::Sample *dst, ARDOUR::Sample *src, nframes_t nframes)
+debug_mix_buffers_no_gain (ARDOUR::Sample *dst, ARDOUR::Sample *src, pframes_t nframes)
{
if ( ((intptr_t)dst & 15) != 0) {
std::cerr << "mix_buffers_no_gain(): dst unaligned!" << std::endl;
@@ -83,9 +83,9 @@ debug_mix_buffers_no_gain (ARDOUR::Sample *dst, ARDOUR::Sample *src, nframes_t n
float
-default_compute_peak (const ARDOUR::Sample * buf, nframes_t nsamples, float current)
+default_compute_peak (const ARDOUR::Sample * buf, pframes_t nsamples, float current)
{
- for (nframes_t i = 0; i < nsamples; ++i) {
+ for (pframes_t i = 0; i < nsamples; ++i) {
current = f_max (current, fabsf (buf[i]));
}
@@ -93,9 +93,9 @@ default_compute_peak (const ARDOUR::Sample * buf, nframes_t nsamples, float curr
}
void
-default_find_peaks (const ARDOUR::Sample * buf, nframes_t nframes, float *min, float *max)
+default_find_peaks (const ARDOUR::Sample * buf, pframes_t nframes, float *min, float *max)
{
- nframes_t i;
+ pframes_t i;
float a, b;
a = *max;
@@ -112,24 +112,24 @@ default_find_peaks (const ARDOUR::Sample * buf, nframes_t nframes, float *min, f
}
void
-default_apply_gain_to_buffer (ARDOUR::Sample * buf, nframes_t nframes, float gain)
+default_apply_gain_to_buffer (ARDOUR::Sample * buf, pframes_t nframes, float gain)
{
- for (nframes_t i=0; i<nframes; i++)
+ for (pframes_t i=0; i<nframes; i++)
buf[i] *= gain;
}
void
-default_mix_buffers_with_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, nframes_t nframes, float gain)
+default_mix_buffers_with_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, pframes_t nframes, float gain)
{
- for (nframes_t i = 0; i < nframes; i++) {
+ for (pframes_t i = 0; i < nframes; i++) {
dst[i] += src[i] * gain;
}
}
void
-default_mix_buffers_no_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, nframes_t nframes)
+default_mix_buffers_no_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, pframes_t nframes)
{
- for (nframes_t i=0; i < nframes; i++) {
+ for (pframes_t i=0; i < nframes; i++) {
dst[i] += src[i];
}
}
@@ -138,7 +138,7 @@ default_mix_buffers_no_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, n
#include <Accelerate/Accelerate.h>
float
-veclib_compute_peak (const ARDOUR::Sample * buf, nframes_t nsamples, float current)
+veclib_compute_peak (const ARDOUR::Sample * buf, pframes_t nsamples, float current)
{
float tmpmax = 0.0f;
vDSP_maxmgv(buf, 1, &tmpmax, nsamples);
@@ -146,26 +146,26 @@ veclib_compute_peak (const ARDOUR::Sample * buf, nframes_t nsamples, float curre
}
void
-veclib_find_peaks (const ARDOUR::Sample * buf, nframes_t nframes, float *min, float *max)
+veclib_find_peaks (const ARDOUR::Sample * buf, pframes_t nframes, float *min, float *max)
{
vDSP_maxv (const_cast<ARDOUR::Sample*>(buf), 1, max, nframes);
vDSP_minv (const_cast<ARDOUR::Sample*>(buf), 1, min, nframes);
}
void
-veclib_apply_gain_to_buffer (ARDOUR::Sample * buf, nframes_t nframes, float gain)
+veclib_apply_gain_to_buffer (ARDOUR::Sample * buf, pframes_t nframes, float gain)
{
vDSP_vsmul(buf, 1, &gain, buf, 1, nframes);
}
void
-veclib_mix_buffers_with_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, nframes_t nframes, float gain)
+veclib_mix_buffers_with_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, pframes_t nframes, float gain)
{
vDSP_vsma(src, 1, &gain, dst, 1, dst, 1, nframes);
}
void
-veclib_mix_buffers_no_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, nframes_t nframes)
+veclib_mix_buffers_no_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, pframes_t nframes)
{
// It seems that a vector mult only operation does not exist...
float gain = 1.0f;
diff --git a/libs/ardour/monitor_processor.cc b/libs/ardour/monitor_processor.cc
index a164f025e8..4f204031ac 100644
--- a/libs/ardour/monitor_processor.cc
+++ b/libs/ardour/monitor_processor.cc
@@ -245,7 +245,7 @@ MonitorProcessor::state (bool full)
}
void
-MonitorProcessor::run (BufferSet& bufs, framepos_t /*start_frame*/, framepos_t /*end_frame*/, nframes_t nframes, bool /*result_required*/)
+MonitorProcessor::run (BufferSet& bufs, framepos_t /*start_frame*/, framepos_t /*end_frame*/, pframes_t nframes, bool /*result_required*/)
{
uint32_t chn = 0;
gain_t target_gain;
@@ -297,7 +297,7 @@ MonitorProcessor::run (BufferSet& bufs, framepos_t /*start_frame*/, framepos_t /
/* scale the first channel */
- for (nframes_t n = 0; n < nframes; ++n) {
+ for (pframes_t n = 0; n < nframes; ++n) {
buf[n] *= scale;
}
@@ -307,7 +307,7 @@ MonitorProcessor::run (BufferSet& bufs, framepos_t /*start_frame*/, framepos_t /
for (; b != bufs.audio_end(); ++b) {
AudioBuffer& ob (*b);
Sample* obuf = ob.data ();
- for (nframes_t n = 0; n < nframes; ++n) {
+ for (pframes_t n = 0; n < nframes; ++n) {
buf[n] += obuf[n] * scale;
}
}
diff --git a/libs/ardour/mtc_slave.cc b/libs/ardour/mtc_slave.cc
index 953b79083b..9564770f7f 100644
--- a/libs/ardour/mtc_slave.cc
+++ b/libs/ardour/mtc_slave.cc
@@ -101,7 +101,7 @@ MTC_Slave::rebind (MIDI::Port& p)
}
void
-MTC_Slave::update_mtc_qtr (Parser& /*p*/, int which_qtr, nframes_t now)
+MTC_Slave::update_mtc_qtr (Parser& /*p*/, int which_qtr, framepos_t now)
{
DEBUG_TRACE (DEBUG::MTC, string_compose ("qtr frame %1 at %2\n", which_qtr, now));
maybe_reset ();
@@ -109,7 +109,7 @@ MTC_Slave::update_mtc_qtr (Parser& /*p*/, int which_qtr, nframes_t now)
}
void
-MTC_Slave::update_mtc_time (const byte *msg, bool was_full, nframes_t now)
+MTC_Slave::update_mtc_time (const byte *msg, bool was_full, framepos_t now)
{
/* "now" can be zero if this is called from a context where we do not have or do not want
to use a timestamp indicating when this MTC time was received. example: when we received
@@ -395,7 +395,7 @@ MTC_Slave::speed_and_position (double& speed, framepos_t& pos)
{
framepos_t now = session.engine().frame_time();
SafeTime last;
- nframes_t elapsed;
+ framecnt_t elapsed;
bool in_control = false;
read_current (&last);
@@ -450,7 +450,7 @@ MTC_Slave::speed_and_position (double& speed, framepos_t& pos)
/* scale elapsed time by the current MTC speed */
if (last.timestamp && (now > last.timestamp)) {
- elapsed = (nframes_t) floor (last.speed * (now - last.timestamp));
+ elapsed = (framecnt_t) floor (last.speed * (now - last.timestamp));
DEBUG_TRACE (DEBUG::MTC, string_compose ("last timecode received @ %1, now = %2, elapsed frames = %3 w/speed= %4\n",
last.timestamp, now, elapsed, last.speed));
} else {
@@ -476,10 +476,10 @@ MTC_Slave::speed_and_position (double& speed, framepos_t& pos)
return true;
}
-ARDOUR::nframes_t
-MTC_Slave::resolution() const
+ARDOUR::framecnt_t
+MTC_Slave::resolution () const
{
- return (nframes_t) session.frames_per_timecode_frame();
+ return (framecnt_t) session.frames_per_timecode_frame();
}
void
@@ -555,7 +555,7 @@ MTC_Slave::reset_window (framepos_t root)
case MTC_Backward:
if (session.slave_state() == Session::Running) {
- nframes_t d = session.frames_per_timecode_frame() * frame_tolerance;
+ framecnt_t const d = session.frames_per_timecode_frame() * frame_tolerance;
if (root > d) {
window_begin = root - d;
window_end = root;
@@ -563,7 +563,7 @@ MTC_Slave::reset_window (framepos_t root)
window_begin = 0;
}
} else {
- nframes_t d = seekahead_distance ();
+ framecnt_t const d = seekahead_distance ();
if (root > d) {
window_begin = root - d;
} else {
@@ -581,7 +581,7 @@ MTC_Slave::reset_window (framepos_t root)
DEBUG_TRACE (DEBUG::MTC, string_compose ("legal MTC window now %1 .. %2\n", window_begin, window_end));
}
-framecnt_t
+ARDOUR::framecnt_t
MTC_Slave::seekahead_distance () const
{
/* 1 second */
diff --git a/libs/ardour/onset_detector.cc b/libs/ardour/onset_detector.cc
index abe7df7022..4f2151a03d 100644
--- a/libs/ardour/onset_detector.cc
+++ b/libs/ardour/onset_detector.cc
@@ -56,7 +56,7 @@ OnsetDetector::use_features (Plugin::FeatureSet& features, ostream* out)
(*out) << (*f).timestamp.toString() << endl;
}
- current_results->push_back (RealTime::realTime2Frame ((*f).timestamp, (nframes_t) floor(sample_rate)));
+ current_results->push_back (RealTime::realTime2Frame ((*f).timestamp, (framecnt_t) floor(sample_rate)));
}
}
diff --git a/libs/ardour/panner.cc b/libs/ardour/panner.cc
index 6bef67788a..c3f4d52a56 100644
--- a/libs/ardour/panner.cc
+++ b/libs/ardour/panner.cc
@@ -204,7 +204,7 @@ StreamPanner::get_state ()
}
void
-StreamPanner::distribute (AudioBuffer& src, BufferSet& obufs, gain_t gain_coeff, nframes_t nframes)
+StreamPanner::distribute (AudioBuffer& src, BufferSet& obufs, gain_t gain_coeff, pframes_t nframes)
{
if (_mono) {
/* we're in mono mode, so just pan the input to all outputs equally */
@@ -220,7 +220,7 @@ StreamPanner::distribute (AudioBuffer& src, BufferSet& obufs, gain_t gain_coeff,
void
StreamPanner::distribute_automated (AudioBuffer& src, BufferSet& obufs,
- nframes_t start, nframes_t end, nframes_t nframes, pan_t** buffers)
+ framepos_t start, framepos_t end, pframes_t nframes, pan_t** buffers)
{
if (_mono) {
/* we're in mono mode, so just pan the input to all outputs equally */
@@ -260,7 +260,7 @@ BaseStereoPanner::load (istream& in, string path, uint32_t& linecnt)
_control->list()->clear ();
while (in.getline (line, sizeof (line), '\n')) {
- nframes_t when;
+ framepos_t when;
double value;
++linecnt;
@@ -269,7 +269,7 @@ BaseStereoPanner::load (istream& in, string path, uint32_t& linecnt)
break;
}
- if (sscanf (line, "%" PRIu32 " %lf", &when, &value) != 2) {
+ if (sscanf (line, "%" PRIu64 " %lf", &when, &value) != 2) {
warning << string_compose(_("badly formatted pan automation event record at line %1 of %2 (ignored) [%3]"), linecnt, path, line) << endmsg;
continue;
}
@@ -285,7 +285,7 @@ BaseStereoPanner::load (istream& in, string path, uint32_t& linecnt)
}
void
-BaseStereoPanner::do_distribute (AudioBuffer& srcbuf, BufferSet& obufs, gain_t gain_coeff, nframes_t nframes)
+BaseStereoPanner::do_distribute (AudioBuffer& srcbuf, BufferSet& obufs, gain_t gain_coeff, pframes_t nframes)
{
assert(obufs.count().n_audio() == 2);
@@ -308,8 +308,8 @@ BaseStereoPanner::do_distribute (AudioBuffer& srcbuf, BufferSet& obufs, gain_t g
/* we've moving the pan by an appreciable amount, so we must
interpolate over 64 frames or nframes, whichever is smaller */
- nframes_t const limit = min ((nframes_t)64, nframes);
- nframes_t n;
+ pframes_t const limit = min ((pframes_t) 64, nframes);
+ pframes_t n;
delta = -(delta / (float) (limit));
@@ -365,8 +365,8 @@ BaseStereoPanner::do_distribute (AudioBuffer& srcbuf, BufferSet& obufs, gain_t g
/* we're moving the pan by an appreciable amount, so we must
interpolate over 64 frames or nframes, whichever is smaller */
- nframes_t const limit = min ((nframes_t)64, nframes);
- nframes_t n;
+ pframes_t const limit = min ((pframes_t) 64, nframes);
+ pframes_t n;
delta = -(delta / (float) (limit));
@@ -460,7 +460,7 @@ EqualPowerStereoPanner::update ()
void
EqualPowerStereoPanner::do_distribute_automated (AudioBuffer& srcbuf, BufferSet& obufs,
- nframes_t start, nframes_t end, nframes_t nframes,
+ framepos_t start, framepos_t end, pframes_t nframes,
pan_t** buffers)
{
assert (obufs.count().n_audio() == 2);
@@ -496,7 +496,7 @@ EqualPowerStereoPanner::do_distribute_automated (AudioBuffer& srcbuf, BufferSet&
const float pan_law_attenuation = -3.0f;
const float scale = 2.0f - 4.0f * powf (10.0f,pan_law_attenuation/20.0f);
- for (nframes_t n = 0; n < nframes; ++n) {
+ for (pframes_t n = 0; n < nframes; ++n) {
float const panR = buffers[0][n];
float const panL = 1 - panR;
@@ -510,7 +510,7 @@ EqualPowerStereoPanner::do_distribute_automated (AudioBuffer& srcbuf, BufferSet&
dst = obufs.get_audio(0).data();
pbuf = buffers[0];
- for (nframes_t n = 0; n < nframes; ++n) {
+ for (pframes_t n = 0; n < nframes; ++n) {
dst[n] += src[n] * pbuf[n];
}
@@ -521,7 +521,7 @@ EqualPowerStereoPanner::do_distribute_automated (AudioBuffer& srcbuf, BufferSet&
dst = obufs.get_audio(1).data();
pbuf = buffers[1];
- for (nframes_t n = 0; n < nframes; ++n) {
+ for (pframes_t n = 0; n < nframes; ++n) {
dst[n] += src[n] * pbuf[n];
}
@@ -1120,7 +1120,7 @@ Panner::set_position (const AngularVector& a, StreamPanner& orig)
}
void
-Panner::distribute_no_automation (BufferSet& inbufs, BufferSet& outbufs, nframes_t nframes, gain_t gain_coeff)
+Panner::distribute_no_automation (BufferSet& inbufs, BufferSet& outbufs, pframes_t nframes, gain_t gain_coeff)
{
if (outbufs.count().n_audio() == 0) {
// Don't want to lose audio...
@@ -1191,7 +1191,7 @@ Panner::distribute_no_automation (BufferSet& inbufs, BufferSet& outbufs, nframes
}
void
-Panner::run (BufferSet& inbufs, BufferSet& outbufs, framepos_t start_frame, framepos_t end_frame, nframes_t nframes)
+Panner::run (BufferSet& inbufs, BufferSet& outbufs, framepos_t start_frame, framepos_t end_frame, pframes_t nframes)
{
if (outbufs.count().n_audio() == 0) {
// Failing to deliver audio we were asked to deliver is a bug
diff --git a/libs/ardour/playlist_factory.cc b/libs/ardour/playlist_factory.cc
index 00996a059d..f7556cc961 100644
--- a/libs/ardour/playlist_factory.cc
+++ b/libs/ardour/playlist_factory.cc
@@ -94,7 +94,7 @@ PlaylistFactory::create (boost::shared_ptr<const Playlist> old, string name, boo
}
boost::shared_ptr<Playlist>
-PlaylistFactory::create (boost::shared_ptr<const Playlist> old, nframes_t start, nframes_t cnt, string name, bool hidden)
+PlaylistFactory::create (boost::shared_ptr<const Playlist> old, framepos_t start, framecnt_t cnt, string name, bool hidden)
{
boost::shared_ptr<Playlist> pl;
boost::shared_ptr<const AudioPlaylist> apl;
diff --git a/libs/ardour/plugin_insert.cc b/libs/ardour/plugin_insert.cc
index c852d6b2a9..ecaca5cc50 100644
--- a/libs/ardour/plugin_insert.cc
+++ b/libs/ardour/plugin_insert.cc
@@ -223,7 +223,7 @@ PluginInsert::parameter_changed (Evoral::Parameter which, float val)
}
int
-PluginInsert::set_block_size (nframes_t nframes)
+PluginInsert::set_block_size (pframes_t nframes)
{
int ret = 0;
for (Plugins::iterator i = _plugins.begin(); i != _plugins.end(); ++i) {
@@ -263,11 +263,11 @@ PluginInsert::flush ()
}
void
-PluginInsert::connect_and_run (BufferSet& bufs, nframes_t nframes, nframes_t offset, bool with_auto, nframes_t now)
+PluginInsert::connect_and_run (BufferSet& bufs, pframes_t nframes, framecnt_t offset, bool with_auto, framepos_t now)
{
// Calculate if, and how many frames we need to collect for analysis
- nframes_t collect_signal_nframes = (_signal_analysis_collect_nframes_max -
- _signal_analysis_collected_nframes);
+ framecnt_t collect_signal_nframes = (_signal_analysis_collect_nframes_max -
+ _signal_analysis_collected_nframes);
if (nframes < collect_signal_nframes) { // we might not get all frames now
collect_signal_nframes = nframes;
}
@@ -355,7 +355,7 @@ PluginInsert::connect_and_run (BufferSet& bufs, nframes_t nframes, nframes_t off
}
void
-PluginInsert::silence (nframes_t nframes)
+PluginInsert::silence (framecnt_t nframes)
{
ChanMapping in_map(input_streams());
ChanMapping out_map(output_streams());
@@ -368,7 +368,7 @@ PluginInsert::silence (nframes_t nframes)
}
void
-PluginInsert::run (BufferSet& bufs, framepos_t /*start_frame*/, framepos_t /*end_frame*/, nframes_t nframes, bool)
+PluginInsert::run (BufferSet& bufs, framepos_t /*start_frame*/, framepos_t /*end_frame*/, pframes_t nframes, bool)
{
if (_pending_active) {
/* run as normal if we are active or moving from inactive to active */
@@ -437,12 +437,12 @@ PluginInsert::get_parameter (Evoral::Parameter param)
}
void
-PluginInsert::automation_run (BufferSet& bufs, nframes_t nframes)
+PluginInsert::automation_run (BufferSet& bufs, pframes_t nframes)
{
Evoral::ControlEvent next_event (0, 0.0f);
- nframes_t now = _session.transport_frame ();
- nframes_t end = now + nframes;
- nframes_t offset = 0;
+ framepos_t now = _session.transport_frame ();
+ framepos_t end = now + nframes;
+ framecnt_t offset = 0;
Glib::Mutex::Lock lm (control_lock(), Glib::TRY_LOCK);
@@ -461,7 +461,7 @@ PluginInsert::automation_run (BufferSet& bufs, nframes_t nframes)
while (nframes) {
- nframes_t cnt = min (((nframes_t) ceil (next_event.when) - now), nframes);
+ framecnt_t cnt = min (((framecnt_t) ceil (next_event.when) - now), (framecnt_t) nframes);
connect_and_run (bufs, cnt, offset, true, now);
@@ -922,7 +922,7 @@ PluginInsert::describe_parameter (Evoral::Parameter param)
return _plugins[0]->describe_parameter (param);
}
-ARDOUR::nframes_t
+ARDOUR::framecnt_t
PluginInsert::signal_latency() const
{
if (_user_latency) {
@@ -1040,7 +1040,7 @@ PluginInsert::get_impulse_analysis_plugin()
}
void
-PluginInsert::collect_signal_for_analysis(nframes_t nframes)
+PluginInsert::collect_signal_for_analysis (framecnt_t nframes)
{
// called from outside the audio thread, so this should be safe
// only do audio as analysis is (currently) only for audio plugins
diff --git a/libs/ardour/port.cc b/libs/ardour/port.cc
index ab38285f0c..fe234c593f 100644
--- a/libs/ardour/port.cc
+++ b/libs/ardour/port.cc
@@ -34,7 +34,7 @@ using namespace std;
using namespace ARDOUR;
AudioEngine* Port::_engine = 0;
-nframes_t Port::_buffer_size = 0;
+pframes_t Port::_buffer_size = 0;
bool Port::_connecting_blocked = false;
/** @param n Port short name */
@@ -220,7 +220,7 @@ Port::recompute_total_latency () const
#endif
}
-nframes_t
+framecnt_t
Port::total_latency () const
{
jack_client_t* jack = _engine->jack();
@@ -293,7 +293,7 @@ Port::request_monitor_input (bool yn)
}
void
-Port::set_latency (nframes_t n)
+Port::set_latency (framecnt_t n)
{
jack_port_set_latency (_jack_port, n);
}
diff --git a/libs/ardour/port_insert.cc b/libs/ardour/port_insert.cc
index 4854c08d8b..b738c68de8 100644
--- a/libs/ardour/port_insert.cc
+++ b/libs/ardour/port_insert.cc
@@ -78,12 +78,12 @@ PortInsert::stop_latency_detection ()
}
void
-PortInsert::set_measured_latency (nframes_t n)
+PortInsert::set_measured_latency (framecnt_t n)
{
_measured_latency = n;
}
-nframes_t
+framecnt_t
PortInsert::latency() const
{
/* because we deliver and collect within the same cycle,
@@ -101,7 +101,7 @@ PortInsert::latency() const
}
void
-PortInsert::run (BufferSet& bufs, framepos_t start_frame, framepos_t end_frame, nframes_t nframes, bool)
+PortInsert::run (BufferSet& bufs, framepos_t start_frame, framepos_t end_frame, pframes_t nframes, bool)
{
if (_output->n_ports().n_total() == 0) {
return;
@@ -166,7 +166,7 @@ PortInsert::state (bool full)
node.add_property ("type", "port");
snprintf (buf, sizeof (buf), "%" PRIu32, bitslot);
node.add_property ("bitslot", buf);
- snprintf (buf, sizeof (buf), "%u", _measured_latency);
+ snprintf (buf, sizeof (buf), "%" PRId64, _measured_latency);
node.add_property("latency", buf);
snprintf (buf, sizeof (buf), "%u", _session.get_block_size());
node.add_property("block_size", buf);
@@ -227,7 +227,7 @@ PortInsert::set_state (const XMLNode& node, int version)
return 0;
}
-ARDOUR::nframes_t
+ARDOUR::framecnt_t
PortInsert::signal_latency() const
{
/* because we deliver and collect within the same cycle,
diff --git a/libs/ardour/rb_effect.cc b/libs/ardour/rb_effect.cc
index e31cebe602..805782807a 100644
--- a/libs/ardour/rb_effect.cc
+++ b/libs/ardour/rb_effect.cc
@@ -70,16 +70,16 @@ RBEffect::run (boost::shared_ptr<Region> r, Progress*)
}
SourceList nsrcs;
- nframes_t done;
+ framecnt_t done;
int ret = -1;
- const nframes_t bufsize = 256;
+ const framecnt_t bufsize = 256;
gain_t* gain_buffer = 0;
Sample** buffers = 0;
char suffix[32];
string new_name;
string::size_type at;
- nframes_t pos = 0;
- int avail = 0;
+ framepos_t pos = 0;
+ framecnt_t avail = 0;
boost::shared_ptr<AudioRegion> result;
cerr << "RBEffect: source region: position = " << region->position()
@@ -148,11 +148,11 @@ RBEffect::run (boost::shared_ptr<Region> r, Progress*)
double stretch = region->stretch() * tsr.time_fraction;
double shift = region->shift() * tsr.pitch_fraction;
- nframes_t read_start = region->ancestral_start() +
- nframes_t(region->start() / (double)region->stretch());
+ framecnt_t read_start = region->ancestral_start() +
+ framecnt_t(region->start() / (double)region->stretch());
- nframes_t read_duration =
- nframes_t(region->length() / (double)region->stretch());
+ framecnt_t read_duration =
+ framecnt_t(region->length() / (double)region->stretch());
uint32_t channels = region->n_channels();
@@ -206,16 +206,16 @@ RBEffect::run (boost::shared_ptr<Region> r, Progress*)
try {
while (pos < read_duration && !tsr.cancel) {
- nframes_t this_read = 0;
+ framecnt_t this_read = 0;
for (uint32_t i = 0; i < channels; ++i) {
this_read = 0;
- nframes_t this_time;
+ framepos_t this_time;
this_time = min(bufsize, read_duration - pos);
- nframes_t this_position;
+ framepos_t this_position;
this_position = read_start + pos -
region->start() + region->position();
@@ -248,15 +248,15 @@ RBEffect::run (boost::shared_ptr<Region> r, Progress*)
while (pos < read_duration && !tsr.cancel) {
- nframes_t this_read = 0;
+ framecnt_t this_read = 0;
for (uint32_t i = 0; i < channels; ++i) {
this_read = 0;
- nframes_t this_time;
+ framepos_t this_time;
this_time = min(bufsize, read_duration - pos);
- nframes_t this_position;
+ framepos_t this_position;
this_position = read_start + pos -
region->start() + region->position();
@@ -283,11 +283,11 @@ RBEffect::run (boost::shared_ptr<Region> r, Progress*)
stretcher.process(buffers, this_read, pos == read_duration);
- int avail = 0;
+ framecnt_t avail = 0;
while ((avail = stretcher.available()) > 0) {
- this_read = min(bufsize, uint32_t(avail));
+ this_read = min (bufsize, avail);
stretcher.retrieve(buffers, this_read);
@@ -308,7 +308,7 @@ RBEffect::run (boost::shared_ptr<Region> r, Progress*)
while ((avail = stretcher.available()) >= 0) {
- uint32_t this_read = min(bufsize, uint32_t(avail));
+ framecnt_t this_read = min (bufsize, avail);
stretcher.retrieve(buffers, this_read);
diff --git a/libs/ardour/region.cc b/libs/ardour/region.cc
index 33338e52ea..09c2552c48 100644
--- a/libs/ardour/region.cc
+++ b/libs/ardour/region.cc
@@ -774,26 +774,26 @@ Region::trim_front (framepos_t new_position, void *src)
}
void
-Region::cut_front (nframes_t new_position, void *src)
+Region::cut_front (framepos_t new_position, void *src)
{
modify_front (new_position, true, src);
}
void
-Region::cut_end (nframes_t new_endpoint, void *src)
+Region::cut_end (framepos_t new_endpoint, void *src)
{
modify_end (new_endpoint, true, src);
}
void
-Region::modify_front (nframes_t new_position, bool reset_fade, void *src)
+Region::modify_front (framepos_t new_position, bool reset_fade, void *src)
{
if (locked()) {
return;
}
- nframes_t end = last_frame();
- nframes_t source_zero;
+ framepos_t end = last_frame();
+ framepos_t source_zero;
if (_position > _start) {
source_zero = _position - _start;
@@ -803,7 +803,7 @@ Region::modify_front (nframes_t new_position, bool reset_fade, void *src)
if (new_position < end) { /* can't trim it zero or negative length */
- nframes_t newlen = 0;
+ framecnt_t newlen = 0;
framepos_t delta = 0;
/* can't trim it back passed where source position zero is located */
@@ -835,7 +835,7 @@ Region::modify_front (nframes_t new_position, bool reset_fade, void *src)
}
void
-Region::modify_end (nframes_t new_endpoint, bool reset_fade, void* /*src*/)
+Region::modify_end (framepos_t new_endpoint, bool reset_fade, void* /*src*/)
{
if (locked()) {
return;
@@ -1045,7 +1045,7 @@ Region::clear_sync_position ()
}
/* @return the sync point relative the first frame of the region */
-framepos_t
+frameoffset_t
Region::sync_offset (int& dir) const
{
if (sync_marked()) {
diff --git a/libs/ardour/resampled_source.cc b/libs/ardour/resampled_source.cc
index 7379aa74af..1d60281565 100644
--- a/libs/ardour/resampled_source.cc
+++ b/libs/ardour/resampled_source.cc
@@ -28,7 +28,7 @@ using namespace PBD;
const uint32_t ResampledImportableSource::blocksize = 16384U;
-ResampledImportableSource::ResampledImportableSource (boost::shared_ptr<ImportableSource> src, nframes_t rate, SrcQuality srcq)
+ResampledImportableSource::ResampledImportableSource (boost::shared_ptr<ImportableSource> src, framecnt_t rate, SrcQuality srcq)
: source (src)
, src_state (0)
{
@@ -65,8 +65,8 @@ ResampledImportableSource::~ResampledImportableSource ()
delete [] input;
}
-nframes_t
-ResampledImportableSource::read (Sample* output, nframes_t nframes)
+framecnt_t
+ResampledImportableSource::read (Sample* output, framecnt_t nframes)
{
int err;
@@ -78,7 +78,7 @@ ResampledImportableSource::read (Sample* output, nframes_t nframes)
/* The last read will not be a full buffer, so set end_of_input. */
- if ((nframes_t) src_data.input_frames < blocksize) {
+ if ((framecnt_t) src_data.input_frames < blocksize) {
src_data.end_of_input = true;
}
@@ -91,7 +91,7 @@ ResampledImportableSource::read (Sample* output, nframes_t nframes)
if (!src_data.end_of_input) {
src_data.output_frames = nframes / source->channels();
} else {
- src_data.output_frames = std::min ((nframes_t) src_data.input_frames, nframes / source->channels());
+ src_data.output_frames = std::min ((framecnt_t) src_data.input_frames, nframes / source->channels());
}
if ((err = src_process (src_state, &src_data))) {
@@ -112,7 +112,7 @@ ResampledImportableSource::read (Sample* output, nframes_t nframes)
}
void
-ResampledImportableSource::seek (nframes_t pos)
+ResampledImportableSource::seek (framepos_t pos)
{
source->seek (pos);
diff --git a/libs/ardour/return.cc b/libs/ardour/return.cc
index d8c8dd22f8..e64db79c86 100644
--- a/libs/ardour/return.cc
+++ b/libs/ardour/return.cc
@@ -103,7 +103,7 @@ Return::set_state (const XMLNode& node, int version)
}
void
-Return::run (BufferSet& bufs, framepos_t start_frame, framepos_t end_frame, nframes_t nframes, bool)
+Return::run (BufferSet& bufs, framepos_t start_frame, framepos_t end_frame, pframes_t nframes, bool)
{
if ((!_active && !_pending_active) || _input->n_ports() == ChanCount::ZERO) {
return;
diff --git a/libs/ardour/reverse.cc b/libs/ardour/reverse.cc
index 9fcfb8c1b1..45d7c83051 100644
--- a/libs/ardour/reverse.cc
+++ b/libs/ardour/reverse.cc
@@ -90,7 +90,7 @@ Reverse::run (boost::shared_ptr<Region> r, Progress*)
/* swap memory order */
- for (nframes_t i = 0; i < to_read/2; ++i) {
+ for (framecnt_t i = 0; i < to_read/2; ++i) {
swap (buf[i],buf[to_read-1-i]);
}
diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc
index 1e0edc2077..3577d3a659 100644
--- a/libs/ardour/route.cc
+++ b/libs/ardour/route.cc
@@ -382,7 +382,7 @@ Route::set_gain (gain_t val, void *src)
*/
void
Route::process_output_buffers (BufferSet& bufs,
- framepos_t start_frame, framepos_t end_frame, nframes_t nframes,
+ framepos_t start_frame, framepos_t end_frame, pframes_t nframes,
bool /*with_processors*/, int declick)
{
bool monitor;
@@ -436,12 +436,12 @@ Route::process_output_buffers (BufferSet& bufs,
Sample* const sp = i->data();
if (_phase_invert[chn]) {
- for (nframes_t nx = 0; nx < nframes; ++nx) {
+ for (pframes_t nx = 0; nx < nframes; ++nx) {
sp[nx] = -sp[nx];
sp[nx] += 1.0e-27f;
}
} else {
- for (nframes_t nx = 0; nx < nframes; ++nx) {
+ for (pframes_t nx = 0; nx < nframes; ++nx) {
sp[nx] += 1.0e-27f;
}
}
@@ -453,7 +453,7 @@ Route::process_output_buffers (BufferSet& bufs,
Sample* const sp = i->data();
if (_phase_invert[chn]) {
- for (nframes_t nx = 0; nx < nframes; ++nx) {
+ for (pframes_t nx = 0; nx < nframes; ++nx) {
sp[nx] = -sp[nx];
}
}
@@ -466,7 +466,7 @@ Route::process_output_buffers (BufferSet& bufs,
for (BufferSet::audio_iterator i = bufs.audio_begin(); i != bufs.audio_end(); ++i) {
Sample* const sp = i->data();
- for (nframes_t nx = 0; nx < nframes; ++nx) {
+ for (pframes_t nx = 0; nx < nframes; ++nx) {
sp[nx] += 1.0e-27f;
}
}
@@ -507,7 +507,7 @@ Route::n_process_buffers ()
}
void
-Route::passthru (framepos_t start_frame, framepos_t end_frame, nframes_t nframes, int declick)
+Route::passthru (framepos_t start_frame, framepos_t end_frame, pframes_t nframes, int declick)
{
BufferSet& bufs = _session.get_scratch_buffers (n_process_buffers());
@@ -547,7 +547,7 @@ Route::passthru (framepos_t start_frame, framepos_t end_frame, nframes_t nframes
}
void
-Route::passthru_silence (framepos_t start_frame, framepos_t end_frame, nframes_t nframes, int declick)
+Route::passthru_silence (framepos_t start_frame, framepos_t end_frame, pframes_t nframes, int declick)
{
BufferSet& bufs (_session.get_silent_buffers (n_process_buffers()));
bufs.set_count (_input->n_ports());
@@ -2417,7 +2417,7 @@ Route::curve_reallocate ()
}
void
-Route::silence (nframes_t nframes)
+Route::silence (framecnt_t nframes)
{
Glib::RWLock::ReaderLock lm (_processor_lock, Glib::TRY_LOCK);
if (!lm.locked()) {
@@ -2428,7 +2428,7 @@ Route::silence (nframes_t nframes)
}
void
-Route::silence_unlocked (nframes_t nframes)
+Route::silence_unlocked (framecnt_t nframes)
{
/* Must be called with the processor lock held */
@@ -2774,7 +2774,7 @@ Route::pans_required () const
}
int
-Route::no_roll (nframes_t nframes, framepos_t start_frame, framepos_t end_frame,
+Route::no_roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame,
bool session_state_changing, bool /*can_record*/, bool /*rec_monitors_input*/)
{
Glib::RWLock::ReaderLock lm (_processor_lock, Glib::TRY_LOCK);
@@ -2811,8 +2811,8 @@ Route::no_roll (nframes_t nframes, framepos_t start_frame, framepos_t end_frame,
return 0;
}
-nframes_t
-Route::check_initial_delay (nframes_t nframes, nframes_t& transport_frame)
+framecnt_t
+Route::check_initial_delay (framecnt_t nframes, framecnt_t& transport_frame)
{
if (_roll_delay > nframes) {
@@ -2839,7 +2839,7 @@ Route::check_initial_delay (nframes_t nframes, nframes_t& transport_frame)
}
int
-Route::roll (nframes_t nframes, framepos_t start_frame, framepos_t end_frame, int declick,
+Route::roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame, int declick,
bool /*can_record*/, bool /*rec_monitors_input*/, bool& /* need_butler */)
{
Glib::RWLock::ReaderLock lm (_processor_lock, Glib::TRY_LOCK);
@@ -2858,7 +2858,7 @@ Route::roll (nframes_t nframes, framepos_t start_frame, framepos_t end_frame, in
return 0;
}
- nframes_t unused = 0;
+ framecnt_t unused = 0;
if ((nframes = check_initial_delay (nframes, unused)) == 0) {
return 0;
@@ -2872,7 +2872,7 @@ Route::roll (nframes_t nframes, framepos_t start_frame, framepos_t end_frame, in
}
int
-Route::silent_roll (nframes_t nframes, framepos_t /*start_frame*/, framepos_t /*end_frame*/,
+Route::silent_roll (pframes_t nframes, framepos_t /*start_frame*/, framepos_t /*end_frame*/,
bool /*can_record*/, bool /*rec_monitors_input*/, bool& /* need_butler */)
{
silence (nframes);
@@ -3041,11 +3041,11 @@ Route::put_monitor_send_at (Placement p)
_session.set_dirty ();
}
-nframes_t
+framecnt_t
Route::update_total_latency ()
{
- nframes_t old = _output->effective_latency();
- nframes_t own_latency = _output->user_latency();
+ framecnt_t old = _output->effective_latency();
+ framecnt_t own_latency = _output->user_latency();
for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) {
if ((*i)->active ()) {
@@ -3080,16 +3080,16 @@ Route::update_total_latency ()
}
void
-Route::set_user_latency (nframes_t nframes)
+Route::set_user_latency (framecnt_t nframes)
{
_output->set_user_latency (nframes);
_session.update_latency_compensation (false, false);
}
void
-Route::set_latency_delay (nframes_t longest_session_latency)
+Route::set_latency_delay (framecnt_t longest_session_latency)
{
- nframes_t old = _initial_delay;
+ framecnt_t old = _initial_delay;
if (_output->effective_latency() < longest_session_latency) {
_initial_delay = longest_session_latency - _output->effective_latency();
@@ -3107,7 +3107,7 @@ Route::set_latency_delay (nframes_t longest_session_latency)
}
void
-Route::automation_snapshot (nframes_t now, bool force)
+Route::automation_snapshot (framepos_t now, bool force)
{
panner()->automation_snapshot (now, force);
@@ -3186,7 +3186,7 @@ Route::MuteControllable::get_value (void) const
}
void
-Route::set_block_size (nframes_t nframes)
+Route::set_block_size (pframes_t nframes)
{
for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) {
(*i)->set_block_size (nframes);
diff --git a/libs/ardour/send.cc b/libs/ardour/send.cc
index 74212155ec..9e34080fe0 100644
--- a/libs/ardour/send.cc
+++ b/libs/ardour/send.cc
@@ -71,7 +71,7 @@ Send::deactivate ()
}
void
-Send::run (BufferSet& bufs, framepos_t start_frame, framepos_t end_frame, nframes_t nframes, bool)
+Send::run (BufferSet& bufs, framepos_t start_frame, framepos_t end_frame, pframes_t nframes, bool)
{
if (_output->n_ports() == ChanCount::ZERO) {
_meter->reset ();
diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc
index 5abaaf3508..690fbc5e9a 100644
--- a/libs/ardour/session.cc
+++ b/libs/ardour/session.cc
@@ -115,7 +115,7 @@ bool Session::_disable_all_loaded_plugins = false;
PBD::Signal1<void,std::string> Session::Dialog;
PBD::Signal0<int> Session::AskAboutPendingState;
-PBD::Signal2<int,nframes_t,nframes_t> Session::AskAboutSampleRateMismatch;
+PBD::Signal2<int, framecnt_t, framecnt_t> Session::AskAboutSampleRateMismatch;
PBD::Signal0<void> Session::SendFeedback;
PBD::Signal3<int,Session*,std::string,DataType> Session::MissingFile;
@@ -826,7 +826,7 @@ Session::auto_punch_start_changed (Location* location)
void
Session::auto_punch_end_changed (Location* location)
{
- nframes_t when_to_stop = location->end();
+ framepos_t when_to_stop = location->end();
// when_to_stop += _worst_output_latency + _worst_input_latency;
replace_event (SessionEvent::PunchOut, when_to_stop);
}
@@ -834,7 +834,7 @@ Session::auto_punch_end_changed (Location* location)
void
Session::auto_punch_changed (Location* location)
{
- nframes_t when_to_stop = location->end();
+ framepos_t when_to_stop = location->end();
replace_event (SessionEvent::PunchIn, location->start());
//when_to_stop += _worst_output_latency + _worst_input_latency;
@@ -1122,7 +1122,7 @@ Session::audible_frame () const
{
framepos_t ret;
framepos_t tf;
- nframes_t offset;
+ framecnt_t offset;
/* the first of these two possible settings for "offset"
mean that the audible frame is stationary until
@@ -1197,9 +1197,9 @@ Session::audible_frame () const
}
void
-Session::set_frame_rate (nframes_t frames_per_second)
+Session::set_frame_rate (framecnt_t frames_per_second)
{
- /** \fn void Session::set_frame_size(nframes_t)
+ /** \fn void Session::set_frame_size(framecnt_t)
the AudioEngine object that calls this guarantees
that it will not be called while we are also in
::process(). Its fine to do things that block
@@ -1210,7 +1210,7 @@ Session::set_frame_rate (nframes_t frames_per_second)
sync_time_vars();
- Automatable::set_automation_interval ((jack_nframes_t) ceil ((double) frames_per_second * (0.001 * Config->get_automation_interval())));
+ Automatable::set_automation_interval (ceil ((double) frames_per_second * (0.001 * Config->get_automation_interval())));
clear_clicks ();
@@ -1223,7 +1223,7 @@ Session::set_frame_rate (nframes_t frames_per_second)
}
void
-Session::set_block_size (nframes_t nframes)
+Session::set_block_size (pframes_t nframes)
{
/* the AudioEngine guarantees
that it will not be called while we are also in
@@ -1258,7 +1258,7 @@ void
Session::set_default_fade (float /*steepness*/, float /*fade_msecs*/)
{
#if 0
- nframes_t fade_frames;
+ framecnt_t fade_frames;
/* Don't allow fade of less 1 frame */
@@ -1269,7 +1269,7 @@ Session::set_default_fade (float /*steepness*/, float /*fade_msecs*/)
} else {
- fade_frames = (nframes_t) floor (fade_msecs * _current_frame_rate * 0.001);
+ fade_frames = (framecnt_t) floor (fade_msecs * _current_frame_rate * 0.001);
}
@@ -4029,7 +4029,7 @@ Session::current_end_frame () const
}
void
-Session::add_session_range_location (nframes_t start, nframes_t end)
+Session::add_session_range_location (framepos_t start, framepos_t end)
{
_session_range_location = new Location (*this, start, end, _("session"), Location::IsSessionRange);
_locations->add (_session_range_location);
diff --git a/libs/ardour/session_click.cc b/libs/ardour/session_click.cc
index 363c5911b8..0a83a0f6d9 100644
--- a/libs/ardour/session_click.cc
+++ b/libs/ardour/session_click.cc
@@ -38,7 +38,7 @@ using namespace PBD;
Pool Click::pool ("click", sizeof (Click), 128);
void
-Session::click (nframes_t start, nframes_t nframes)
+Session::click (framepos_t start, framecnt_t nframes)
{
TempoMap::BBTPointList *points;
Sample *buf;
@@ -54,7 +54,7 @@ Session::click (nframes_t start, nframes_t nframes)
return;
}
- const nframes_t end = start + nframes;
+ const framepos_t end = start + nframes;
BufferSet& bufs = get_scratch_buffers(ChanCount(DataType::AUDIO, 1));
buf = bufs.get_audio(0).data();
@@ -90,8 +90,8 @@ Session::click (nframes_t start, nframes_t nframes)
for (list<Click*>::iterator i = clicks.begin(); i != clicks.end(); ) {
- nframes_t copy;
- nframes_t internal_offset;
+ framecnt_t copy;
+ framecnt_t internal_offset;
Click *clk;
list<Click*>::iterator next;
diff --git a/libs/ardour/session_export.cc b/libs/ardour/session_export.cc
index 75c8fd0dd7..2c4d8a1a22 100644
--- a/libs/ardour/session_export.cc
+++ b/libs/ardour/session_export.cc
@@ -96,7 +96,7 @@ Session::pre_export ()
}
int
-Session::start_audio_export (nframes_t position, bool /* realtime */)
+Session::start_audio_export (framepos_t position, bool /* realtime */)
{
if (!_exporting) {
pre_export ();
@@ -149,7 +149,7 @@ Session::start_audio_export (nframes_t position, bool /* realtime */)
}
void
-Session::process_export (nframes_t nframes)
+Session::process_export (pframes_t nframes)
{
if (_export_rolling && export_status->stop) {
stop_audio_export ();
@@ -178,7 +178,7 @@ Session::process_export (nframes_t nframes)
}
int
-Session::process_export_fw (nframes_t nframes)
+Session::process_export_fw (pframes_t nframes)
{
_engine.main_thread()->get_buffers ();
process_export (nframes);
diff --git a/libs/ardour/session_midi.cc b/libs/ardour/session_midi.cc
index 6914b9db94..ee43a7263a 100644
--- a/libs/ardour/session_midi.cc
+++ b/libs/ardour/session_midi.cc
@@ -90,7 +90,7 @@ Session::setup_midi_control ()
}
void
-Session::spp_start (Parser &, nframes_t /*timestamp*/)
+Session::spp_start (Parser &, framepos_t /*timestamp*/)
{
if (Config->get_mmc_control() && (!config.get_external_sync() || config.get_sync_source() != JACK)) {
request_transport_speed (1.0);
@@ -98,13 +98,13 @@ Session::spp_start (Parser &, nframes_t /*timestamp*/)
}
void
-Session::spp_continue (Parser& ignored, nframes_t timestamp)
+Session::spp_continue (Parser& ignored, framepos_t timestamp)
{
spp_start (ignored, timestamp);
}
void
-Session::spp_stop (Parser&, nframes_t /*timestamp*/)
+Session::spp_stop (Parser&, framepos_t /*timestamp*/)
{
if (Config->get_mmc_control()) {
request_stop ();
@@ -373,7 +373,7 @@ Session::send_full_time_code (framepos_t const t)
if (((mtc_timecode_bits >> 5) != MIDI::MTC_25_FPS) && (transmitting_timecode_time.frames % 2)) {
// start MTC quarter frame transmission on an even frame
Timecode::increment (transmitting_timecode_time, config.get_subframes_per_frame());
- outbound_mtc_timecode_frame += (nframes_t) _frames_per_timecode_frame;
+ outbound_mtc_timecode_frame += _frames_per_timecode_frame;
}
// Compensate for audio latency
@@ -410,7 +410,7 @@ Session::send_full_time_code (framepos_t const t)
* earlier already this cycle by send_full_time_code)
*/
int
-Session::send_midi_time_code_for_cycle(nframes_t nframes)
+Session::send_midi_time_code_for_cycle (pframes_t nframes)
{
if (_slave || !session_send_mtc || transmitting_timecode_time.negative || (next_quarter_frame_to_send < 0)) {
// cerr << "(MTC) Not sending MTC\n";
@@ -421,7 +421,7 @@ Session::send_midi_time_code_for_cycle(nframes_t nframes)
assert (next_quarter_frame_to_send <= 7);
/* Duration of one quarter frame */
- nframes_t quarter_frame_duration = ((nframes_t) _frames_per_timecode_frame) >> 2;
+ framecnt_t quarter_frame_duration = ((framecnt_t) _frames_per_timecode_frame) >> 2;
DEBUG_TRACE (DEBUG::MTC, string_compose ("TF %1 SF %2 NQ %3 FD %4\n", _transport_frame, outbound_mtc_timecode_frame,
next_quarter_frame_to_send, quarter_frame_duration));
@@ -463,14 +463,14 @@ Session::send_midi_time_code_for_cycle(nframes_t nframes)
break;
}
- const nframes_t msg_time = (outbound_mtc_timecode_frame
+ const framepos_t msg_time = (outbound_mtc_timecode_frame
+ (quarter_frame_duration * next_quarter_frame_to_send));
// This message must fall within this block or something is broken
assert(msg_time >= _transport_frame);
assert(msg_time < _transport_frame + nframes);
- nframes_t out_stamp = msg_time - _transport_frame;
+ framepos_t out_stamp = msg_time - _transport_frame;
assert(out_stamp < nframes);
if (MIDI::Manager::instance()->mtc_output_port()->midimsg (mtc_msg, 2, out_stamp)) {
diff --git a/libs/ardour/session_process.cc b/libs/ardour/session_process.cc
index 7f88642b12..fe85109869 100644
--- a/libs/ardour/session_process.cc
+++ b/libs/ardour/session_process.cc
@@ -52,7 +52,7 @@ using namespace std;
* @param nframes Number of frames to process.
*/
void
-Session::process (nframes_t nframes)
+Session::process (pframes_t nframes)
{
MIDI::Manager::instance()->cycle_start(nframes);
@@ -76,8 +76,8 @@ Session::process (nframes_t nframes)
_engine.main_thread()->drop_buffers ();
// the ticker is for sending time information like MidiClock
- nframes_t transport_frames = transport_frame();
- BBT_Time transport_bbt;
+ framepos_t transport_frames = transport_frame();
+ BBT_Time transport_bbt;
bbt_time(transport_frames, transport_bbt);
Timecode::Time transport_timecode;
timecode_time(transport_frames, transport_timecode);
@@ -89,15 +89,15 @@ Session::process (nframes_t nframes)
}
int
-Session::fail_roll (nframes_t nframes)
+Session::fail_roll (pframes_t nframes)
{
return no_roll (nframes);
}
int
-Session::no_roll (nframes_t nframes)
+Session::no_roll (pframes_t nframes)
{
- nframes_t end_frame = _transport_frame + nframes; // FIXME: varispeed + no_roll ??
+ framepos_t end_frame = _transport_frame + nframes; // FIXME: varispeed + no_roll ??
int ret = 0;
bool declick = get_transport_declick_required();
boost::shared_ptr<RouteList> r = routes.reader ();
@@ -130,7 +130,7 @@ Session::no_roll (nframes_t nframes)
}
int
-Session::process_routes (nframes_t nframes, bool& need_butler)
+Session::process_routes (pframes_t nframes, bool& need_butler)
{
bool record_active;
int declick = get_transport_declick_required();
@@ -144,8 +144,8 @@ Session::process_routes (nframes_t nframes, bool& need_butler)
record_active = actively_recording(); // || (get_record_enabled() && get_punch_in());
- const nframes_t start_frame = _transport_frame;
- const nframes_t end_frame = _transport_frame + (nframes_t)floor(nframes * _transport_speed);
+ const framepos_t start_frame = _transport_frame;
+ const framepos_t end_frame = _transport_frame + floor (nframes * _transport_speed);
DEBUG_TRACE(DEBUG::Graph,"calling graph/process-routes\n");
route_graph->process_routes( nframes, start_frame, end_frame, declick, record_active, rec_monitors, need_butler);
@@ -170,7 +170,7 @@ Session::process_routes (nframes_t nframes, bool& need_butler)
}
int
-Session::silent_process_routes (nframes_t nframes, bool& need_butler)
+Session::silent_process_routes (pframes_t nframes, bool& need_butler)
{
bool record_active = actively_recording();
int declick = get_transport_declick_required();
@@ -182,8 +182,8 @@ Session::silent_process_routes (nframes_t nframes, bool& need_butler)
declick = -1;
}
- const nframes_t start_frame = _transport_frame;
- const nframes_t end_frame = _transport_frame + lrintf(nframes * _transport_speed);
+ const framepos_t start_frame = _transport_frame;
+ const framepos_t end_frame = _transport_frame + lrintf(nframes * _transport_speed);
route_graph->silent_process_routes( nframes, start_frame, end_frame, record_active, rec_monitors, need_butler);
/*
@@ -233,10 +233,10 @@ Session::get_track_statistics ()
/** Process callback used when the auditioner is not active */
void
-Session::process_with_events (nframes_t nframes)
+Session::process_with_events (pframes_t nframes)
{
SessionEvent* ev;
- nframes_t this_nframes;
+ pframes_t this_nframes;
framepos_t end_frame;
bool session_needs_butler = false;
framepos_t stop_limit;
@@ -291,7 +291,7 @@ Session::process_with_events (nframes_t nframes)
frames_moved = (framecnt_t) interpolation.interpolate (0, nframes, 0, 0);
}
- end_frame = _transport_frame + (nframes_t)frames_moved;
+ end_frame = _transport_frame + frames_moved;
{
SessionEvent* this_event;
@@ -350,7 +350,7 @@ Session::process_with_events (nframes_t nframes)
if (this_event && this_event->action_frame <= end_frame && this_event->action_frame >= _transport_frame) {
/* this isn't quite right for reverse play */
frames_moved = (framecnt_t) (this_event->action_frame - _transport_frame);
- this_nframes = (nframes_t) abs( floor(frames_moved / _transport_speed) );
+ this_nframes = abs (floor(frames_moved / _transport_speed));
}
if (this_nframes) {
@@ -399,7 +399,7 @@ Session::process_with_events (nframes_t nframes)
}
/* this is necessary to handle the case of seamless looping */
- end_frame = _transport_frame + (nframes_t) floor (nframes * _transport_speed);
+ end_frame = _transport_frame + floor (nframes * _transport_speed);
}
@@ -434,11 +434,11 @@ Session::transport_locked () const
}
bool
-Session::follow_slave (nframes_t nframes)
+Session::follow_slave (pframes_t nframes)
{
double slave_speed;
framepos_t slave_transport_frame;
- nframes_t this_delta;
+ framecnt_t this_delta;
int dir;
if (!_slave->ok()) {
@@ -538,7 +538,7 @@ Session::follow_slave (nframes_t nframes)
}
#if 1
- if ((nframes_t) abs(average_slave_delta) > _slave->resolution()) {
+ if ((framecnt_t) abs(average_slave_delta) > _slave->resolution()) {
cerr << "average slave delta greater than slave resolution (" << _slave->resolution() << "), going to silent motion\n";
goto silent_motion;
}
@@ -564,7 +564,7 @@ Session::follow_slave (nframes_t nframes)
}
void
-Session::calculate_moving_average_of_slave_delta(int dir, nframes_t this_delta)
+Session::calculate_moving_average_of_slave_delta (int dir, framecnt_t this_delta)
{
if (delta_accumulator_cnt >= delta_accumulator_size) {
have_first_delta_accumulator = true;
@@ -572,7 +572,7 @@ Session::calculate_moving_average_of_slave_delta(int dir, nframes_t this_delta)
}
if (delta_accumulator_cnt != 0 || this_delta < _current_frame_rate) {
- delta_accumulator[delta_accumulator_cnt++] = (nframes_t) dir * (nframes_t) this_delta;
+ delta_accumulator[delta_accumulator_cnt++] = (framecnt_t) dir * (framecnt_t) this_delta;
}
if (have_first_delta_accumulator) {
@@ -591,7 +591,7 @@ Session::calculate_moving_average_of_slave_delta(int dir, nframes_t this_delta)
}
void
-Session::track_slave_state (float slave_speed, nframes_t slave_transport_frame, nframes_t this_delta)
+Session::track_slave_state (float slave_speed, framepos_t slave_transport_frame, framecnt_t this_delta)
{
if (slave_speed != 0.0f) {
@@ -644,7 +644,7 @@ Session::track_slave_state (float slave_speed, nframes_t slave_transport_frame,
bool ok = true;
- nframes_t frame_delta = slave_transport_frame - _transport_frame;
+ framecnt_t frame_delta = slave_transport_frame - _transport_frame;
boost::shared_ptr<RouteList> rl = routes.reader();
for (RouteList::iterator i = rl->begin(); i != rl->end(); ++i) {
@@ -699,7 +699,7 @@ Session::track_slave_state (float slave_speed, nframes_t slave_transport_frame,
}
void
-Session::follow_slave_silently (nframes_t nframes, float slave_speed)
+Session::follow_slave_silently (pframes_t nframes, float slave_speed)
{
if (slave_speed && _transport_speed) {
@@ -742,7 +742,7 @@ Session::follow_slave_silently (nframes_t nframes, float slave_speed)
}
void
-Session::process_without_events (nframes_t nframes)
+Session::process_without_events (pframes_t nframes)
{
bool session_needs_butler = false;
framepos_t stop_limit;
@@ -822,7 +822,7 @@ Session::process_without_events (nframes_t nframes)
* @param nframes number of frames to process.
*/
void
-Session::process_audition (nframes_t nframes)
+Session::process_audition (pframes_t nframes)
{
SessionEvent* ev;
boost::shared_ptr<RouteList> r = routes.reader ();
@@ -869,9 +869,9 @@ Session::process_audition (nframes_t nframes)
}
bool
-Session::maybe_sync_start (nframes_t& nframes)
+Session::maybe_sync_start (pframes_t & nframes)
{
- nframes_t sync_offset;
+ pframes_t sync_offset;
if (!waiting_for_sync_offset) {
return false;
diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc
index dea341bf15..b67de14d07 100644
--- a/libs/ardour/session_state.cc
+++ b/libs/ardour/session_state.cc
@@ -225,7 +225,7 @@ Session::first_stage_init (string fullpath, string snapshot_name)
/* default short fade = 15ms */
- Crossfade::set_short_xfade_length ((nframes_t) floor (config.get_short_xfade_seconds() * frame_rate()));
+ Crossfade::set_short_xfade_length ((framecnt_t) floor (config.get_short_xfade_seconds() * frame_rate()));
SndFileSource::setup_standard_crossfades (*this, frame_rate());
last_mmc_step.tv_sec = 0;
@@ -1017,7 +1017,7 @@ Session::state(bool full_state)
if (full_state) {
node->add_property ("name", _name);
- snprintf (buf, sizeof (buf), "%" PRId32, _nominal_frame_rate);
+ snprintf (buf, sizeof (buf), "%" PRId64, _nominal_frame_rate);
node->add_property ("sample-rate", buf);
if (session_dirs.size() > 1) {
diff --git a/libs/ardour/session_time.cc b/libs/ardour/session_time.cc
index e33fe3a9fb..b5137e0d6a 100644
--- a/libs/ardour/session_time.cc
+++ b/libs/ardour/session_time.cc
@@ -47,7 +47,7 @@ using namespace PBD;
/* BBT TIME*/
void
-Session::bbt_time (nframes_t when, BBT_Time& bbt)
+Session::bbt_time (framepos_t when, BBT_Time& bbt)
{
_tempo_map->bbt_time (when, bbt);
}
@@ -155,14 +155,14 @@ Session::timecode_drop_frames() const
void
Session::sync_time_vars ()
{
- _current_frame_rate = (nframes_t) round (_base_frame_rate * (1.0 + (config.get_video_pullup()/100.0)));
+ _current_frame_rate = (framecnt_t) round (_base_frame_rate * (1.0 + (config.get_video_pullup()/100.0)));
_frames_per_timecode_frame = (double) _current_frame_rate / (double) timecode_frames_per_second();
if (timecode_drop_frames()) {
_frames_per_hour = (int32_t)(107892 * _frames_per_timecode_frame);
} else {
_frames_per_hour = (int32_t)(3600 * rint(timecode_frames_per_second()) * _frames_per_timecode_frame);
}
- _timecode_frames_per_hour = (nframes_t)rint(timecode_frames_per_second() * 3600.0);
+ _timecode_frames_per_hour = rint(timecode_frames_per_second() * 3600.0);
last_timecode_valid = false;
// timecode type bits are the middle two in the upper nibble
@@ -231,13 +231,13 @@ Session::timecode_to_sample( Timecode::Time& timecode, framepos_t& sample, bool
// Per Sigmond <per@sigmond.no>
// Samples inside time dividable by 10 minutes (real time accurate)
- nframes_t base_samples = (nframes_t) (((timecode.hours * 107892) + ((timecode.minutes / 10) * 17982)) * _frames_per_timecode_frame);
+ framecnt_t base_samples = (framecnt_t) (((timecode.hours * 107892) + ((timecode.minutes / 10) * 17982)) * _frames_per_timecode_frame);
// Samples inside time exceeding the nearest 10 minutes (always offset, see above)
int32_t exceeding_df_minutes = timecode.minutes % 10;
int32_t exceeding_df_seconds = (exceeding_df_minutes * 60) + timecode.seconds;
int32_t exceeding_df_frames = (30 * exceeding_df_seconds) + timecode.frames - (2 * exceeding_df_minutes);
- nframes_t exceeding_samples = (nframes_t) rint(exceeding_df_frames * _frames_per_timecode_frame);
+ framecnt_t exceeding_samples = (framecnt_t) rint(exceeding_df_frames * _frames_per_timecode_frame);
sample = base_samples + exceeding_samples;
} else {
/*
@@ -247,7 +247,7 @@ Session::timecode_to_sample( Timecode::Time& timecode, framepos_t& sample, bool
frame_rate() in the non-integer Timecode rate case.
*/
- sample = (nframes_t)rint((((timecode.hours * 60 * 60) + (timecode.minutes * 60) + timecode.seconds) * (rint(timecode.rate) * _frames_per_timecode_frame)) + (timecode.frames * _frames_per_timecode_frame));
+ sample = (framecnt_t)rint((((timecode.hours * 60 * 60) + (timecode.minutes * 60) + timecode.seconds) * (rint(timecode.rate) * _frames_per_timecode_frame)) + (timecode.frames * _frames_per_timecode_frame));
}
if (use_subframes) {
@@ -376,7 +376,7 @@ Session::sample_to_timecode (framepos_t sample, Timecode::Time& timecode, bool u
}
void
-Session::timecode_time (nframes_t when, Timecode::Time& timecode)
+Session::timecode_time (framepos_t when, Timecode::Time& timecode)
{
if (last_timecode_valid && when == last_timecode_when) {
timecode = last_timecode;
@@ -391,7 +391,7 @@ Session::timecode_time (nframes_t when, Timecode::Time& timecode)
}
void
-Session::timecode_time_subframes (nframes_t when, Timecode::Time& timecode)
+Session::timecode_time_subframes (framepos_t when, Timecode::Time& timecode)
{
if (last_timecode_valid && when == last_timecode_when) {
timecode = last_timecode;
@@ -469,7 +469,7 @@ Session::jack_sync_callback (jack_transport_state_t state,
void
Session::jack_timebase_callback (jack_transport_state_t /*state*/,
- nframes_t /*nframes*/,
+ pframes_t /*nframes*/,
jack_position_t* pos,
int /*new_position*/)
{
@@ -546,14 +546,14 @@ Session::jack_timebase_callback (jack_transport_state_t /*state*/,
#endif
}
-ARDOUR::nframes_t
-Session::convert_to_frames_at (nframes_t /*position*/, AnyTime const & any)
+ARDOUR::framecnt_t
+Session::convert_to_frames_at (framepos_t /*position*/, AnyTime const & any)
{
double secs;
switch (any.type) {
case AnyTime::BBT:
- return _tempo_map->frame_time ( any.bbt);
+ return _tempo_map->frame_time (any.bbt);
break;
case AnyTime::Timecode:
@@ -563,14 +563,14 @@ Session::convert_to_frames_at (nframes_t /*position*/, AnyTime const & any)
secs += any.timecode.seconds;
secs += any.timecode.frames / timecode_frames_per_second();
if (config.get_timecode_offset_negative()) {
- return (nframes_t) floor (secs * frame_rate()) - config.get_timecode_offset();
+ return (framecnt_t) floor (secs * frame_rate()) - config.get_timecode_offset();
} else {
- return (nframes_t) floor (secs * frame_rate()) + config.get_timecode_offset();
+ return (framecnt_t) floor (secs * frame_rate()) + config.get_timecode_offset();
}
break;
case AnyTime::Seconds:
- return (nframes_t) floor (any.seconds * frame_rate());
+ return (framecnt_t) floor (any.seconds * frame_rate());
break;
case AnyTime::Frames:
diff --git a/libs/ardour/session_transport.cc b/libs/ardour/session_transport.cc
index 3c50065684..bb20fe97ac 100644
--- a/libs/ardour/session_transport.cc
+++ b/libs/ardour/session_transport.cc
@@ -751,7 +751,7 @@ Session::start_locate (framepos_t target_frame, bool with_roll, bool with_flush,
}
int
-Session::micro_locate (nframes_t distance)
+Session::micro_locate (framecnt_t distance)
{
boost::shared_ptr<RouteList> rl = routes.reader();
for (RouteList::iterator i = rl->begin(); i != rl->end(); ++i) {
@@ -1182,7 +1182,7 @@ Session::post_transport ()
}
void
-Session::reset_rf_scale (nframes_t motion)
+Session::reset_rf_scale (framecnt_t motion)
{
cumulative_rf_motion += motion;
@@ -1359,7 +1359,7 @@ Session::set_play_range (list<AudioRange>& range, bool leave_rolling)
/* locating/stopping is subject to delays for declicking.
*/
- nframes_t requested_frame = (*i).end;
+ framepos_t requested_frame = i->end;
if (requested_frame > current_block_size) {
requested_frame -= current_block_size;
@@ -1490,8 +1490,8 @@ Session::update_latency_compensation (bool with_stop, bool abort)
(*i)->handle_transport_stopped (abort, (ptw & PostTransportLocate), (!(ptw & PostTransportLocate) || pending_locate_flush));
}
- nframes_t old_latency = (*i)->output()->signal_latency ();
- nframes_t track_latency = (*i)->update_total_latency ();
+ framecnt_t old_latency = (*i)->output()->signal_latency ();
+ framecnt_t track_latency = (*i)->update_total_latency ();
if (old_latency != track_latency) {
(*i)->input()->update_port_total_latencies ();
@@ -1547,7 +1547,7 @@ Session::reset_jack_connection (jack_client_t* jack)
}
bool
-Session::maybe_stop (nframes_t limit)
+Session::maybe_stop (framepos_t limit)
{
if ((_transport_speed > 0.0f && _transport_frame >= limit) || (_transport_speed < 0.0f && _transport_frame == 0)) {
if (synced_to_jack () && config.get_jack_time_master ()) {
diff --git a/libs/ardour/slave.cc b/libs/ardour/slave.cc
index ce03f0b17e..1cbcba8ee6 100644
--- a/libs/ardour/slave.cc
+++ b/libs/ardour/slave.cc
@@ -29,7 +29,7 @@ SlaveSessionProxy::tempo_map() const
return session.tempo_map();
}
-nframes_t
+framecnt_t
SlaveSessionProxy::frame_rate() const
{
return session.frame_rate();
@@ -47,7 +47,7 @@ SlaveSessionProxy::transport_frame() const
return session.transport_frame();
}
-nframes_t
+pframes_t
SlaveSessionProxy::frames_since_cycle_start() const
{
return session.engine().frames_since_cycle_start();
diff --git a/libs/ardour/smf_source.cc b/libs/ardour/smf_source.cc
index 7a664b30d6..4e939a3762 100644
--- a/libs/ardour/smf_source.cc
+++ b/libs/ardour/smf_source.cc
@@ -106,9 +106,9 @@ SMFSource::~SMFSource ()
}
/** All stamps in audio frames */
-nframes_t
-SMFSource::read_unlocked (Evoral::EventSink<nframes_t>& destination, framepos_t const source_start,
- framepos_t start, nframes_t duration,
+framecnt_t
+SMFSource::read_unlocked (Evoral::EventSink<framepos_t>& destination, framepos_t const source_start,
+ framepos_t start, framecnt_t duration,
MidiStateTracker* tracker) const
{
int ret = 0;
@@ -207,12 +207,12 @@ SMFSource::read_unlocked (Evoral::EventSink<nframes_t>& destination, framepos_t
* @param source Buffer to read from.
* @param position This source's start position in session frames.
*/
-nframes_t
-SMFSource::write_unlocked (MidiRingBuffer<nframes_t>& source, framepos_t position, nframes_t duration)
+framecnt_t
+SMFSource::write_unlocked (MidiRingBuffer<framepos_t>& source, framepos_t position, framecnt_t duration)
{
_write_data_count = 0;
- nframes_t time;
+ framepos_t time;
Evoral::EventType type;
uint32_t size;
@@ -223,7 +223,7 @@ SMFSource::write_unlocked (MidiRingBuffer<nframes_t>& source, framepos_t positio
_model->start_write();
}
- Evoral::MIDIEvent<nframes_t> ev;
+ Evoral::MIDIEvent<framepos_t> ev;
while (true) {
bool ret = source.peek_time(&time);
@@ -315,9 +315,9 @@ SMFSource::append_event_unlocked_beats (const Evoral::Event<double>& ev)
}
-/** Append an event with a timestamp in frames (nframes_t) */
+/** Append an event with a timestamp in frames (framepos_t) */
void
-SMFSource::append_event_unlocked_frames (const Evoral::Event<nframes_t>& ev, framepos_t position)
+SMFSource::append_event_unlocked_frames (const Evoral::Event<framepos_t>& ev, framepos_t position)
{
assert(_writing);
if (ev.size() == 0) {
diff --git a/libs/ardour/sndfileimportable.cc b/libs/ardour/sndfileimportable.cc
index b51ad3634a..75bfb9da57 100644
--- a/libs/ardour/sndfileimportable.cc
+++ b/libs/ardour/sndfileimportable.cc
@@ -43,10 +43,10 @@ SndFileImportableSource::~SndFileImportableSource ()
{
}
-nframes_t
-SndFileImportableSource::read (Sample* buffer, nframes_t nframes)
+framecnt_t
+SndFileImportableSource::read (Sample* buffer, framecnt_t nframes)
{
- nframes_t per_channel = nframes / sf_info.channels;
+ framecnt_t per_channel = nframes / sf_info.channels;
per_channel = sf_readf_float (in.get(), buffer, per_channel);
return per_channel * sf_info.channels;
}
@@ -63,14 +63,14 @@ SndFileImportableSource::length () const
return (framecnt_t) sf_info.frames;
}
-nframes_t
-SndFileImportableSource::samplerate() const
+framecnt_t
+SndFileImportableSource::samplerate () const
{
return sf_info.samplerate;
}
void
-SndFileImportableSource::seek (nframes_t /*pos*/)
+SndFileImportableSource::seek (framepos_t /*pos*/)
{
sf_seek (in.get(), 0, SEEK_SET);
}
diff --git a/libs/ardour/sndfilesource.cc b/libs/ardour/sndfilesource.cc
index 0afe50a311..fa2e761d8e 100644
--- a/libs/ardour/sndfilesource.cc
+++ b/libs/ardour/sndfilesource.cc
@@ -83,7 +83,7 @@ SndFileSource::SndFileSource (Session& s, const string& path, int chn, Flag flag
/** This constructor is used to construct new files, not open existing ones. */
SndFileSource::SndFileSource (Session& s, const string& path, const string& origin,
- SampleFormat sfmt, HeaderFormat hf, nframes_t rate, Flag flags)
+ SampleFormat sfmt, HeaderFormat hf, framecnt_t rate, Flag flags)
: Source(s, DataType::AUDIO, path, flags)
, AudioFileSource (s, path, origin, flags, sfmt, hf)
{
@@ -321,7 +321,7 @@ SndFileSource::read_unlocked (Sample *dst, framepos_t start, framecnt_t cnt) con
}
if (_info.channels == 1) {
- nframes_t ret = sf_read_float (sf, dst, file_cnt);
+ framecnt_t ret = sf_read_float (sf, dst, file_cnt);
_read_data_count = ret * sizeof(float);
if (ret != file_cnt) {
char errbuf[256];
@@ -420,8 +420,8 @@ SndFileSource::destructive_write_unlocked (Sample* data, framecnt_t cnt)
file_pos = capture_start_frame - _timeline_position;
// split cnt in half
- nframes_t subcnt = cnt / 2;
- nframes_t ofilepos = file_pos;
+ framecnt_t subcnt = cnt / 2;
+ framecnt_t ofilepos = file_pos;
// fade in
if (crossfade (data, subcnt, 1) != subcnt) {
@@ -804,7 +804,7 @@ SndFileSource::handle_header_position_change ()
}
void
-SndFileSource::setup_standard_crossfades (Session const & s, nframes_t rate)
+SndFileSource::setup_standard_crossfades (Session const & s, framecnt_t rate)
{
/* This static method is assumed to have been called by the Session
before any DFS's are created.
diff --git a/libs/ardour/source_factory.cc b/libs/ardour/source_factory.cc
index c9f7386c00..f886f952bd 100644
--- a/libs/ardour/source_factory.cc
+++ b/libs/ardour/source_factory.cc
@@ -257,7 +257,7 @@ SourceFactory::createReadable (DataType type, Session& s, const string& path,
boost::shared_ptr<Source>
SourceFactory::createWritable (DataType type, Session& s, const std::string& path, const std::string& origin,
- bool destructive, nframes_t rate, bool announce, bool defer_peaks)
+ bool destructive, framecnt_t rate, bool announce, bool defer_peaks)
{
/* this might throw failed_constructor(), which is OK */
diff --git a/libs/ardour/sse_functions_xmm.cc b/libs/ardour/sse_functions_xmm.cc
index b3e3342cb8..48212ea8e1 100644
--- a/libs/ardour/sse_functions_xmm.cc
+++ b/libs/ardour/sse_functions_xmm.cc
@@ -22,7 +22,7 @@
#include "ardour/types.h"
void
-x86_sse_find_peaks(const ARDOUR::Sample* buf, ARDOUR::nframes_t nframes, float *min, float *max)
+x86_sse_find_peaks(const ARDOUR::Sample* buf, ARDOUR::pframes_t nframes, float *min, float *max)
{
__m128 current_max, current_min, work;
diff --git a/libs/ardour/st_stretch.cc b/libs/ardour/st_stretch.cc
index 748c854daf..3660ff34d3 100644
--- a/libs/ardour/st_stretch.cc
+++ b/libs/ardour/st_stretch.cc
@@ -67,10 +67,10 @@ int
STStretch::run (boost::shared_ptr<Region> a_region)
{
SourceList nsrcs;
- nframes_t total_frames;
- nframes_t done;
+ framecnt_t total_frames;
+ framecnt_t done;
int ret = -1;
- const nframes_t bufsize = 16384;
+ const framecnt_t bufsize = 16384;
gain_t *gain_buffer = 0;
Sample *buffer = 0;
char suffix[32];
@@ -108,13 +108,13 @@ STStretch::run (boost::shared_ptr<Region> a_region)
boost::shared_ptr<AudioSource> asrc
= boost::dynamic_pointer_cast<AudioSource>(nsrcs[i]);
- nframes_t pos = 0;
- nframes_t this_read = 0;
+ framepos_t pos = 0;
+ framecnt_t this_read = 0;
st.clear();
while (!tsr.cancel && pos < region->length()) {
- nframes_t this_time;
+ framecnt_t this_time;
this_time = min (bufsize, region->length() - pos);
@@ -179,16 +179,16 @@ STStretch::run (boost::shared_ptr<Region> a_region)
for (vector<boost::shared_ptr<Region> >::iterator x = results.begin(); x != results.end(); ++x) {
framepos_t astart = (*x)->ancestral_start();
framepos_t alength = (*x)->ancestral_length();
- nframes_t start;
- nframes_t length;
+ framepos_t start;
+ framecnt_t length;
// note: tsr.fraction is a percentage of original length. 100 = no change,
// 50 is half as long, 200 is twice as long, etc.
float stretch = (*x)->stretch() * (tsr.time_fraction/100.0);
- start = (nframes_t) floor (astart + ((astart - (*x)->start()) / stretch));
- length = (nframes_t) floor (alength / stretch);
+ start = (framepos_t) floor (astart + ((astart - (*x)->start()) / stretch));
+ length = (framecnt_t) floor (alength / stretch);
(*x)->set_ancestral_data (start, length, stretch, (*x)->shift());
}
diff --git a/libs/ardour/strip_silence.cc b/libs/ardour/strip_silence.cc
index a7308b06ab..cf03c2df8b 100644
--- a/libs/ardour/strip_silence.cc
+++ b/libs/ardour/strip_silence.cc
@@ -35,7 +35,7 @@ using namespace ARDOUR;
* @param fade_length Length of fade in/out to apply to trimmed regions, in samples.
*/
-StripSilence::StripSilence (Session & s, double threshold, nframes_t minimum_length, nframes_t fade_length)
+StripSilence::StripSilence (Session & s, double threshold, framecnt_t minimum_length, framecnt_t fade_length)
: Filter (s), _threshold (threshold), _minimum_length (minimum_length), _fade_length (fade_length)
{
diff --git a/libs/ardour/tempo.cc b/libs/ardour/tempo.cc
index 67c3419b1b..8afdfb140b 100644
--- a/libs/ardour/tempo.cc
+++ b/libs/ardour/tempo.cc
@@ -45,7 +45,7 @@ Tempo TempoMap::_default_tempo (120.0);
const double Meter::ticks_per_beat = 1920.0;
-double Tempo::frames_per_beat (nframes_t sr, const Meter& meter) const
+double Tempo::frames_per_beat (framecnt_t sr, const Meter& meter) const
{
return ((60.0 * sr) / (_beats_per_minute * meter.note_divisor()/_note_type));
}
@@ -53,7 +53,7 @@ double Tempo::frames_per_beat (nframes_t sr, const Meter& meter) const
/***********************************************************************/
double
-Meter::frames_per_bar (const Tempo& tempo, nframes_t sr) const
+Meter::frames_per_bar (const Tempo& tempo, framecnt_t sr) const
{
return ((60.0 * sr * _beats_per_bar) / (tempo.beats_per_minute() * _note_type/tempo.note_type()));
}
@@ -218,7 +218,7 @@ struct MetricSectionSorter {
}
};
-TempoMap::TempoMap (nframes_t fr)
+TempoMap::TempoMap (framecnt_t fr)
{
metrics = new Metrics;
_frame_rate = fr;
diff --git a/libs/ardour/test/interpolation_test.cpp b/libs/ardour/test/interpolation_test.cpp
index ef47417c6e..0bbb697b85 100644
--- a/libs/ardour/test/interpolation_test.cpp
+++ b/libs/ardour/test/interpolation_test.cpp
@@ -9,7 +9,7 @@ using namespace ARDOUR;
void
InterpolationTest::linearInterpolationTest ()
{
- nframes_t result = 0;
+ framecnt_t result = 0;
// cout << "\nLinear Interpolation Test\n";
// cout << "\nSpeed: 1/3";
@@ -25,7 +25,7 @@ InterpolationTest::linearInterpolationTest ()
linear.set_speed (1.0);
linear.set_target_speed (linear.speed());
result = linear.interpolate (0, NUM_SAMPLES, input, output);
- CPPUNIT_ASSERT_EQUAL ((uint32_t)(NUM_SAMPLES * linear.speed()), result);
+ CPPUNIT_ASSERT_EQUAL ((framecnt_t)(NUM_SAMPLES * linear.speed()), result);
for (int i = 0; i < NUM_SAMPLES; i += INTERVAL) {
CPPUNIT_ASSERT_EQUAL (1.0f, output[i]);
}
@@ -35,7 +35,7 @@ InterpolationTest::linearInterpolationTest ()
linear.set_speed (0.5);
linear.set_target_speed (linear.speed());
result = linear.interpolate (0, NUM_SAMPLES, input, output);
- CPPUNIT_ASSERT_EQUAL ((uint32_t)(NUM_SAMPLES * linear.speed()), result);
+ CPPUNIT_ASSERT_EQUAL ((framecnt_t)(NUM_SAMPLES * linear.speed()), result);
for (int i = 0; i < NUM_SAMPLES; i += (INTERVAL / linear.speed() +0.5)) {
CPPUNIT_ASSERT_EQUAL (1.0f, output[i]);
}
@@ -45,14 +45,14 @@ InterpolationTest::linearInterpolationTest ()
linear.set_speed (0.2);
linear.set_target_speed (linear.speed());
result = linear.interpolate (0, NUM_SAMPLES, input, output);
- CPPUNIT_ASSERT_EQUAL ((uint32_t)(NUM_SAMPLES * linear.speed()), result);
+ CPPUNIT_ASSERT_EQUAL ((framecnt_t)(NUM_SAMPLES * linear.speed()), result);
// cout << "\nSpeed: 0.02";
linear.reset();
linear.set_speed (0.02);
linear.set_target_speed (linear.speed());
result = linear.interpolate (0, NUM_SAMPLES, input, output);
- CPPUNIT_ASSERT_EQUAL ((uint32_t)(NUM_SAMPLES * linear.speed()), result);
+ CPPUNIT_ASSERT_EQUAL ((framecnt_t)(NUM_SAMPLES * linear.speed()), result);
/* This one fails due too error accumulation
cout << "\nSpeed: 0.002";
@@ -61,7 +61,7 @@ InterpolationTest::linearInterpolationTest ()
linear.set_target_speed (linear.speed());
result = linear.interpolate (0, NUM_SAMPLES, input, output);
linear.speed();
- CPPUNIT_ASSERT_EQUAL ((nframes_t)(NUM_SAMPLES * linear.speed()), result);
+ CPPUNIT_ASSERT_EQUAL ((framecnt_t)(NUM_SAMPLES * linear.speed()), result);
*/
// cout << "\nSpeed: 2.0";
@@ -69,7 +69,7 @@ InterpolationTest::linearInterpolationTest ()
linear.set_speed (2.0);
linear.set_target_speed (linear.speed());
result = linear.interpolate (0, NUM_SAMPLES / 2, input, output);
- CPPUNIT_ASSERT_EQUAL ((uint32_t)(NUM_SAMPLES / 2 * linear.speed()), result);
+ CPPUNIT_ASSERT_EQUAL ((framecnt_t)(NUM_SAMPLES / 2 * linear.speed()), result);
for (int i = 0; i < NUM_SAMPLES / 2; i += (INTERVAL / linear.speed() +0.5)) {
CPPUNIT_ASSERT_EQUAL (1.0f, output[i]);
}
@@ -78,7 +78,7 @@ InterpolationTest::linearInterpolationTest ()
linear.set_speed (10.0);
linear.set_target_speed (linear.speed());
result = linear.interpolate (0, NUM_SAMPLES / 10, input, output);
- CPPUNIT_ASSERT_EQUAL ((uint32_t)(NUM_SAMPLES / 10 * linear.speed()), result);
+ CPPUNIT_ASSERT_EQUAL ((framecnt_t)(NUM_SAMPLES / 10 * linear.speed()), result);
for (int i = 0; i < NUM_SAMPLES / 10; i += (INTERVAL / linear.speed() +0.5)) {
CPPUNIT_ASSERT_EQUAL (1.0f, output[i]);
}
@@ -92,7 +92,7 @@ InterpolationTest::linearInterpolationTest ()
void
InterpolationTest::cubicInterpolationTest ()
{
- nframes_t result = 0;
+ framecnt_t result = 0;
// cout << "\nCubic Interpolation Test\n";
// cout << "\nSpeed: 1/3";
@@ -108,7 +108,7 @@ InterpolationTest::cubicInterpolationTest ()
cubic.set_speed (1.0);
cubic.set_target_speed (cubic.speed());
result = cubic.interpolate (0, NUM_SAMPLES, input, output);
- CPPUNIT_ASSERT_EQUAL ((uint32_t)(NUM_SAMPLES * cubic.speed()), result);
+ CPPUNIT_ASSERT_EQUAL ((framecnt_t)(NUM_SAMPLES * cubic.speed()), result);
for (int i = 0; i < NUM_SAMPLES; i += INTERVAL) {
CPPUNIT_ASSERT_EQUAL (1.0f, output[i]);
}
@@ -118,7 +118,7 @@ InterpolationTest::cubicInterpolationTest ()
cubic.set_speed (0.5);
cubic.set_target_speed (cubic.speed());
result = cubic.interpolate (0, NUM_SAMPLES, input, output);
- CPPUNIT_ASSERT_EQUAL ((uint32_t)(NUM_SAMPLES * cubic.speed()), result);
+ CPPUNIT_ASSERT_EQUAL ((framecnt_t)(NUM_SAMPLES * cubic.speed()), result);
for (int i = 0; i < NUM_SAMPLES; i += (INTERVAL / cubic.speed() +0.5)) {
CPPUNIT_ASSERT_EQUAL (1.0f, output[i]);
}
@@ -128,14 +128,14 @@ InterpolationTest::cubicInterpolationTest ()
cubic.set_speed (0.2);
cubic.set_target_speed (cubic.speed());
result = cubic.interpolate (0, NUM_SAMPLES, input, output);
- CPPUNIT_ASSERT_EQUAL ((uint32_t)(NUM_SAMPLES * cubic.speed()), result);
+ CPPUNIT_ASSERT_EQUAL ((framecnt_t)(NUM_SAMPLES * cubic.speed()), result);
// cout << "\nSpeed: 0.02";
cubic.reset();
cubic.set_speed (0.02);
cubic.set_target_speed (cubic.speed());
result = cubic.interpolate (0, NUM_SAMPLES, input, output);
- CPPUNIT_ASSERT_EQUAL ((uint32_t)(NUM_SAMPLES * cubic.speed()), result);
+ CPPUNIT_ASSERT_EQUAL ((framecnt_t)(NUM_SAMPLES * cubic.speed()), result);
/* This one fails due too error accumulation
cout << "\nSpeed: 0.002";
@@ -144,7 +144,7 @@ InterpolationTest::cubicInterpolationTest ()
cubic.set_target_speed (cubic.speed());
result = cubic.interpolate (0, NUM_SAMPLES, input, output);
cubic.speed();
- CPPUNIT_ASSERT_EQUAL ((nframes_t)(NUM_SAMPLES * cubic.speed()), result);
+ CPPUNIT_ASSERT_EQUAL ((framecnt_t)(NUM_SAMPLES * cubic.speed()), result);
*/
// cout << "\nSpeed: 2.0";
@@ -152,7 +152,7 @@ InterpolationTest::cubicInterpolationTest ()
cubic.set_speed (2.0);
cubic.set_target_speed (cubic.speed());
result = cubic.interpolate (0, NUM_SAMPLES / 2, input, output);
- CPPUNIT_ASSERT_EQUAL ((uint32_t)(NUM_SAMPLES / 2 * cubic.speed()), result);
+ CPPUNIT_ASSERT_EQUAL ((framecnt_t)(NUM_SAMPLES / 2 * cubic.speed()), result);
for (int i = 0; i < NUM_SAMPLES / 2; i += (INTERVAL / cubic.speed() +0.5)) {
CPPUNIT_ASSERT_EQUAL (1.0f, output[i]);
}
@@ -161,7 +161,7 @@ InterpolationTest::cubicInterpolationTest ()
cubic.set_speed (10.0);
cubic.set_target_speed (cubic.speed());
result = cubic.interpolate (0, NUM_SAMPLES / 10, input, output);
- CPPUNIT_ASSERT_EQUAL ((uint32_t)(NUM_SAMPLES / 10 * cubic.speed()), result);
+ CPPUNIT_ASSERT_EQUAL ((framecnt_t)(NUM_SAMPLES / 10 * cubic.speed()), result);
for (int i = 0; i < NUM_SAMPLES / 10; i += (INTERVAL / cubic.speed() +0.5)) {
CPPUNIT_ASSERT_EQUAL (1.0f, output[i]);
}
diff --git a/libs/ardour/test/midi_clock_slave_test.h b/libs/ardour/test/midi_clock_slave_test.h
index 3b9278b872..7bc73fdab4 100644
--- a/libs/ardour/test/midi_clock_slave_test.h
+++ b/libs/ardour/test/midi_clock_slave_test.h
@@ -61,11 +61,11 @@ class TestSlaveSessionProxy : public ISlaveSessionProxy {
}
// Implementation
- TempoMap& tempo_map () const { return *_tempo_map; }
- nframes_t frame_rate () const { return FRAME_RATE; }
+ TempoMap& tempo_map () const { return *_tempo_map; }
+ framecnt_t frame_rate () const { return FRAME_RATE; }
framepos_t audible_frame () const { return _transport_frame; }
framepos_t transport_frame () const { return _transport_frame; }
- nframes_t frames_since_cycle_start () const { return 0; }
+ pframes_t frames_since_cycle_start () const { return 0; }
framecnt_t frame_time () const { return _frame_time; }
void request_locate (framepos_t frame, bool with_roll = false) {
diff --git a/libs/ardour/thread_buffers.cc b/libs/ardour/thread_buffers.cc
index e319acc329..2436b6d365 100644
--- a/libs/ardour/thread_buffers.cc
+++ b/libs/ardour/thread_buffers.cc
@@ -66,7 +66,7 @@ ThreadBuffers::ensure_buffers (ChanCount howmany)
}
void
-ThreadBuffers::allocate_pan_automation_buffers (nframes_t nframes, uint32_t howmany, bool force)
+ThreadBuffers::allocate_pan_automation_buffers (framecnt_t nframes, uint32_t howmany, bool force)
{
if (!force && howmany <= npan_buffers) {
return;
diff --git a/libs/ardour/ticker.cc b/libs/ardour/ticker.cc
index 98f0632c45..d3499c13be 100644
--- a/libs/ardour/ticker.cc
+++ b/libs/ardour/ticker.cc
@@ -72,8 +72,8 @@ void MidiClockTicker::transport_state_changed()
return;
}
- float speed = _session->transport_speed();
- nframes_t position = _session->transport_frame();
+ float speed = _session->transport_speed();
+ framepos_t position = _session->transport_frame();
#ifdef DEBUG_MIDI_CLOCK
cerr << "Transport state change, speed:" << speed << "position:" << position<< " play loop " << _session->get_play_loop() << endl;
#endif
@@ -108,7 +108,7 @@ void MidiClockTicker::transport_state_changed()
tick(position, *((ARDOUR::BBT_Time *) 0), *((Timecode::Time *)0));
}
-void MidiClockTicker::position_changed(nframes_t position)
+void MidiClockTicker::position_changed (framepos_t position)
{
#ifdef DEBUG_MIDI_CLOCK
cerr << "Position changed:" << position << endl;
@@ -131,18 +131,18 @@ void MidiClockTicker::transport_looped()
// adjust _last_tick, so that the next MIDI clock message is sent
// in due time (and the tick interval is still constant)
- nframes_t elapsed_since_last_tick = loop_location->end() - _last_tick;
+ framecnt_t elapsed_since_last_tick = loop_location->end() - _last_tick;
_last_tick = loop_location->start() - elapsed_since_last_tick;
}
-void MidiClockTicker::tick(const nframes_t& transport_frames, const BBT_Time& /*transport_bbt*/, const Timecode::Time& /*transport_smpt*/)
+void MidiClockTicker::tick (const framepos_t& transport_frames, const BBT_Time& /*transport_bbt*/, const Timecode::Time& /*transport_smpt*/)
{
if (!Config->get_send_midi_clock() || _session == 0 || _session->transport_speed() != 1.0f || _midi_port == 0)
return;
while (true) {
double next_tick = _last_tick + one_ppqn_in_frames(transport_frames);
- nframes_t next_tick_offset = nframes_t(next_tick) - transport_frames;
+ framecnt_t next_tick_offset = framecnt_t(next_tick) - transport_frames;
#ifdef DEBUG_MIDI_CLOCK
cerr << "Transport:" << transport_frames
@@ -162,7 +162,7 @@ void MidiClockTicker::tick(const nframes_t& transport_frames, const BBT_Time& /*
}
}
-double MidiClockTicker::one_ppqn_in_frames(nframes_t transport_position)
+double MidiClockTicker::one_ppqn_in_frames (framepos_t transport_position)
{
const Tempo& current_tempo = _session->tempo_map().tempo_at(transport_position);
const Meter& current_meter = _session->tempo_map().meter_at(transport_position);
@@ -176,7 +176,7 @@ double MidiClockTicker::one_ppqn_in_frames(nframes_t transport_position)
return frames_per_quarter_note / double (_ppqn);
}
-void MidiClockTicker::send_midi_clock_event(nframes_t offset)
+void MidiClockTicker::send_midi_clock_event (framecnt_t offset)
{
if (!_midi_port) {
return;
@@ -190,7 +190,7 @@ void MidiClockTicker::send_midi_clock_event(nframes_t offset)
_midi_port->write(_midi_clock_tick, 1, offset);
}
-void MidiClockTicker::send_start_event(nframes_t offset)
+void MidiClockTicker::send_start_event (framecnt_t offset)
{
if (!_midi_port) {
return;
@@ -200,7 +200,7 @@ void MidiClockTicker::send_start_event(nframes_t offset)
_midi_port->write(_midi_clock_tick, 1, offset);
}
-void MidiClockTicker::send_continue_event(nframes_t offset)
+void MidiClockTicker::send_continue_event (framecnt_t offset)
{
if (!_midi_port) {
return;
@@ -210,7 +210,7 @@ void MidiClockTicker::send_continue_event(nframes_t offset)
_midi_port->write(_midi_clock_tick, 1, offset);
}
-void MidiClockTicker::send_stop_event(nframes_t offset)
+void MidiClockTicker::send_stop_event (framecnt_t offset)
{
if (!_midi_port) {
return;
diff --git a/libs/ardour/track.cc b/libs/ardour/track.cc
index f480638d13..6a39553cf7 100644
--- a/libs/ardour/track.cc
+++ b/libs/ardour/track.cc
@@ -85,11 +85,11 @@ Track::toggle_monitor_input ()
}
}
-ARDOUR::nframes_t
+ARDOUR::framecnt_t
Track::update_total_latency ()
{
- nframes_t old = _output->effective_latency();
- nframes_t own_latency = _output->user_latency();
+ framecnt_t old = _output->effective_latency();
+ framecnt_t own_latency = _output->user_latency();
for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) {
if ((*i)->active ()) {
@@ -221,7 +221,7 @@ Track::set_name (const string& str)
}
void
-Track::set_latency_delay (nframes_t longest_session_latency)
+Track::set_latency_delay (framecnt_t longest_session_latency)
{
Route::set_latency_delay (longest_session_latency);
_diskstream->set_roll_delay (_roll_delay);
@@ -236,7 +236,7 @@ Track::zero_diskstream_id_in_xml (XMLNode& node)
}
int
-Track::no_roll (nframes_t nframes, framepos_t start_frame, framepos_t end_frame,
+Track::no_roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame,
bool session_state_changing, bool can_record, bool /*rec_monitors_input*/)
{
Glib::RWLock::ReaderLock lm (_processor_lock, Glib::TRY_LOCK);
@@ -336,7 +336,7 @@ Track::no_roll (nframes_t nframes, framepos_t start_frame, framepos_t end_frame,
}
int
-Track::silent_roll (nframes_t nframes, framepos_t /*start_frame*/, framepos_t /*end_frame*/,
+Track::silent_roll (pframes_t nframes, framepos_t /*start_frame*/, framepos_t /*end_frame*/,
bool can_record, bool rec_monitors_input, bool& need_butler)
{
Glib::RWLock::ReaderLock lm (_processor_lock, Glib::TRY_LOCK);
@@ -662,7 +662,7 @@ Track::diskstream_id () const
}
void
-Track::set_block_size (nframes_t n)
+Track::set_block_size (pframes_t n)
{
Route::set_block_size (n);
_diskstream->set_block_size (n);
diff --git a/libs/ardour/transient_detector.cc b/libs/ardour/transient_detector.cc
index 6573262393..27abf9a0b3 100644
--- a/libs/ardour/transient_detector.cc
+++ b/libs/ardour/transient_detector.cc
@@ -49,13 +49,13 @@ TransientDetector::use_features (Plugin::FeatureSet& features, ostream* out)
for (Plugin::FeatureList::const_iterator f = fl.begin(); f != fl.end(); ++f) {
- if ((*f).hasTimestamp) {
+ if (f->hasTimestamp) {
if (out) {
(*out) << (*f).timestamp.toString() << endl;
}
- current_results->push_back (RealTime::realTime2Frame ((*f).timestamp, (nframes_t) floor(sample_rate)));
+ current_results->push_back (RealTime::realTime2Frame (f->timestamp, (framecnt_t) floor(sample_rate)));
}
}
diff --git a/libs/ardour/utils.cc b/libs/ardour/utils.cc
index 9698486e90..64e06b6f12 100644
--- a/libs/ardour/utils.cc
+++ b/libs/ardour/utils.cc
@@ -341,7 +341,7 @@ CFStringRefToStdString(CFStringRef stringRef)
#endif // __APPLE__
void
-compute_equal_power_fades (nframes_t nframes, float* in, float* out)
+compute_equal_power_fades (framecnt_t nframes, float* in, float* out)
{
double step;
@@ -349,7 +349,7 @@ compute_equal_power_fades (nframes_t nframes, float* in, float* out)
in[0] = 0.0f;
- for (nframes_t i = 1; i < nframes - 1; ++i) {
+ for (framecnt_t i = 1; i < nframes - 1; ++i) {
in[i] = in[i-1] + step;
}
@@ -358,7 +358,7 @@ compute_equal_power_fades (nframes_t nframes, float* in, float* out)
const float pan_law_attenuation = -3.0f;
const float scale = 2.0f - 4.0f * powf (10.0f,pan_law_attenuation/20.0f);
- for (nframes_t n = 0; n < nframes; ++n) {
+ for (framecnt_t n = 0; n < nframes; ++n) {
float inVal = in[n];
float outVal = 1 - inVal;
out[n] = outVal * (scale * outVal + 1.0f - scale);
diff --git a/libs/ardour/vbap.cc b/libs/ardour/vbap.cc
index 4e54327acf..d727293b05 100644
--- a/libs/ardour/vbap.cc
+++ b/libs/ardour/vbap.cc
@@ -141,7 +141,7 @@ VBAPanner::compute_gains (double gains[3], int speaker_ids[3], int azi, int ele)
}
void
-VBAPanner::do_distribute (AudioBuffer& srcbuf, BufferSet& obufs, gain_t gain_coefficient, nframes_t nframes)
+VBAPanner::do_distribute (AudioBuffer& srcbuf, BufferSet& obufs, gain_t gain_coefficient, pframes_t nframes)
{
if (_muted) {
return;
@@ -179,7 +179,7 @@ VBAPanner::do_distribute (AudioBuffer& srcbuf, BufferSet& obufs, gain_t gain_coe
for (int o = 0; o < 3; ++o) {
if (desired_outputs[o] != -1) {
- nframes_t n = 0;
+ pframes_t n = 0;
/* XXX TODO: interpolate across changes in gain and/or outputs
*/
@@ -209,7 +209,7 @@ VBAPanner::do_distribute (AudioBuffer& srcbuf, BufferSet& obufs, gain_t gain_coe
void
VBAPanner::do_distribute_automated (AudioBuffer& src, BufferSet& obufs,
- nframes_t start, nframes_t end, nframes_t nframes, pan_t** buffers)
+ framepos_t start, framepos_t end, pframes_t nframes, pan_t** buffers)
{
}
diff --git a/libs/ardour/vst_plugin.cc b/libs/ardour/vst_plugin.cc
index d805a2feec..ee7c165fb3 100644
--- a/libs/ardour/vst_plugin.cc
+++ b/libs/ardour/vst_plugin.cc
@@ -107,7 +107,7 @@ VSTPlugin::~VSTPlugin ()
}
int
-VSTPlugin::set_block_size (nframes_t nframes)
+VSTPlugin::set_block_size (pframes_t nframes)
{
deactivate ();
_plugin->dispatcher (_plugin, effSetBlockSize, 0, nframes, NULL, 0.0f);
@@ -357,7 +357,7 @@ VSTPlugin::describe_parameter (Evoral::Parameter param)
return name;
}
-nframes_t
+framecnt_t
VSTPlugin::signal_latency () const
{
if (_user_latency) {
@@ -365,7 +365,7 @@ VSTPlugin::signal_latency () const
}
#ifdef VESTIGE_HEADER
- return *((nframes_t *) (((char *) &_plugin->flags) + 12)); /* initialDelay */
+ return *((framecnt_t *) (((char *) &_plugin->flags) + 12)); /* initialDelay */
#else
return _plugin->initial_delay;
#endif
@@ -386,7 +386,7 @@ VSTPlugin::automatable () const
int
VSTPlugin::connect_and_run (BufferSet& bufs,
ChanMapping in_map, ChanMapping out_map,
- nframes_t nframes, nframes_t offset)
+ pframes_t nframes, framecnt_t offset)
{
float *ins[_plugin->numInputs];
float *outs[_plugin->numOutputs];
diff --git a/libs/audiographer/audiographer/general/chunker.h b/libs/audiographer/audiographer/general/chunker.h
index 38345acb1f..397d67ffc5 100644
--- a/libs/audiographer/audiographer/general/chunker.h
+++ b/libs/audiographer/audiographer/general/chunker.h
@@ -20,7 +20,7 @@ class Chunker
/** Constructs a new Chunker with a constant chunk size.
* \n NOT RT safe
*/
- Chunker (nframes_t chunk_size)
+ Chunker (framecnt_t chunk_size)
: chunk_size (chunk_size)
, position (0)
{
@@ -41,12 +41,12 @@ class Chunker
{
check_flags (*this, context);
- nframes_t frames_left = context.frames();
- nframes_t input_position = 0;
+ framecnt_t frames_left = context.frames();
+ framecnt_t input_position = 0;
while (position + frames_left >= chunk_size) {
// Copy from context to buffer
- nframes_t const frames_to_copy = chunk_size - position;
+ framecnt_t const frames_to_copy = chunk_size - position;
TypeUtils<T>::copy (&context.data()[input_position], &buffer[position], frames_to_copy);
// Output whole buffer
@@ -73,8 +73,8 @@ class Chunker
using Sink<T>::process;
private:
- nframes_t chunk_size;
- nframes_t position;
+ framecnt_t chunk_size;
+ framecnt_t position;
T * buffer;
};
diff --git a/libs/audiographer/audiographer/general/deinterleaver.h b/libs/audiographer/audiographer/general/deinterleaver.h
index 2a6ad64ef2..96d77b1f7b 100644
--- a/libs/audiographer/audiographer/general/deinterleaver.h
+++ b/libs/audiographer/audiographer/general/deinterleaver.h
@@ -34,7 +34,7 @@ class DeInterleaver
typedef boost::shared_ptr<Source<T> > SourcePtr;
/// Inits the deinterleaver. Must be called before using. \n Not RT safe
- void init (unsigned int num_channels, nframes_t max_frames_per_channel)
+ void init (unsigned int num_channels, framecnt_t max_frames_per_channel)
{
reset();
channels = num_channels;
@@ -59,10 +59,10 @@ class DeInterleaver
/// Deinterleaves data and outputs it to the outputs. \n RT safe
void process (ProcessContext<T> const & c)
{
- nframes_t frames = c.frames();
+ framecnt_t frames = c.frames();
T const * data = c.data();
- nframes_t const frames_per_channel = frames / channels;
+ framecnt_t const frames_per_channel = frames / channels;
if (throw_level (ThrowProcess) && c.channels() != channels) {
throw Exception (*this, "wrong amount of channels given to process()");
@@ -100,7 +100,7 @@ class DeInterleaver
std::vector<OutputPtr> outputs;
unsigned int channels;
- nframes_t max_frames;
+ framecnt_t max_frames;
T * buffer;
};
diff --git a/libs/audiographer/audiographer/general/interleaver.h b/libs/audiographer/audiographer/general/interleaver.h
index 98a71f3afd..924c1d04a5 100644
--- a/libs/audiographer/audiographer/general/interleaver.h
+++ b/libs/audiographer/audiographer/general/interleaver.h
@@ -31,7 +31,7 @@ class Interleaver
~Interleaver() { reset(); }
/// Inits the interleaver. Must be called before using. \n Not RT safe
- void init (unsigned int num_channels, nframes_t max_frames_per_channel)
+ void init (unsigned int num_channels, framecnt_t max_frames_per_channel)
{
reset();
channels = num_channels;
@@ -78,11 +78,11 @@ class Interleaver
using Sink<T>::process;
- nframes_t frames() { return frames_written; }
+ framecnt_t frames() { return frames_written; }
void reset() { frames_written = 0; }
private:
- nframes_t frames_written;
+ framecnt_t frames_written;
Interleaver & parent;
unsigned int channel;
};
@@ -115,7 +115,7 @@ class Interleaver
buffer[channel + (channels * i)] = c.data()[i];
}
- nframes_t const ready_frames = ready_to_output();
+ framecnt_t const ready_frames = ready_to_output();
if (ready_frames) {
ProcessContext<T> c_out (c, buffer, ready_frames, channels);
ListedSource<T>::output (c_out);
@@ -123,13 +123,13 @@ class Interleaver
}
}
- nframes_t ready_to_output()
+ framecnt_t ready_to_output()
{
- nframes_t ready_frames = inputs[0]->frames();
+ framecnt_t ready_frames = inputs[0]->frames();
if (!ready_frames) { return 0; }
for (unsigned int i = 1; i < channels; ++i) {
- nframes_t const frames = inputs[i]->frames();
+ framecnt_t const frames = inputs[i]->frames();
if (!frames) { return 0; }
if (throw_level (ThrowProcess) && frames != ready_frames) {
init (channels, max_frames);
@@ -143,7 +143,7 @@ class Interleaver
std::vector<InputPtr> inputs;
unsigned int channels;
- nframes_t max_frames;
+ framecnt_t max_frames;
T * buffer;
};
diff --git a/libs/audiographer/audiographer/general/normalizer.h b/libs/audiographer/audiographer/general/normalizer.h
index 205f6e70e5..48d0fe8b0b 100644
--- a/libs/audiographer/audiographer/general/normalizer.h
+++ b/libs/audiographer/audiographer/general/normalizer.h
@@ -48,7 +48,7 @@ class Normalizer
* non-const ProcessContexts are given to \a process() .
* \n Not RT safe
*/
- void alloc_buffer(nframes_t frames)
+ void alloc_buffer(framecnt_t frames)
{
delete [] buffer;
buffer = new float[frames];
@@ -86,7 +86,7 @@ class Normalizer
float gain;
float * buffer;
- nframes_t buffer_size;
+ framecnt_t buffer_size;
};
diff --git a/libs/audiographer/audiographer/general/sample_format_converter.h b/libs/audiographer/audiographer/general/sample_format_converter.h
index 8dda57c4cc..a200f37825 100644
--- a/libs/audiographer/audiographer/general/sample_format_converter.h
+++ b/libs/audiographer/audiographer/general/sample_format_converter.h
@@ -40,7 +40,7 @@ class SampleFormatConverter
* \note If the non-const version of process() is used with floats,
* there is no need to call this function.
*/
- void init (nframes_t max_frames, int type, int data_width);
+ void init (framecnt_t max_frames, int type, int data_width);
/// Set whether or not clipping to [-1.0, 1.0] should occur when TOut = float. Clipping is off by default
void set_clip_floats (bool yn) { clip_floats = yn; }
@@ -53,12 +53,12 @@ class SampleFormatConverter
private:
void reset();
- void init_common(nframes_t max_frames); // not-template-specialized part of init
- void check_frame_and_channel_count(nframes_t frames, ChannelCount channels_);
+ void init_common (framecnt_t max_frames); // not-template-specialized part of init
+ void check_frame_and_channel_count (framecnt_t frames, ChannelCount channels_);
ChannelCount channels;
GDither dither;
- nframes_t data_out_size;
+ framecnt_t data_out_size;
TOut * data_out;
bool clip_floats;
diff --git a/libs/audiographer/audiographer/general/silence_trimmer.h b/libs/audiographer/audiographer/general/silence_trimmer.h
index 5256d4a8cc..8782a25d4b 100644
--- a/libs/audiographer/audiographer/general/silence_trimmer.h
+++ b/libs/audiographer/audiographer/general/silence_trimmer.h
@@ -22,7 +22,7 @@ class SilenceTrimmer
public:
/// Constructor, \see reset() \n Not RT safe
- SilenceTrimmer(nframes_t silence_buffer_size_ = 1024)
+ SilenceTrimmer(framecnt_t silence_buffer_size_ = 1024)
: silence_buffer_size (0)
, silence_buffer (0)
{
@@ -40,7 +40,7 @@ class SilenceTrimmer
* This also defines the maximum length of output process context
* which can be output during long intermediate silence.
*/
- void reset (nframes_t silence_buffer_size_ = 1024)
+ void reset (framecnt_t silence_buffer_size_ = 1024)
{
if (throw_level (ThrowObject) && silence_buffer_size_ == 0) {
throw Exception (*this,
@@ -68,7 +68,7 @@ class SilenceTrimmer
* Needs to be called before starting processing.
* \n RT safe
*/
- void add_silence_to_beginning (nframes_t frames_per_channel)
+ void add_silence_to_beginning (framecnt_t frames_per_channel)
{
if (throw_level (ThrowObject) && !in_beginning) {
throw Exception(*this, "Tried to add silence to beginning after already outputting data");
@@ -80,7 +80,7 @@ class SilenceTrimmer
* Needs to be called before end is reached.
* \n RT safe
*/
- void add_silence_to_end (nframes_t frames_per_channel)
+ void add_silence_to_end (framecnt_t frames_per_channel)
{
if (throw_level (ThrowObject) && in_end) {
throw Exception(*this, "Tried to add silence to end after already reaching end");
@@ -131,7 +131,7 @@ class SilenceTrimmer
}
in_end = c.has_flag (ProcessContext<T>::EndOfInput);
- nframes_t frame_index = 0;
+ framecnt_t frame_index = 0;
if (in_beginning) {
@@ -223,9 +223,9 @@ class SilenceTrimmer
private:
- bool find_first_non_zero_sample (ProcessContext<T> const & c, nframes_t & result_frame)
+ bool find_first_non_zero_sample (ProcessContext<T> const & c, framecnt_t & result_frame)
{
- for (nframes_t i = 0; i < c.frames(); ++i) {
+ for (framecnt_t i = 0; i < c.frames(); ++i) {
if (c.data()[i] != static_cast<T>(0.0)) {
result_frame = i;
// Round down to nearest interleaved "frame" beginning
@@ -236,13 +236,13 @@ class SilenceTrimmer
return false;
}
- void output_silence_frames (ProcessContext<T> const & c, nframes_t & total_frames, bool adding_to_end = false)
+ void output_silence_frames (ProcessContext<T> const & c, framecnt_t & total_frames, bool adding_to_end = false)
{
bool end_of_input = c.has_flag (ProcessContext<T>::EndOfInput);
c.remove_flag (ProcessContext<T>::EndOfInput);
while (total_frames > 0) {
- nframes_t frames = std::min (silence_buffer_size, total_frames);
+ framecnt_t frames = std::min (silence_buffer_size, total_frames);
if (max_output_frames) {
frames = std::min (frames, max_output_frames);
}
@@ -262,20 +262,20 @@ class SilenceTrimmer
}
- bool in_beginning;
- bool in_end;
+ bool in_beginning;
+ bool in_end;
- bool trim_beginning;
- bool trim_end;
+ bool trim_beginning;
+ bool trim_end;
- nframes_t silence_frames;
- nframes_t max_output_frames;
+ framecnt_t silence_frames;
+ framecnt_t max_output_frames;
- nframes_t add_to_beginning;
- nframes_t add_to_end;
+ framecnt_t add_to_beginning;
+ framecnt_t add_to_end;
- nframes_t silence_buffer_size;
- T * silence_buffer;
+ framecnt_t silence_buffer_size;
+ T * silence_buffer;
};
} // namespace
diff --git a/libs/audiographer/audiographer/general/sr_converter.h b/libs/audiographer/audiographer/general/sr_converter.h
index f28c8f6953..a3298bbf97 100644
--- a/libs/audiographer/audiographer/general/sr_converter.h
+++ b/libs/audiographer/audiographer/general/sr_converter.h
@@ -25,10 +25,10 @@ class SampleRateConverter
~SampleRateConverter ();
/// Init converter \n Not RT safe
- void init (nframes_t in_rate, nframes_t out_rate, int quality = 0);
+ void init (framecnt_t in_rate, framecnt_t out_rate, int quality = 0);
/// Returns max amount of frames that will be output \n RT safe
- nframes_t allocate_buffers (nframes_t max_frames);
+ framecnt_t allocate_buffers (framecnt_t max_frames);
/** Does sample rate conversion.
* Note that outpt size may vary a lot.
@@ -46,14 +46,14 @@ class SampleRateConverter
bool active;
uint32_t channels;
- nframes_t max_frames_in;
+ framecnt_t max_frames_in;
float * leftover_data;
- nframes_t leftover_frames;
- nframes_t max_leftover_frames;
+ framecnt_t leftover_frames;
+ framecnt_t max_leftover_frames;
float * data_out;
- nframes_t data_out_size;
+ framecnt_t data_out_size;
SRC_DATA src_data;
SRC_STATE* src_state;
diff --git a/libs/audiographer/audiographer/process_context.h b/libs/audiographer/audiographer/process_context.h
index 3ad84d7708..843c09b618 100644
--- a/libs/audiographer/audiographer/process_context.h
+++ b/libs/audiographer/audiographer/process_context.h
@@ -37,7 +37,7 @@ public:
public:
/// Basic constructor with data, frame and channel count
- ProcessContext (T * data, nframes_t frames, ChannelCount channels)
+ ProcessContext (T * data, framecnt_t frames, ChannelCount channels)
: _data (data), _frames (frames), _channels (channels)
{ validate_data(); }
@@ -48,13 +48,13 @@ public:
/// "Copy constructor" with unique data, frame and channel count, but copies flags
template<typename Y>
- ProcessContext (ProcessContext<Y> const & other, T * data, nframes_t frames, ChannelCount channels)
+ ProcessContext (ProcessContext<Y> const & other, T * data, framecnt_t frames, ChannelCount channels)
: _data (data), _frames (frames), _channels (channels), _flags (other.flags())
{ validate_data(); }
/// "Copy constructor" with unique data and frame count, but copies channel count and flags
template<typename Y>
- ProcessContext (ProcessContext<Y> const & other, T * data, nframes_t frames)
+ ProcessContext (ProcessContext<Y> const & other, T * data, framecnt_t frames)
: _data (data), _frames (frames), _channels (other.channels()), _flags (other.flags())
{ validate_data(); }
@@ -65,7 +65,7 @@ public:
{ /* No need to validate data */ }
/// Make new Context out of the beginning of this context
- ProcessContext beginning (nframes_t frames)
+ ProcessContext beginning (framecnt_t frames)
{
if (throw_level (ThrowProcess) && frames > _frames) {
throw Exception (*this, boost::str (boost::format
@@ -84,7 +84,7 @@ public:
inline T * data() { return _data; }
/// \a frames tells how many frames the array pointed by data contains
- inline nframes_t const & frames() const { return _frames; }
+ inline framecnt_t const & frames() const { return _frames; }
/** \a channels tells how many interleaved channels \a data contains
* If \a channels is greater than 1, each channel contains \a frames / \a channels frames of data
@@ -92,7 +92,7 @@ public:
inline ChannelCount const & channels() const { return _channels; }
/// Returns the amount of frames per channel
- inline nframes_t frames_per_channel() const { return _frames / _channels; }
+ inline framecnt_t frames_per_channel() const { return _frames / _channels; }
/* Flags */
@@ -103,7 +103,7 @@ public:
protected:
T * const _data;
- nframes_t _frames;
+ framecnt_t _frames;
ChannelCount _channels;
mutable FlagField _flags;
@@ -124,11 +124,11 @@ template <typename T = DefaultSampleType>
struct AllocatingProcessContext : public ProcessContext<T>
{
/// Allocates uninitialized memory
- AllocatingProcessContext (nframes_t frames, ChannelCount channels)
+ AllocatingProcessContext (framecnt_t frames, ChannelCount channels)
: ProcessContext<T> (new T[frames], frames, channels) {}
/// Allocates and copies data from raw buffer
- AllocatingProcessContext (T const * data, nframes_t frames, ChannelCount channels)
+ AllocatingProcessContext (T const * data, framecnt_t frames, ChannelCount channels)
: ProcessContext<T> (new T[frames], frames, channels)
{ TypeUtils<float>::copy (data, ProcessContext<T>::_data, frames); }
@@ -139,12 +139,12 @@ struct AllocatingProcessContext : public ProcessContext<T>
/// "Copy constructor" with uninitialized data, unique frame and channel count, but copies flags
template<typename Y>
- AllocatingProcessContext (ProcessContext<Y> const & other, nframes_t frames, ChannelCount channels)
+ AllocatingProcessContext (ProcessContext<Y> const & other, framecnt_t frames, ChannelCount channels)
: ProcessContext<T> (other, new T[frames], frames, channels) {}
/// "Copy constructor" with uninitialized data, unique frame count, but copies channel count and flags
template<typename Y>
- AllocatingProcessContext (ProcessContext<Y> const & other, nframes_t frames)
+ AllocatingProcessContext (ProcessContext<Y> const & other, framecnt_t frames)
: ProcessContext<T> (other, new T[frames], frames, other.channels()) {}
/// "Copy constructor" uninitialized data, that copies frame and channel count + flags
@@ -161,7 +161,7 @@ class ConstProcessContext
{
public:
/// Basic constructor with data, frame and channel count
- ConstProcessContext (T const * data, nframes_t frames, ChannelCount channels)
+ ConstProcessContext (T const * data, framecnt_t frames, ChannelCount channels)
: context (const_cast<T *>(data), frames, channels) {}
/// Copy constructor from const ProcessContext
@@ -170,12 +170,12 @@ class ConstProcessContext
/// "Copy constructor", with unique data, frame and channel count, but copies flags
template<typename ProcessContext>
- ConstProcessContext (ProcessContext const & other, T const * data, nframes_t frames, ChannelCount channels)
+ ConstProcessContext (ProcessContext const & other, T const * data, framecnt_t frames, ChannelCount channels)
: context (other, const_cast<T *>(data), frames, channels) {}
/// "Copy constructor", with unique data and frame count, but copies channel count and flags
template<typename ProcessContext>
- ConstProcessContext (ProcessContext const & other, T const * data, nframes_t frames)
+ ConstProcessContext (ProcessContext const & other, T const * data, framecnt_t frames)
: context (other, const_cast<T *>(data), frames) {}
/// "Copy constructor", with unique data, but copies frame and channel count + flags
diff --git a/libs/audiographer/audiographer/sndfile/sndfile.h b/libs/audiographer/audiographer/sndfile/sndfile.h
index 4db2298a90..939e5f8a2c 100644
--- a/libs/audiographer/audiographer/sndfile/sndfile.h
+++ b/libs/audiographer/audiographer/sndfile/sndfile.h
@@ -16,7 +16,7 @@ class Sndfile : public SndfileWriter<T>, public SndfileReader<T>
public:
Sndfile (std::string const & filename, SndfileBase::Mode mode = SndfileBase::ReadWrite, int format = 0,
- ChannelCount channels = 0, nframes_t samplerate = 0)
+ ChannelCount channels = 0, framecnt_t samplerate = 0)
: SndfileHandle (filename, mode, format, channels, samplerate)
{}
@@ -27,4 +27,4 @@ class Sndfile : public SndfileWriter<T>, public SndfileReader<T>
} // namespace
-#endif // AUDIOGRAPHER_SNDFILE_H \ No newline at end of file
+#endif // AUDIOGRAPHER_SNDFILE_H
diff --git a/libs/audiographer/audiographer/sndfile/sndfile_reader.h b/libs/audiographer/audiographer/sndfile/sndfile_reader.h
index f5f7adcb3a..f7a04f22d6 100644
--- a/libs/audiographer/audiographer/sndfile/sndfile_reader.h
+++ b/libs/audiographer/audiographer/sndfile/sndfile_reader.h
@@ -29,7 +29,7 @@ class SndfileReader
* Note that the data read is output to the outputs, as well as read into the context
* \return number of frames read
*/
- nframes_t read (ProcessContext<T> & context)
+ framecnt_t read (ProcessContext<T> & context)
{
if (throw_level (ThrowStrict) && context.channels() != channels() ) {
throw Exception (*this, boost::str (boost::format
@@ -37,7 +37,7 @@ class SndfileReader
% context.channels() % channels()));
}
- nframes_t frames_read = SndfileHandle::read (context.data(), context.frames());
+ framecnt_t const frames_read = SndfileHandle::read (context.data(), context.frames());
ProcessContext<T> c_out = context.beginning (frames_read);
if (frames_read < context.frames()) {
@@ -54,4 +54,4 @@ class SndfileReader
} // namespace
-#endif // AUDIOGRAPHER_SNDFILE_READER_H \ No newline at end of file
+#endif // AUDIOGRAPHER_SNDFILE_READER_H
diff --git a/libs/audiographer/audiographer/sndfile/sndfile_writer.h b/libs/audiographer/audiographer/sndfile/sndfile_writer.h
index a6f338487a..7b3c2968ff 100644
--- a/libs/audiographer/audiographer/sndfile/sndfile_writer.h
+++ b/libs/audiographer/audiographer/sndfile/sndfile_writer.h
@@ -27,7 +27,7 @@ class SndfileWriter
, public FlagDebuggable<>
{
public:
- SndfileWriter (std::string const & path, int format, ChannelCount channels, nframes_t samplerate, boost::shared_ptr<BroadcastInfo> broadcast_info)
+ SndfileWriter (std::string const & path, int format, ChannelCount channels, framecnt_t samplerate, boost::shared_ptr<BroadcastInfo> broadcast_info)
: SndfileHandle (path, Write, format, channels, samplerate)
, path (path)
{
@@ -54,7 +54,7 @@ class SndfileWriter
% c.channels() % channels()));
}
- nframes_t written = write (c.data(), c.frames());
+ framecnt_t const written = write (c.data(), c.frames());
if (throw_level (ThrowProcess) && written != c.frames()) {
throw Exception (*this, boost::str (boost::format
("Could not write data to output file (%1%)")
diff --git a/libs/audiographer/audiographer/sndfile/tmp_file.h b/libs/audiographer/audiographer/sndfile/tmp_file.h
index e312007247..a4e7b2679a 100644
--- a/libs/audiographer/audiographer/sndfile/tmp_file.h
+++ b/libs/audiographer/audiographer/sndfile/tmp_file.h
@@ -13,7 +13,7 @@ class TmpFile : public SndfileWriter<T>, public SndfileReader<T>
{
public:
- TmpFile (int format, ChannelCount channels, nframes_t samplerate)
+ TmpFile (int format, ChannelCount channels, framecnt_t samplerate)
: SndfileHandle (fileno (tmpfile()), true, SndfileBase::ReadWrite, format, channels, samplerate)
{}
@@ -24,4 +24,4 @@ class TmpFile : public SndfileWriter<T>, public SndfileReader<T>
} // namespace
-#endif // AUDIOGRAPHER_TMP_FILE_H \ No newline at end of file
+#endif // AUDIOGRAPHER_TMP_FILE_H
diff --git a/libs/audiographer/audiographer/type_utils.h b/libs/audiographer/audiographer/type_utils.h
index d17f3634ed..360168d55d 100644
--- a/libs/audiographer/audiographer/type_utils.h
+++ b/libs/audiographer/audiographer/type_utils.h
@@ -16,11 +16,11 @@ class TypeUtilsBase
protected:
template<typename T, bool b>
- static void do_zero_fill(T * buffer, nframes_t frames, const boost::integral_constant<bool, b>&)
+ static void do_zero_fill(T * buffer, framecnt_t frames, const boost::integral_constant<bool, b>&)
{ std::uninitialized_fill_n (buffer, frames, T()); }
template<typename T>
- static void do_zero_fill(T * buffer, nframes_t frames, const boost::true_type&)
+ static void do_zero_fill(T * buffer, framecnt_t frames, const boost::true_type&)
{ memset (buffer, 0, frames * sizeof(T)); }
};
@@ -39,21 +39,21 @@ class TypeUtils : private TypeUtilsBase
* if T is not a floating point or signed integer type
* \n RT safe
*/
- inline static void zero_fill (T * buffer, nframes_t frames)
+ inline static void zero_fill (T * buffer, framecnt_t frames)
{ do_zero_fill(buffer, frames, zero_fillable()); }
/** Copies \a frames frames of data from \a source to \a destination
* The source and destination may NOT overlap.
* \n RT safe
*/
- inline static void copy (T const * source, T * destination, nframes_t frames)
+ inline static void copy (T const * source, T * destination, framecnt_t frames)
{ std::uninitialized_copy (source, &source[frames], destination); }
/** Moves \a frames frames of data from \a source to \a destination
* The source and destination may overlap in any way.
* \n RT safe
*/
- inline static void move (T const * source, T * destination, nframes_t frames)
+ inline static void move (T const * source, T * destination, framecnt_t frames)
{
if (destination < source) {
std::copy (source, &source[frames], destination);
diff --git a/libs/audiographer/audiographer/types.h b/libs/audiographer/audiographer/types.h
index 558bab302f..ae98cde7bd 100644
--- a/libs/audiographer/audiographer/types.h
+++ b/libs/audiographer/audiographer/types.h
@@ -5,11 +5,13 @@
namespace AudioGrapher {
-typedef int64_t nframes_t;
+/* XXX: copied from libardour */
+typedef int64_t framecnt_t;
+
typedef uint8_t ChannelCount;
typedef float DefaultSampleType;
} // namespace
-#endif // AUDIOGRAPHER_TYPES_H \ No newline at end of file
+#endif // AUDIOGRAPHER_TYPES_H
diff --git a/libs/audiographer/src/general/sample_format_converter.cc b/libs/audiographer/src/general/sample_format_converter.cc
index a827f67078..a1aa4d88a9 100644
--- a/libs/audiographer/src/general/sample_format_converter.cc
+++ b/libs/audiographer/src/general/sample_format_converter.cc
@@ -21,7 +21,7 @@ SampleFormatConverter<TOut>::SampleFormatConverter (ChannelCount channels) :
template <>
void
-SampleFormatConverter<float>::init (nframes_t max_frames, int /* type */, int data_width)
+SampleFormatConverter<float>::init (framecnt_t max_frames, int /* type */, int data_width)
{
if (throw_level (ThrowObject) && data_width != 32) {
throw Exception (*this, "Unsupported data width");
@@ -32,7 +32,7 @@ SampleFormatConverter<float>::init (nframes_t max_frames, int /* type */, int da
template <>
void
-SampleFormatConverter<int32_t>::init (nframes_t max_frames, int type, int data_width)
+SampleFormatConverter<int32_t>::init (framecnt_t max_frames, int type, int data_width)
{
if(throw_level (ThrowObject) && data_width < 24) {
throw Exception (*this, "Trying to use SampleFormatConverter<int32_t> for data widths < 24");
@@ -51,7 +51,7 @@ SampleFormatConverter<int32_t>::init (nframes_t max_frames, int type, int data_w
template <>
void
-SampleFormatConverter<int16_t>::init (nframes_t max_frames, int type, int data_width)
+SampleFormatConverter<int16_t>::init (framecnt_t max_frames, int type, int data_width)
{
if (throw_level (ThrowObject) && data_width != 16) {
throw Exception (*this, "Unsupported data width");
@@ -62,7 +62,7 @@ SampleFormatConverter<int16_t>::init (nframes_t max_frames, int type, int data_w
template <>
void
-SampleFormatConverter<uint8_t>::init (nframes_t max_frames, int type, int data_width)
+SampleFormatConverter<uint8_t>::init (framecnt_t max_frames, int type, int data_width)
{
if (throw_level (ThrowObject) && data_width != 8) {
throw Exception (*this, "Unsupported data width");
@@ -73,7 +73,7 @@ SampleFormatConverter<uint8_t>::init (nframes_t max_frames, int type, int data_w
template <typename TOut>
void
-SampleFormatConverter<TOut>::init_common (nframes_t max_frames )
+SampleFormatConverter<TOut>::init_common (framecnt_t max_frames)
{
reset();
if (max_frames > data_out_size) {
@@ -141,11 +141,11 @@ template<>
void
SampleFormatConverter<float>::process (ProcessContext<float> & c_in)
{
- nframes_t frames = c_in.frames();
+ framecnt_t frames = c_in.frames();
float * data = c_in.data();
if (clip_floats) {
- for (nframes_t x = 0; x < frames; ++x) {
+ for (framecnt_t x = 0; x < frames; ++x) {
if (data[x] > 1.0f) {
data[x] = 1.0f;
} else if (data[x] < -1.0f) {
@@ -172,7 +172,7 @@ SampleFormatConverter<float>::process (ProcessContext<float> const & c_in)
template<typename TOut>
void
-SampleFormatConverter<TOut>::check_frame_and_channel_count(nframes_t frames, ChannelCount channels_)
+SampleFormatConverter<TOut>::check_frame_and_channel_count (framecnt_t frames, ChannelCount channels_)
{
if (throw_level (ThrowStrict) && channels_ != channels) {
throw Exception (*this, boost::str (boost::format
diff --git a/libs/audiographer/src/general/sr_converter.cc b/libs/audiographer/src/general/sr_converter.cc
index 1fbed12128..5661f60394 100644
--- a/libs/audiographer/src/general/sr_converter.cc
+++ b/libs/audiographer/src/general/sr_converter.cc
@@ -26,7 +26,7 @@ SampleRateConverter::SampleRateConverter (uint32_t channels)
}
void
-SampleRateConverter::init (nframes_t in_rate, nframes_t out_rate, int quality)
+SampleRateConverter::init (framecnt_t in_rate, framecnt_t out_rate, int quality)
{
reset();
@@ -52,12 +52,12 @@ SampleRateConverter::~SampleRateConverter ()
reset();
}
-nframes_t
-SampleRateConverter::allocate_buffers (nframes_t max_frames)
+framecnt_t
+SampleRateConverter::allocate_buffers (framecnt_t max_frames)
{
if (!active) { return max_frames; }
- nframes_t max_frames_out = (nframes_t) ceil (max_frames * src_data.src_ratio);
+ framecnt_t max_frames_out = (framecnt_t) ceil (max_frames * src_data.src_ratio);
if (data_out_size < max_frames_out) {
delete[] data_out;
@@ -87,7 +87,7 @@ SampleRateConverter::process (ProcessContext<float> const & c)
return;
}
- nframes_t frames = c.frames();
+ framecnt_t frames = c.frames();
float * in = const_cast<float *> (c.data()); // TODO check if this is safe!
if (throw_level (ThrowProcess) && frames > max_frames_in) {
diff --git a/libs/audiographer/tests/general/chunker_test.cc b/libs/audiographer/tests/general/chunker_test.cc
index c667360601..ea5c29a410 100644
--- a/libs/audiographer/tests/general/chunker_test.cc
+++ b/libs/audiographer/tests/general/chunker_test.cc
@@ -33,13 +33,13 @@ class ChunkerTest : public CppUnit::TestFixture
void testSynchronousProcess()
{
chunker->add_output (sink);
- nframes_t frames_output = 0;
+ framecnt_t frames_output = 0;
ProcessContext<float> const context (random_data, frames, 1);
chunker->process (context);
frames_output = sink->get_data().size();
- CPPUNIT_ASSERT_EQUAL ((nframes_t) 0, frames_output);
+ CPPUNIT_ASSERT_EQUAL ((framecnt_t) 0, frames_output);
chunker->process (context);
frames_output = sink->get_data().size();
@@ -51,7 +51,7 @@ class ChunkerTest : public CppUnit::TestFixture
chunker->process (context);
frames_output = sink->get_data().size();
- CPPUNIT_ASSERT_EQUAL ((nframes_t) 0, frames_output);
+ CPPUNIT_ASSERT_EQUAL ((framecnt_t) 0, frames_output);
chunker->process (context);
frames_output = sink->get_data().size();
@@ -65,7 +65,7 @@ class ChunkerTest : public CppUnit::TestFixture
assert (frames % 2 == 0);
chunker->add_output (sink);
- nframes_t frames_output = 0;
+ framecnt_t frames_output = 0;
ProcessContext<float> const half_context (random_data, frames / 2, 1);
ProcessContext<float> const context (random_data, frames, 1);
@@ -73,12 +73,12 @@ class ChunkerTest : public CppUnit::TestFixture
// 0.5
chunker->process (half_context);
frames_output = sink->get_data().size();
- CPPUNIT_ASSERT_EQUAL ((nframes_t) 0, frames_output);
+ CPPUNIT_ASSERT_EQUAL ((framecnt_t) 0, frames_output);
// 1.5
chunker->process (context);
frames_output = sink->get_data().size();
- CPPUNIT_ASSERT_EQUAL ((nframes_t) 0, frames_output);
+ CPPUNIT_ASSERT_EQUAL ((framecnt_t) 0, frames_output);
// 2.5
chunker->process (context);
@@ -93,7 +93,7 @@ class ChunkerTest : public CppUnit::TestFixture
// 3.5
chunker->process (context);
frames_output = sink->get_data().size();
- CPPUNIT_ASSERT_EQUAL ((nframes_t) 0, frames_output);
+ CPPUNIT_ASSERT_EQUAL ((framecnt_t) 0, frames_output);
// 4.0
chunker->process (half_context);
@@ -112,7 +112,7 @@ class ChunkerTest : public CppUnit::TestFixture
chunker.reset (new Chunker<float>(frames / 4));
chunker->add_output (sink);
- nframes_t frames_output = 0;
+ framecnt_t frames_output = 0;
ProcessContext<float> const half_context (random_data, frames / 2, 1);
ProcessContext<float> const context (random_data, frames, 1);
@@ -120,12 +120,12 @@ class ChunkerTest : public CppUnit::TestFixture
// 0.5
chunker->process (half_context);
frames_output = sink->get_data().size();
- CPPUNIT_ASSERT_EQUAL ((nframes_t) frames / 2, frames_output);
+ CPPUNIT_ASSERT_EQUAL ((framecnt_t) frames / 2, frames_output);
// 1.5
chunker->process (context);
frames_output = sink->get_data().size();
- CPPUNIT_ASSERT_EQUAL ((nframes_t) frames / 2 * 3, frames_output);
+ CPPUNIT_ASSERT_EQUAL ((framecnt_t) frames / 2 * 3, frames_output);
// 2.5
chunker->process (context);
@@ -141,7 +141,7 @@ class ChunkerTest : public CppUnit::TestFixture
boost::shared_ptr<VectorSink<float> > sink;
float * random_data;
- nframes_t frames;
+ framecnt_t frames;
};
CPPUNIT_TEST_SUITE_REGISTRATION (ChunkerTest);
diff --git a/libs/audiographer/tests/general/deinterleaver_test.cc b/libs/audiographer/tests/general/deinterleaver_test.cc
index 3d644a3cf1..3260045b11 100644
--- a/libs/audiographer/tests/general/deinterleaver_test.cc
+++ b/libs/audiographer/tests/general/deinterleaver_test.cc
@@ -61,9 +61,9 @@ class DeInterleaverTest : public CppUnit::TestFixture
CPPUNIT_ASSERT_THROW (deinterleaver->process (c.beginning (total_frames - 1)), Exception);
}
- void assert_outputs (nframes_t expected_frames)
+ void assert_outputs (framecnt_t expected_frames)
{
- nframes_t generated_frames = 0;
+ framecnt_t generated_frames = 0;
generated_frames = sink_a->get_data().size();
CPPUNIT_ASSERT_EQUAL (expected_frames, generated_frames);
@@ -89,7 +89,7 @@ class DeInterleaverTest : public CppUnit::TestFixture
assert_outputs (frames_per_channel);
// Now with less frames
- nframes_t const less_frames = frames_per_channel / 4;
+ framecnt_t const less_frames = frames_per_channel / 4;
deinterleaver->process (c.beginning (less_frames * channels));
assert_outputs (less_frames);
}
@@ -120,8 +120,8 @@ class DeInterleaverTest : public CppUnit::TestFixture
boost::shared_ptr<VectorSink<float> > sink_c;
float * random_data;
- nframes_t frames_per_channel;
- nframes_t total_frames;
+ framecnt_t frames_per_channel;
+ framecnt_t total_frames;
unsigned int channels;
};
diff --git a/libs/audiographer/tests/general/interleaver_deinterleaver_test.cc b/libs/audiographer/tests/general/interleaver_deinterleaver_test.cc
index 908abafdf2..da042b9494 100644
--- a/libs/audiographer/tests/general/interleaver_deinterleaver_test.cc
+++ b/libs/audiographer/tests/general/interleaver_deinterleaver_test.cc
@@ -55,7 +55,7 @@ class InterleaverDeInterleaverTest : public CppUnit::TestFixture
CPPUNIT_ASSERT (TestUtils::array_equals (random_data_a, sink_a->get_array(), total_frames));
// And a second round...
- nframes_t less_frames = (frames_per_channel / 10) * channels;
+ framecnt_t less_frames = (frames_per_channel / 10) * channels;
deinterleaver->process (c.beginning (less_frames));
CPPUNIT_ASSERT (TestUtils::array_equals (random_data_a, sink_a->get_array(), less_frames));
}
@@ -85,7 +85,7 @@ class InterleaverDeInterleaverTest : public CppUnit::TestFixture
CPPUNIT_ASSERT (TestUtils::array_equals (random_data_c, sink_c->get_array(), frames_per_channel));
// And a second round...
- nframes_t less_frames = frames_per_channel / 5;
+ framecnt_t less_frames = frames_per_channel / 5;
interleaver->input (0)->process (c_a.beginning (less_frames));
interleaver->input (1)->process (c_b.beginning (less_frames));
interleaver->input (2)->process (c_c.beginning (less_frames));
@@ -108,8 +108,8 @@ class InterleaverDeInterleaverTest : public CppUnit::TestFixture
float * random_data_b;
float * random_data_c;
- nframes_t frames_per_channel;
- nframes_t total_frames;
+ framecnt_t frames_per_channel;
+ framecnt_t total_frames;
unsigned int channels;
};
diff --git a/libs/audiographer/tests/general/interleaver_test.cc b/libs/audiographer/tests/general/interleaver_test.cc
index 1512d054fc..b82aac74bb 100644
--- a/libs/audiographer/tests/general/interleaver_test.cc
+++ b/libs/audiographer/tests/general/interleaver_test.cc
@@ -69,11 +69,11 @@ class InterleaverTest : public CppUnit::TestFixture
interleaver->input (1)->process (c);
interleaver->input (2)->process (c);
- nframes_t expected_frames = frames * channels;
- nframes_t generated_frames = sink->get_data().size();
+ framecnt_t expected_frames = frames * channels;
+ framecnt_t generated_frames = sink->get_data().size();
CPPUNIT_ASSERT_EQUAL (expected_frames, generated_frames);
- nframes_t less_frames = frames / 2;
+ framecnt_t less_frames = frames / 2;
interleaver->input (0)->process (c.beginning (less_frames));
interleaver->input (1)->process (c.beginning (less_frames));
interleaver->input (2)->process (c.beginning (less_frames));
@@ -100,8 +100,8 @@ class InterleaverTest : public CppUnit::TestFixture
interleaver->input (1)->process (c);
interleaver->input (2)->process (c);
- nframes_t expected_frames = frames * channels;
- nframes_t generated_frames = sink->get_data().size();
+ framecnt_t expected_frames = frames * channels;
+ framecnt_t generated_frames = sink->get_data().size();
CPPUNIT_ASSERT_EQUAL (expected_frames, generated_frames);
}
@@ -119,9 +119,9 @@ class InterleaverTest : public CppUnit::TestFixture
boost::shared_ptr<VectorSink<float> > sink;
- nframes_t channels;
+ framecnt_t channels;
float * random_data;
- nframes_t frames;
+ framecnt_t frames;
};
CPPUNIT_TEST_SUITE_REGISTRATION (InterleaverTest);
diff --git a/libs/audiographer/tests/general/normalizer_test.cc b/libs/audiographer/tests/general/normalizer_test.cc
index b08fd73a0e..be23680202 100644
--- a/libs/audiographer/tests/general/normalizer_test.cc
+++ b/libs/audiographer/tests/general/normalizer_test.cc
@@ -54,7 +54,7 @@ class NormalizerTest : public CppUnit::TestFixture
boost::shared_ptr<VectorSink<float> > sink;
float * random_data;
- nframes_t frames;
+ framecnt_t frames;
};
CPPUNIT_TEST_SUITE_REGISTRATION (NormalizerTest);
diff --git a/libs/audiographer/tests/general/peak_reader_test.cc b/libs/audiographer/tests/general/peak_reader_test.cc
index 53b7a15174..6b60598a2e 100644
--- a/libs/audiographer/tests/general/peak_reader_test.cc
+++ b/libs/audiographer/tests/general/peak_reader_test.cc
@@ -48,7 +48,7 @@ class PeakReaderTest : public CppUnit::TestFixture
boost::shared_ptr<PeakReader> reader;
float * random_data;
- nframes_t frames;
+ framecnt_t frames;
};
CPPUNIT_TEST_SUITE_REGISTRATION (PeakReaderTest);
diff --git a/libs/audiographer/tests/general/sample_format_converter_test.cc b/libs/audiographer/tests/general/sample_format_converter_test.cc
index 1456528ebf..9239564d5b 100644
--- a/libs/audiographer/tests/general/sample_format_converter_test.cc
+++ b/libs/audiographer/tests/general/sample_format_converter_test.cc
@@ -62,7 +62,7 @@ class SampleFormatConverterTest : public CppUnit::TestFixture
converter->init (frames, D_Tri, 32);
converter->add_output (sink);
- nframes_t frames_output = 0;
+ framecnt_t frames_output = 0;
{
ProcessContext<float> pc(random_data, frames / 2, 1);
@@ -88,7 +88,7 @@ class SampleFormatConverterTest : public CppUnit::TestFixture
{
boost::shared_ptr<SampleFormatConverter<float> > converter (new SampleFormatConverter<float>(1));
boost::shared_ptr<VectorSink<float> > sink (new VectorSink<float>());
- nframes_t frames_output = 0;
+ framecnt_t frames_output = 0;
converter->init(frames, D_Tri, 32);
converter->add_output (sink);
@@ -110,7 +110,7 @@ class SampleFormatConverterTest : public CppUnit::TestFixture
CPPUNIT_ASSERT_EQUAL (frames, frames_output);
CPPUNIT_ASSERT (TestUtils::array_filled(sink->get_array(), frames));
- for (nframes_t i = 0; i < frames; ++i) {
+ for (framecnt_t i = 0; i < frames; ++i) {
// fp comparison needs a bit of tolerance, 1.01 << 1.5
CPPUNIT_ASSERT(sink->get_data()[i] < 1.01);
CPPUNIT_ASSERT(sink->get_data()[i] > -1.01);
@@ -121,7 +121,7 @@ class SampleFormatConverterTest : public CppUnit::TestFixture
{
boost::shared_ptr<SampleFormatConverter<int32_t> > converter (new SampleFormatConverter<int32_t>(1));
boost::shared_ptr<VectorSink<int32_t> > sink (new VectorSink<int32_t>());
- nframes_t frames_output = 0;
+ framecnt_t frames_output = 0;
converter->init(frames, D_Tri, 32);
converter->add_output (sink);
@@ -137,7 +137,7 @@ class SampleFormatConverterTest : public CppUnit::TestFixture
{
boost::shared_ptr<SampleFormatConverter<int32_t> > converter (new SampleFormatConverter<int32_t>(1));
boost::shared_ptr<VectorSink<int32_t> > sink (new VectorSink<int32_t>());
- nframes_t frames_output = 0;
+ framecnt_t frames_output = 0;
converter->init(frames, D_Tri, 24);
converter->add_output (sink);
@@ -153,7 +153,7 @@ class SampleFormatConverterTest : public CppUnit::TestFixture
{
boost::shared_ptr<SampleFormatConverter<int16_t> > converter (new SampleFormatConverter<int16_t>(1));
boost::shared_ptr<VectorSink<int16_t> > sink (new VectorSink<int16_t>());
- nframes_t frames_output = 0;
+ framecnt_t frames_output = 0;
converter->init(frames, D_Tri, 16);
converter->add_output (sink);
@@ -169,7 +169,7 @@ class SampleFormatConverterTest : public CppUnit::TestFixture
{
boost::shared_ptr<SampleFormatConverter<uint8_t> > converter (new SampleFormatConverter<uint8_t>(1));
boost::shared_ptr<VectorSink<uint8_t> > sink (new VectorSink<uint8_t>());
- nframes_t frames_output = 0;
+ framecnt_t frames_output = 0;
converter->init(frames, D_Tri, 8);
converter->add_output (sink);
@@ -185,7 +185,7 @@ class SampleFormatConverterTest : public CppUnit::TestFixture
{
boost::shared_ptr<SampleFormatConverter<int32_t> > converter (new SampleFormatConverter<int32_t>(3));
boost::shared_ptr<VectorSink<int32_t> > sink (new VectorSink<int32_t>());
- nframes_t frames_output = 0;
+ framecnt_t frames_output = 0;
converter->init(frames, D_Tri, 32);
converter->add_output (sink);
@@ -193,7 +193,7 @@ class SampleFormatConverterTest : public CppUnit::TestFixture
ProcessContext<float> pc(random_data, 4, 1);
CPPUNIT_ASSERT_THROW (converter->process (pc), Exception);
- nframes_t new_frame_count = frames - (frames % 3);
+ framecnt_t new_frame_count = frames - (frames % 3);
converter->process (ProcessContext<float> (pc.data(), new_frame_count, 3));
frames_output = sink->get_data().size();
CPPUNIT_ASSERT_EQUAL (new_frame_count, frames_output);
@@ -203,7 +203,7 @@ class SampleFormatConverterTest : public CppUnit::TestFixture
private:
float * random_data;
- nframes_t frames;
+ framecnt_t frames;
};
CPPUNIT_TEST_SUITE_REGISTRATION (SampleFormatConverterTest);
diff --git a/libs/audiographer/tests/general/silence_trimmer_test.cc b/libs/audiographer/tests/general/silence_trimmer_test.cc
index add24d026a..dfcf3c7ca2 100644
--- a/libs/audiographer/tests/general/silence_trimmer_test.cc
+++ b/libs/audiographer/tests/general/silence_trimmer_test.cc
@@ -50,14 +50,14 @@ class SilenceTrimmerTest : public CppUnit::TestFixture
{
ProcessContext<float> c (zero_data, frames, 1);
trimmer->process (c);
- nframes_t frames_processed = sink->get_data().size();
- CPPUNIT_ASSERT_EQUAL ((nframes_t) 0, frames_processed);
+ framecnt_t frames_processed = sink->get_data().size();
+ CPPUNIT_ASSERT_EQUAL ((framecnt_t) 0, frames_processed);
}
{
ProcessContext<float> c (random_data, frames, 1);
trimmer->process (c);
- nframes_t frames_processed = sink->get_data().size();
+ framecnt_t frames_processed = sink->get_data().size();
CPPUNIT_ASSERT_EQUAL (frames, frames_processed);
CPPUNIT_ASSERT (TestUtils::array_equals (sink->get_array(), random_data, frames));
}
@@ -65,14 +65,14 @@ class SilenceTrimmerTest : public CppUnit::TestFixture
{
ProcessContext<float> c (zero_data, frames, 1);
trimmer->process (c);
- nframes_t frames_processed = sink->get_data().size();
+ framecnt_t frames_processed = sink->get_data().size();
CPPUNIT_ASSERT_EQUAL (frames, frames_processed);
}
{
ProcessContext<float> c (random_data, frames, 1);
trimmer->process (c);
- nframes_t frames_processed = sink->get_data().size();
+ framecnt_t frames_processed = sink->get_data().size();
CPPUNIT_ASSERT_EQUAL (3 * frames, frames_processed);
CPPUNIT_ASSERT (TestUtils::array_equals (sink->get_array(), random_data, frames));
CPPUNIT_ASSERT (TestUtils::array_equals (&sink->get_array()[frames], zero_data, frames));
@@ -82,7 +82,7 @@ class SilenceTrimmerTest : public CppUnit::TestFixture
{
ProcessContext<float> c (zero_data, frames, 1);
trimmer->process (c);
- nframes_t frames_processed = sink->get_data().size();
+ framecnt_t frames_processed = sink->get_data().size();
CPPUNIT_ASSERT_EQUAL (3 * frames, frames_processed);
}
}
@@ -97,7 +97,7 @@ class SilenceTrimmerTest : public CppUnit::TestFixture
{
ProcessContext<float> c (half_random_data, frames, 1);
trimmer->process (c);
- nframes_t frames_processed = sink->get_data().size();
+ framecnt_t frames_processed = sink->get_data().size();
CPPUNIT_ASSERT_EQUAL (frames / 2, frames_processed);
CPPUNIT_ASSERT (TestUtils::array_equals (sink->get_array(), &half_random_data[frames / 2], frames / 2));
}
@@ -105,14 +105,14 @@ class SilenceTrimmerTest : public CppUnit::TestFixture
{
ProcessContext<float> c (zero_data, frames, 1);
trimmer->process (c);
- nframes_t frames_processed = sink->get_data().size();
+ framecnt_t frames_processed = sink->get_data().size();
CPPUNIT_ASSERT_EQUAL (frames / 2, frames_processed);
}
{
ProcessContext<float> c (half_random_data, frames, 1);
trimmer->process (c);
- nframes_t frames_processed = sink->get_data().size();
+ framecnt_t frames_processed = sink->get_data().size();
CPPUNIT_ASSERT_EQUAL (2 * frames + frames / 2, frames_processed);
CPPUNIT_ASSERT (TestUtils::array_equals (&sink->get_array()[frames + frames / 2], half_random_data, frames));
}
@@ -129,7 +129,7 @@ class SilenceTrimmerTest : public CppUnit::TestFixture
{
trimmer->add_output (sink);
- nframes_t silence = frames / 2;
+ framecnt_t silence = frames / 2;
trimmer->add_silence_to_beginning (silence);
{
@@ -145,7 +145,7 @@ class SilenceTrimmerTest : public CppUnit::TestFixture
{
trimmer->add_output (sink);
- nframes_t silence = frames / 3;
+ framecnt_t silence = frames / 3;
trimmer->add_silence_to_end (silence);
{
@@ -159,8 +159,8 @@ class SilenceTrimmerTest : public CppUnit::TestFixture
trimmer->process (c);
}
- nframes_t frames_processed = sink->get_data().size();
- nframes_t total_frames = 2 * frames + silence;
+ framecnt_t frames_processed = sink->get_data().size();
+ framecnt_t total_frames = 2 * frames + silence;
CPPUNIT_ASSERT_EQUAL (total_frames, frames_processed);
CPPUNIT_ASSERT (TestUtils::array_equals (sink->get_array(), random_data, frames));
CPPUNIT_ASSERT (TestUtils::array_equals (&sink->get_array()[frames], random_data, frames));
@@ -174,7 +174,7 @@ class SilenceTrimmerTest : public CppUnit::TestFixture
float * random_data;
float * zero_data;
float * half_random_data;
- nframes_t frames;
+ framecnt_t frames;
};
CPPUNIT_TEST_SUITE_REGISTRATION (SilenceTrimmerTest);
diff --git a/libs/audiographer/tests/general/sr_converter_test.cc b/libs/audiographer/tests/general/sr_converter_test.cc
index 68e21d3558..75834127f5 100644
--- a/libs/audiographer/tests/general/sr_converter_test.cc
+++ b/libs/audiographer/tests/general/sr_converter_test.cc
@@ -31,8 +31,8 @@ class SampleRateConverterTest : public CppUnit::TestFixture
void testNoConversion()
{
assert (frames % 2 == 0);
- nframes_t const half_frames = frames / 2;
- nframes_t frames_output = 0;
+ framecnt_t const half_frames = frames / 2;
+ framecnt_t frames_output = 0;
converter->init (44100, 44100);
converter->add_output (sink);
@@ -52,8 +52,8 @@ class SampleRateConverterTest : public CppUnit::TestFixture
void testUpsampleLength()
{
assert (frames % 2 == 0);
- nframes_t const half_frames = frames / 2;
- nframes_t frames_output = 0;
+ framecnt_t const half_frames = frames / 2;
+ framecnt_t frames_output = 0;
converter->init (44100, 88200);
converter->allocate_buffers (half_frames);
@@ -66,15 +66,15 @@ class SampleRateConverterTest : public CppUnit::TestFixture
converter->process (c2);
frames_output = sink->get_data().size();
- nframes_t tolerance = 3;
+ framecnt_t tolerance = 3;
CPPUNIT_ASSERT (2 * frames - tolerance < frames_output && frames_output < 2 * frames + tolerance);
}
void testDownsampleLength()
{
assert (frames % 2 == 0);
- nframes_t const half_frames = frames / 2;
- nframes_t frames_output = 0;
+ framecnt_t const half_frames = frames / 2;
+ framecnt_t frames_output = 0;
converter->init (88200, 44100);
converter->allocate_buffers (half_frames);
@@ -87,14 +87,14 @@ class SampleRateConverterTest : public CppUnit::TestFixture
converter->process (c2);
frames_output = sink->get_data().size();
- nframes_t tolerance = 3;
+ framecnt_t tolerance = 3;
CPPUNIT_ASSERT (half_frames - tolerance < frames_output && frames_output < half_frames + tolerance);
}
void testRespectsEndOfInput()
{
assert (frames % 2 == 0);
- nframes_t const half_frames = frames / 2;
+ framecnt_t const half_frames = frames / 2;
converter->init (44100, 48000);
converter->allocate_buffers (half_frames);
@@ -123,7 +123,7 @@ class SampleRateConverterTest : public CppUnit::TestFixture
boost::shared_ptr<ProcessContextGrabber<float> > grabber;
float * random_data;
- nframes_t frames;
+ framecnt_t frames;
};
CPPUNIT_TEST_SUITE_REGISTRATION (SampleRateConverterTest);
diff --git a/libs/audiographer/tests/general/threader_test.cc b/libs/audiographer/tests/general/threader_test.cc
index c599d87953..1e87c8d34d 100644
--- a/libs/audiographer/tests/general/threader_test.cc
+++ b/libs/audiographer/tests/general/threader_test.cc
@@ -149,7 +149,7 @@ class ThreaderTest : public CppUnit::TestFixture
float * random_data;
float * zero_data;
- nframes_t frames;
+ framecnt_t frames;
};
CPPUNIT_TEST_SUITE_REGISTRATION (ThreaderTest);
diff --git a/libs/audiographer/tests/sndfile/tmp_file_test.cc b/libs/audiographer/tests/sndfile/tmp_file_test.cc
index d2d1b3581e..94647cc1a6 100644
--- a/libs/audiographer/tests/sndfile/tmp_file_test.cc
+++ b/libs/audiographer/tests/sndfile/tmp_file_test.cc
@@ -40,7 +40,7 @@ class TmpFileTest : public CppUnit::TestFixture
boost::shared_ptr<TmpFile<float> > file;
float * random_data;
- nframes_t frames;
+ framecnt_t frames;
};
CPPUNIT_TEST_SUITE_REGISTRATION (TmpFileTest);
diff --git a/libs/audiographer/tests/utils.h b/libs/audiographer/tests/utils.h
index b13a7b7f07..bc882b679c 100644
--- a/libs/audiographer/tests/utils.h
+++ b/libs/audiographer/tests/utils.h
@@ -17,14 +17,14 @@
#include <cstdlib>
#include <ctime>
-using AudioGrapher::nframes_t;
+using AudioGrapher::framecnt_t;
struct TestUtils
{
template<typename T>
- static bool array_equals (T const * a, T const * b, nframes_t frames)
+ static bool array_equals (T const * a, T const * b, framecnt_t frames)
{
- for (nframes_t i = 0; i < frames; ++i) {
+ for (framecnt_t i = 0; i < frames; ++i) {
if (a[i] != b[i]) {
return false;
}
@@ -33,9 +33,9 @@ struct TestUtils
}
template<typename T>
- static bool array_filled (T const * array, nframes_t frames)
+ static bool array_filled (T const * array, framecnt_t frames)
{
- for (nframes_t i = 0; i < frames; ++i) {
+ for (framecnt_t i = 0; i < frames; ++i) {
if (array[i] == static_cast<T> (0.0)) {
return false;
}
@@ -44,13 +44,13 @@ struct TestUtils
}
/// Generate random data, all samples guaranteed not to be 0.0, 1.0 or -1.0
- static float * init_random_data (nframes_t frames, float range = 1.0)
+ static float * init_random_data (framecnt_t frames, float range = 1.0)
{
unsigned int const granularity = 4096;
float * data = new float[frames];
srand (std::time (NULL));
- for (nframes_t i = 0; i < frames; ++i) {
+ for (framecnt_t i = 0; i < frames; ++i) {
do {
int biased_int = (rand() % granularity) - (granularity / 2);
data[i] = (range * biased_int) / granularity;
@@ -102,7 +102,7 @@ class AppendingVectorSink : public VectorSink<T>
}
private:
- nframes_t total_frames;
+ framecnt_t total_frames;
};
diff --git a/libs/audiographer/tests/utils/identity_vertex_test.cc b/libs/audiographer/tests/utils/identity_vertex_test.cc
index 165af66a9d..799dcca386 100644
--- a/libs/audiographer/tests/utils/identity_vertex_test.cc
+++ b/libs/audiographer/tests/utils/identity_vertex_test.cc
@@ -37,7 +37,7 @@ class IdentityVertexTest : public CppUnit::TestFixture
vertex->add_output (sink_a);
vertex->add_output (sink_b);
- nframes_t frames_output = 0;
+ framecnt_t frames_output = 0;
ProcessContext<float> c (random_data, frames, 1);
vertex->process (c);
@@ -93,7 +93,7 @@ class IdentityVertexTest : public CppUnit::TestFixture
float * random_data;
float * zero_data;
- nframes_t frames;
+ framecnt_t frames;
};
CPPUNIT_TEST_SUITE_REGISTRATION (IdentityVertexTest);
diff --git a/libs/evoral/src/Event.cpp b/libs/evoral/src/Event.cpp
index b886d4b39e..930a18e77b 100644
--- a/libs/evoral/src/Event.cpp
+++ b/libs/evoral/src/Event.cpp
@@ -93,7 +93,7 @@ Event<Timestamp>::~Event() {
#endif // EVORAL_EVENT_ALLOC
template class Event<Evoral::MusicalTime>;
-template class Event<uint32_t>;
+template class Event<int64_t>;
} // namespace Evoral
diff --git a/libs/midi++2/channel.cc b/libs/midi++2/channel.cc
index e96a4b4edc..ae889058c4 100644
--- a/libs/midi++2/channel.cc
+++ b/libs/midi++2/channel.cc
@@ -47,7 +47,7 @@ Channel::connect_signals ()
}
void
-Channel::reset (timestamp_t timestamp, nframes_t /*nframes*/, bool notes_off)
+Channel::reset (timestamp_t timestamp, framecnt_t /*nframes*/, bool notes_off)
{
_program_number = _channel_number;
_bank_number = 0;
diff --git a/libs/midi++2/manager.cc b/libs/midi++2/manager.cc
index cab42d8d81..d4b9b00715 100644
--- a/libs/midi++2/manager.cc
+++ b/libs/midi++2/manager.cc
@@ -72,7 +72,7 @@ Manager::add_port (Port* p)
}
void
-Manager::cycle_start(nframes_t nframes)
+Manager::cycle_start (pframes_t nframes)
{
for (PortList::iterator p = _ports.begin(); p != _ports.end(); ++p) {
(*p)->cycle_start (nframes);
diff --git a/libs/midi++2/midi++/channel.h b/libs/midi++2/midi++/channel.h
index 7afaffb274..162eea1e9a 100644
--- a/libs/midi++2/midi++/channel.h
+++ b/libs/midi++2/midi++/channel.h
@@ -141,7 +141,7 @@ class Channel : public PBD::ScopedConnectionList {
bool _mono;
size_t _notes_on;
- void reset (timestamp_t timestamp, nframes_t nframes, bool notes_off = true);
+ void reset (timestamp_t timestamp, framecnt_t nframes, bool notes_off = true);
void process_note_off (Parser &, EventTwoBytes *);
void process_note_on (Parser &, EventTwoBytes *);
diff --git a/libs/midi++2/midi++/manager.h b/libs/midi++2/midi++/manager.h
index 915f650c9d..dec9d0d9f1 100644
--- a/libs/midi++2/midi++/manager.h
+++ b/libs/midi++2/midi++/manager.h
@@ -39,14 +39,14 @@ class Manager {
* This MUST be called before any reading/writing for this cycle.
* Realtime safe.
*/
- void cycle_start(nframes_t nframes);
+ void cycle_start (pframes_t nframes);
/** Signal the end of an audio cycle.
* This signifies that the cycle began with @ref cycle_start has ended.
* This MUST be called at the end of each cycle.
* Realtime safe.
*/
- void cycle_end();
+ void cycle_end ();
MachineControl* mmc () const { return _mmc; }
Port *mtc_input_port() const { return _mtc_input_port; }
diff --git a/libs/midi++2/midi++/mmc.h b/libs/midi++2/midi++/mmc.h
index 65d91686b3..cc8891db2c 100644
--- a/libs/midi++2/midi++/mmc.h
+++ b/libs/midi++2/midi++/mmc.h
@@ -270,9 +270,9 @@ class MachineControl
int do_shuttle (byte *, size_t len);
void write_track_status (byte *, size_t len, byte reg);
- void spp_start (Parser&, nframes_t);
- void spp_continue (Parser&, nframes_t);
- void spp_stop (Parser&, nframes_t);
+ void spp_start (Parser&, framecnt_t);
+ void spp_continue (Parser&, framecnt_t);
+ void spp_stop (Parser&, framecnt_t);
};
/** Class to describe a MIDI machine control command to be sent.
diff --git a/libs/midi++2/midi++/parser.h b/libs/midi++2/midi++/parser.h
index 43cf80c067..e57323e72d 100644
--- a/libs/midi++2/midi++/parser.h
+++ b/libs/midi++2/midi++/parser.h
@@ -33,7 +33,7 @@ class Port;
class Parser;
typedef PBD::Signal1<void,Parser&> ZeroByteSignal;
-typedef PBD::Signal2<void,Parser&,nframes_t> TimestampedSignal;
+typedef PBD::Signal2<void,Parser&,framecnt_t> TimestampedSignal;
typedef PBD::Signal2<void,Parser&, byte> OneByteSignal;
typedef PBD::Signal2<void,Parser &, EventTwoBytes *> TwoByteSignal;
typedef PBD::Signal2<void,Parser &, pitchbend_t> PitchBendSignal;
@@ -49,8 +49,8 @@ class Parser {
therefore be set before every byte passed into ::scanner().
*/
- nframes_t get_timestamp() const { return _timestamp; }
- void set_timestamp (const nframes_t timestamp) { _timestamp = timestamp; }
+ framecnt_t get_timestamp() const { return _timestamp; }
+ void set_timestamp (const framecnt_t timestamp) { _timestamp = timestamp; }
/* signals that anyone can connect to */
@@ -124,10 +124,10 @@ class Parser {
const byte *mtc_current() const { return _mtc_time; }
bool mtc_locked() const { return _mtc_locked; }
- PBD::Signal3<void,Parser&,int,nframes_t> mtc_qtr;
- PBD::Signal3<void,const byte*,bool,nframes_t> mtc_time;
- PBD::Signal1<void,MTC_Status> mtc_status;
- PBD::Signal0<bool> mtc_skipped;
+ PBD::Signal3<void, Parser &, int, framecnt_t> mtc_qtr;
+ PBD::Signal3<void, const byte *, bool, framecnt_t> mtc_time;
+ PBD::Signal1<void, MTC_Status> mtc_status;
+ PBD::Signal0<bool> mtc_skipped;
void set_mtc_forwarding (bool yn) {
_mtc_forward = yn;
@@ -172,7 +172,7 @@ class Parser {
bool _mtc_locked;
byte last_qtr_frame;
- nframes_t _timestamp;
+ framecnt_t _timestamp;
ParseState pre_variable_state;
MIDI::eventType pre_variable_msgtype;
diff --git a/libs/midi++2/midi++/port.h b/libs/midi++2/midi++/port.h
index d0b6249ebe..f7bef36b1f 100644
--- a/libs/midi++2/midi++/port.h
+++ b/libs/midi++2/midi++/port.h
@@ -57,9 +57,9 @@ class Port {
// FIXME: make Manager a friend of port so these can be hidden?
/* Only for use by MidiManager. Don't ever call this. */
- void cycle_start(nframes_t nframes);
+ void cycle_start (pframes_t nframes);
/* Only for use by MidiManager. Don't ever call this. */
- void cycle_end();
+ void cycle_end ();
/** Write a message to port.
* @param msg Raw MIDI message to send
@@ -76,7 +76,7 @@ class Port {
*/
int read (byte *buf, size_t bufsize);
- void parse (nframes_t timestamp);
+ void parse (framecnt_t timestamp);
/** Write a message to port.
* @return true on success.
@@ -124,7 +124,7 @@ class Port {
XMLNode& get_state();
};
- nframes_t nframes_this_cycle() const { return _nframes_this_cycle; }
+ pframes_t nframes_this_cycle() const { return _nframes_this_cycle; }
void reestablish (jack_client_t *);
void reconnect ();
@@ -141,7 +141,7 @@ class Port {
private:
bool _ok;
bool _currently_in_cycle;
- nframes_t _nframes_this_cycle;
+ pframes_t _nframes_this_cycle;
std::string _tagname;
size_t _number;
Channel *_channel[16];
@@ -151,7 +151,7 @@ private:
jack_client_t* _jack_client;
jack_port_t* _jack_port;
- nframes_t _last_read_index;
+ framecnt_t _last_read_index;
timestamp_t _last_write_timestamp;
/** Channel used to signal to the MidiControlUI that input has arrived */
diff --git a/libs/midi++2/midi++/types.h b/libs/midi++2/midi++/types.h
index a7929e16f5..185e1e6f3f 100644
--- a/libs/midi++2/midi++/types.h
+++ b/libs/midi++2/midi++/types.h
@@ -20,6 +20,7 @@
#ifndef __midi_types_h__
#define __midi_types_h__
+#include <jack/jack.h>
#include <inttypes.h>
namespace MIDI {
@@ -28,9 +29,12 @@ namespace MIDI {
typedef float controller_value_t;
typedef unsigned char byte;
typedef unsigned short pitchbend_t;
- typedef uint32_t nframes_t;
typedef uint32_t timestamp_t;
+ /** XXX: dupes from libardour */
+ typedef int64_t framecnt_t;
+ typedef jack_nframes_t pframes_t;
+
enum eventType {
none = 0x0,
raw = 0xF4, /* undefined in MIDI spec */
diff --git a/libs/midi++2/mmc.cc b/libs/midi++2/mmc.cc
index fd18648de2..31e0fdfa23 100644
--- a/libs/midi++2/mmc.cc
+++ b/libs/midi++2/mmc.cc
@@ -649,19 +649,19 @@ MachineControl::send (MachineControlCommand const & c)
}
void
-MachineControl::spp_start (Parser& parser, nframes_t timestamp)
+MachineControl::spp_start (Parser& parser, framecnt_t timestamp)
{
SPPStart (parser, timestamp); /* EMIT SIGNAL */
}
void
-MachineControl::spp_continue (Parser& parser, nframes_t timestamp)
+MachineControl::spp_continue (Parser& parser, framecnt_t timestamp)
{
SPPContinue (parser, timestamp); /* EMIT SIGNAL */
}
void
-MachineControl::spp_stop (Parser& parser, nframes_t timestamp)
+MachineControl::spp_stop (Parser& parser, framecnt_t timestamp)
{
SPPStop (parser, timestamp); /* EMIT SIGNAL */
}
diff --git a/libs/midi++2/port.cc b/libs/midi++2/port.cc
index 600886a94d..539d5c49cb 100644
--- a/libs/midi++2/port.cc
+++ b/libs/midi++2/port.cc
@@ -119,7 +119,7 @@ Port::~Port ()
}
void
-Port::parse (nframes_t timestamp)
+Port::parse (framecnt_t timestamp)
{
byte buf[512];
@@ -171,7 +171,7 @@ Port::clock (timestamp_t timestamp)
}
void
-Port::cycle_start (nframes_t nframes)
+Port::cycle_start (pframes_t nframes)
{
assert (_jack_port);
@@ -190,12 +190,12 @@ Port::cycle_start (nframes_t nframes)
if (receives_input()) {
void* jack_buffer = jack_port_get_buffer(_jack_port, nframes);
- const nframes_t event_count = jack_midi_get_event_count(jack_buffer);
+ const pframes_t event_count = jack_midi_get_event_count(jack_buffer);
jack_midi_event_t ev;
timestamp_t cycle_start_frame = jack_last_frame_time (_jack_client);
- for (nframes_t i = 0; i < event_count; ++i) {
+ for (pframes_t i = 0; i < event_count; ++i) {
jack_midi_event_get (&ev, jack_buffer, i);
input_fifo.write (cycle_start_frame + ev.time, (Evoral::EventType) 0, ev.size, ev.buffer);
}
diff --git a/libs/surfaces/frontier/tranzport/tranzport_control_protocol.cc b/libs/surfaces/frontier/tranzport/tranzport_control_protocol.cc
index 1924a4df94..f6a8f4d4b7 100644
--- a/libs/surfaces/frontier/tranzport/tranzport_control_protocol.cc
+++ b/libs/surfaces/frontier/tranzport/tranzport_control_protocol.cc
@@ -555,7 +555,7 @@ TranzportControlProtocol::show_meter ()
}
void
-TranzportControlProtocol::show_bbt (nframes_t where)
+TranzportControlProtocol::show_bbt (framepos_t where)
{
if ((where != last_where) || lcd_isdamaged(1,9,8)) {
char buf[16];
@@ -591,12 +591,11 @@ TranzportControlProtocol::show_bbt (nframes_t where)
void
TranzportControlProtocol::show_transport_time ()
{
- nframes_t where = session->transport_frame();
- show_bbt(where);
+ show_bbt (session->transport_frame ());
}
void
-TranzportControlProtocol::show_smpte (nframes_t where)
+TranzportControlProtocol::show_smpte (framepos_t where)
{
if ((where != last_where) || lcd_isdamaged(1,9,10)) {
diff --git a/libs/surfaces/frontier/tranzport/tranzport_control_protocol.h b/libs/surfaces/frontier/tranzport/tranzport_control_protocol.h
index 4e37da9916..0c7f600e2c 100644
--- a/libs/surfaces/frontier/tranzport/tranzport_control_protocol.h
+++ b/libs/surfaces/frontier/tranzport/tranzport_control_protocol.h
@@ -151,7 +151,7 @@ class TranzportControlProtocol : public ARDOUR::ControlProtocol
uint32_t last_mins;
uint32_t last_secs;
uint32_t last_frames;
- nframes_t last_where;
+ framepos_t last_where;
ARDOUR::gain_t last_track_gain;
uint32_t last_meter_fill;
struct timeval last_wheel_motion;
@@ -246,8 +246,8 @@ class TranzportControlProtocol : public ARDOUR::ControlProtocol
void show_current_track ();
void show_track_gain ();
void show_transport_time ();
- void show_bbt (nframes_t where);
- void show_smpte (nframes_t where);
+ void show_bbt (framepos_t where);
+ void show_smpte (framepos_t where);
void show_wheel_mode ();
void show_gain ();
void show_pan ();
diff --git a/libs/surfaces/mackie/mackie_control_protocol.cc b/libs/surfaces/mackie/mackie_control_protocol.cc
index 44e6b28d78..25b5679c45 100644
--- a/libs/surfaces/mackie/mackie_control_protocol.cc
+++ b/libs/surfaces/mackie/mackie_control_protocol.cc
@@ -1048,7 +1048,7 @@ MackieControlProtocol::update_automation (RouteSignal & rs)
}
string
-MackieControlProtocol::format_bbt_timecode (nframes_t now_frame)
+MackieControlProtocol::format_bbt_timecode (framepos_t now_frame)
{
BBT_Time bbt_time;
session->bbt_time (now_frame, bbt_time);
@@ -1078,7 +1078,7 @@ MackieControlProtocol::format_bbt_timecode (nframes_t now_frame)
}
string
-MackieControlProtocol::format_timecode_timecode (nframes_t now_frame)
+MackieControlProtocol::format_timecode_timecode (framepos_t now_frame)
{
Timecode::Time timecode;
session->timecode_time (now_frame, timecode);
@@ -1101,7 +1101,7 @@ MackieControlProtocol::update_timecode_display()
if (surface().has_timecode_display())
{
// do assignment here so current_frame is fixed
- nframes_t current_frame = session->transport_frame();
+ framepos_t current_frame = session->transport_frame();
string timecode;
switch (_timecode_type)
@@ -1592,7 +1592,7 @@ MackieControlProtocol::marker_press (Button &)
{
// cut'n'paste from LocationUI::add_new_location()
string markername;
- nframes_t where = session->audible_frame();
+ framepos_t where = session->audible_frame();
session->locations()->next_available_name(markername,"mcu");
Location *location = new Location (*session, where, where, markername, Location::IsMark);
session->begin_reversible_command (_("add marker"));
diff --git a/libs/surfaces/mackie/mackie_control_protocol.h b/libs/surfaces/mackie/mackie_control_protocol.h
index 3007df8f5a..458dc86172 100644
--- a/libs/surfaces/mackie/mackie_control_protocol.h
+++ b/libs/surfaces/mackie/mackie_control_protocol.h
@@ -283,8 +283,8 @@ class MackieControlProtocol
// also called from poll_automation to update timecode display
void update_timecode_display();
- std::string format_bbt_timecode (ARDOUR::nframes_t now_frame);
- std::string format_timecode_timecode (ARDOUR::nframes_t now_frame);
+ std::string format_bbt_timecode (ARDOUR::framepos_t now_frame);
+ std::string format_timecode_timecode (ARDOUR::framepos_t now_frame);
/**
notification that the port is about to start it's init sequence.
diff --git a/libs/surfaces/tranzport/show.cc b/libs/surfaces/tranzport/show.cc
index cefe5f2dd1..c7eb11216a 100644
--- a/libs/surfaces/tranzport/show.cc
+++ b/libs/surfaces/tranzport/show.cc
@@ -284,7 +284,7 @@ TranzportControlProtocol::show_meter ()
}
void
-TranzportControlProtocol::show_bbt (nframes_t where)
+TranzportControlProtocol::show_bbt (framepos_t where)
{
if (where != last_where) {
char buf[16];
@@ -348,12 +348,11 @@ TranzportControlProtocol::show_bbt (nframes_t where)
void
TranzportControlProtocol::show_transport_time ()
{
- nframes_t where = session->transport_frame();
- show_bbt(where);
+ show_bbt (session->transport_frame ());
}
void
-TranzportControlProtocol::show_timecode (nframes_t where)
+TranzportControlProtocol::show_timecode (framepos_t where)
{
if ((where != last_where) || lcd_isdamaged(1,9,10)) {
diff --git a/libs/surfaces/tranzport/tranzport_control_protocol.h b/libs/surfaces/tranzport/tranzport_control_protocol.h
index e85234c7a3..53d64e8e98 100644
--- a/libs/surfaces/tranzport/tranzport_control_protocol.h
+++ b/libs/surfaces/tranzport/tranzport_control_protocol.h
@@ -193,7 +193,7 @@ private:
uint32_t last_mins;
uint32_t last_secs;
uint32_t last_frames;
- nframes_t last_where;
+ framepos_t last_where;
ARDOUR::gain_t last_track_gain;
uint32_t last_meter_fill;
struct timeval last_wheel_motion;
@@ -301,8 +301,8 @@ private:
void show_current_track ();
void show_track_gain ();
void show_transport_time ();
- void show_bbt (nframes_t where);
- void show_timecode (nframes_t where);
+ void show_bbt (framepos_t where);
+ void show_timecode (framepos_t where);
void show_wheel_mode ();
void show_gain ();
void show_pan ();