SFML community forums
General => Feature requests => Topic started by: tgnottingham on September 26, 2017, 07:17:07 am
-
SFML only supports wave files with the PCM format tag. However, there are PCM wave files that use the "extensible" tag. The extensible format supports PCM and non-PCM formats, and things like mapping channels to speaker positions. Any audio that can be put in a PCM format wave can be put in an extensible format wave.
I stumbled on this issue after trying to load some wave files I had converted using sox (http://sox.sourceforge.net/). Turns out it's because it uses the extensible format when outputting a wave file with a bit depth greater than 16. Other sound processing applications might use this tag for PCM data. I found that Audacity can be configured to save wave files in this format, at least.
Would you like SFML to support this format? By support, I mean accepting integer-encoded PCM audio in a file with the extensible format tag, not supporting non-PCM formats or extra features (such as the channel-mapping feature mentioned above). If so, I would be happy to open an issue and create a pull request. Support just requires adding a little more header parsing.
The rationale for adding this feature is that it shields users from having to be concerned about a low-level detail--whether their PCM wave file is using the regular PCM format tag or the extensible tag.
Example of an unsupported file. (https://www.dropbox.com/s/4j48bvpa35daowp/tone_24.wav?dl=1)
Wave File Specifications (http://www-mmsp.ece.mcgill.ca/Documents/AudioFormats/WAVE/WAVE.html)
-
If it's not too much work, maybe you could directly submit a PR so that we can see exactly what modifications it involves.
-
Sure. By the way, I found that SFML 2.1 supports this wave format, on account of using libsndfile. I suppose you could consider this a regression, but then again, the switch away from libsndfile probably caused a lot of "regressions".
For the purposes of branch naming, workflow, would you prefer to consider this a feature or a bug fix?
-
The way you name your own branches is totally up to you. I would consider it a feature as it adds something new, even if it might have been support in a different way before.