Codebase overview
Last updated
Last updated
Audacity 4's codebase consists of 3 main parts: Audacity 3 code invoked through a wrapper, Audacity 4 code, and the Muse Framework.
Audacity 3 code in the main au3/
folder is unused; it's merely kept to make copypasting bits into the active src/
somewhat more easy. Active Audacity 3 code may be found in some subdirectories of src/
.
Muse Framework code is not part of the Audacity repo, and can be found (or eventually ). It provides elements common to Audacity and MuseScore Studio, most notably low-level functionality, buttons and graphics, the preferences system, and things like that. At the time of writing, active development of the framework happens in the musescore/musescore repo, with updates to the framework repo being extracted from there - though this will change soon, probably.
Audacity 4-specific code can be found in . On a high level, it is structured as follows:
app/
contains the base of the program, including default configurations and theme configuration.
appshell/
contains various dialogs and pages, such as the preferences.
au3audio/
contains the PortAudio-based audio engine found in Audacity 3. It is scheduled for replacement with a new engine.
au3wrap/
contains the wrapper for old Audacity 3 code. You'll find au3/ subdirectories in various other places, this is what makes it run within Audacity 4.
context/
contains the different contexts actions can exist in.
effects/
contains effects and plugin implementations.
importexport/
contains importing and exporting code.
playback/
contains everything needed for playback, including device configuration and meters.
project/
contains code related to the project itself, so anything that loads/writes to/modifies AUP3 files.
projectscene/
contains all of the stuff needed to show what a project contais - clips, tracks, etc.
record/
contains everything needed for recording.
trackedit/
contains everything related to editing and modifying audio clips and tracks.
The directories in src/ contain subdirectories with some separation of concerns:
internal/
contains the internal calculations, generally only relevant within the directory its in.
qml/
contains QML files - ie layouts for various components.
tests/
contains unit tests. New code should have at least 80% unit test coverage.
types/
contains custom types and data structures needed in that area.
view/
contains the things data which should be displayed by the QML above.