This would realloc a buffer for every event, making it absurdly slow for
large MIDI files (say, 10k events). Use the somewhat standard heuristic
of doubling the requested allocation every time we need to increase the size.
This results in a speedup of 40-100x when saving SMF to disk
This changes the assumption that an SMF object only refers to
a single track when being written.
::end_track() is used within begin::write()/end_write() pairs to mark the start
of a new SMF track.
If you have the "wrong" kind of MIDI CC, the interpolation for the list is set
to Linear, which causes interpolation to return audio time stamps instead of
beat time. Because of the asymmetrical transforms, this causes iterators over
the Sequence to go haywire and create an infinite loop.
This fix changes ControlList behavior to always return times in the time domain
of the list.
every write pass deletes existing tracks, which means it also deletes any existing
EOT event. Rather than try to replicate the _length value() that is kept in a
Source object in the SMF object, add a virtual method to SMF that returns
the _length value (or std::numeric_limits<Beats>::max() if not set).
If the _length value is not the max, we will add EOT events to each track
(usually just one) right before writing to disk.
the rest from `tools/convert_boost.sh`.
* replace boost::function, boost::bind with std::function and std::bind.
This required some manual fixes, notably std::placeholders,
some static_casts<>, and boost::function::clear -> = {}.
This reverts commit 615326be9b because it
breaks windows builds.
```
File "/home/ardour/ardour-w64/wscript", line 1462, in configure
set_compiler_flags (conf, Options.options)
File "/home/ardour/ardour-w64/wscript", line 522, in set_compiler_flags
if re.search ('x86_64-w64', conf.env['CC']) is not None:
File "/usr/lib/python2.7/re.py", line 146, in search
return _compile(pattern, flags).search(string)
TypeError: expected string or buffer
```
CC is already set to a string. (And if it ever should be None, we want
to handle that explicitly.)
(And #autowaf.display_msg handle Booleans just fine.)
https://waf.io/book/ says
By default, the project name and version are set to noname and 1.0. To
change them, it is necessary to provide two additional variables in
the top-level project file
- and waf code inspection confirms that waf itself only will use the top
level APPNAME.
Variables by these names are only used from the local wscript and when
running "waf configure", which already for other reasons only can run at
the top-level.
These variables are thus not mandatory and not used.