Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Support for extensible format PCM wave files  (Read 3340 times)

0 Members and 1 Guest are viewing this topic.

tgnottingham

  • Newbie
  • *
  • Posts: 4
    • View Profile
Support for extensible format PCM wave files
« 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. 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.

Wave File Specifications

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Support for extensible format PCM wave files
« Reply #1 on: September 26, 2017, 08:23:10 am »
If it's not too much work, maybe you could directly submit a PR so that we can see exactly what modifications it involves.
Laurent Gomila - SFML developer

tgnottingham

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Support for extensible format PCM wave files
« Reply #2 on: September 27, 2017, 12:20:42 am »
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?
« Last Edit: September 27, 2017, 12:22:15 am by tgnottingham »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: Support for extensible format PCM wave files
« Reply #3 on: September 27, 2017, 12:49:39 am »
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.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

 

anything