View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0001546||OpenMPT||User Interface||public||2022-01-09 04:58||2022-01-09 14:59|
|Reporter||Lachesis||Assigned To||Saga Musix|
|Product Version||OpenMPT 1.30.01.00 / libopenmpt 0.6.0 (current stable)|
|Summary||0001546: Minor raw sample export/import issues.|
Putting several minor issues/complaints regarding raw samples here because they aren't really worth their own individual reports.
My use case for raw samples is mainly testing very old junk so this issue is about as low priority as it gets...
|Tags||No tags attached.|
|Has the bug occurred in previous versions?||Yes|
|Tested code revision (in case you know it)|
I think I should explain one thing upfront which might clear up some of the confusion: OpenMPT tries to be smart (maybe too smart?) about which sample format it offers by default in the dialog, which is not always the one chosen in the configuration dialog: After loading a file, OpenMPT will deduce the format to use from its filename, but only (until now) if it ends in .wav or .flac (as of r16474 it also takes S3I into account). I'd be hesistant to add .raw to that logic because I think that most people, after loading a raw sample, wouldn't want to keep the sample in raw format, but rather convert it to WAV and FLAC, so that they can keep the middle-C frequency, loop points, etc... I totally get your use case but I think that defaulting to RAW format in this case would be dangerous (many people don't even realize how they could change the format from the dropdown in the Save As dialog...). Note that this logic no longer applies if a sample has been saved once, as then OpenMPT knows its new filename.
r16474 does two more things: It adds .sam to the list of raw sample extensions, and adds S3I to the list of default formats in the config dialog.
This is essentially a bit of a workaround for some of Windows' own smartness when it comes to deducing the correct filename. IIRC when you manually enter a filename but leave out the file extension, Windows will not always add the correct file extension when hitting the Save button, if the filename looks like something that already has a valid file extension. This again can cause a lot of confusion because now your sample that you just saved doesn't show up in the sample browser because it uses a bogus file extension.
I'm open to suggestions how this could be improved but I wouldn't want to hurt the default behaviour for users without this specific usecase.