Audio Editor
Go to file
Dmitry Makarenko 6d4e8be398
Horizontal scrolling - fix crash of debug version on Windows (#10033)
Resolves: https://github.com/audacity/audacity/issues/10032

Problem:
When no horizontal scrolling is possible, trying to scroll by dragging
using the middle mouse button causes a debug exception.

When this is the case, in the call to void
Viewport::ScrollHorizontalByPixels(int deltaPixels), in the call to
std::clamp(current - deltaPixels, 0, max), max can be negative, leading
to clamp() being undefined.

Additional issue, scrollbar thumb moves in the wrong direction.

Fix:
Ensure max is not negative (as is done in other funtions in the file, eg
Viewport::SetHorizontalThumb()).

Scrollbar thumb now moves in the correct direction.


<!-- Use "x" to fill the checkboxes below like [x] -->

- [x ] I signed [CLA](https://www.audacityteam.org/cla/)
- [x ] The title of the pull request describes an issue it addresses
- [x ] If changes are extensive, then there is a sequence of easily
reviewable commits
- [x ] Each commit's message describes its purpose and effects
- [x ] There are no behavior changes unnecessary for the stated purpose
of the PR

Recommended:
- [x ] Each commit compiles and runs on my machine without known
undesirable changes of behavior

QA:

- [ ] Autobot test cases have been run
2025-12-11 17:24:45 +03:00
.github ci: update macos runner to macos-14 2025-11-11 19:38:30 +03:00
au4 fixed #7487: override all shortcuts when editing 2024-10-11 15:35:01 +03:00
cmake-proxies Fix arm64 installer filename (#9130) 2025-07-24 20:10:40 +03:00
conan chore: update wxWidgets to 3.1.3.9 2025-11-25 11:31:14 +03:00
crashreporter Update privacy policy URL 2025-02-18 21:19:04 +03:00
dox2-src
help chore: update main branch version 2025-11-25 16:41:28 +03:00
images fix: improve image quality 2025-12-03 18:24:49 +03:00
include/audacity
lib-src Use full function prototypes in libnyquist 2025-06-16 11:57:33 +03:00
libraries Horizontal scrolling - fix crash of debug version on Windows 2025-12-11 10:57:20 +00:00
linux chore: remove workaround that is no longer needed 2025-11-13 11:57:39 +03:00
locale Merge branch 'release-3.7.6' into audacity3 2025-12-08 20:21:39 +03:00
mac change icon to be compliant with the style guidelines 2024-01-02 20:14:50 +01:00
modules Addressed review comments 2025-11-26 23:21:57 -08:00
nyq-po remove vocal reduction effect 2024-04-04 13:07:25 +02:00
nyquist Use set(...) not list( APPEND ... ) for first assignments in cmake 2024-05-02 15:08:38 +03:00
plug-ins Fix Studio Fade Out. 2025-03-24 14:35:57 +03:00
resources Re-enable Classic Filters and place it in Legacy group 2024-07-30 15:11:03 +02:00
scripts Check if the file is signed after being processed on the signing service 2025-06-11 15:05:14 +03:00
src TrackPanel: Initialize new members 2025-12-06 13:30:38 +04:00
tests remove arch tags from 3-4 version control systems ago 2024-01-15 07:22:48 +01:00
win Fix arm64 installer filename (#9130) 2025-07-24 20:10:40 +03:00
.editorconfig
.gitattributes normalize line endings to lf 2024-09-25 13:18:50 +02:00
.gitignore feat: add Open Audio from audio.com dialog 2025-11-12 14:09:28 +03:00
ABOUT-NLS
audacity.dox
audacity.dox.in Remove mentions of libmad 2023-11-22 22:25:26 +01:00
BUILDING.md Remove obsolete MSVS 2019 build from CI (#9160) 2025-07-30 09:46:02 +03:00
CHANGELOG.txt chore: update changelog 2025-12-04 19:33:16 +03:00
CMakeLists.txt chore: update main branch version 2025-11-25 16:41:28 +03:00
CODE_OF_CONDUCT.md
CONTRIBUTING.md Unnecessary spaces in the file 2024-05-02 15:08:39 +03:00
INSTALL fix broken links, remove wikilinks 2023-06-02 14:29:46 +02:00
LICENSE.txt
nographs.dox
README.md README.md fixes 2023-07-26 13:53:27 +02:00

Audacity

Audacity is an easy-to-use, multi-track audio editor and recorder for Windows, macOS, GNU/Linux and other operating systems.

  • Recording from any real or virtual audio device that is available to the host system.
  • Export / Import a wide range of audio formats, extensible with FFmpeg.
  • High quality using 32-bit float audio processing.
  • Plugin Support for multiple audio plugin formats, including VST, LV2, and AU.
  • Macros for chaining commands and batch processing.
  • Scripting in Python, Perl, or any other language that supports named pipes.
  • Nyquist a powerful built-in scripting language that may also be used to create plugins.
  • Editing multi-track editing with sample accuracy and arbitrary sample rates.
  • Accessibility for VI users.
  • Analysis and visualization tools to analyze audio or other signal data.

Users

For end users, the latest Windows and macOS release version of Audacity is available from the Audacity website. Help with using Audacity is available here.

Developers

Build instructions are available here.

Additional development resources may be found here.

License

Audacity is open source software licensed GPLv3. Most code files are GPLv2-or-later, with the notable exceptions being /lib-src (which contains third party libraries), as well as VST3-related code. Documentation is licensed CC-by 3.0 unless otherwise noted. Details can be found in the license file.