libsidplayfp / sidplayfp

Console SID/MUS player
GNU General Public License v2.0
34 stars 8 forks source link

Writing wav to stdout no longer works with v2.x #12

Closed joolswills closed 2 years ago

joolswills commented 2 years ago

With sidplayfp v1.4.4 (with Ubuntu 20.04.4), you could write a wav to stdout with -w-.

With v2.2.3 (Ubuntu 22.04 version) this no longer works, as the .wav extension is added and a file -.wav is created instead.

I assume this is related to the extension being automatically added before the check in https://github.com/libsidplayfp/sidplayfp/blob/1dcccd3cc7eda4251acaf97d7524b33d8881f9e6/src/audio/wav/WavFile.cpp#L173 (or something like that).

drfiemost commented 2 years ago

I guess it broke with 09512ab, need to check for stdout in getFileName and avoid adding the extension in that case