1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-01 16:19:43 +02:00

9239 Commits

Author SHA1 Message Date
Steve Daulton
5d34d022a5 Add rms.ny to Audacity bundle
Tidy translation code in init.lsp
Include rms.ny in Makefile.am
Add rms.ny to Linux package
Update Makefiles with: autoreconf --force --no-recursive
Add rms.ny to mac build
Add rms.ny to Windows build
2018-10-08 18:55:46 +01:00
Paul Licameli
14fe11f4d4 Bug2008: There was error in stereo Contrast calculation, at aee4005 2018-10-07 10:29:58 -04:00
Paul Licameli
3f928a25b0 Bug2004: Opening Mixer Board with a Note track crashed...
... Just one null check was needed, but I also add another, and use a
wxWeakRef pointer, for more safety.
2018-10-06 11:20:30 -04:00
Paul Licameli
e6e4f44c81 Bug1997: Split Stereo Track and Split Stereo to Mono were doing nothing 2018-10-05 22:09:10 -04:00
Paul Licameli
b5a7b67cb7 Fix some crashes in time-shift 2018-10-04 12:02:51 -04:00
Paul Licameli
92cceaf599 Fix usage of InconsistencyException 2018-10-04 11:44:46 -04:00
Paul Licameli
90e2da7f14 Fix uses of TrackList::GroupChannels in Mix and effect preview 2018-10-04 11:34:14 -04:00
Paul Licameli
df1103822e Don't crash in Nyquist tools with mOutputTracks undefined 2018-10-04 10:56:03 -04:00
Paul Licameli
75918918c4 Correct template parameters to std::iterator base of TrackIter...
... so that std::reverse_iterator<TrackIter<T>> works right, not making a
subtle error of return of reference to a temporary in its operator * with some
compilers.
2018-10-03 22:47:21 -04:00
Paul Licameli
50f2b0e860 Bug1995: Fix drawing of stereo tracks, bug introduced at 0c0c2c0 2018-10-03 17:19:15 -04:00
Steve Daulton
8880e1b929 Fix missing initialization from a17af37 2018-10-03 21:08:27 +01:00
Paul Licameli
cc74b0273f Fix return of reference to temporary object (that's bad!) ...
... This might be the reason for Linux crashes when playing-at-speed.

This was a bad thing to do with any compiler -- not to be blamed on
possible compiler bugs.

There was a warning about this in the XCode build.
2018-10-03 14:26:05 -04:00
David Bailes
348e7868b8 1991: On Windows, nyquist effects and analysers slower than on 2.2.2
Problem: profiled the limiter effect, and found that wxGetLocalTimeMillis() in ProgressDilaog::Update was taking up a lot of time.
The slow down of the nyquist effects and analysers was introduced by the switch to wxWidgets 3.1.1, so presumably there was some change to the implementation of wxGetLocalTimeMillis()

Fix: Use wxGetUTCTimeMillis() instead of wxLocalTimeMillis() in ProgressDialog.cpp. This is much faster on Windows, and wxWidgets recommend its use to due wxGetLocalTimeMillis() being affected by start/end summer time (daylight saving time).
2018-10-03 19:18:41 +01:00
Paul Licameli
0a55b27d2d Bug1994: Crashes in append-record...
... The crash happened in drawing code.  The recently submitted but long
developed rewriting of track and channel iterations wasn't all reconciled
with the early 2.3.0 development relating to temporary track objects for
display purposes, which was for fixing the interactions of recording and undo.
2018-10-03 13:21:15 -04:00
Pokechu22
565fef2ba9 Bug 1832: Fix adjusting time track when in logarithmic scale
The typo that caused this appears to have been introduced when this code was restructured in 9e0010ec5f.
2018-10-02 21:13:23 -04:00
Steve Daulton
a17af37c1e Fix bug 1992 2018-10-02 22:40:10 +01:00
Paul Licameli
526179b63e Remove a use of c_str 2018-10-01 19:48:10 -04:00
Paul Licameli
81385d7ebd Track type switch safety; simplified iterations & channel groupings...
A very extensive rewrite.

No longer:

1 Test a type field of a track and then do a C-style pointer down-cast
2 Use verbose old iterators over tracks that required those down-casts
3 Detect that a track has a stereo partner by testing Track::GetLink();
  Detect that a track is the left stereo channel by testing Track::GetLinked()
4 Do something to one channel of a pair, then repeat on the other channel
5 Set up new or imported stereo tracks with Track::SetLinked() and setting of
  channel types

Instead:

1 -- Use track_cast, which won't cast const away, to convert a pointer, getting
     null if the track is not of the specified type
  -- Or use Track::TypeSwitch which takes lambda expressions with arguments of
     desired subtypes, entering the lambda body only if the track has the
     right type
  -- Or use TrackIterRange<...>::Visit() or VisitWhile() to apply a
     type-switch over each of several tracks.

2 -- Use TrackList::Any() or Selected() or other new functions, which return
     TrackIterRange<...> objects that represent ranges of tracks to be visited.
  -- Use the template type parameter to restrict visitation to a subtype and
     cause the pointer down-cast to be built in to the iterator deferences.
  -- Use C++11 range-for or stl algorithms with TrackIterRanges for brevity
  -- Or even avoid loops by using size() or min() or similar member functions
     of TrackIterRange.
  -- Use StartingWith(), EndingAfter(), Excluding(), and operators + and -
     (which can take arbitrary predicates on tracks) to filter the range object
     and simplify loop bodies even further.

3 -- Use Track::IsLeader() to test whether a track is first in a channel group
     (which also returns true when it is not grouped with any other track, and
     maybe not even a WaveTrack)
  -- Or use TrackList::FindLeader() to get the first member of its group
  -- Or use TrackList::Leaders() to get a track range that includes leaders
     only, then visit that range as in (2).

4 -- Use TrackList::Channels() to get a TrackIterRange that includes only
     the members of the group of a given track and visit that as in (2).
  -- Do not needlessly assume or assert that the channels are at most two.

5 -- After all the channels have been added at the end of the TrackList, just
     call TrackList::GroupChannels() passing the leader track and number of
     channels.

Most rewrites covered by (3) and (4) generalize without any complications to
possible future more-than-stereo track groupings.  In other places, there may
be some difficulty about such generalization, and those are marked with the
comments:

// TODO: more-than-two-channels

or else

// TODO: more-than-two-channels-message

where it was merely a matter of more appropriate wording for the user.  This
branch makes no changes to user-visible messages.

What isn't changed in the interface exposed by TrackList and Track:

-- Grouped channels are always a contiguous sub-range of all tracks, and
   client code may rely on that assumption.

What isn't changed in the implementaion:

-- Channel groups are never yet actually more than two.
-- The grouping of channels is still represented by a boolean flag in each
   track that is true only for the first channel of each stereo pair.
-- The persistent representation of channel groups in .aup files.
2018-10-01 13:42:37 -04:00
Paul Licameli
8fcbbaeea9 Encapsulate details of setting-up of channel groups in TrackList...
... except that WaveTrack needs to be a friend, just for reloading from disk.

Nothing yet is changed in the internal or persistent representation of channel
groups.
2018-10-01 13:42:36 -04:00
Paul Licameli
32d767c7f5 Track::SetLinked() and Track::SetChannel() are private...
... but class WaveTrack needs to invoke SetLinked still during project load
2018-10-01 13:42:36 -04:00
Paul Licameli
beebe648fb Remove more uses of Track::SetLinked() and Track::SetChannel() 2018-10-01 13:42:36 -04:00
Paul Licameli
894f6f4f63 Remove SetLinked() and SetChannel() from importers 2018-10-01 13:42:36 -04:00
Paul Licameli
b0c5f42b9a Remove old iterators, type tests, GetLink(ed) from Track's interface 2018-10-01 13:42:35 -04:00
Paul Licameli
7e6a543473 Define TrackList::GroupChannels() 2018-10-01 13:42:35 -04:00
Paul Licameli
31d46ae624 Importer functions return a vector of vector of pointers to tracks...
... grouping the channels; rather than one flat vector.

OGG, GStreamer and FFmpeg import were written to allow multiple multi-channel
tracks; others always imported one group of channels.

All of that is reflected in the results returned by the importers, though it
makes no difference yet in AudacityProject::AddImportedTracks (where the
results are used).
2018-10-01 13:42:35 -04:00
Paul Licameli
2ee87082cb Track::GetLink and GetLinked are private, but SetLinked isn't yet 2018-10-01 13:42:34 -04:00
Paul Licameli
b36c3efec1 Track::GetKind is private 2018-10-01 13:42:34 -04:00
Paul Licameli
b5f52e7c1c Remove old style track iterator classes 2018-10-01 13:42:34 -04:00
Paul Licameli
fbec3efa0c Eliminate some unnecessary track type tests 2018-10-01 13:42:34 -04:00
Paul Licameli
7d55defde6 Rewrite channel iterations that don't generalize to more than two...
... requiring at least some message rewrites.

All these places have a comment:

// TODO: more-than-two-channels

or in simpler cases just

// TODO: more-than-two-channels-message
2018-10-01 13:42:33 -04:00
Paul Licameli
dbf44efc9f Iterations over channels in remaining places that won't generalize...
... simply to the more-than-stereo case.

All these places have the comment:

// TODO: more-than-two-channels
2018-10-01 13:42:33 -04:00
Paul Licameli
4aa990e835 Remove GetLink(ed) in various other places 2018-10-01 13:42:33 -04:00
Paul Licameli
c107fb298b Remove GetLink(ed) in channel manipulation menu items 2018-10-01 13:42:32 -04:00
Paul Licameli
ecc869bdbe Remove GetLink(ed) in TrackPanel resizing code 2018-10-01 13:42:32 -04:00
Paul Licameli
d2a18f01e3 Remove use of GetLink(ed) in AudacityProject::OnPaste 2018-10-01 13:42:32 -04:00
Paul Licameli
7eadd7a36f Iterations over channels involving third-party effects libraries...
... I don't know whether these libraries support more than two channels with
no problems.

All these places have the comment:

// TODO: more-than-two-channels
2018-10-01 13:42:31 -04:00
Paul Licameli
22c85dd99c Rewrite GetLink(ed) in SBSMS 2018-10-01 13:42:31 -04:00
Paul Licameli
48ae1eb3c9 Rewrite GetLink(ed) in SoundTouch 2018-10-01 13:42:31 -04:00
Paul Licameli
70f7b0f6ef Iterations over channels where more general messages may be needed...
... but otherwise the logic generalizes without a problem.

All these places have the comment:

// TODO: more-than-two-channels-message
2018-10-01 13:42:30 -04:00
Paul Licameli
518df314eb Rewrite GetLink(ed) in vamp effects 2018-10-01 13:42:30 -04:00
Paul Licameli
a68184f81d Remove GetLink(ed) in track panel drawing and refresh 2018-10-01 13:42:30 -04:00
Paul Licameli
46557a9a2d Rewrite many track type switches, track and channel iterations...
... that present no complications to more-than-stereo genralization
2018-10-01 13:42:29 -04:00
Paul Licameli
4c75175e41 Remove GetLink(ed) in Normalize effect...
... It's much simpler and should be easy to generalize, but what would be
appropriate messages?
2018-10-01 13:42:29 -04:00
Paul Licameli
f276373f3c Remove GetLink(ed) in clip-moving functions 2018-10-01 13:42:29 -04:00
Paul Licameli
3561154311 More rewrites of iterations over channels...
... that can generalize to more than stereo
2018-10-01 13:42:28 -04:00
Paul Licameli
669054b4f4 Remove many uses of GetLink in TrackPanel 2018-10-01 13:42:24 -04:00
Paul Licameli
0c0c2c0d1e Rewrite iteration over visible tracks in TrackArtist...
... also eliminating AudacityProject::GetFirstVisible.
2018-10-01 13:41:51 -04:00
Paul Licameli
51e0ae0447 Remove GetLink() in AudacityProject::AddImportedTracks...
... Be careful when you call IsLeader()!  It's correct only after the
tracks belong to the project's TrackList.
2018-10-01 13:41:51 -04:00
Paul Licameli
a7ca6db7c3 Rewrite many iterations over tracks and channels, track type tests...
... which do not require cautions for future more-than-stereo cases.
2018-10-01 13:41:50 -04:00
Paul Licameli
968d63d5fd Rewrite many iterations over tracks and channels in various places 2018-10-01 13:35:51 -04:00