There is an option in “Edit menu > Preferences > Import/Export” >>> “Read uncompressed audio files directly (faster)”.
There is an option in “Edit menu > Preferences > Projects” >>> “When saving a project that depends on other audio files > Do not copy any audio”.
“Read uncompressed audio files directly (faster)” will allow Audacity to reference imported uncompressed audio files without copying them into the project. It does this by creating “virtual data blocks” (my terminology) instead of using .AU files (which would either be in the temporary folder if the project has not yet been saved, or in the _data folder if the project has been saved).
These “virtual data blocks” are listed in the Audacity Project file (.AUP) as “pcmaliasblockfile” and are given a .AUF extension.
If/when the pcmaliasblockfiles are edited, the corresponding data from the linked audio file (WAV, AIFF or FLAC files) are copied into the project as .AU files.
If this project is Saved and the option “Do not copy any audio” has been selected, the project will still depend on the external WAV/AIFF/Flac file for all unchanged “virtual blocks”. These will be shown in the AUP file as .AUF files (pcmaliasblockfiles). Any data blocks that have been changed will be shown in the AUP file as .AU data blocks.
The first time that a project is saved, any .AU files that are in the temporary folder that are required by the project will be copied into the project _data folder. Any unused .AU files will be discarded when the project is closed. The uncompressed audio file that is linked to the project is called a “dependency” because the project depends on data within that file.
If all of the data from the linked dependency file is modified, then all of the data will have been copied into the project as .AU block files and the original uncompressed audio file will no longer be a dependency. This can be checked from “File menu > Check Dependencies”.
The underlying problem with (lossy) compressed audio files is that there is not a direct correlation between data blocks in the compressed audio file and data blocks in the Audacity project. The only way that Audacity can know that a specific sample belongs at a specific location in a specific data block is if the entire file has been decoded (uncompressed). This means that “On Demand” reading of data from compressed files is not (currently) possible, and imported compressed files must be copied into the project.
The only way that I can see this proposed feature working is for Audacity to copy data from the compressed file and raise a flag. Then if any data in that track is changed for the flag to change state. While the flag is in its original state the compressed source file would be listed as a Dependency, but if the flag state changed then it would be removed from the list of Dependencies. On “Save”, if the compressed file is listed as a Dependency, then the associated track data would be discarded and a link would be made to the original source (compressed) file so that when the project is reopened the compressed file is imported (copied) back into the project.
While I think that such a scheme is probably possible, it is potentially very dangerous. For example, if the user saves the project with a different name, then the dependent source file will still be in the old project _data folder, and if the old project is moved, renamed or (most likely) deleted, then the new project will be destroyed. I guess that this could be avoided by only linking to the original source file IF the data is unchanged AND the option to “not copy data” is selected in Preferences AND the project is Saved with the original project name, but this is getting extremely complicated for the rare and not-recommended case that the user is opening a compressed copy of the projects AND the user has re-saved the project as a compressed copy AND has not made any changes to the track AND has not saved as a full (uncompressed) project.
Even if this proposal is implemented, the next question is “I only truncated the silence at the end of the track. Why can’t Audacity split the original file without decoding - like you can do with MP3Split?” The simple answer is that Audacity is primarily designed for high quality editing and processing of uncompressed audio - as soon as you start trying to work with compressed audio there is inevitably loss of sound quality. Personally I’d rather that the developers continued to concentrate their efforts on high quality audio work
Much easier and safer to recommend that users always Save the actual (uncompressed) project if they wish to continue working on it later, and only use “Save Compressed Copy” as a copy. This recommendation is in line with the recommendation that users should always (if possible) work with uncompressed audio until the final export.