I am getting this error today for the first time. I tried the usual stuff, rebooting SC, rebooting computer, nothing worked. Any ideas what could cause such an error for a tmp file?
OSX 13.6.4, SC 3.13, 1st gen M1.
File β/Users/thormadsen/Library/Application Support/SuperCollider/tmp/-211969695β could not be opened: Format not recognised.
This error would be coming from the server, when loading an audio file β thus probably a loadCollection
.
I guess first troubleshooting step:
(
~test = { |format = "wav", sample = "int16"|
var path = PathName.tmp +/+ 100000.rand ++ "." ++ format;
var file = SoundFile(path)
.headerFormat_(format)
.sampleFormat_(sample)
.numChannels_(1);
var buffer;
if(file.openWrite) {
file.writeData(
Signal.sineFill(512, [1]);
);
file.close;
} {
Error("File write failed").throw;
};
s.waitForBoot {
var cond = CondVar.new;
buffer = Buffer.read(s, path, action: { cond.signalAll });
cond.waitFor(1, { buffer.numFrames.notNil });
if(buffer.numFrames.isNil) {
Error("File read failed").throw;
};
buffer.free;
File.delete(path);
"Pass".postln;
};
};
)
~test.();
~test.("aiff", "float");
// try different formats
If it fails, then something regressed in soundfile writing/reading. If it passes, something regressed in loadCollection.
hjh
1 Like
Thanks a lot. I havenβt figured out exactly why I got the error, but now I have a good idea where in my code to check next time I see it.