General Dev Question - Internal Name of Imported Files

Audio software developers forum.
Forum rules
If you require help using Audacity, please post on the forum board relevant to your operating system:
Windows
Mac OS X
GNU/Linux and Unix-like
Post Reply
cpsmusic
Posts: 116
Joined: Mon Jun 06, 2011 3:23 pm
Operating System: Please select

General Dev Question - Internal Name of Imported Files

Post by cpsmusic » Fri Jan 06, 2012 2:51 pm

Hi,

I'm currently developing a new audio backend for the 2D animation program Pencil.

I have a question regarding how Audacity names the audio that gets imported into a project's data directory (e0000acc.au, e0000b5b.au, etc.).

How are these names generated and whereabouts does this happen in the source code?

Obviously, these names need to be unique so that the same file can be imported and copied to the data directory multiple times without the risk of overwriting existing files. Am I right in thinking this or am I way off track :D

Cheers,

Chris

kozikowski
Forum Staff
Posts: 69374
Joined: Thu Aug 02, 2007 5:57 pm
Operating System: macOS 10.13 High Sierra

Re: General Dev Question - Internal Name of Imported Files

Post by kozikowski » Fri Jan 06, 2012 4:17 pm

The older Audacity used to name them more or less sequentially. The new Audacity has a numbering scheme that makes disaster recovery much easier and comprehensive. I think they're still sequential by creation time and date.

They're not straight sound files and messing with them can cause Audacity and your show to fail. For one thing, they're left-right-left-right. They're mono snippets.

Koz

steve
Site Admin
Posts: 81627
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: General Dev Question - Internal Name of Imported Files

Post by steve » Fri Jan 06, 2012 5:47 pm

I'm not a developer so I'm not sure, but I think that a good place to start looking is in:
/src/blockfile/SimpleBlockFile.cpp
and
/src/DirManager.cpp
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

cpsmusic
Posts: 116
Joined: Mon Jun 06, 2011 3:23 pm
Operating System: Please select

Re: General Dev Question - Internal Name of Imported Files

Post by cpsmusic » Fri Jan 06, 2012 11:47 pm

Thanks, the code I was looking for is in DirManager.cpp.

Cheers,

Chris

Post Reply