1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-05 14:18:53 +02:00

5769 Commits

Author SHA1 Message Date
Paul Licameli
52417c444d Remove unnecessary casts to sampleCount 2016-08-24 14:50:46 -04: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
b8c1d02058 Use sf_count_t not sampleCount 2016-08-24 14:50:45 -04:00
Paul Licameli
ee5a0db9ff some uses of size_t 2016-08-24 14:50:45 -04:00
Paul Licameli
bf66e4410a Use long long for argument passed to wxString::ToLongLong 2016-08-24 14:50:45 -04:00
Paul Licameli
2949a080d2 More cautions in SBSMSEffect.cpp...
... The narrowings from sampleCount to long might be fixed, but it would
require changes in lib-src
2016-08-24 14:50:45 -04:00
Paul Licameli
5ef9b81a94 Merge branch 'master' into HEAD 2016-08-24 14:50:13 -04:00
Paul Licameli
d81358399e Put Paulstretch in the right place in the Xcode project browser 2016-08-24 13:11:46 -04:00
Paul Licameli
b5e410d987 Fix Windows build differently 2016-08-24 12:13:53 -04:00
James Crook
781de82d02 Workaround build breakers. Needs review.
These changes fix a broken build in Windows.
#include <algorithm> needed for min/max to be in std.
decltype(+name) was declaring a const variable, that could not be incremented.  Changed to auto.
2016-08-23 21:46:12 +01:00
Paul Licameli
b20a9bacad Revert unintended changes in Experimental.h, sorry 2016-08-23 14:27:35 -04:00
Paul Licameli
0d3c00662e Merge commit '1281f1b14b03355f694cd104d6b4d9919de107a6'
* commit '1281f1b14b03355f694cd104d6b4d9919de107a6':
  Common function limits buffer size to sampleCount known to be small
2016-08-23 12:46:37 -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
58b83873a4 Some preliminaries before sweeping the uses of sampleCount
Uniform init in blockfile ctors (prevents implicit narrowings)
  spaces
  change a variable name
  Don't use conversion of sampleCount to bool
  Add explicit cast to sampleCount where negative values are possible
  use std::min and std::max
  an assertion
  LadspaEffect::mSampleRate has type double, like other plug-in effects
2016-08-22 21:46:25 -04:00
Paul Licameli
367ed1dfce Uniform init in blockfile ctors (prevents implicit narrowings) 2016-08-22 21:45:54 -04:00
Paul Licameli
477d8d9d1d spaces 2016-08-22 21:45:54 -04:00
Paul Licameli
26b94a447b change a variable name 2016-08-22 21:45:54 -04:00
Paul Licameli
39df8d0b51 Don't use conversion of sampleCount to bool 2016-08-22 21:45:54 -04:00
Paul Licameli
69064edf20 Add explicit cast to sampleCount where negative values are possible 2016-08-22 21:45:54 -04:00
Paul Licameli
a6de680cdb use std::min and std::max 2016-08-22 21:45:54 -04:00
Paul Licameli
82a5950a6c an assertion 2016-08-22 21:45:54 -04:00
Paul Licameli
2be2e73e66 LadspaEffect::mSampleRate has type double, like other plug-in effects 2016-08-22 21:45:54 -04:00
Paul Licameli
d58ac8d5cb Merge branch 'master' into HEAD 2016-08-22 21:45:32 -04:00
James Crook
2a113f7ae4 Paint over region between Grabber and Pin button.
Numbers from the timeline were previously visible here.
2016-08-22 15:56:37 +01:00
James Crook
555767f2ad Bug 1487 - (Residual) Scrub and Seek are enabled when there is no audio to operate
Fixed QP Region created when no audio, and dragging in Scrub Ruler.
2016-08-22 15:23:15 +01:00
James Crook
8886d1ba41 Bug 1487 - Scrub and Seek are enabled when there is no audio to operate on
I added a new flag, HasWaveDataFlag that checks not only for the presence  of a WaveTrack but also for audio actually in it.  This is now applied to the Scrub and Seek menu items, with the result that they grey out in the menu, and their buttons are dulled on the toolbar, if there is no audio.
2016-08-22 13:25:05 +01:00
James Crook
f9d269bcee Change ScrubBar to ScrubRuler
This also makes it clearer in the code when we are dealing with a Toolbar ID (for the scrubbing toolbar) and when we are dealing with a button ID (for enabling/disabling the scrub ruler).
2016-08-22 12:25:36 +01:00
Paul Licameli
314648e1f1 Identify the few unsafe narrowing conversions from sampleCount... 2016-08-21 15:31:37 -04:00
Paul Licameli
1189cfd62a Identify the few unsafe narrowing conversions from sampleCount...
... I believe this list of four places is exhaustive.

There are many, many more safe narrowings that I examined.

This resulted from changing the definition of sampleCount in my builds so that
narrowing conversions failed to compile without some fixes, and I examined and
fixed every place.

The rest of that work is not yet shared.
2016-08-21 15:28:32 -04:00
Paul Licameli
37687c589f Merge branch 'master' into HEAD 2016-08-21 15:28:07 -04:00
James Crook
be66873fca Restored bevels on TrackInfo.
Aesthetic choice, currently disabled in run up to 2.1.3.
Lowest edge of bevels now hidden correctly on smaller panels (if bevels enabled).
2016-08-21 18:17:51 +01:00
Paul Licameli
d5712a462f Some rewriting in currently unused VoiceKey... 2016-08-21 12:31:40 -04:00
Paul Licameli
d82e87cac3 Some rewriting in currently unused VoiceKey...
... involving distinction of size_t and sampleCount
2016-08-21 12:30:09 -04:00
Paul Licameli
fc584fd2cf Merge branch 'master' 2016-08-21 12:27:42 -04:00
James Crook
6383df2ff6 Bug 1414 - (Residual) Green triangles in scrub bar sometimes appear and sometimes don't
The residual bug was that the PlayHead triangle could appear when in the scrub ruler.  This was an 'off by 2' error in using the size of that region.
2016-08-21 17:02:17 +01:00
James Crook
26fac64ddd Bug 1478 - Cannot generate or record after starting and stopping Scrub Mode with no audio present
Stream time from the scrubbing audio (which had not started) was coming out as a large negative value.  That in turn led to an out of range selection starting and ending at that value.  Negative stream times now treated as zero when stopping audio.  This does mean that the (fringe) case of stop and set cursor with audio playing to the left of zero, if you are able to do that, will likely set the cursor at zero rather than at the negative time end point.  I think that is probably OK, even good.
2016-08-21 15:19:45 +01:00
Paul Licameli
c998f194c7 Preliminary changes and fixes, before reducing uses of sampleCount...
Fix bug in update of progress in CompareAudioCommand
  EffectClientInterface::SetSampleRate takes double...
  Rewrite WaveTrack::GetEnvelopeValues, taking one less argument...
  Write and read the wide aliasStart fields carefully...
  Rewrite Sequence::FindBlock using size_t variables for indices
  Remove overloads for sampleCount from ConfigInterface...
  A mutex guarding access to this variable made volatile unnecessary
  time warper bug
  Fix bug in disabled experimental code...
2016-08-21 10:04:08 -04:00
Paul Licameli
2969336258 Fix bug in update of progress in CompareAudioCommand 2016-08-21 09:52:10 -04:00
Paul Licameli
56586770e0 EffectClientInterface::SetSampleRate takes double...
... All the overrides (except Ladspa) were casting it to floating poing anyway
2016-08-21 09:51:32 -04:00
Paul Licameli
5cf331ae8c Rewrite WaveTrack::GetEnvelopeValues, taking one less argument...
... In practice this argument was always 1 / rate so it was superfluous.

Also make the buffer size argument unsigned.
2016-08-21 09:45:53 -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
a1d930322c Rewrite Sequence::FindBlock using size_t variables for indices 2016-08-21 09:16:20 -04:00
Paul Licameli
49e699b1df Remove overloads for sampleCount from ConfigInterface...
... The value was always cast to int anyway when writing, and it was used
only for one value in VST effect, which did not need 64 bits
2016-08-21 09:11:44 -04:00
Paul Licameli
854651306c A mutex guarding access to this variable made volatile unnecessary 2016-08-21 09:00:18 -04:00
Paul Licameli
2a7d8dca77 time warper bug 2016-08-21 08:59:48 -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
5761972dfa BHug1488: Don't crash exiting from command-line benchmark test...
Problem was that cfd7648fce2388ec8ae35b38004f2ae111c484af fixed a memory leak
but created a dangling pointer bug, which does not happen during usual run
of Audacity because AudacityProject::OnCloseWindow is reached then before
destroying AudacityProject.

Fixed it by using a std::shared_pointer for the TrackList that both
AudacityProject and TrackPanel must use.
2016-08-20 13:58:56 -04:00
James Crook
05fe684114 Ungrey more actions, if paused.
This introduces a new variable, mStopIfWasPaused (default true).  Actions which require AudioIONotBusyFlag will now stop the audio, if audio was busy but paused and attempt to continue.

We could perhaps make mStopAudioIfWasPaused into a preference, but I don't think we need to keep even the option of the old behaviour.
2016-08-20 18:52:30 +01:00
James Crook
f77000bcfb Update Danish translation (da.po). 2016-08-20 16:55:20 +01:00