James Crook
545d741eb2
Make Audacity source more like DarkAudacity source.
2016-09-11 13:03:37 +01: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
0b31690ace
Return wide type from ImportFileHandle::GetFileUncompressedBytes()...
...
... and use override. But this function isn't (yet?) used anywhere.
2016-09-06 12:39:57 -04:00
Paul Licameli
d23c20c5d1
Comments where casting to sampleCount from other library typedefs
2016-09-06 12:39:57 -04:00
James Crook
80f61589a2
Fix stray ';'
...
Was breaking build when FLAC disabled.
2016-08-27 15:21:57 +01:00
Paul Licameli
fd2b050d6f
Type agnosticism for some other variables that were not sampleCount...
...
... in some cases, this fixes narrowings.
2016-08-24 14:50:45 -04:00
Paul Licameli
79c79f9cd3
Remove many mentions of sampleCount with auto and decltype...
...
... This makes much code agnostic about how other things (functions and
arguments) are typed.
Many of these neeed to become size_t instead of sampleCount.
2016-08-24 14:50:45 -04:00
Paul Licameli
1281f1b14b
Common function limits buffer size to sampleCount known to be small
2016-08-23 12:46:10 -04:00
Paul Licameli
4011eba627
Fix bug in disabled experimental code...
...
a * had got replaced with , and no compiler error!
2016-08-21 08:51:42 -04:00
Paul Licameli
eef2669abd
One less indirection accessing containers in Importer
2016-08-11 11:51:33 -04:00
Paul Licameli
8226441210
use vector of smart pointers to ExtImportItem objects
2016-08-11 11:51:33 -04:00
Paul Licameli
28f0b11376
Use arrays of smart pointers to import plugins
2016-08-11 11:51:33 -04:00
Paul Licameli
7d89e5ff68
Pass containers by ref to import plugin factories, use STL idiom
2016-08-11 11:51:33 -04:00
Paul Licameli
924df495ff
Make headers in import directory self-contained
2016-08-11 11:51:33 -04:00
Paul Licameli
473e955da3
Remove some naked new amd delete in: ondemand
2016-08-08 07:53:28 -04:00
Paul Licameli
f82ff73578
Remove some naked new amd delete in: import and export
2016-08-08 07:53:28 -04:00
Paul Licameli
fd2e36e0c8
Remove some naked new amd delete in: FFmpeg
2016-08-08 07:51:24 -04:00
Paul Licameli
20bee00115
Remove some naked new amd delete in: tracks and clips
2016-08-08 07:30:44 -04:00
Paul Licameli
84c0337aba
Fix TAB key navigation on Mac for all dialogs (not only for panels)
2016-07-10 17:12:27 -04:00
James Crook
763485b0dc
Add error check comments.
...
These are places where we don't properly handle error returns.
2016-07-10 21:40:48 +01: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
c3cca71461
Sweep for filename copying: import and export
2016-04-10 22:24:12 -04:00
Paul Licameli
ae5c5c2b4a
Simplify recent GStreamer changes with deleters.
2016-04-10 15:17:28 -04:00
Paul Licameli
59af732763
Mac build fixes; and implement deleters for our imitation unique_ptr
2016-04-10 14:15:51 -04:00
Paul Licameli
98f739a076
cleanup the previous
2016-04-09 21:43:17 -04:00
Paul Licameli
093f055f1d
Make GStreamer compilable (but it doesn't link), and rewrite with lots of RAII
2016-04-09 20:45:12 -04:00
Paul Licameli
9c18d3853d
ImportFileHandle::GetStreamInfo returns reference. Don't dereference NULLs.
2016-04-09 16:18:29 -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
e6e7b73043
ImportFileHandles
2016-04-06 14:56:04 -04:00
Paul Licameli
c2457c2067
mac build
2016-04-02 01:22:52 -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
824ff647f8
Import functions return containers of smart pointers to new tracks
2016-03-26 15:41:27 -04:00
Paul Licameli
5ef4dd46a5
TrackFactory functions return std::unique_ptr, although some callers...
...
... release() them for now.
2016-03-26 11:50:12 -04:00
Paul Licameli
4cf9e0e6d6
Bug1354: Importing MIDI via Import Audio... and list-of-files should undo...
...
... also fixes a possible memory leak in direct Import MIDI... along the
failure path.
2016-03-14 11:02:09 -04:00
Leland Lucius
9dc9348127
Fixes bug #1344 (mac build)
...
In addition, the Xcode project can now build against the 10.6
or 10.7 SDKs. All that is needed is to change the SDK version
and the other settings will change automatically.
2016-03-07 00:29:26 -06:00
Leland Lucius
32470a4248
Correct Open() definition
2016-03-03 00:04:10 -06:00
Paul Licameli
0c9deb398c
Fix mac build. No standard headers in Audacity.h.
2016-03-01 12:22:37 -05: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
60f2322055
Fix warnings for returning false instead of null
2016-02-26 14:56:32 -05:00
Paul Licameli
3cc4754ac7
Fix warnings for nonexhaustive switches on enumerations
2016-02-26 14:56:31 -05:00
Paul Licameli
60bcd7aea2
Fix warnings for unused variables and functions
2016-02-26 14:56:26 -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
a8652c5e74
uses
2016-02-25 20:18:31 -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
d21c0aa478
Sweep unnecessary wxString copies: import
2016-02-22 22:13:50 -05:00
Paul Licameli
8e995d66d0
Avoid extra indirection in FormatList
2016-02-19 10:59:51 -05:00
Paul Licameli
1c07741d57
Sizers are owned by wxWindow objects when added, so use safenew, or...
...
... use unique_ptr in the interim between building them and adding.
This checks eliminates some naked news, which were not paired with deletes.
2016-02-18 18:58:38 -05:00
Paul Licameli
4d78e353c3
Revert "sizers"
...
This reverts commit 84c0a0b6663a1210be502a76ab9c48dd330b3919.
2016-02-18 14:50:52 -05:00