file format change?

I’ve run into this issue before, but it was so bizarre, I thought I must have made some kind of mistake. Today it happened again and I grabbed a file to send. Here’s the problem:

The original version is an Aiff file. I added some loop markers and saved it (command-S) for later editing. I tried to open it in another application and it refused to open the file. Why? Because WL saved the file with the .aif extension, but it actually wrote a .wav file. I’m not sure how something like that could even happen. First, the format should never be changed with a simple Save command. That should be reserved for Save As or Export. Second, the extension should always reflect the actual format of the file. There’s no way WL should write a .wav file but leave the .aif extension.

And, just for good measure, all of the header information has been erased. I keep trying to figure out the order of operations that led to this, but it seems to be erratic. I wonder if the default file in the Save As dialog might have something to do with this since it was set to .wav?
PIano original format.aif.zip (772 KB)
Piano format change WL.aif.zip (752 KB)

Not normal indeed.
I tried to reproduce with various combinations (eg. saving a WAV file before saving the AIFF), but I can’t.
Do you have an idea about what operations you did before.
Did you open two files with the same name but one with AIFF and the other with the WAV extension?

Are you sure you did not rename the extension wav to aiff, outside WaveLab?

Thanks for checking this, PG. I know the operation I was doing when it happened. It actually involved a Keyboard Maestro macro, but the macro only has to do with moving loop markers from one file to another and nothing to do with saving the file or anything that should change the format. I tried a bunch of tests doing the same set of operations and had the format change happen one other time, but not happen lots of other times. I’m still trying to figure out if there’s a particular recipe that triggers this. I’ll try to find some time tonight to work on this again.

This still happens too erratically to pin down. The only thing that’s consistent is that if wav default is the file type selection in the Save As… dialog, then I get the changed format during occasional saves. I haven’t seen that happen yet if I have aif as the file type selection in the Save As… dialog. It doesn’t seem to matter what I’ve done to modify the file either. It’s just that sometimes the file saves as a wave format with an .aif extension even though most of the time it correctly saves in the .aif format. I wish I had a more definitive set of steps, but that’s all I’ve got so far…