Menu

How Waveward Handles a Truncated Audacity .aup Document
📰

How Waveward Handles a Truncated Audacity .aup Document

DEV Community: javascript·王磊·1 day ago
#wIfUmb5s
#devtojavascript#devto#dev#file#audacity
Reading 0:00
15s threshold

Audacity 1.x and 2.x projects are an XML document ( .aup ) plus a _data folder of audio block files. The .aup stores project structure and references to those blocks; it does not contain the audio samples. I wrote a parser for that document in Waveward. If the file ended inside a tag, or with elements still open, Waveward used to refuse the open as unreadable.

That refusal throws away a prefix that may still be usable, but opening the file is not the same as getting the whole project back. Waveward now keeps the complete entries it can still parse, and only the audio those entries still name in the _data folder. A cut that falls before any usable entry, a block the document never finished naming, or a block file that is missing is not recovered; missing blocks play as silence and are counted.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.