wrong samplerate in au-files off project


I recorded on Ubuntu (10.10) but my File-System (Fat32 on SD-Chip) was Defect.

After chdisk i get some lost&found-files. I show this files with HEX-Editor.
In des snd-header ar the wrong sample rate (44100). I take 48000 by recording.

It`s a BUG?

It is posible to read useful infos from snd-header for reparing the project-data?

Audacity data files (.AU) do not have a specified sample rate. The sample rate is set by the AUP file, so I don’t know what files you are analysing, but if they say what the sample rate is in the header, then they are not Audacity data files. If you “Import” existing audio files into Audacity then they may have a different sample rate.

Hmmmm … what’s this then (from SimpleBlockFile.h)

// The AU formats we care about
enum {

typedef struct {
   wxUint32 magic;      // magic number
   wxUint32 dataOffset; // byte offset to start of audio data
   wxUint32 dataSize;   // data length, in bytes (optional)
   wxUint32 encoding;   // data encoding enumeration
   wxUint32 sampleRate; // samples per second
   wxUint32 channels;   // number of interleaved channels
} auHeader;

Comparing this to the top of a .au file:
magic 2E 73 6E 64 (.snd)
dataOffset 00 00 60 8C
dataSize FF FF FF FF
encoding 00 00 00 03
sampleRate 00 00 AC 44 (= 44100)
channels 00 00 00 01

– Bill

Thanks billw58

For the better understanding:

My Project-Folder is corrupt. Many of the .au Files are in the Lost&Found folder but without the right name.
The Record was 1h and 600 au-files are moved.

When I drop the file in audacity I can hear it but whit the wrong speed. When I repare the file-header the speed is correct.

I think it’s better when the right speed a saved and some add-data for finding the original-position are helpful too.

OK … the best is use a better file-system.

sorry for my terrible English (I’m from ger)

I’m guessing that is a legacy hang-over as Audacity does not appear to use that information. Regardless of the recording sample rate, the block files report a sample rate of 44100, but Audacity ignores that and uses the sample rate that is stated in the AUP file.