I’m going on with the format converter and at this point it’s already usable. Here is a screenshot of the GUI after having selected the source and the destination files.
The destination format is selected automatically if the user as selected/typed an output file complete with its extension, but If the extension is not recognized (or not typed at all) the the user needs to pick the target format from the drop-down gadget.
Of course it is also possible to select the destination format after the auto-detection but in this case an additional extension will be added to the output file to avoid confusion.
For example, you set as destionation “my_file.mp3” then you pick “au” as destination format, the program will use “my_file.mp3.au” as output filename.
When a source file is selected, sox is invoked to analyze the source file, and as you can see in the first screenshot, all retrieved data is printed into the interface.
If the source is not recognized and error will be printed like in the following screenshot:
In this case I hava selected a mp3 file as input but SoX was not able to find the needed library to read this kind of files and an error has been printed.
Unfortunately I wasn’t able to grab the fancy animation that SoX prints during the conversion, so I provided a visual feedback implementing a simple timer to elapse the processing and to give something to watch to the user while sox is working.
In this third screenshot you can see that I’ve tried to convert a wav file to an 8svx file succesfully so I’m pretty happy about the results.
NEXT STEPS
- Compile for AROS and check if all is working as expected
- Allow the user to select a folder to convert multiple files in one go
- Attach to the [Advanced] button another GUI to let the user to set additional parameters, like, for example, the bitrate.
Ok, that’s it 🙂