Commit Graph

68 Commits

Author SHA1 Message Date
Leland Lucius cbf1bb558e AUP3: Removes OD code related to project file handling
This removes all of the OnDemand code embedded throughout
    the main codebase. Individual files related specifically
    to OD have been left in place, but removed from the build.
2020-07-01 01:14:05 -05:00
Paul Licameli da93757401 Remove ImportRaw.h from other headers 2020-06-13 12:19:38 -04:00
Yuri Chornoivan d1ada5f08c Fix minor typos 2020-04-11 10:06:24 +01:00
Paul Licameli b1b8b034c8 Reimplement import plugin registation without sequence numbers 2020-02-01 08:39:52 -05:00
Paul Licameli 7592227f14 Remove uses of GetActiveProject in import 2020-01-02 13:11:17 -05:00
Paul Licameli 0300b49b37 TranslatableString for importer stream info...
... fixing some missed translations in OGG (and GStreamer too, if you care)
2019-12-18 10:42:52 -05:00
Paul Licameli d32d464471 Uses of TranslatableString in src/import 2019-12-14 01:48:15 -05: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 f1b04c79d8 WaveClip does not depend on ondemand files besides ODTaskThread...
... Lifting the specification of factory function arguments for Sequence even
higher

This frees ODPCMAliasBlockFile from cycles
2019-06-22 21:46:34 -04:00
Paul Licameli e2cf1d93c2 Import.cpp does not depend on subclasses of ImportPlugin...
... freeing 15 files from the big strongly connected component:

ImportFFmpeg & ODDecodeFFMpegTask (still in a cycle of two)
ImportFLAC
ImportGStreamer
ImportLOF
ImportMIDI
ImportMP3
ImportOGG
ImportPCM
ImportQT
ProjectFileManager
ProjectFSCK
ProjectManager
ProjectSelectionManager
ODDecodeFlacTask

And eight header files in src/import are deleted.

This breaks a lot of cycles because Import, which is still in the big component,
no longer includes ImportLOF, which recursively uses ProjectManager. A
registration system for the subclasses of ImportFileHandle allows that
recursion without the cyclic compilation dependencies.
2019-06-09 12:10:52 -04:00
Paul Licameli 0b85251885 Fewer inclusions of AudioIO.h and Import.h 2019-06-06 12:53:20 -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 0b733eed3f Remove (or comment) ProgressDialog.h in headers...
... For ImportPlugin, use unique_ptr not Maybe to hold it, and take constructors
out-of-line.
2019-04-04 09:47:57 -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 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 a30000cf74 Use type aliases FilePath, FilePaths...
... for wxString and wxArrayStringEx, holding file paths (absolute or relative,
directory or plain file); to be replaced later with different types

(not yet using std::vector, becase of some uses of wxArrayString::Index with
two arguments)
2019-03-15 15:18:11 -04:00
Paul Licameli 485b6bb425 Use type aliases FileExtension, FileExtensions...
... for wxString and wxArrayStringEx, holding file extensions (without dot);
to be replaced later with different types

(not yet using std::vector, becase of some uses of wxArrayString::Index with
two arguments)

And simplify some constructions of arrays
2019-03-15 15:18:11 -04:00
Paul Licameli c68e336247 More use of std:: style members of wxString...
... replacing:

Length => length
Len => length
2019-03-10 14:44:54 -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 5fd95dd131 Fix C4456 Warnings.
"C4456 declaration hides previous local declaration."
These arise from repeated declarations of the same name.
2018-10-10 17:28:50 +01:00
Paul Licameli 894f6f4f63 Remove SetLinked() and SetChannel() from importers 2018-10-01 13:42:36 -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 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
Paul Licameli 2626f6cd5b Exception safety in: subclasses of ImportFileHandle 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 6525bb18cf Translate exceptions to error codes in callback functions...
... That is what the library protocols allow, and libraries may be written
in C and might corrupt their state if C++ exceptions pass through them.
2017-03-17 17:53:01 -04:00
Paul Licameli 88cac8cd7e Remove naked new[] in: import 2017-03-17 17:52:46 -04:00
Paul Licameli aa0d55ac83 Use enum class ProgressResult, don't interconvert with int or bool 2017-03-17 17:52:24 -04:00
Paul Licameli 81285ee0c1 More const and override 2017-03-17 17:52:20 -04:00
Paul Licameli 7b87ca6ffd Make switches on enums exhaustive 2016-09-18 10:36:55 -04:00
Paul Licameli 78be459fa1 Convert sampleCount <-> floating or -> long long explicitly ...
... A non-narrowing conversion out to long long is a necessity, but the
conversions to float and double are simply conveniences.

Conversion from floating is explicit, to avoid unintended consequences with
arithmetic operators, when later sampleCount ceases to be an alias for an
integral type.

Some conversions are not made explicit, where I expect to change the type of
the variable later to have mere size_t width.
2016-09-15 21:02:31 -04:00
Paul Licameli d783762737 Remove unnecessary std::move in return statements...
... and comment where it is necessary.
2016-09-15 07:39:46 -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 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 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
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 9c18d3853d ImportFileHandle::GetStreamInfo returns reference. Don't dereference NULLs. 2016-04-09 16:18:29 -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 824ff647f8 Import functions return containers of smart pointers to new tracks 2016-03-26 15:41:27 -04:00