1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-17 08:30:06 +02:00

159 Commits

Author SHA1 Message Date
Paul Licameli
7be911b7fb Simplify the use of Sequence::Blockify() 2016-02-03 22:17:10 -05:00
Paul Licameli
51fbc697cf One less indirection accessing Sequence::mBlock 2016-02-03 22:17:08 -05:00
Paul Licameli
38ba19183d One less indirection accessing SeqBlock 2016-02-03 22:17:07 -05:00
Paul Licameli
eaccd490ec Bug1320: Correct contrast window miscalculations of RMS 2016-01-29 14:18:47 -05:00
Leland Lucius
445dd81b29 Fix format specifier 2015-08-15 17:37:00 -05:00
Paul-Licameli
bdc2839112 Preliminaries for bug 900
Create WaveTrackCache as a utility class but don't use it anywhere yet.

The possible minor performance problem with effects is fixed by changes
in WaveTrack::GetBestBlockSize().
2015-05-26 20:02:37 -04:00
James Crook
16fe9af314 Bug 938 - Audio longer than 2^31 sample is visually corrupted.
Seems to have been an overflow in GetWaveDisplay().
2015-05-10 20:17:30 +01:00
Paul-Licameli
8bcec00e65 Rewrite Sequence::GetWaveDisplay
That is the function that computes the heights of dark and pale blue lines in
the waveform display.

It's not simple but now the flow of control is less strange and it is better
commented.

This doesn't fix or enhance anything, but it might find use later, such as in
a project to adapt the resolution of the display in reponse to slow scrolling
updates.
2015-04-21 11:11:20 -04:00
Paul-Licameli
2b85d0edb4 Preliminary function argument list changes and comments, for scrubbing project
In particular, use an options structure for AudioIO::StartStream to simplify
calls

ControlToolBar::PlayPlayRegion also takes that structure as an argument, and a
SelectedRegion instead of two times

And other changes
2015-04-17 02:25:39 -04:00
james.k.crook@gmail.com
8305bfdb05 From: martin@steghoefer.eu [PATCH 01/15] Fix runtime problem with wxWidgets 3.0: Correct string formatting: wxLongLong -> %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: In Shuttle.cpp this patch supersedes one related change done in r13466 because a wxLongLong_t can be bigger than an int and in a generic function like "TransferLongLong" this should be taken into account.
2014-11-08 16:06:28 +00:00
lllucius
bdcefb4850 Preliminary changes for wxWidgets 3.0.1
We can't go to 3.0.1 yet as there are still build issues on
Linux and OSX.  You can get Windows to build, but there's
still some display issues.

These changes should work with wxWidgets 2.8.12 as well, so
we can take our time to get things working properly before
switching over.
2014-10-06 08:10:50 +00:00
benjamin.drung@gmail.com
277932dccb Remove trailing spaces. 2014-06-03 20:30:19 +00:00
v.audacity
fc6e4a4cba Fix some compiler warnings. 2013-12-13 01:24:47 +00:00
RichardAsh1981@gmail.com
0413de548b fix the loading of projects with more than 2^31 samples in a waveclip, and possibly some other similar constraints on waveclips. This fixes a long-standing problem with long recordings being saved but unable to re-open them. Tested by Gale and Steve. 2013-11-03 15:49:12 +00:00
v.audacity
8408eaf52a Get rid of some compiler warnings. 2013-10-31 22:28:21 +00:00
RichardAsh1981@gmail.com
991969cab8 Apply parts of a warning supression patch by Campbell Barton 2013-09-12 16:52:30 +00:00
v.audacity
cc876ce7be just some cleanups on FIXMEs and unused method parameters 2013-08-31 05:57:48 +00:00
v.audacity
c7daafede2 In off-list discussion, Steve mentioned that kdevelop / kate highlighting recognizes "FIXME", but not "FIX-ME", which has been the Audacity convention. This commit changes Audacity code to use the "FIXME" convention (though I've never known it as convention and MSVC doesn't recognize it).
Also, minor change in WaveTrack.cpp in the effort on bug 641. Should have no functional difference.
2013-08-24 20:30:47 +00:00
v.audacity
51e0391b7d Campbell Barton's patch for mem leaks, http://www.graphicall.org/ftp/ideasman42/audacity_mem_leak_fix_r12450.diff 2013-08-03 00:24:26 +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
v.audacity
9d0daf8662 Campbell Barton's patch to turn many, many tabs to our 3-space convenbtion 2013-02-20 23:42:58 +00:00
v.audacity
f7841b4d8f Add selection settings to Device Toolbar tooltips. Adjust some comments. 2012-08-07 04:16:13 +00:00
v.audacity
6f50a64050 comments, cleanup 2012-07-19 23:42:47 +00:00
martynshaw99
ffea5a2273 Addressing one of the problems reported with 'Normalise' if the offset is greater than the signal. Comments on other possible problems. 2012-04-23 23:39:36 +00:00
james.k.crook@gmail.com
dd97cae3d9 Removed some (hidden) Cleanspeech cruft that had been used to disable effects. Made some static text open to translation. Added more i18n hints (thanks Thomas Breinstrup). 2012-04-05 11:21:15 +00:00
mchinen
57694a2449 Sequence.cpp: Convert all blockfiles types including aliases in ConvertToSampleFormat 2012-03-01 04:18:32 +00:00
v.audacity
d3513320d6 fix for typo on prev commit 2012-03-01 02:56:41 +00:00
v.audacity
b45d4dd998 further fix for additional P1 "repeatable crash set format to 16-bit..." thread, Gale's msg of 2012-02-29 2012-03-01 02:11:09 +00:00
v.audacity
01aeba01c1 fix for additional P1 "repeatable crash set format to 16-bit..." thread, Gale's msg of 2012-02-29 2012-03-01 00:47:46 +00:00
v.audacity
c699aa601d fix for P1 "repeatable crash set format to 16-bit..." thread 2012-02-29 04:16:08 +00:00
v.audacity
1f688cfb85 Failsafe against null dereferences if SeqBlock* has a null f. 2012-02-29 00:45:36 +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
martynshaw99
d28404a3b6 Removing too stringent Asserts - the Sequence::GetRMS code is set up to find the rms of a number of samples > than a block length. 2012-01-11 00:28:22 +00:00
v.audacity
17083dffa5 (bug 451, p2) A bit more work on what I committed yesterday. 2011-12-03 01:27:13 +00:00
v.audacity
2f043dfb0f (bug 451, p2)
Correct Sequence::ConvertToSampleFormat() errors resulting in wrong block file sizes, per offline discussions with Martyn and James.

In WaveClip::ConvertToSampleFormat(), distinguish between failure and no change.

Changed deprecated calls to wxArray::Count() to GetCount(),

In Sequence::Blockify(), no reason to call Alloc() if we know we have no samples, so rearranged that code.
2011-12-02 06:54:52 +00:00
v.audacity
6f768cb889 (bug 451, p2) When I made the change to actually enforce the bounds on sampleCount s (i.e., [0, mNumSamples]), I used the test from the old (2002!) code. But the test on the upper limit was wrong -- the second test should have been >, not >=, because if (s == mNumSamples), there's no point in setting s to mNumSamples. This fired the new assert when s and mNumSamples are both 0. Fixed it to check >. 2011-11-20 19:28:45 +00:00
v.audacity
8cc8a275f8 (bug 451, P2)
Changes per Martyn's suggestion (http://bugzilla.audacityteam.org/show_bug.cgi?id=451#c24), i.e., deal with sample format mismatch in WaveClip::Paste() and Sequence::Paste().

Also add error checking for bad s parameter values passed to Sequence::Paste().
2011-11-20 03:46:00 +00:00
v.audacity
458152070e Fix some problems with asserts in 11308. Further wording corrections. 2011-11-18 03:47:43 +00:00
v.audacity
59db8d4ad4 See http://bugzilla.audacityteam.org/show_bug.cgi?id=451#c31 and http://bugzilla.audacityteam.org/show_bug.cgi?id=451#c32. 2011-11-16 05:59:48 +00:00
martynshaw99
8adac0ed64 Remove spurious ASSERT, Sequence::GetMinMax iterates over each of the blocks that go to make up the len. 2011-11-07 00:01:30 +00:00
v.audacity
4038f214cd (bug 451, p2) Add some asserts against mMaxSamples. In Sequence::Paste(), correct var largerBlockLen declaration to be sampleCount, not the smaller int, that can overflow on comparing to sampleCount and add log error msg. Add alert dialog, log warning, and limitation in Sequence::WriteXML() if mMaxSamples exceeded. Obviate EnvPoint::WriteXML(), unused. A few comments on some "TODO" comments. Make DirManager::WriteXML() fail in debug mode, as it should not be called. 2011-11-01 04:39:14 +00:00
v.audacity
a0db986d56 More detail in log message about Sequence with len > mMaxSamples. 2011-10-16 23:15:28 +00:00
v.audacity
5bb7d0ec84 This should fix the additional build problem Steve reported. 2011-10-16 22:16:24 +00:00
v.audacity
de54ae309d This should fix r11279 build problems on Linux. 2011-10-14 04:36:40 +00:00
v.audacity
1f352b0157 (bug 451, P2) Add more error checking and increase specificity of Sequence-reading code.
Add wxLogWarning messages to AudacityProject::OpenFile()

Fixed correction for "A linked track's partner should never itself be linked" to remove the link from the partner, not the original (left).

Fix possible NULL pointer dereference in previous commit.
2011-10-13 22:52:55 +00:00
v.audacity
5697e39ec0 (bug 451, P2) Improve specificity of one of the "Gap detected..." messages, so it includes blockfile name and extension if possible. Also changed some wxLogError calls to wxLogWarning, as the plan is to handle them rather than fail the load.
Also made the "...will not be loaded" messages in LoadModules.cpp consistently use wxLogError.
2011-10-12 23:17:40 +00:00
v.audacity
4d1e18d8fd In DirManager.cpp, probably fixed bug 451, by not deleting over-long blockfile.
Made Sequence::HandleXMLEndTag log errors more specific.

Differentiated "Gap detected in project file" error messages.
2011-10-12 05:40:23 +00:00
v.audacity
caf33fc995 Clarify some comments, in figuring out the cause of bug 451 (p2). 2011-10-10 21:26:35 +00:00
v.audacity
3a1d4334f2 Make wxLog* calls consistently not have \n at the end. Turn some wxLogWarning calls to wxLogError. Put some periods at the ends of sentences. 2011-10-09 21:14:03 +00:00
v.audacity
f2b02294b6 Fix memory leaks. 2011-09-29 22:10:42 +00:00