Commit Graph
63 Commits
Author SHA1 Message Date
itsmattkc f4feb381b1 audiomanager: updated config entries
The config entries that we were using were changed before.
2020-08-18 02:08:03 +10:00
itsmattkc 3e9f98e230 Merge branch 'master' of https://github.com/olive-editor/olive.git 2020-06-26 00:22:03 +10:00
itsmattkc c324de804c audiomanager: create and delete future watchers when necessary 2020-06-26 00:21:34 +10:00
itsmattkc 6ebcb7162e audiovisualwaveform: clamp audio values so they stay inbounds 2020-06-22 00:39:38 +10:00
itsmattkc ffebe70a65 audiovisualwaveform: fixed bug that would make all channels the same 2020-06-12 03:27:00 +10:00
itsmattkc ccf5d4cece audiovisualwaveform: detect if the start index exceeds the buffer sample count
Fixes segfault.
2020-06-11 21:24:50 +10:00
itsmattkc 430561e2ac sequence: made divider a sequence parameter rather than a viewer parameter
Doing this makes the preview resolution an explicit project setting rather
than a temporary UI setting. This will allow more consistency when caching.
2020-06-08 14:41:35 +10:00
itsmattkc ee3fa529cb audiovisualwaveform: reinterpret cast to char*
Bypasses GCC warning about qfloat16's constructor.
2020-06-08 04:03:24 +10:00
itsmattkc a29de7cea0 audiovisualwaveform: allow only partial sum overwrite 2020-06-05 15:02:44 +10:00
itsmattkc 5eeef76b62 waveform: shift track waveform alongside cache 2020-06-04 23:32:50 +10:00
itsmattkc 0e87762afa waveforms: moved waveform to track rather than block
This is a much more robust and thread-safe system of storing the waveforms.
2020-06-04 18:03:21 +10:00
itsmattkc fb5c06db50 audiooutputmanager: use deleteLater instead of delete
Ensures destructor is run in its own thread.
2020-06-03 03:39:02 +10:00
itsmattkc 08eb12710c audiovisualwaveform: ignore OverwriteSums if input data is empty
Prevents potential index out of bounds error.
2020-06-03 03:37:46 +10:00
itsmattkc 1fce380cc6 timeline: automate waveform resizing
Now each UndoCommand won't have to handle it (unless it can introduce
specific optimizations).
2020-06-01 14:54:14 +10:00
itsmattkc c2e47a296c timeline: heavily optimized and improved nearly all timeline optimizations
Features a lot of timeline-related cache optimizations as well as general
optimizations and improvements in timeline behavior. Should improve
usability significantly.
2020-06-01 04:42:59 +10:00
itsmattkc d15b08c181 sampleformat: fixed erroneous constant 2020-04-22 13:10:48 +10:00
itsmattkc ccb02d30aa colormanager: implement default config 2020-04-22 05:08:33 +10:00
itsmattkc 141ac8b12f audiomonitor: implemented hardware acceleration
Drawing is much smoother this way.
2020-04-22 01:26:39 +10:00
itsmattkc afa3d3babe audiomonitor: rewrote to handle audio independently of output
This gives the AudioMonitor more control over its own timing and appearance
and also reduces the load on the audio processing threads.
2020-04-22 01:09:49 +10:00
itsmattkc efeac6793e audio: increased qaudiooutput buffer size
Reduces stuttering with audio playback.
2020-04-21 23:52:16 +10:00
itsmattkc 412a6dfdc2 audio: moved output to its own high priority thread
macOS audio playback failed due to audio being processed in the main thread.
Now all audio playback has been placed into its own high priority thread to
always keep up better with the operating system's demands.
2020-04-21 19:31:29 +10:00
itsmattkc 05eae1e28a audio: don't use a shared QIODevice
This system was kind of janky anyway. It makes more sense ultimately for the
audio management classes to contain the file handle rather than the renderer.
2020-04-21 17:55:55 +10:00
itsmattkc 1d3b9bbf13 audiomanager: remove audio signalling
This is in preparation for upcoming modifications that we'll be making to the
AudioManager.
2020-04-21 17:45:39 +10:00
itsmattkc fd1ecfae6f audio: removed hardcoded stereo value
Fixes bug that caused AudioMonitor to only show two channels regardless of the
actual number of channels being mixed.
2020-04-14 23:55:28 +10:00
itsmattkc 1aa87cbda6 various: encapsulate all code in the olive namespace to avoid name collisions
Large-scale code cleanup. Also adds a license to the top of all files that were
missing it.
2020-04-06 15:29:53 +10:00
itsmattkc 6ea52e4123 audio renderer/timeline: pass through channel count of waveform visualizations 2020-04-05 19:59:14 +10:00
itsmattkc 59d32f60ad core: use SAMPLE_FMT_FLT only
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.
2020-03-31 18:07:25 +11:00
itsmattkc 6f0d72c05d renderer: switched audio rendering over to planar buffers
While planar audio cannot be used for playback, it's much easier for processing.
This should lead to cleaner and easier to write code in the future.
2020-03-31 18:01:20 +11:00
itsmattkc 9e4c79699e node: split off traversing functions from renderer for usage elsewhere
Fixes issue where Viewer node wouldn't pick up correct length if a tracks
weren't in use.
2020-03-13 15:31:15 +11:00
itsmattkc c75a0e8498 timeline/renderer: implemented basic waveform display support 2020-03-06 16:18:07 +11:00
itsmattkc f1f80c0a39 audiomanager: fixed segfault if olive is closed while the devices are getting
refreshed
2020-02-23 02:20:39 +11:00
itsmattkc 5a070f14de general: use IdlePriority rather than LowPriority
Fixes a number of playback stuttering and general UI lag issues by setting all
background tasks to IdlePriority rather than LowPriority. While it was assumed
LowPriority tasks would always get scheduled below NormalPriority (e.g. main
thread) tasks, it turns out this is not always the case. If the background tasks
start consuming a lot of CPU cycles, the scheduler may use "dynamic scheduling"
to schedule them above the main thread regardless leading to UI lag. This is
apparently the case for all thread priorities apart from IdlePriority, which
is allegedly a special case where threads are *only* scheduled when other
threads aren't busy ensuring the main thread stays responsive.
2020-02-20 17:48:50 +11:00
itsmattkc 1ae2c8b128 fixed mingw compile issue 2020-02-07 12:42:19 +11:00
itsmattkc 4697b98980 fixed gcc compile issues 2020-01-19 20:39:48 +11:00
itsmattkc 1101b58ee8 allow setting of pixel format/ocio method/sample format in preferences
Implementation isn't perfect yet, viewer/renderer doesn't update yet when
the preference is changed so a sequence needs to be re-opened for the change to
take effect.
2020-01-18 03:37:36 +11:00
itsmattkc 5bdc631da8 fixed bug caused by uninitialized variable in tempoprocessor 2020-01-07 20:23:45 +11:00
itsmattkc a616aaa182 correctly affect speed/reversing when shuttling audio 2020-01-07 16:41:30 +11:00
itsmattkc e671fb63b7 always close pull audio device when we're doing with it 2020-01-03 21:11:47 +11:00
itsmattkc f13f5b5fdb fixes memory leak in AudioManager
Ensures a thread that gets created gets deleted when it's done.
2020-01-03 02:44:33 +11:00
itsmattkc 02a790b041 simple file renames to better represent their new purposes 2020-01-03 02:36:30 +11:00
itsmattkc 0ac202078c rewrite of audio output manager for vastly improved operation
Previously the audio output manager was a "hybrid device" that acted as a pull
device for audio devices and as a push device and device proxy for the rest of
the application. This approach turned out to be flawed, particularly in the
frequent opening and closing of the audio device (extremely slow). Since we
use both pulling (for constant playback) and pushing (audio scrubbing, short
bursts of sound), it needed a similar but different approach. This approach
will switch the output device from push mode (default) to pull mode (during
playback) only when necessary resulting in far less UI lag (basically
unnoticeable now) than the previous approach.
2020-01-03 02:33:11 +11:00
itsmattkc 8ec63abc74 moved audio output manager and device to separate thread 2020-01-03 00:32:23 +11:00
itsmattkc 7d0d73bcfe use signal/slot threading for the audio refresh thread instead of subclassing QThread 2020-01-02 22:02:48 +11:00
itsmattkc 61c60e00d6 various small code cleanups and improvements
Largely refactoring work to make the code somewhat nicer to work with.
2019-12-26 19:00:08 +11:00
itsmattkc eb970fc293 replaced assert(false) calls with abort() 2019-11-30 02:45:47 +11:00
itsmattkc cb5d816145 removed extraneous debug line in audiohybrid device
Code cleanup.
2019-11-23 17:03:37 +09:00
itsmattkc 51c95cc48f ensure audio output is always closed when it's no longer needed 2019-11-19 11:09:21 +09:00
itsmattkc cd69bd76b9 use sequence parameters as audio output parameters 2019-11-15 20:11:17 +09:00
itsmattkc a9660201f1 miscellaneous other changes to make audio rendering work
Many changes were made throughout the codebase to support audio, these are
most of the small changes necessary.

The audio support still is not perfect. I still need to write in resampling
support. After that it should work correctly with all audio types.
2019-11-15 13:57:49 +09:00
itsmattkc 9a44e656b5 added simple wave classes
To assist the input/output of PCM data, we use the fairly straight-forward
WAVE format. These classes simplify the input and output of such data.
2019-11-15 13:49:40 +09:00