1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-18 16:41:14 +02:00
Commit Graph

40 Commits

Author SHA1 Message Date
Leland Lucius
4db62ff68c Fix for bug #996 2015-06-02 18:27:37 -05:00
Leland Lucius
cfddd5f069 Fix for bug #996 2015-05-31 19:22:06 -05:00
Leland Lucius
2457579091 Bug 765 - Delays using Edit commands and Draw Tool in long projects
A 4hr track used to take about 20s to cut a few samples. This is now significantly improved, to around 3s. Leland did this by

(a) moving the size calculation to when we examine the undo history, so it isn't slowing down the edits.
(b) in size calculation, using sizes that are cached rather than going to disk to find the sizes.
(c) writing the autosave file which is to an FFIle to a string first, i.e. using XMLStringWriter as a buffer for XMLFileWriter.

Step (c) may also make autosave marginally safer, as the risk of a partially updated autosave file is reduced.
2015-04-07 12:20:50 +01: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
benjamin.drung@gmail.com
277932dccb Remove trailing spaces. 2014-06-03 20:30:19 +00:00
martynshaw99
4ce2643d5f Remove the
// Indentation settings for Vim and Emacs
etc. lines from all files, as Campbell's patch (except for other changes to Languages.cpp)
2013-09-24 00:14:37 +00:00
james.k.crook@gmail.com
dba81b3f1c Cleanup: Fixed lots of trivial MSVC warnings. 2013-08-25 21:51:26 +00:00
james.k.crook@gmail.com
a8944db4a6 Fix compilation (windows release build) header inclusion/order. 2013-04-07 16:48:09 +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
b95918fe52 apply parts of Campbell Bartons patch for cleaning up compiler warnings: add static qualifiers to methods, ensure prototypes match definitions and some whitespace and comment changes 2013-02-22 21:29:19 +00:00
martynshaw99
cdd2ccf594 Remove spurious windows.h includes. 2012-12-31 22:12:23 +00:00
v.audacity
a42f5b45cb http://bugzilla.audacityteam.org/show_bug.cgi?id=545 (P2)
Remove crash-prone "Audio Cache" feature.
2012-07-18 01:18:59 +00:00
mchinen
816b58bc08 integrate OD FFmpeg to work with multiple formats, including wav
also move streamContext to ffmpeg.h to allow for refactoring of import code
2012-06-01 06:11:07 +00:00
martynshaw99
2fa98d3c16 Add missing header 2012-05-06 14:27:55 +00:00
martynshaw99
f8c81d332a Fix summary values for edge cases when overall signal does not straddle zero line. 2012-05-05 21:45:50 +00:00
v.audacity
5f5b9778de Fixes per Vigilant Sentry (http://www.vigilantsw.com/)
* Fix memory leaks.

* Add comments about initializations and checking for successful results.

* Add checks for NULL deref.

* Consistency in "TODO" vs "TO-DO" comments!
2012-02-08 05:09:14 +00:00
v.audacity
4386504569 Martyn, good catch on commit r11461. I had gone back and forth between what you did and this commit, and messed up the edit. I like this one better because it doesn't duplicate the constant, and keeps all the wxLogDebug calls consistent -- less cognitive overhead. 2012-02-06 22:02:50 +00:00
martynshaw99
37eeb7628e Correct error trap - compare with what we are expecting. 2012-02-05 23:54:56 +00:00
v.audacity
c6c3d9106b As in commit r11447, put a wxASSERT on result of SimpleBlockFile::WriteSimpleBlockFile() in ODDecodeBlockFile::WriteODDecodeBlockFile. 2012-02-02 00:36:39 +00:00
v.audacity
9d5ddb52d5 Working on bug 437 (http://bugzilla.audacityteam.org/show_bug.cgi?id=437). Current architecture does not make it easy to alert user to this via dialog, but at least we now check for it and catch it in debug.
Removed some old debugging cruft.
2012-02-01 03:45:36 +00:00
v.audacity
939eab26ae Change "blockfile" to "block file" consistently in log and error dialogs. 2011-10-16 23:16:20 +00:00
mchinen
ada7eaf758 Apply patch by Christopher Rudorff that fixes an issue where re-opening OD projects would create blockfiles with malformed filenames.
Modified by mchinen to cleanup debug messages and fix unbalanced mutex on error.
Original patch notes:

    OD loader doesn't properly continue scanning files
    
    BUG:
    
    * import large audio file with OD import
    * save and close project before OD finishes
    * open project again: OD failes badly on continuing
    
    Syntoms:
    
    * .auf.auf.auf worm files ...
    * truncated wave display
    
    The isse is subtile:
    
    <odpcmaliasblockfile summaryfile="e000031a.auf" aliasfile="/home/chris/Records/test/0.5seek+cue.flac" aliasstart="26738688" aliaslen="524288" aliaschannel="1"/>
    
    A ODPCMAliasBlockFile is a AliasBlockFile which has 3 overloaded
    constructer. One of then silently adds '.aup' to the summaryfile.
    
    So when creating those tracks from XML, we must use the other constructor.
    
    Now we run into a second bug:
    
    AudacityProject::OpenFile calls ProjectFSCK after reading which deletes
    the just created empty directories in the _data/e00 dir. OD is doomed.
    So simply skip rmdir in fsck.  The OD..Blockfiles will disapper when the
    OD finishes, so empty dirs will be deleted on further opening the project.
2011-04-28 19:57:37 +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
0526b8c98a Adjust some comments. 2011-02-26 23:17:26 +00:00
v.audacity
04e23a0889 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". 2011-01-06 03:09:21 +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
2def1e7f51 bug 195 - fixed 2010-08-03 01:46:37 +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
v.audacity
ddec06f8a2 code cleanup
naming improvements for clarity (e.g., aliasedFileName instead of aliasedFile for an instance of wxFileName -- it's not an instance of AliasedFile)
2010-07-28 22:56:27 +00:00
v.audacity
ceb5aff5cb Fixed bug "On Demand calculation stuck at 1%". (Don't know if it had a bugzilla entry. Didn't find one.)
Basic problem was in using wxConvUTF8 instead of wxConvFile. I believe wxConvFile should work on all platforms, but if not we can "#ifdef _WIN32" its use. 

Also simplified the code by getting rid of the mFileNameChar member. It was used only in ODPCMAliasBlockFile::WriteSummary() so there's no reason to do the conversion from mFileName in so many places -- just do it once, in ODPCMAliasBlockFile::WriteSummary().
2010-07-23 01:41:21 +00:00
v.audacity
7501b9a865 minor changes on brief code review 2010-07-06 21:39:08 +00:00
mchinen
5a5957b422 Add seek support to OD-based FFmpeg import.
Also some minor refactoring.
This feature works with mp3 right now - may work on other formats, but that will be a seperate commit.
It is not enabled so most of the changes won't even be compiled, and those that do won't be run.
To enable it uncommment the EXPERIMENTAL_ODFFMPEG def in Experimental.h
2010-07-05 14:38:47 +00:00
mchinen
5ccce1ed4b checking in cleanup of on-demand files following james' review. also speeds up od cursor updating when user clicks for on-demand 2010-03-08 01:52:38 +00:00
businessmanprogrammersteve
a55c20be66 Fix most of the compile warnings I get on Linux (but not the Audacity Logo
xpm stuff or a few things in FFMPEG export)
2010-02-12 21:36:20 +00:00
BusinessmanProgrammerSteve
a6001192f2 In ODPCMAliasBlockFile check file existance before opening; solves bug 26 on Mac 2010-02-09 23:30:27 +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