-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Export as ".wav" does not append extension #764
Comments
This happens if you don't specify the file type in the name regardless when you are exporting. This has been a "bug" since before 4.13, when I had issues with it. |
sugest splitting all composite save-selection ext.
|
How is this relevant to .WAV and .OGG export? Edit: Furthermore, I don't agree mmp should be in the drop-down since it's for advanced users and in the rare event it is needed, the user can type ".mmp". |
I think I got it. It's a bit ugly because Qt won't let you just grab the file extension, so I had to parse it from the drop-down description. I tested it with "Export tracks" and it seems be be ok because it never finds the file filter (i.e. This works whether or not a file extension has been clicked from the drop down and still works when the extension has been typed. It's not smart enough to change a .wav to a .ogg though (unless using the dropdown), instead you'd get untitled.wav.ogg, which should be pretty constant with the behavior in any save dialog. An additional enhancement should be made to the export settings dialog to rename it's own title when it's own extension drop-down has been changed. This is relatively minor. if( efd.exec() == QDialog::Accepted &&
!efd.selectedFiles().isEmpty() && !efd.selectedFiles()[0].isEmpty() )
{
int suffix_begin = efd.selectedNameFilter().indexOf("(*.");
int suffix_end = efd.selectedNameFilter().indexOf(")");
QString export_file_suffix = "";
if (suffix_begin != -1 && suffix_end > suffix_begin)
{
// Determined selected file extension, i.e. get ".wav" from "WAV-File (*.wav)
export_file_suffix = efd.selectedNameFilter().mid(suffix_begin + 2, suffix_end - suffix_begin - 2);
// If multiple extensions are listed, only get the first (i.e. ".wav .WAV")
export_file_suffix = export_file_suffix.split(" ")[0].trimmed();
// Don't add the suffix if it is already specified
if ( efd.selectedFiles()[0].endsWith(export_file_suffix) )
{
export_file_suffix = "";
}
}
const QString export_file_name = efd.selectedFiles()[0] + export_file_suffix;
exportProjectDialog epd( export_file_name,
engine::mainWindow(), multiExport );
epd.exec();
} |
|
Then please open your own bug report for that. What you are describing is an enhancement whereas this issues is a very specific bug and is unrelated to what you describe. In fact, you could make your change now by forking and commit the change quickly via web browser if you wanted to avoid downloading the repo... Just browse the source code and find the right file with the The issue I'm describing seems to be caused by a combination of To say "all dialogs" is OK in casual conversation, but I'm going fix and close this bug report soon and your requests will get left behind as they are part of completely different code (and in my opinion already work just fine). |
Closed per #779 |
I noticed this on Ubuntu, but it may occur on other platforms. Exporting a track as a wav format seems to omit the file extension if one is not provided.
When "Files of type" is set to "WAV", the file name should alway have ".wav" appended, but this doesn't seem to be the case if the name is typed without one.
This is likely caused by the additional settings dialog which asks a second time which format the file should be in, but doesn't actually do anything to determine that the provided extension is correct or that there is even an extension provided at all.
This does not happen on the Save Project dialog. If "mmpz" is omitted, the dialog corrects this behavior by placing the file extension on the end of it.
This is normally ok in Ubuntu because the Ubuntu desktop still recognizes the file as a WAV regardless of whether it has an extension or not, however LMMS is not so forgiving and will not import a WAV file without the proper extension.
The text was updated successfully, but these errors were encountered: