There's no real reason not to use float for audio. It's light on system
resources (compared to everything else we're doing at least) and the code
becomes simpler when we can assume all audio will be -1 to 1 rather than 0 to
255 or -32768 to 32767.
The only thing we might want to do one day is move up to SAMPLE_FMT_DBL, but
this should only take some mild refactoring and all our assumptions (i.e. -1 to
1 range, etc.) can remain the same.
While we implement an audio cache "truncate" function when the sequence length
changes, the render functions also have the ability to extend it. This is fine,
but if truncation happened while workers were caching, it could truncate and
then extend beyond the length of the sequence. This commit changes the worker
extend function to only extend as much as the length, therefore not undoing the
truncation.
Using QSizePolicys seemed to always produce some variant of the IntegerSlider
and QSlider consuming roughly half of the width each. The IntegerSlider is only
two characters wide at any one time so this results in a lot of wasted screen
real estate. This commit limits the integer slider to 4 characters wide (more
than 2 to allow for UI padding)
Ensures filenames end with the appropriate extension (necessary for
communicating the output format to both FFmpeg and OIIO) and moves overwrite
check from file dialog to render since it's still possible to type the
intended filename. Also checks the intended output directory and creates it
if it doesn't already exist.
Minor code path improvement. Since EncodeFrame() will try to stop the debug
timer if the encode is finished, it doesn't make sense to always start it
unconditionally after calling EncodeFrame().
Implemented the ability to copy/paste blocks/clips in the timeline. This did
require some large scale changes and reworking of the copy/paste system
introduced a few commits ago, but should be largely functional now.
Since waveforms are generated during the cache process, if clips don't cache,
a waveform isn't generated for them. Therefore for now, this optimization will
be disabled but should be re-enabled later when waveforms are improved to handle
this situation.
Since the node graph can have transform cross nodes, input keyframes may occur
at a different times requiring transforming between sequence time and media
time. This commit implements such a mechanism in all UI classes that need it.
Updates drag mime data to include a variable determining which streams are
enabled and which ones aren't (a binary qint64 where the 0s are disabled
and the 1s are enabled) rather than relying solely on the stream->enabled
values which can't be modified as part of the drag process.
Since other parts of the UI use OpenGL (through Qt), the viewer's context can
sometimes become non-current until the next time it draws. Since the color
processor is created before the main drawing function, the context could
occasionally be non-current causing its creation to fail. Subsequently trying
to use that color processor would trigger a segfault. This commit addresses that
by always making the context current before creating the color processor shader.