Commit Graph

25 Commits

Author SHA1 Message Date
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 367ed1dfce Uniform init in blockfile ctors (prevents implicit narrowings) 2016-08-22 21:45:54 -04:00
Paul Licameli 0c4c835b27 Write and read the wide aliasStart fields carefully...
...They may never have been large enough to matter, but some seek offsets into
files were written as 64 bits but read back as only 32.  It ought to be
consistent.
2016-08-21 09:18:06 -04:00
Paul Licameli e7b4d935a5 Hide the use of new in factory functions for BlockFiles 2016-08-16 12:29:59 -04:00
Paul Licameli 2ede67be96 Use type alias for pointer to BlockFile, which is still a dumb pointer 2016-08-16 12:29:59 -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 b6fdffbab2 Don't copy wxFileName often, it's not lightweight! Use wxFileNameWrapper...
... which is a new class that defines moves.
2016-04-16 11:57:39 -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 f94b3b3afa Add some const qualifiers to BlockFile methods 2016-04-10 21:05:20 -04:00
Paul Licameli 70bd46b8ad travis 2016-04-09 22:55:15 -04:00
Paul Licameli 0c9deb398c Fix mac build. No standard headers in Audacity.h. 2016-03-01 12:22:37 -05:00
Paul Licameli a8652c5e74 uses 2016-02-25 20:18:31 -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 321d5259a2 More uses of SampleBuffer, eliminating explicit DeleteSamples calls 2016-02-01 10:16:00 -05:00
benjamin.drung@gmail.com 277932dccb Remove trailing spaces. 2014-06-03 20:30:19 +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
martynshaw99 cdd2ccf594 Remove spurious windows.h includes. 2012-12-31 22:12:23 +00:00
mchinen 91d8f132a6 Bug 330 (P2) - Fix an issue where multiple projects would cause the warning dialogs to pop up above the wrong project.
I refactored the code into AudacityApp with a new timer.  This is provisional pending discussion - if it is decided that it should go somewhere else I will move it.
2011-03-29 23:39:00 +00:00
mchinen 5e4250e302 bug 26 - add modeless warning dialog for missing aliased files during playback. 2011-03-01 01:29:03 +00:00
v.audacity 0332c60a2a Define one constant, PLATFORM_MAX_PATH, for maximum path value, so we don't have to do platform-specific conditionals everywhere we want to check it. In fact, we were actually checking that only for Windows. This is follow-on to Richard's message on audacity-devel about "overflow vulns".
Remove unnecessary declaration of MAX_PATH in BlockFile.h.
2011-01-06 00:07:59 +00:00
v.audacity 1c5ba68d55 (bug 137)
Make DirManager::MoveToNewProjectDirectory(), DirManager::CopyToNewProjectDirectory(), and several BuildFromXML() methods check the result of AssignFile() and do something appropriate about it on failure, rather than ignoring it. Also made AssignFile() check whether the assigned name is well-formed, so it doesn't always return TRUE when disckcheck is FALSE.

Briefer and more correct checks for uninitialized wxFileName objects.

Several "//ANSWER-ME" comments about file ops and commented-out cruft to probably remove.

Clarify some logic and readability.
2010-08-31 23:31:11 +00:00
v.audacity 3729f067be more progress on bug 113
better handling of error conditions in all BuildFromXML methods, per comment: 

// BuildFromXML methods should always return a BlockFile, not NULL,  
// even if the result is flawed (e.g., refers to nonexistent file), 
// as testing will be done in DirManager::ProjectFSCK().
2010-07-30 03:04:37 +00:00
v.audacity 874e530d84 more progress on bug 113
better handling of error conditions in PCMAliasBlockFile::BuildFromXML so that DirManager::ProjectFSCK can report cases of missing PCMAliasBlockFile files on opening projects where missing files were not corrected
2010-07-29 03:54:54 +00:00
v.audacity 8f8504b5a6 some progress on bug 113, including rewordings DependencyDialog based on some suggested by Gale
code cleanup

naming improvements for clarity (e.g., aliasedFileName instead of aliasedFile for an instance of wxFileName -- it's not an instance of AliasedFile)

parens, not square brackets, for parenthetic phrases
2010-07-28 23:06:10 +00:00
ra e74978ba77 Locate and position the current Audacity source code, and clear a variety of old junk out of the way into junk-branches 2010-01-23 19:44:49 +00:00