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

156 Commits

Author SHA1 Message Date
Paul Licameli
65a13fd3d6 Remove unused variable 2019-12-28 23:49:17 -05:00
Leland Lucius
487016727e Fix include 2019-12-24 03:24:14 -06:00
Paul Licameli
519b16f6ca Keep EXPERIMENTAL_OD_FFMPEG compilable 2019-12-24 00:16:28 -05:00
Paul Licameli
49cab86fc1 TranslatableString for tooltips and status bar messages 2019-12-20 21:54:49 -05:00
Paul Licameli
586eb0d4cb Break cycle of ODDecodeBlockFile and ODDecodeTask 2019-07-09 13:39:08 -04:00
Paul Licameli
86320838de WaveTrack.cpp does not depend on ODManager.cpp ...
... Breaking up an s.c.c. of 6 into 3 components:
ODManager, ODTask, ODWaveTrackTaskQueue
UndoManager
WaveClip, WaveTrack

Rewrite the OD tasks and queues to hold weak pointers to tracks, so the
track destructor need not notify them.
2019-06-22 21:46:35 -04:00
Paul Licameli
499e3c01ce Keep EXPERIMENTAL_OD_FFMPEG and EXPERIMENTAL_OD_FLAC compilable 2019-06-22 21:45:56 -04:00
Paul Licameli
c6a7f7c59f OD manager events will be signalled through the Project...
... not the project window, when those are distinct objects.

This will keep the existing calls that bind the events correct.
2019-06-01 23:06:04 -04:00
Paul Licameli
b25d3ad344 Limit access to global array of open projects & simplify iterations 2019-05-30 01:55:25 -04:00
Paul Licameli
82663892dc Accessors to get the project window...
... as a preparation for splitting up class AudacityProject.

Use ProjectWindow as an alias for AudacityProject, and fetch it from the
project with a static member function, where certain of its services are used;
pretending they are not the same class.

Use global accessor functions to get wxFrame from the project where only
wxFrame's member functions are needed, so there will be less dependency on
ProjectWindow when it becomes a distinct class.
2019-05-28 23:18:13 -04:00
Paul Licameli
441763cabd Fix 9c75ebe, which caused TrackPanel not to get the message 2019-05-28 18:53:54 -04:00
Paul Licameli
72b7c776a8 static UndoManager::Get()...
... not member functions of AudacityProject
2019-05-23 12:58:47 -04:00
Paul Licameli
14ab93a01f static TrackList::Get()...
... not member function of AudacityProject
2019-05-23 12:58:47 -04:00
Paul Licameli
6bed41a9be Move class ODTaskThread out of ODTaskThread.* (!) ...
... freeing three files from dependency cycles.

The class is only constructed by ODManager so move its definition there.

Meanwhile, the (now misnamed) ODTaskThread.cpp implements some thread
synchronization utilities used in several other places, not dependent now on
ODManager.cpp, and also not on ODTask.cpp.

These utilities should be eliminated in favor of standard library alternatives,
but that is a task for later.
2019-05-18 20:29:25 -04:00
Paul Licameli
6c57948d8f Remove unnecessary #include-s from .cpp files...
... Unnecessary because transitively included.

But each .cpp file still includes its own .h file near the top to ensure
that it compiles indenendently, even if it is reincluded transitively later.
2019-05-16 17:21:00 -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 b7fe62d17067b4441530dd36b25052cea3ad44b5.
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
f6adeed47b Remove some unnecessary #include directives 2019-05-15 14:14:18 -04:00
Paul Licameli
a10196eb91 Fix some comments 2019-03-31 15:14:26 -04:00
Paul Licameli
ec2f26e48c Remove wx/pen.h, wx/thread.h from headers 2019-03-30 10:17:18 -04:00
Paul Licameli
40b4361732 Remove wx/arrstr.h from headers 2019-03-26 12:41:44 -04:00
Paul Licameli
51f0362e9f Remove wx/wx.h from headers 2019-03-26 11:17:41 -04:00
Paul Licameli
8dace29aba Make EXPERIMENTAL_OD_FFMPEG compilable again 2019-03-25 19:18:11 -04:00
Paul Licameli
f45300f032 This is only comments, in files where USE_ macros are tested...
... following the comment convention used in the preceding commit.
2019-03-22 12:38:30 -04:00
Paul Licameli
b4ce681867 WaveTrack.h does not include WaveClip.h 2019-03-18 01:44:42 -04:00
Paul Licameli
5e7d41ec07 Each .cpp/.mm file includes corresponding header before any other...
... except Audacity.h

This forces us to make each header contain all forward declarations or nested
headers that it requires, rather than depend on context.
2019-03-17 22:54:52 -04:00
Paul Licameli
906e55f047 Experimental.h in all .h or .cpp files that directly use EXPERIMENTALs...
... except Audacity.h; and in no others.

Do so even if Experimental.h gets multiply included, as in both the .h and
.cpp files.

This makes it easier to do a text scan to be sure there are no unintended quiet
changes of meaning because of omission of Experimental.h when the flag is
an enabled one.

Also move inclusions of Experimental.h earlier.

Also don't require Experimental.h to be preceded by Audacity.h to define
EXPERIMENTAL_MIDI_OUT correctly.
2019-03-17 22:54:00 -04:00
Paul Licameli
173a300427 Include nothing before Audacity.h, as comments say we should...
... and remove some duplicated inclusions
2019-03-17 21:41:39 -04:00
Paul Licameli
2db49dc1f0 Use standard library style members of wxArrayString (and wxString) ...
... which will make it easier to change the types of those containers to
std::vectors of other string-like classes

for wxString,

IsEmpty => empty
Clear => clear
Alloc => reserve

for wxArrayString,

Count => size
GetCount => size
IsEmpty => empty
Add => push_back
Clear => clear
Empty => clear
Sort => std::sort (only with default comparator)
SetCount => resize
Last => back
Item => operator []
Alloc => reserve
2019-03-10 14:43:57 -04:00
Paul Licameli
52642e49a5 Define and use utilities transform_range, transform_container 2019-03-10 14:43:47 -04:00
Paul Licameli
b4113aae35 Make EXPERIMENTAL_OD_FFMPEG compilable 2019-03-09 12:02:13 -05:00
Paul Licameli
a7df004a88 Don't include Project.h or ODTask.h needlessly in other header files 2018-10-16 17:36:38 -04:00
scootergrisen
b4f7946e9b Remove some double space 2018-10-14 10:42:01 +01: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
968d63d5fd Rewrite many iterations over tracks and channels in various places 2018-10-01 13:35:51 -04:00
Paul Licameli
af06691982 casting of Track* to WaveTrack* happens at lower level in OD manager 2018-09-29 12:46:45 -04:00
Paul Licameli
8935fa106f Replace deprecated std::mem_fun and mem_fun_ref with mem_fn...
... which is easier to type and works whether you pass object pointers or
references to its operator ().
2018-07-28 10:59:08 -04:00
James Crook
20178b15e1 Fix some 'declaration hides' warnings.
We were for example getting many of these:
\audacity\src\widgets\numerictextctrl.h(171): warning C4458: declaration of 'value' hides class member

MSVC2013 didn't warn about these, but MSVC2017 does.
2018-06-27 12:36:13 +01:00
Paul Licameli
a9e7a7e5d5 movable_ptr(_with_deleter) -> std::unique_ptr 2018-05-10 00:56:37 -04:00
Paul Licameli
b8a8712ba0 make_movable -> std::make_unique 2018-05-10 00:56:36 -04:00
James Crook
b60fae4470 Fix some warnings on mac
These are mostly missing 'overrides'
2018-04-07 20:28:27 +01:00
Paul Licameli
2ea5741e2e Redo format setting choices in Quality preferences 2018-03-25 14:46:53 -04:00
James Crook
1d9477a455 SetClip, SetLabel, SetProject added
- SetTrack also updated with more options.
2018-02-24 14:20:24 -05:00
Paul Licameli
7fd78183d2 Remove needless uses of wxString::c_str() in wxString::Format...
... and similar wx "variadics," which all treat wxString smartly enough that
you don't need this.

Don't need c_str either to convert wxString to const wxChar * because
wxString has a conversion operator that does the same.
2018-01-01 20:34:33 -05:00
Paul Licameli
4d978bcefb Use wxPrintf not printf 2017-12-16 11:54:32 -05:00
Paul Licameli
f0de38dec1 Scanned for bad naked new; found none; changed comments, used safenew 2017-07-23 09:35:01 -04:00
Paul Licameli
ed6f2ea80f Exception safety in: locking of BlockFile for read 2017-03-21 14:11:27 -04:00
James Crook
748e718395 Workaround for FLAC__MAX_METADATA_TYPE not defined. 2017-03-18 19:44:12 +00:00
Paul Licameli
01c5f25a19 Rewrite one try-catch with GuardedCall so we can show the user errors 2017-03-17 17:53:01 -04:00