1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-07-23 07:58:05 +02:00

192 Commits

Author SHA1 Message Date
Paul Licameli
a8ac80eda9 Bug1651: NoteTrack sync-lock and crash fixes...
Simplify the logic of duplication of NoteTrack.  Duplicates are always in
serialized state.  Un-serialization can happen on demand in any of the
NoteTrack operations that require a defined sequence.

Changing the duration of the sequence after paste is needed,
as it was also needed, when I fixed Stretch at commit
90eb4ec142f7d575d0870dd9c755589bff520cbe.  I don't know if this should be
considered a bug in Allegro that we are compensating.
2017-05-25 08:08:31 -04:00
Paul Licameli
55439247ad All the catches are in place for BlockFile and other errors, now throw. 2017-04-03 23:32:40 -04:00
Paul Licameli
1552ff188f When opening a file into a new project, delete the project on failure 2017-03-21 14:11:28 -04:00
Paul Licameli
2626f6cd5b Exception safety in: subclasses of ImportFileHandle 2017-03-21 14:11:27 -04:00
Paul Licameli
0bb6a3d971 Exception safety in: importing functions...
... Side effects on preferences may persist even after errors.
2017-03-21 14:11:23 -04:00
Paul Licameli
12e3d1d2e2 Small correction to parsing of LOF file 2017-03-21 11:21:25 -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
9314fe0cc0 Remove naked malloc (or similar) and free in: import 2017-03-17 17:52:52 -04:00
Paul Licameli
48d951d9c3 Remove naked malloc (or similar) and free in: RawAudioGuess.cpp 2017-03-17 17:52:52 -04:00
Paul Licameli
53b9869268 Remove naked malloc (or similar) and free in: FFmpeg 2017-03-17 17:52:51 -04:00
Paul Licameli
88cac8cd7e Remove naked new[] in: import 2017-03-17 17:52:46 -04:00
Paul Licameli
aebaaf46a0 require unsigned arguments for Array(s)Of::reinit 2017-03-17 17:52:43 -04:00
Paul Licameli
0e43079d06 Further precautions for the corrupt .wav bug...
Check both allocations of buffers.

See commit 407c1dc4b209111e4dbb3eec88f333aa8f69094c
2017-03-17 17:52:35 -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
5036583549 Fewer inclusions of AudacityApp.h 2017-03-17 17:52:24 -04:00
Paul Licameli
9af53f92cc un-confused editor indenting 2017-03-17 17:52:21 -04:00
Paul Licameli
81285ee0c1 More const and override 2017-03-17 17:52:20 -04:00
Paul Licameli
a3d20c846a Don't invert 24 or 32 bit PCM files when reimported via FFmpeg libs 2017-03-01 21:50:45 +00:00
Chris Cannam
30eaa0d52c Fix truncated decode of mp3 files on import
The MAD decoder will not decode the final frame in an mp3 stream unless
it has a small amount of padding afterwards (MAD_BUFFER_GUARD bytes,
actually 8). Without this, it loses sync before returning any decoded
data from the final frame. The result is that the imported audio is
truncated by up to 1152 samples.

This commit addresses that by using a final round of input callback
calls to provide the last MAD_BUFFER_GUARD bytes after the underlying
file has reached eof. The logic is based on madplay.
2016-11-26 17:41:07 +00:00
windinthew
e29a85a89f add aif* and mp4 extensions
This gives a way to import AIFF files containing compressed
audio on Mac without adding FFmpeg or extended import rules.
2016-10-16 19:33:14 +01:00
windinthew
d5a6b83fe0 Fix issues reported on Wording page 2016-10-14 16:36:41 +01:00
Paul Licameli
53936ac970 Fix some warnings for unused variables and labels...
... But not in cases where a return status is ignored.
2016-09-19 11:47:47 -04:00
Paul Licameli
7b87ca6ffd Make switches on enums exhaustive 2016-09-18 10:36:55 -04:00
Paul Licameli
ad04187a41 Change sampleCount arguments, variables, return values to size_t...
... whenever they really describe the size of a buffer that fits in memory, or
of a block file (which is never now more than a megabyte and so could be fit in
memory all at once), or a part thereof.
2016-09-15 21:03:17 -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
26b5e77050 Define sampleCount as a class, not a type alias...
... Define lots of operators for disambiguation, but they will go away after
all conversions from sampleCount to built-in numerical types are forced
to be explicit.
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
ed21545c80 pixel column counts and sample window sizes use unsigned types 2016-09-11 20:28:13 -04:00
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