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

Author Topic: Odd sound quality (fixed)  (Read 3897 times)

0 Members and 1 Guest are viewing this topic.

Contadotempo

  • Full Member
  • ***
  • Posts: 167
  • Firelink Shrine
    • View Profile
Odd sound quality (fixed)
« on: August 23, 2012, 09:33:21 pm »
Hello everyone,

I'm trying to play a simple .wav sound using the minimal code shown bellow. It plays fine, however the quality of the sound being played by the application, sounds significantly worse in quality when compared to the original.

It's hard to describe but it sounds like it's missing some frequencies or like really bad quality like a 12kbps mp3 sound. I know this explanation is really daft and I which I could record it or show it somehow.

Also, this doesn't seem to happen with all sounds. Only on sounds with 1 channel or mono but I'm not very sure. If someone could give me a hint I'd be thankful.

Here's my minimal code:
#include <SFML/Audio.hpp>
int main()
{
    sf::SoundBuffer sb;
    sb.loadFromFile("engine.wav");

    sf::Sound sound;
    sound.setBuffer(sb);
    sound.play();
    while(sound.getStatus() == sf::Sound::Playing)
    {}
    return 0;
}

Here's engine.wav from the example: https://dl.dropbox.com/u/8365167/engine.wav
And here's a 2 channel .wav that seems to play just fine: https://dl.dropbox.com/u/8365167/se_powerup.wav

Best regards, and thanks again.
« Last Edit: August 24, 2012, 01:22:24 pm by Contadotempo »

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: Odd sound quality
« Reply #1 on: August 23, 2012, 09:44:04 pm »
OS? Version of SFML? Version of OpenAL?
Laurent Gomila - SFML developer

Contadotempo

  • Full Member
  • ***
  • Posts: 167
  • Firelink Shrine
    • View Profile
Re: Odd sound quality
« Reply #2 on: August 23, 2012, 09:54:51 pm »
Sorry, completely forgot:

Windows 7 64-bit
SFML 2.0 Latest commit
As for OpenAL I'm using the one supplied with the SFML commit on the extlibs folder (32 bit). I also tried downloading the latest version (6.14.357.24, I think) but the problem persisted.

Thanks.
« Last Edit: August 23, 2012, 09:57:05 pm by Contadotempo »

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: Odd sound quality
« Reply #3 on: August 23, 2012, 10:53:20 pm »
It works for me. Are you really sure that your program is not using another OpenAL DLL (that would be, for example, in your C:/Windows/System32 folder)?
Laurent Gomila - SFML developer

Contadotempo

  • Full Member
  • ***
  • Posts: 167
  • Firelink Shrine
    • View Profile
Re: Odd sound quality
« Reply #4 on: August 23, 2012, 11:26:35 pm »
Quote
Are you really sure that your program is not using another OpenAL DLL
Yeah seems clean. Only using a single openAL dll file.
Also, I  kind of went with an extreme solution and changed the sound card, and now it works just fine.

I was using a Creative Sound Blaster Audigy SE and changed it to the default onboard sound card that comes with the motherboard (VIA VT1708S). If I change it back to the Creative sound card again, the problem comes back.

I've never had this sort of problem before and I've been using this Creative card for years so this makes me a bit sceptical. The driver is up to date, all Creative enhancements and extras are disabled.

Odd but I'll try to investigate and see if I can find a solution. First I'll try to remove the drivers completely and reinstall them I guess.

Thanks.

« Last Edit: August 23, 2012, 11:32:16 pm by Contadotempo »

Contadotempo

  • Full Member
  • ***
  • Posts: 167
  • Firelink Shrine
    • View Profile
Re: Odd sound quality
« Reply #5 on: August 24, 2012, 12:34:56 am »
EDIT: The problem came back today when I first turned on the computer. So once again I deleted all openAL components (the ones supplied with the sound card's driver) and manually installed the openAL32.dll supplied by the SFML commit. Now it works again... I don't get it...

__________

Sorry for the double post but I guess you were right. It was a conflicting openAL DLL somewhere, just not sure where.

Uninstalled everything related to Creative and used driversweeper to delete any driver leftovers.
Installed everything again but the problem persisted.
Went to system32 and deleted the openAL32.dll that the Creative installer put there automatically.
Then I went to the Creative's install folder which is in X:\Program Files (x86)\Creative and manually installed an openAL file that I found in this folder.
Now surprisingly any sound plays correctly now.

I don't really understand especially because this openAL's version that I installed manually is also 6.14.357.24. Well at least it's working.

Also, I have to admit I thought this was SFML's fault at the start because I've never had a problem of this sort before, so I'm sorry for assuming...

Best regards.
« Last Edit: August 24, 2012, 01:21:10 pm by Contadotempo »

 

anything