Commit Graph

39 Commits

Author SHA1 Message Date
Paul Licameli 406b23cae7 More uses of AUDACITY_DLL_API...
... in many places where the function call will later need to be between
modules (or libraries, or the executable) and the annotation will be a necessity
to keep the linkage working on Windows.

That's all that this sweeping commit does.
2021-05-10 10:46:55 -04:00
Paul Licameli 55ad1b43b8 More members of Mixer are const 2020-11-30 19:03:55 -05:00
Paul Licameli 4871584cb3 Mixer::WarpOptions constructor for common case 2020-11-30 13:42:35 -05:00
Paul Licameli 4ca3e7096f
Track factory cleanup (#646)
* Don't need TrackFactory to make LabelTrack

* Don't need TrackFactory to make NoteTrack

* Don't need TrackFactory to make TimeTrack, or ZoomInfo in the factory

* Remove some forward declarations

* Rename TrackFactory as WaveTrackFactory, move it out of Track.cpp
2020-08-22 18:44:49 -05:00
Leland Lucius d39590cf41 AUP3: First round of updates
!!! THERE WILL NO DOUBT BE BUGS !!!

This is a big one and there's still several things to
complete. Just want to get this in the wild to start
receiving feedback.

One big thing right now is that it will NOT load pre-aup3
files.  An importer is on the way for that.
2020-07-01 02:30:18 -05:00
David Bailes 64079c3f55 Keyboard scrubbing: faster change of direction
If one of the keyboard scrubbing keys is being held down, and the other keyboard scrubbing key is pressed:
1. With current behaviour, scrubbing in the other direction only starts when the original key is released - scrubbing stops and then starts in the other direction.
2. With the new behaviour, scrubbing immediately changes direction, and does not stop when the original key is released - scrubbing does not stop and then start again.

New behaviour:
If one of the keyboard scrubbing keys is being held down,
2020-01-17 09:32:17 +00:00
David Bailes 6b9c8e79cc Bug 1954: Clicks may occur starting/pausing play-at-speed or Scrub
Problem:
On Windows, after 50ms, there is a short period of roughly zero introduced into the output. On Linux, there is also a spike which sounds like a crackle.

In AudioIO::FillBuffers(), Mixer::SetTimesAndSpeed() is called, which sets mT0 and mT1 to a small interval.
In Mixer::MixVariableRates(), all the samples in the interval are used, which means the Resample::Process() is called with last equal to true.
So when Mixer::MixVariableRates() is called again, the resampler is being reused after a call to Process() in which last is true.
It is not stated in the soxr documentation if the resampler will produce valid results in this case, and it's only the scrubbing code which does this.
I think this is the problem, and so the partial fix below avoids this happening.

Partial fix for play-at-speed and keyboard scrubbing:
For these, there is no need to reset the values of mT0 and mT1. (There is no need to allow for the sample position being used to potentially jump around.)
So for these cases, Mixer::SetSpeed() is called, rather than Mixer::SetTimesAndSpeed().
2020-01-15 11:12:40 +00:00
Paul Licameli 46bf5a82fc Don't pass whole TimeTrack to Ruler or Mixer...
... they need only the information in a (Bounded)Envelope.
2019-06-10 20:48:38 -04:00
Paul Licameli 548192fcf3 Remove redundant #include-s from .h files...
Redundant, because transitively implied.  But don't do this for inclusions of
Audacity.h or Experimental.h.
2019-05-16 14:58:34 -04:00
Paul Licameli 56f51d8176 Revert "Remove redundant #include-s from .h files..."
This reverts commit b7fe62d170.
2019-05-16 14:33:55 -04:00
Paul Licameli b7fe62d170 Remove redundant #include-s from .h files...
Redundant, because transitively implied.  But don't do this for inclusions of
Audacity.h or Experimental.h.
2019-05-16 14:15:05 -04:00
Paul Licameli 1d0247607a Remove wx/string.h from headers 2019-03-26 11:33:55 -04:00
Paul Licameli a0aa69a248 All tracks allocated with make_shared, no more make_unique...
... so that we can use Track::SharedPointer without undefined behavior even on
tracks that don't yet belong to any TrackList.

Also fix the return type of function template TrackList::Add and remove some
casts.
2019-03-16 13:11:33 -04:00
James Crook 0eb778631b Bug 2045 - Clicky playback with Play-at-Speed and Scrubbing/Seeking 2018-12-03 21:04:50 +00:00
Paul Licameli 14051f04cf Bug1887: crash or hang loop-playing with WASAPI; libsoxr 0.1.3 to blame...
... probably?  This is a workaround to prevent crashes in libsoxr that did
not happen with the previous version.
2018-06-11 14:05:00 -04:00
Paul Licameli c975de8c5e More use of shared_ptr to Track, for safety...
... This even makes it possible to remove the prohibition of undo and redo
during transport, not that we want to though.  Playback and recording will
continue, using track objects that might not be in the current project.
2018-01-10 20:05:11 -05:00
James Crook a49f14ad02 doxygen. Class list completed for letter 'A'. 2017-11-09 18:32:29 +00:00
Paul Licameli 38b8e57e4e Specify whether to throw on bad read in Mixer and WaveTrackCache...
... Do throw when exporting or mixing-and-rendering; don't if playing back or
drawing a spectrogram, but then just use zeroes.
2017-03-21 17:23:35 -04:00
Paul Licameli ea05fac870 Remove naked new[] in: mixer 2017-03-17 17:52:45 -04:00
Paul Licameli ad04187a41 Change sampleCount arguments, variables, return values to size_t...
... whenever they really describe the size of a buffer that fits in memory, or
of a block file (which is never now more than a megabyte and so could be fit in
memory all at once), or a part thereof.
2016-09-15 21:03:17 -04:00
Paul Licameli 67cec5ad83 Make many counts of tracks and channels unsigned...
... And in some places where a library uses signed types, assert that
the reported number is not negative.

What led me to this, is that there are many places where a size_t value for
an allocation is the product of a number of channels and some other number.
2016-09-07 10:11:41 -04:00
Paul-Licameli 6eaff838f2 Less scrub lag: avoid redundant disk traffic in Mixer...
Also improves performance in bug 860, but not as much as the special case
patch for that bug in Bugzilla
2016-05-15 16:18:00 -04:00
Paul Licameli 13595620cf Fix mac build 2016-03-30 23:24:39 -04:00
Paul Licameli c4fc7e2bf0 MixAndRender returns unique_ptr results (in a std::pair) 2016-03-26 11:50:14 -04:00
Paul Licameli 43790cfa56 std::vector for wave track pointers; remove deprecated TrackList function; ...
... and some more uses of const
2016-03-01 20:54:48 -05:00
Paul Licameli 321d5259a2 More uses of SampleBuffer, eliminating explicit DeleteSamples calls 2016-02-01 10:16:00 -05:00
Paul Licameli d39eaa4e65 Remove WaveTrack.h from other headers 2015-07-28 10:02:05 -04:00
Paul Licameli 991ba8cc6e Remove TimeTrack.h from other headers 2015-07-28 10:02:02 -04:00
Paul-Licameli d988c3329f Support for scrubbing in playback engine, but unused 2015-04-17 02:35:06 -04:00
Paul-Licameli 2b85d0edb4 Preliminary function argument list changes and comments, for scrubbing project
In particular, use an options structure for AudioIO::StartStream to simplify
calls

ControlToolBar::PlayPlayRegion also takes that structure as an argument, and a
SelectedRegion instead of two times

And other changes
2015-04-17 02:25:39 -04:00
james.k.crook@gmail.com 4ae1517898 Inadvertently checked in changes to IS_ALPHA and Restart. Rolled these back. 2014-06-13 17:10:18 +00:00
james.k.crook@gmail.com 4c0d515dba Added <wx/filename.h> to #includes. 2014-06-13 17:02:37 +00:00
benjamin.drung@gmail.com 277932dccb Remove trailing spaces. 2014-06-03 20:30:19 +00:00
v.audacity 3fc912710b Leland's minimal_v2.patch for bug 650 2013-09-16 02:32:43 +00:00
RichardAsh1981@gmail.com 9e452d66e9 remove unused commented variables (fragment of patch from Maarten Baert) 2012-12-29 16:13:33 +00:00
richardash1981 55be06c9e4 commit a large patch by Maarten Baert maarten-baert<at>hotmail<dot>com to fix and improve time track support. Several fix-me issues remain but none are new with this patch. 2012-12-19 21:49:25 +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
richardash1981 88c9e4720a Convert existing comments to Doxygen so they show up in the documentation and less reading of source code is required. Also document some important behavious previously only discoverable by reading the source code 2011-08-28 19:42:17 +00:00
ra e74978ba77 Locate and position the current Audacity source code, and clear a variety of old junk out of the way into junk-branches 2010-01-23 19:44:49 +00:00