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

72 Commits

Author SHA1 Message Date
Paul Licameli
94cf94718e Redefine ODLocker as movable, and it may try-lock only. 2016-04-17 13:58:21 -04:00
Paul Licameli
185d5e132d Avoid some wxString copies 2016-04-17 13:58:21 -04:00
Paul Licameli
09b7fed2f9 ODLock has a non-blocking TryLock (not yet used); remove unnecessary mallocs. 2016-04-16 14:15:01 -04:00
Paul Licameli
da23526860 Condition variable needs the associated mutex locked only when waiting. 2016-04-14 16:37:22 -04:00
Paul Licameli
61177a15ad More consistent mutual exclusion in calls to certain sf_ functions; ...
... also SFCall to simplify thread-safe calls, and SFFile for RAII of SNDFILE
objects.
2016-04-14 15:20:37 -04:00
Paul Licameli
24df87bb4c Fix resource leaks in the usage of the FFMPEG library with RAII objects...
... This includes failure paths in the initialization if import.  Those
resources would have been reclaimed before program exit, but not as soon as
they should have been.

... This also includes certain leaks that would happen every time a file is
successfully imported or exported.  We never used avformat_free_context or
av_dict_free as we should have!

... There were also AVPacket objects repeatedly reinitialized without proper
cleanups in between.  That might have leaked memory too.
2016-04-13 20:31:54 -04:00
Paul Licameli
5d28a05702 RAII object for pausing and unpausing OD manager 2016-04-13 17:57:10 -04:00
Paul Licameli
70bd46b8ad travis 2016-04-09 22:55:15 -04:00
Paul Licameli
7c0073dd77 Unreported bug: memory and file handle leak when importing custom mpeg...
I could see this on windows:

Import a file such as .aiff format, while "Files of type:"
reads "FFmpeg-compatible files".
Leave Audacity running.
Attempt to delete the file in Windows Exploerer.
Get a message from Windows that the file is in use by Audacity and cannot be
deleted.
2016-04-09 00:21:38 -04:00
Paul Licameli
c9d50dc20b ODTask cloners return smart pointers 2016-04-06 16:06:36 -04:00
Paul Licameli
539eb0edf6 Fix "memory leak" of decoder objects... though it wasn't really reachable...
... except with some EXPERIMENTAL flags turned on
2016-04-02 00:40:19 -04:00
Paul Licameli
cbd561be7d Make EXPERIMENTAL_OD_FFMPEG compilable, and change some memory management 2016-04-02 00:02:52 -04:00
Paul Licameli
60eeac0b10 Remove changes not really needed to fix warnings, and which broke some builds 2016-02-27 09:41:23 -05:00
Paul Licameli
3cc4754ac7 Fix warnings for nonexhaustive switches on enumerations 2016-02-26 14:56:31 -05:00
Paul Licameli
990080ae7d Replace virtual with override wherever possible; eliminate needless virtual...
... for functions in final classes.

override is like const -- it's not necessary, but it helps the compiler to
catch mistakes.

There may be some overriding functions not explicitly declared virtual and I did
not identify such cases, in which I might also add override.
2016-02-26 12:35:38 -05:00
Paul Licameli
7824e94030 Harmlessly qualify classes as final (or explicitly comment not)...
... Should have no effect on generated code, except perhaps some slight faster
virtual function calls.  Mostly useful as documentation of design intent.

Tried to mark every one of our classes that inherits from another, or is a
base for others, or has abstract virtual functions, and a few others besides.
2016-02-24 20:58:30 -05:00
Paul Licameli
73ced7b93f Remove UndoManager.h from other headers 2016-02-24 19:10:34 -05:00
Paul Licameli
55d85f1b25 Remove more uses of at(); use a std::vector of bare pointers, not wx array 2016-02-16 09:35:03 -05:00
Paul Licameli
7c4c45a0d5 "new"->"NEW" in comments, easier to find remaining naked operator new 2016-02-14 18:52:41 -05:00
Paul Licameli
56e7653343 "delete"->"DELETE" in comments, easier to find remaining naked operator delete 2016-02-14 18:50:45 -05:00
Paul Licameli
6c28276daf Use RAII idiom for lock and locking mutex in Sequence 2016-02-04 00:53:54 -05:00
Paul Licameli
38ba19183d One less indirection accessing SeqBlock 2016-02-03 22:17:07 -05:00
Paul Licameli
321d5259a2 More uses of SampleBuffer, eliminating explicit DeleteSamples calls 2016-02-01 10:16:00 -05:00
Paul Licameli
edba89d704 Pass tooltips by wxString, not const wxChar* 2015-07-28 11:49:56 -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
unknown
34b09053b4 Simplified some management of WaveClip caches 2015-06-01 22:58:17 -04:00
Daniel Winzen
92d522132e Variable cleanup 2015-04-23 18:30:38 +02:00
james.k.crook@gmail.com
8a9987a0d9 From: martin@steghoefer.eu [PATCHES 02-15 of 15] Fix runtime problem with wxWidgets 3.0:
Correct string formatting for:
2/15  %d + enum => %d + int
3/15  %lld + int64_t => %lld + long long
4/15  %d + int64_t => %lld + long long
5/15  %d + double => %f + double
6/15  %d + int32_t => %d + int
7/15  %d + intptr_t => %p + void*
8/15  gint, guint
9/15  %d + long => %ld + long
10/15 %n + int => %d + int
11/15 %x + int => %x + unsigned int
12/15 %f + int => %d + int
13/15 %S + wxChar* => %s + wxChar*
14/15 %d + size_t => %d + int
15/15 %d + size_t => %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 (9/15): In TrackPanel.cpp, ExportMP2.cpp and CompareAudioCommand.cpp this patch supersedes related change done in r13466 because the new solution requires fewer casts and therefore simplifies the code.

Note: Many .po files are affected, and we need to be very careful about this.  Incorrect "%d" and similar in translation files may lead to crashes in those languages (only).  This is something we should actually have been more careful about in the past.  We need to write a script to check that the "%d" and similar format specifiers match between English and translation.
2014-11-08 16:42:34 +00:00
lllucius
bdcefb4850 Preliminary changes for wxWidgets 3.0.1
We can't go to 3.0.1 yet as there are still build issues on
Linux and OSX.  You can get Windows to build, but there's
still some display issues.

These changes should work with wxWidgets 2.8.12 as well, so
we can take our time to get things working properly before
switching over.
2014-10-06 08:10:50 +00:00
benjamin.drung@gmail.com
149fcafc1c Replace tabs by spaces. 2014-06-05 22:04:22 +00:00
benjamin.drung@gmail.com
277932dccb Remove trailing spaces. 2014-06-03 20:30:19 +00:00
benjamin.drung@gmail.com
4d4580a042 FFmpeg: Replace long deprecated functions by current ones. 2014-05-31 14:01:57 +00:00
benjamin.drung@gmail.com
33b9e9336f FFmpeg: Replace deprecated av_close_input_file by avformat_close_input. 2014-05-29 15:50:47 +00:00
benjamin.drung@gmail.com
0a1999130d Drop compatibility for libav/FFmpeg < 0.7. 2014-05-25 21:08:58 +00:00
RichardAsh1981@gmail.com
6758caa5e1 Make a large number of global variables static so they only have file scope when that is all they need. Part of a patch by Campbell Barton 2013-09-21 19:11:41 +00:00
v.audacity
cc876ce7be just some cleanups on FIXMEs and unused method parameters 2013-08-31 05:57:48 +00:00
v.audacity
c7daafede2 In off-list discussion, Steve mentioned that kdevelop / kate highlighting recognizes "FIXME", but not "FIX-ME", which has been the Audacity convention. This commit changes Audacity code to use the "FIXME" convention (though I've never known it as convention and MSVC doesn't recognize it).
Also, minor change in WaveTrack.cpp in the effort on bug 641. Should have no functional difference.
2013-08-24 20:30:47 +00:00
RichardAsh1981@gmail.com
fc0cb41356 fix the build of on-demand ffmpeg, disable the preference if FFmpeg support is not compiled in. Patch by Michael Chinen. This feature is currently off in experimental.h. 2013-05-25 15:36:04 +00:00
v.audacity
c26b3c6b49 Campbell Barton's further patch to turn many, many tabs to our 3-space convenbtion 2013-02-23 04:33:20 +00:00
richardash1981
393129d9b9 fix the line endings on this file, and set svn:eol-style to native so they stay fixed 2013-01-01 15:54:53 +00:00
v.audacity
24af4febea Bug 539 (P2) - Audacity does not build if configured --without-ffmpeg
Revert to quick fix of r 11867. Steve reports Debian build error with r11868. Left that code in, because this should override it.
2012-07-25 06:20:17 +00:00
v.audacity
d90e6c5285 Bug 539 (P2) - Audacity does not build if configured --without-ffmpeg
more pinpointed fix that should close this
2012-07-25 02:00:48 +00:00
v.audacity
15f9695d18 Fix a compiler warning. 2012-07-16 23:46:20 +00:00
v.audacity
87610cea39 Benjamin Drung's disable-dynamic-lame.patch for http://bugzilla.audacityteam.org/show_bug.cgi?id=233 2012-06-25 01:41:57 +00:00
mchinen
b8f19b58d9 OD FFmpeg: disable seeking (caused issues on windows) 2012-06-17 13:33:13 +00:00
mchinen
a09fe983ed remove debug printfs 2012-06-01 06:11:54 +00:00
mchinen
c4f1a52413 OD FFmpeg: fix a bug with demand seeking by using a safer seek test 2012-06-01 06:11:49 +00:00
mchinen
1fb7a1dcee OD FFmpeg: do not attempt to correct stream lag unless a seek was demanded by user 2012-06-01 06:11:45 +00:00
mchinen
2aedaaa68d lazy evaluate for OD ffmpeg seek test 2012-06-01 06:11:41 +00:00