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

Author Topic: SFML's audio playback includes distortion and heavy stereo channel crossover  (Read 6010 times)

0 Members and 1 Guest are viewing this topic.

LostRobot

  • Newbie
  • *
  • Posts: 1
    • View Profile
    • Email
I am running the official code example found at the bottom of the page here: https://www.sfml-dev.org/tutorials/2.5/audio-streams.php

I have attached two audio files.  "sound.ogg" is the original sample, consisting of a simple 440 Hz sine wave which only plays in the left ear.  "smfl_result.ogg" is SFML's resulting playback once that sound sample it used with the above sample code.  Note that there is very significant crossover between the two stereo channels, and some distortion is also present.

Given this bug is consistent between both my own code and the example code on the official website, it's clear that this is most likely a bug with SFML itself.  I am on Ubuntu 20.04 with Pulseaudio.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10191
    • View Profile
    • development blog
    • Email
This was recently reported and confirmed by myself: https://github.com/SFML/SFML/issues/1813
Unfortunately I haven't had time to further dig into the issue.

If anyone has some time it would be interesting to figure out where the root cause really lies:

- Parsing the audio format?
- SFML buffer storage?
- SFML buffering handling towards OpenAL?
- OpenAL usage?
Official FAQ: https://www.sfml-dev.org/faq.php
Nightly Builds: https://www.nightlybuilds.ch/
——————————————————————
Dev Blog: https://dev.my-gate.net/
Thor: http://www.bromeon.ch/libraries/thor/