1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-21 14:50:06 +02:00

69 Commits

Author SHA1 Message Date
Paul Licameli
ca56876aaf Various minor fixes in Sequence 2016-02-04 01:06:51 -05:00
Paul Licameli
51fbc697cf One less indirection accessing Sequence::mBlock 2016-02-03 22:17:08 -05:00
Paul Licameli
5de27ac36f One less indirection accessing InvalidRegion 2016-02-02 11:49:54 -05:00
Paul Licameli
321d5259a2 More uses of SampleBuffer, eliminating explicit DeleteSamples calls 2016-02-01 10:16:00 -05:00
Paul Licameli
9c483e2e86 Add (redundant) #include "Experimental.h" in all .cpp files using the symbols 2015-08-31 17:56:10 -04:00
Paul Licameli
7544a35a6e Improve calculation of reassigned spectrogram at screen boundaries 2015-08-17 10:03:45 -04:00
Paul Licameli
9505278c44 Disable caching for reassigned spectrogram 2015-08-17 10:03:21 -04:00
Paul Licameli
84ee685ee9 reassignment, internals, implementing time correction, but -- ...
... it does not yet interact correctly with caching, so results may be
slightly wrong if you scroll the view by less than a screen.
2015-08-17 09:17:46 -04:00
Paul Licameli
7113d533fb reassignment, internals, implementing frequency correction only 2015-08-17 09:17:45 -04:00
Paul Licameli
e4fe449021 more simplification of arguments 2015-08-16 21:14:41 -04:00
Paul Licameli
5aba06a8a2 simplify argument passing for drawing pitch views 2015-08-16 19:45:09 -04:00
Paul Licameli
f81231efae Remove Sequence.h from other headers 2015-07-28 10:02:08 -04:00
Paul Licameli
d39eaa4e65 Remove WaveTrack.h from other headers 2015-07-28 10:02:05 -04:00
Paul Licameli
adb4a534e8 Pitch is no longer a special view type... && bug fixes 1040, 1041
... It is a choice of algorithm in spectrogram settings, and any frequency
scale may be chosen with it.  Spectral selection works in it.
2015-07-27 23:01:20 -04:00
Paul Licameli
1dffeace93 Access SpectrogramSettings via WaveTrack, which may be nondefault (no UI yet)...
... and add accessors to SpectrogramSettings, and remove TrackArtist functions
for getting and setting the globals.
2015-07-26 21:10:16 -04:00
Paul Licameli
786c1da645 Move class SpectrogramSettings to its own file 2015-07-26 21:10:13 -04:00
Paul Licameli
8664c877ba WaveDisplay may or may not manage its own memory. 2015-07-19 11:44:16 -04:00
Paul Licameli
c14b326913 Publicize class SpecCache. TrackArtist will re-use it. 2015-07-19 11:44:15 -04:00
Paul Licameli
35e0897bf7 Avoid needless mix/max/rms calculation when showing individual samples. 2015-07-19 11:43:55 -04:00
Paul Licameli
b25994a82d Throw away EXPERIMENTAL_FFT_SKIP_POINTS...
... with James' consent.
2015-07-18 23:21:27 -04:00
Paul Licameli
97f06ec09c Less shimmer and maybe less CPU in display updates for scroll-scrub, because...
... tolerant comparison of pps values allows more cache reuse and avoids the
changing alignment of pixels to samples that causes the "shimmery" update.
2015-06-11 10:26:38 -04:00
Paul Licameli
e8d676c961 fix compilation warning 2015-06-09 14:22:13 -04:00
Paul Licameli
bb42f6e7c0 More minor spectrogram drawing changes...
... Removed an unnecessary zero-filling, added comments, removed a duplication
with a loop.
2015-06-07 17:37:52 -04:00
Paul Licameli
976eb6164f More reorganization of wave and spectrum caches, and performance...
Simplify the partial copying of wave and spectrum caches.  Use memcpy for speed.

Don't memcpy out of the caches into temporary buffers for TrackArtist,
just pass
pointers.

More vectors in the cache classes, fewer deletes.

Pulled big loop, and its body, out of the spectrogram routine into functions.
2015-06-06 11:43:10 -04:00
Paul Licameli
1916bc3142 Fix compilation of some disabled experimental branches for spectrograms ...
... Not promising that they work, just compilation.
2015-06-04 11:30:08 -04:00
Paul Licameli
afa2fe9fb4 Keep FFT windows for Spectrograms in one place in SpectrogramSettings...
... not redundantly in each WaveClip.
2015-06-04 11:29:18 -04:00
Paul Licameli
952a22c8b1 Created a global structure to hold spectrogram preferences...
Don't read "/Spectrum/" preferences anywhere but in SpectrumPrefs.cpp.
Don't store global values in TrackArtist.

Possibly some day, there will be other instances of SpectrogramSettings so we
can have independent per-track settings.
2015-06-04 11:29:17 -04:00
Paul Licameli
38f24a42ef Don't invalidate SpecCache for changes of min, max, gain or range...
... because those do not affect it.  They only affect the SpecPxCache.

Did other things to that class:  renamed fields, new constructors.
2015-06-04 11:29:16 -04:00
Paul Licameli
ba5738446c Bug1009: Correct interaction of Zero Padding and Frequency Gain...
... also an excuse to pull out a function I will want to reuse in a later
project.  The real fix was simply to use fftLen not windowSize.
2015-06-03 15:01:54 -04:00
Paul Licameli
8d5052bf4e Avoid assertion violation while scrolling 2015-06-02 22:38:08 -04:00
unknown
29fb5a2ffe Simplified passing of min/min/rmx/bl/where values for drawing waveforms 2015-06-01 22:58:18 -04:00
unknown
34b09053b4 Simplified some management of WaveClip caches 2015-06-01 22:58:17 -04:00
unknown
ee600ce30b Functions for common parts of waveform and spectrogram display update 2015-06-01 22:58:11 -04:00
Paul Licameli
6a1227f039 zero-padding factor for spectrograms, internals 2015-05-31 16:43:09 -04:00
Paul Licameli
e6ccd51326 Use WaveTrackCache for spectrograms
Zooming-in of spectrograms (or other view changes that invalidate the
whole pixel cache of the WaveClip) used to do at least one opening and
closing of a block file for each column of pixels.  With this change,
open each block file not more than once for each repopulation of the
cache.

Improved speed may be more noticeable on less powerful computers, or when
the audio file is in a slower storage device.
2015-05-26 20:02:38 -04:00
Paul-Licameli
da2b9e3233 Fix other assertion violations in wave clip cache code, and add comments.
Duplicate the assertion for the case of spectrograms.
2015-04-21 17:52:29 -04:00
Paul-Licameli
8bcec00e65 Rewrite Sequence::GetWaveDisplay
That is the function that computes the heights of dark and pale blue lines in
the waveform display.

It's not simple but now the flow of control is less strange and it is better
commented.

This doesn't fix or enhance anything, but it might find use later, such as in
a project to adapt the resolution of the display in reponse to slow scrolling
updates.
2015-04-21 11:11:20 -04:00
Paul-Licameli
46e937e3ea Fix assertion violations from the previous change. 2015-04-17 18:21:43 -04:00
Paul-Licameli
cc2a26956a Fix display caching for waveforms and spectrograms so smooth scrolling works
This will matter if the smooth-scrolling version of scrubbing is enabled

The problem was accumulation of roundoff errors when deciding which pixel
column data to copy from old caches to new caches, when the number of samples
scrolled was not an integer multiple of samples per pixel (itself, not always
an integer)

Thus repeated scrolling by small amounts caused the wave display or spectrogram
to creep relative to the time ruler!
2015-04-17 11:12:47 -04:00
Paul-Licameli
fe8d3535d8 Bug819 - Paste should not change clipboard contents when sample formats differ 2015-04-08 19:11:50 -04:00
james.k.crook@gmail.com
8305bfdb05 From: martin@steghoefer.eu [PATCH 01/15] Fix runtime problem with wxWidgets 3.0: Correct string formatting: wxLongLong -> %lld + long long
The functions wxString::Format, wxString::Printf (and others indirectly) have become stricter about parameter types that don't match (format specifier vs. function parameters). So the bugs (that were already present in audacity before) become visible in wx3.0 as error message dialogs. I've checked all occurrences of Printf, wxPrintf, PrintfV, Format, FormatV, wxLogDebug and wxLogError systematically and made the type match.

Note: In Shuttle.cpp this patch supersedes one related change done in r13466 because a wxLongLong_t can be bigger than an int and in a generic function like "TransferLongLong" this should be taken into account.
2014-11-08 16:06:28 +00:00
benjamin.drung@gmail.com
277932dccb Remove trailing spaces. 2014-06-03 20:30:19 +00:00
RichardAsh1981@gmail.com
28e9f0ca73 make many functions which do not require access to class member variables static so they can be called without an object to do so with. Based on part of a patch by Campbell Barton 2013-09-21 19:15:42 +00:00
v.audacity
030d2450a8 Go back to simpler architecture for Resample class, now that libsoxr is proven for variable rate resampling. 2013-08-04 01:58:54 +00:00
v.audacity
9d0daf8662 Campbell Barton's patch to turn many, many tabs to our 3-space convenbtion 2013-02-20 23:42:58 +00:00
v.audacity
ce9bd9fa90 I think this completes the refactoring for const-rate vs var-rate resampling. 2012-11-04 04:44:10 +00:00
v.audacity
5460b5c668 This commit is partial effort toward more libsoxr integration, that implements Rob Sykes's latest patch. I have no idea whether the Linux-specific stuff from the patch (e.g., M4 file) is still correct in this.
For Resample.* and QualityPrefs.cpp, this commit has my restructuring for distinguishing constant-rate vs variable-rate resamplers more generally. I think it's complete and ready for const-rate, but I have more review and testing to do for the var-rate cases. 

Variable-rate resampling is not implemented here, so Time Tracks are still broken, but this is a milestone in getting to a more general and correct structure. 

Also I think this fixes AboutDialog issues Steve noticed.
2012-11-03 02:06:07 +00:00
martynshaw99
ffea5a2273 Addressing one of the problems reported with 'Normalise' if the offset is greater than the signal. Comments on other possible problems. 2012-04-23 23:39:36 +00:00
v.audacity
111278c61b In WaveTrack.*:
* Fix P2 bug described by Bill Wharrie in "Problem dragging clips between tracks with different sample rates" thread on audacity-quality. Made sure the clips get resampled to the destination WaveTrack rate, and marked changed.

* Comment out unused override of WaveTrack::MoveClipToTrack().

* Added an ANSWER-ME about what appears to be a useless declaration and assignment.


In WaveClip.cpp, remove wxASSERT that Michael was trying to convince me to do yesterday. In debugging this, found a case when it's not a bad call. Thanks, Michael! :-)

In TrackPanel.cpp, removed some cruft.
2012-03-03 01:34:14 +00:00
v.audacity
3b90ee098e Martyn's fix for http://bugzilla.audacityteam.org/show_bug.cgi?id=474 2012-02-27 01:43:33 +00:00