1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-17 16:40:07 +02:00

379 Commits

Author SHA1 Message Date
Paul Licameli
7969b5a9e9 Bug2159: Ruler play region should update when play/record stops 2019-07-15 23:28:25 -04:00
Paul Licameli
2f3b119caa Bug2129 residual: click effect Preview button make Linux assert failure 2019-07-14 12:00:33 -04:00
Paul Licameli
e2362bc25a Move project status string management to new attached object class 2019-07-02 21:01:34 -04:00
Paul Licameli
0b7a4d07b9 Fix wrong arguments to wxClip in AudioIO...
... the bug began at commit 494ab4eafedd4aef47a6680581a8b357f5100ec4

Now, a sine wave with the gain turned up really sounds like a square wave
2019-06-29 23:44:11 -04:00
Paul Licameli
e08a942ab8 Fix other cause of intermittent timing-dependent crash at shutdown...
... AudioIO holds a weak pointer to its listener so there is no dangling
pointer
2019-06-24 13:32:08 -04:00
Paul Licameli
5627620b78 Remove dependency of AudioIO on Scrubbing.cpp ...
... though the demotion of the constant into AudioIO.h isn't wholly satisfactory
and there is still the scrubbing queue in AudioIO
2019-06-24 12:52:54 -04:00
Paul Licameli
d9b780b067 AudioIO does not depend directly on ControlToolBar ...
... use one more callback in the listener to change the ControlToolBar pause
state.
2019-06-24 12:43:08 -04:00
Paul Licameli
bcc90ee91a AudioIO does not need ProjectWindow 2019-06-24 12:43:08 -04:00
Paul Licameli
ed5c92450d CommitRecording out of ControlToolBar 2019-06-24 12:43:08 -04:00
Paul Licameli
ab5a98003a Free EffectManager and EffectRack from the big s.c.c. ...
... though in a small cycle with each other, by moving RealtimeEffectManager to
new files, which remain in the big component.

Net loss of 1, the big component now has 27 files
2019-06-24 00:49:12 -04:00
Paul Licameli
04a3ed9d04 Separate class RealtimeEffectManager 2019-06-24 00:37:02 -04:00
Paul Licameli
758e9813f1 Move MeterPanelBase to new files...
... which frees AudioIOBase, QualityPrefs, and ProjectAudioIO from cycles
2019-06-10 20:48:39 -04:00
Paul Licameli
51051ee933 Separate AudioIOBase from AudioIO 2019-06-10 20:48:38 -04:00
Paul Licameli
42a4f55ffe Prepare to split AudioIOBase from AudioIO...
... New files, but (almost) empty; don't use the global variable gAudioIO,
but use one of two accessor function names (which are the same function for
now).

AudioIOBase will have fewer dependencies than AudioIO -- in particular, no
dependency on tracks.

It won't include StartStream.  It will contain functions to query the
present state of streams, and device capabilities.
2019-06-10 20:48:38 -04: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
4f940c855d New files for ProjectWindow 2019-06-03 01:43:26 -04:00
Paul Licameli
fee5582826 New files for ProjectManager 2019-06-03 01:21:12 -04:00
Paul Licameli
850628275b AudioIO.cpp does not depend on ProjectAudioIO.h and GetActiveProject 2019-06-03 01:18:11 -04:00
Paul Licameli
e5cf2165d1 New files for ProjectAudioIO 2019-06-03 01:18:08 -04:00
Paul Licameli
1f4202c878 New attached structure ProjectAudioIO handles tokens and meters 2019-06-03 01:15:47 -04:00
Paul Licameli
96b749f232 Fix Linux assertion violation when closing Preferences 2019-05-30 17:37:44 -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
02afcbca8c Redo TP_UpdateStatusMessage...
... Rename it as SetStatus; make it part of AudacityProject not
TrackPanelListener; and use a roundabout event signalling to cause the timer
restart.

Because SetStatus will be one of very few things left in AudacityProject, but
the timer handling will be part of another class decoupled from it.

And TrackPanelListener won't really be needed: TrackPanel will not need to
pretend it doesn't know what an AudacityProject is.
2019-05-28 19:36:47 -04:00
Paul Licameli
ad0580c3de fix assertions on Linux because of 1ed9338 2019-05-27 19:45:57 -04:00
Paul Licameli
3416b5bad6 Toolbars accessed by static Get() functions, not through AudacityProject 2019-05-24 16:08:29 -04:00
Paul Licameli
2f0a76ed10 static Scrubber::Get()...
... not member functions of AudacityProject
2019-05-23 16:01:10 -04:00
Paul Licameli
dccb716f39 enum PlayMode tells whether there's cut preview; out of Project.h 2019-05-20 21:38:12 -04:00
Paul Licameli
f86403378b Move AudacityMessageBox to its own files...
... breaking cycles among low-level files introduced by 273ba9f
2019-05-20 14:48:36 -04:00
Paul Licameli
519a988467 RecordingPrefs.cpp does not depend on AudioIO.cpp...
... freeing it from dependency cycles, but no others
2019-05-18 20:29:25 -04:00
Paul Licameli
a047fa6e7a Missing alias file tracking out of AudacityApp, into new files...
... which reduces the need for including AudacityApp.h
2019-05-17 16:28:50 -04:00
Paul Licameli
0ab29d21e9 Some naming consistency...
Prefer "MissingAliasFiles" not other permutations of the words
2019-05-17 06:47:53 -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
544d9aa580 Don't use AudacityApp where you only need wxApp...
... I want to have fewer inclusions of AudacityApp.h.  More work on removing
them will happen in the next version.
2019-04-26 11:54:28 -04:00
Paul Licameli
3bc95e610a Remove vacuous write of /GUI/EnvdBRange ...
... but see code comments about the apparent original intent, to update some
other preference instead; which I don't do, thus preserving present behavior
2019-04-05 21:09:57 -04:00
Paul Licameli
3760db9dff Remove wx/wxchar.h from headers 2019-03-29 15:56:54 -04:00
Paul Licameli
5aa08950a5 Internationalize audio and midi device info reports...
... following the substitute, don't concatenate rule in many places.

The end users have commands to generate these reports in menus, so they should
be translated then; however, they are also part of crash reports meant for
developers, so temporarily set English locale for generating those.
2019-03-27 12:29:18 -04:00
Paul Licameli
9569cfddf5 More comments for including Audacity.h; fix one #ifdef in AudioIO.cpp 2019-03-23 14:09:05 -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
eb94489277 Make EXPERIMENTAL_AUTOMATED_INPUT_LEVEL_ADJUSTMENT compilable 2019-03-20 16:54:14 -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
1bcb7c20a5 Remove some nested #include from Project.h 2019-03-16 13:09:54 -04:00
David Bailes
b8b2f4380e Bug 2080: Using WASAPI, after recording, playback can fail
The bug:
1. Set Audio host to WASAPI
2. choose recording and playback devices which have different default sample rates in shared mode.
3. Set overdub, and playthrough to off.
4. make a short recording.
5. playback. Fails with error dialog.

Cause of bug:
In AudioIO::GetBestRate, the last returned sample rate is cached. If the function is called again, with the same requested sample rate, then the cached value is returned. So in the above steps, when GetBestRate is called for playback, the sample rate of the recording device is returned.

Fix:
Include in the conditions for returning the cached rate that the values of playing and capturing as the same as in the previous call.
2019-03-15 10:03:46 +00:00
Paul Licameli
50074f2cfe Replace comparisons against "" with empty() 2019-03-14 13:23:41 -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
James Crook
0eb778631b Bug 2045 - Clicky playback with Play-at-Speed and Scrubbing/Seeking 2018-12-03 21:04:50 +00:00
Paul Licameli
41d0ac1b65 reinterpret_cast not C-style cast. (The cast value is always 0). 2018-11-15 11:20:22 -05:00
James Crook
7f8bfa0ac2 Make microfades into a preference. 2018-11-02 21:58:53 +00:00
James Crook
6a4663e19c Use wxGetUTCTimeMillis in preference to wxGetLocalTimeMillis
For internal time-difference test, it is significantly faster, and does not suffer from daylight-saving time shifts.
2018-10-29 19:59:28 +00:00
Paul Licameli
723cecbeac Mixerboard uses events to detect start and stop of playback 2018-10-27 18:01:08 -04:00