Audacity Bug Summary
••• Introduction •••
••• Keywords •••
    Audacity 3.0.3 development began 19th April 2021

Audacity Bugzilla



Bug 1355 - "Other uncompressed files" does not (visually) update target file extension according to the chosen "Header" type
"Other uncompressed files" does not (visually) update target file extension a...
Status: RESOLVED FIXED
Product: Audacity
Classification: Unclassified
Component: Formats
2.1.3
Per OS All
: P2 RepeatableAll
Assigned To: Default Assignee for New Bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2016-03-10 19:22 UTC by Gale Andrews
Modified: 2020-03-31 11:19 UTC (History)
8 users (show)

See Also:
Steps To Reproduce:
1) Quit Audacity, delete audacity.cfg, restart Audacity. Create some audio. 2) File > Export > Export Audio and choose "Other uncompressed files". The header defaults to WAV (or AIFF on Mac) which is fine. 3) Change the Header dropdown to AIFF (or WAV on Mac) or some other header. The extension in the Save As: box remains at WAV (AIFF on Mac). 4) Press the OK button to effect the export 5) Note that the file has been exported with the users chosen format and with the correct extension 6) File > Export > Export Audio 7 Note that Audacity has remembered that "Other uncompressed files" is in play and 8) Note the the file-type is as selected in Step 3 above - BUT this time the extension is correct for that file-type
Release Note:
GROUP: Imports and Exports * '''When exporting using the "Other uncompressed files" option, if you change the required file-type in the "Header" dropdown in the "Format options" the filename extension will not change in the "File name" box to the left of the Save button.''' **However the file will be exported in the correct format with the correct default extension for that format, even if you don't change the extension in the "File name:" box.
First Git SHA:
Group: ---
Workaround:
Closed: 2018-08-31 00:00:00
petersampsonaudacity: Test‑OK‑Win+
petersampsonaudacity: Test‑OK‑Mac+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gale Andrews 2016-03-10 19:22:17 UTC

    
Comment 1 Paul L 2016-06-22 14:43:28 UTC
I do not see the same behavior, on my MacBook runinng 10.10.2

If I type a name with no extention in Save As:, I see no unselected extension, and there is no change as I vary the File Type.

If I add .aiff in the Save As: box when that is the selected export type, then that part of the name becomes unselected, and changes appropriately, which changes of file type.

If I cancel, reopen the export dialog, type a name, choose "Other Uncompressed Files" (and no extension is filled in the box) and export -- then I get a .aiff file.

So, I see no bug.
Comment 2 Steve Daulton 2016-08-17 13:56:02 UTC
I'm seeing this bug with other formats also (Debian Xfce)

1) Import an Ogg file, say "test.ogg"
2) Export (16-bit WAV selected by default).
Audacity offers to export as "test.aiff"
Comment 3 Gale Andrews 2016-08-17 14:33:20 UTC
(In reply to Steve Daulton from comment #2)
> I'm seeing this bug with other formats also (Debian Xfce)
> 1) Import an Ogg file, say "test.ogg"
> 2) Export (16-bit WAV selected by default).
> Audacity offers to export as "test.aiff

That's the separate bug 1315.
Comment 4 Peter Sampson 2017-11-22 09:45:19 UTC
This affects Windows too - so I broadened the scope (assumed All)

The underlying problem would appear to be the when using "Other uncompressed files" as the "Save as type" in the Export dialog when the user goes to the "Format Options" part of the dialog and chooses something other then the default or last-used in the "Header" dropdown - Audacity does not update the file extension in the "File name" data box.

Pressing the OK button will however cause Audacity to export the file in the required format and with the correct extension  that the user specified in the "Header" dropdown.

A subsequent visit to The Export Audio dialog will show that Audacity remembers the "Header" type correctly AND it sets the extension in the "File name" correctly.  BUT changing the "Header" type to something else shows that then the "File name" extension is once again not visually changed.

This is (or could be) very confusing for the user have the displayed file-type (extension) being different to that which is normally exported - accordingly I shall upgrade this from P3 to P2.

---------------------------------------------------

Note that initial use behavior varies between Windows and Mac - on Windows the initial use default for "Other compressed files" is WAV - whereas on Mac it is AIFF.

This will need to be considered if and when we implement this Wiki proposal: https://wiki.audacityteam.org/wiki/Proposal_WAV_exports_to_have_Format_Options
Comment 5 Peter Sampson 2017-11-22 10:01:38 UTC
I updated the Steps To Reproduce and The Release Note
Comment 6 Peter Sampson 2018-02-26 08:02:38 UTC
Forum poster ppw1 wrote:

Well, since I'm here, I may as well write up a list of correct header-extension matches for future reference:

    AIFF (Apple/SGI) - .aiff
    AU (Sun/NeXT) - .au
    AVR (Audio Visual Research) - .avr
    CAF (Apple Core Audio Format) - .caf
    HTK (Hidden Markov Model Toolkit) - .htk
    IFF (Amiga Interchange File Format/SVX8/SV16) - .iff
    MAT4 (Octave 2.0) - .mat
    MAT5 (Octave 2.1) - .mat
    MPC (Akai MPC 2k) - .mpc
    PAF (Ensoniq PARIS) - .paf
    PVF (Portable Voice Format) - .pvf
    RAW (header-less) - .raw
    RF64 (RIFF 64) - .rf64
    SD2 (Sound Designer II) - .sd2
    SDS (Midi Sample Dump Standard) - .sds
    SF (Berkeley/IRCAM/CARL) - .sf
    VOC (Creative Labs) - .voc
    W64 (SoundFoundry WAVE 64) - .w64
    WAV (Microsoft) - .wav
    WAV (NIST Sphere) - .wav
    WAVEX (Microsoft) - .wav
    WVE (Psion Series 3) - .wve
    XI (FastTracker 2) - .xi
Comment 7 James Crook 2018-08-06 11:08:34 UTC
After some further research, it's a limitation of wxWidgets, that you cannot get at the wxFileDialog filename to change it, at least not from wxWidgets.  

I have added some code that spots that the extension has changed, but there is no way to hook that in to changing the filename.
https://github.com/JamesCrook/audacity/commit/cf442759b41466b67ba73b7924b6da4f3ef13302

So what could we do?  
1. Wait for wxWidgets to provide a way to change the filename programmatically  OR
2. Re-Write the wxFileDialog ourselves (not going to happen). OR
3. Rejig our 'Other uncompressed files' Exporter so that all its header options are separately in the FileDialog Type drop down, and 'Other Uncompressed files' disappears as a separate option.  That's a major rejig and beyond the scope of this bug.

So all in all that makes this a WONTFIX.
Comment 8 Leland Lucius 2020-03-23 01:53:25 UTC
Fixed in:
https://github.com/audacity/audacity/commit/38bf51a

I'll be posting some testing guidance on -quality...
Comment 9 Peter Sampson 2020-03-23 11:34:42 UTC
(In reply to Leland Lucius from comment #8)
Testing on W10 and macOS 10.15.3 with Audacity 2.4.0 df32c04

The bug as described in the title and steps appears to be fixed properly
1) when you change the header the extension on the "Save as" filename changes accordingly
2) the file is exported in the right format and with the right extension


>I'll be posting some testing guidance on -quality...

Duly noted and I shall be doing some further "testing around" - I would invite others to do likewise as Leland has been doing some serious under-the-hood work with Exports.
Comment 10 Peter Sampson 2020-03-31 11:19:03 UTC
On the basis that this works on Widows and Mac - and the fix was provided by Leland) who works on Linux) I am going to trust Leland's fix (I trust his thoroughness in testing before releasing his fix) I am going to close it as RESOLVED.

If it later turns out not to bood on Linux we can always reopen this a Linux-oly or open a new Linux-only bug.