mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-09 15:15:41 +01:00
This fixes various rounding issues. Notably superclock to sample conversion must always round down when playing forward. `::process (start, end, speed = 1)` uses exclusive end. Processing begins at `start` and end ends just before `end`. Next cycle will begin with the current end. One example where this failed: - New session at 48kHz - Change tempo to 130 BPM - Enable snap to 1/8 note - Snap playhead to 1|3|0 - Enable Metronome - Play `assert (superclock_to_samples ((*i).sclock(), sample_rate()) < end);` end = 177231 samples == superclock 1042118280 A grid point is found at superclock 1042116920 (that is < 1042118280). However converting it back to samples rounded it to sample 177231 == end, while actual location is 1360 super-clock ticks before end. The metronome click has to be started this cycle, since the same position will not be found at the beginning of the next cycle, with start = 177232. Similarly a samplecnt_t t, converted to music-time and back must not be later than the given sample. ``` timepos_t tsc (t); assert (timepos_t::from_ticks (tsc.ticks ()).samples () <= t); ``` IOW. When playing forward, all super-clock time between 1|1|0 and 1|1|1 should round down to 1|1|0. "We have not yet reached the first tick". |
||
|---|---|---|
| .. | ||
| boost-debug | ||
| msvc | ||
| MSVCpbd | ||
| pbd | ||
| test | ||
| base_ui.cc | ||
| basename.cc | ||
| boost_debug.cc | ||
| cartesian.cc | ||
| ChangeLog | ||
| cocoa_open_uri.mm | ||
| command.cc | ||
| configuration_variable.cc | ||
| controllable.cc | ||
| convert.cc | ||
| COPYING | ||
| cpus.cc | ||
| crossthread.cc | ||
| crossthread.posix.cc | ||
| crossthread.win.cc | ||
| debug.cc | ||
| debug_rt_alloc.c | ||
| demangle.cc | ||
| downloader.cc | ||
| enums.cc | ||
| enumwriter.cc | ||
| epa.cc | ||
| error.cc | ||
| event_loop.cc | ||
| ffs.cc | ||
| file_archive.cc | ||
| file_utils.cc | ||
| fpu.cc | ||
| glib_event_source.cc | ||
| id.cc | ||
| inflater.cc | ||
| libpbd.pc.in | ||
| libpbd.spec.in | ||
| locale_guard.cc | ||
| localtime_r.cc | ||
| malign.cc | ||
| md5.cc | ||
| microseconds.cc | ||
| mountpoint.cc | ||
| openuri.cc | ||
| pathexpand.cc | ||
| pbd.cc | ||
| pcg_rand.cc | ||
| pool.cc | ||
| property_list.cc | ||
| pthread_utils.cc | ||
| reallocpool.cc | ||
| receiver.cc | ||
| resource.cc | ||
| run-tests.sh | ||
| search_path.cc | ||
| semutils.cc | ||
| shortpath.cc | ||
| signals.cc | ||
| spinlock.cc | ||
| stacktrace.cc | ||
| stateful.cc | ||
| stateful_diff_command.cc | ||
| string_convert.cc | ||
| strreplace.cc | ||
| strsplit.cc | ||
| system_exec.cc | ||
| textreceiver.cc | ||
| timer.cc | ||
| timing.cc | ||
| tlsf.cc | ||
| transmitter.cc | ||
| undo.cc | ||
| uuid.cc | ||
| whitespace.cc | ||
| windows_mmcss.cc | ||
| windows_special_dirs.cc | ||
| windows_timer_utils.cc | ||
| wscript | ||
| xml++.cc | ||