9 Commits

Author SHA1 Message Date
Jonathan Thomas
16f791a55a Adding missing <sstream> includes for older compilers, and because it should be included anyway 2025-12-16 18:23:57 -06:00
Jonathan Thomas
af9a4893ed Fixing regression inside AudioWaveformer so it uses a proper detached reader, and no longer mutates the Clip's reader (preventing a bug which caused our video to disappear when waveforms were used on the clip) 2025-11-24 18:33:25 -06:00
Jonathan Thomas
d4647b5525 Refactoring the AudioWaveformer again, this time to de-couple it from the actual clip object passed to it, and to no longer iterate over the potential longer time keyframes using GetFrame alone. Now, we only decode audio-streams, and only get the original samples (reduced sample rate drastically), and finally we apply keyframes (volume and time) to modify our original samples. This is a HUGE speed-up boost for waveform generation. 2025-11-23 14:11:53 -06:00
Jonathan Thomas
5596344575 Fixing AudioWaveformer::ExtractSamples to pause temporarily when a clip's reader is closed, and resume extracting when it's open again. This prevents a very common crash / bug when generating waveforms for longer audio clips and continuing to make chagnes on the timeline (which closes all clips temporarily - interrupting the waveform extracting). 2025-11-06 14:51:57 -06:00
Jonathan Thomas
7e29fc0935 Improving audio directionality, with new function: SetAudioDirection(), so we can safely flip audio buffer direction when needed (i.e. time curves, reversed time). Also adding a new SetDirectionHint function to FrameMapper class - so our Clip class can inform the FrameMapper of its direction at any given moment. Also, clear resampler when changing directions inside a Time curve (since the audio buffer will be flipped - the resampler internal cache must be cleared). 2025-10-11 16:29:11 -05:00
Jonathan Thomas
c165eca5d8 Improving AudioWaveformer to be able to correctly generate waveforms for time-curved clips that have a modified duration/video_length (i.e. repeated clips, slowled down clips, etc...). Adding a new ReaderBase.h VideoLength() that can be overridden in Clip.cpp when time curves are involved. 2025-09-22 12:28:12 -05:00
Jonathan Thomas
bdb161dc93 AudioWaveformData: Adding protection from divide by zero and readers with no audio, including additional unit tests and a faster zero() function 2022-11-03 11:37:14 -05:00
Jonathan Thomas
c838c126ad Improvements to AudioWaveformer to use RMS (Root Mean Square), and return both average RMS and max RMS for graphing, including some new unit tests. 2022-11-01 15:17:03 -05:00
Jonathan Thomas
2326532820 Initial commit of AudioWaveformer class, which is designed to iterate any ReaderBase, and return a reduced "average" sample set - more useful for generating waveforms - for example, reduce a 44100 samples per second down to 20 samples per second. 2022-10-30 22:04:19 -05:00