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

Author Topic: Scratchy sound FreeBSD?  (Read 3078 times)

0 Members and 1 Guest are viewing this topic.

Anthony11

  • Newbie
  • *
  • Posts: 38
    • View Profile
Scratchy sound FreeBSD?
« on: October 16, 2015, 07:57:23 pm »
So I've installed Xorg along with the SFML on FreeBSD, configured the .xinitrc file to run my application, which currently just plays sound. But the problem I'm facing now is the scratchy sound. The file I'm trying to play is the .ogg vorbis. I'm not sure if it is the problem of SFML, or the Xorg, but I cannot find a solution to this myself, no matter how hard I tried. Any suggestions are welcome. Thanks.

zsbzsb

  • Hero Member
  • *****
  • Posts: 1409
  • Active Maintainer of CSFML/SFML.NET
    • View Profile
    • My little corner...
    • Email
Re: Scratchy sound FreeBSD?
« Reply #1 on: October 16, 2015, 11:10:05 pm »
It would help us if you provided a complete and minimal code example that you use to play the sound. Also uploading the exact file you use would be helpful.
Motion / MotionNET - Complete video / audio playback for SFML / SFML.NET

NetEXT - An SFML.NET Extension Library based on Thor

Anthony11

  • Newbie
  • *
  • Posts: 38
    • View Profile
Re: Scratchy sound FreeBSD?
« Reply #2 on: October 16, 2015, 11:12:13 pm »
I used the exact code as specified on SFML/Learn section. And the sound is just a regular .ogg vorbis file.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Scratchy sound FreeBSD?
« Reply #3 on: October 16, 2015, 11:18:03 pm »
Version of SFML?
Version of OpenAL installed on your system?

Make sure that your audio file is normalized (all samples in [-1 .. 1]), or try a format with integer samples (WAV for example). Or try one of the audio files included in the SFML SDK, these ones work perfectly for sure.
Laurent Gomila - SFML developer

Anthony11

  • Newbie
  • *
  • Posts: 38
    • View Profile
Re: Scratchy sound FreeBSD?
« Reply #4 on: October 16, 2015, 11:23:51 pm »
I just realized that I've forgotten to link OpenAL. Perhaps it'll work now... Thanks for reminding me

Anthony11

  • Newbie
  • *
  • Posts: 38
    • View Profile
Re: Scratchy sound FreeBSD?
« Reply #5 on: October 16, 2015, 11:38:48 pm »
Nope, doesn't fix it. And as far as I can see, the ogg file is pretty much a regular ogg file. Works on Windows though.

dabbertorres

  • Hero Member
  • *****
  • Posts: 505
    • View Profile
    • website/blog
Re: Scratchy sound FreeBSD?
« Reply #6 on: October 16, 2015, 11:55:24 pm »
Are you using OSS or ALSA?

Is the sound scratchy when playing the sound without SFML?

If so, you probably need to tweak your OS audio settings, I've seen this with ALSA on Linux.

Anthony11

  • Newbie
  • *
  • Posts: 38
    • View Profile
Re: Scratchy sound FreeBSD?
« Reply #7 on: October 17, 2015, 12:50:00 am »
i'm still kind of new to this, so i don't know what those are yet. and as of playing normally, i've checked it on windows, but i don't know how can i check if it plays fine on freebsd as well, the only way i've known was using sfml, but that doesn't work.

dabbertorres

  • Hero Member
  • *****
  • Posts: 505
    • View Profile
    • website/blog
Re: Scratchy sound FreeBSD?
« Reply #8 on: October 17, 2015, 01:38:15 am »
Well you probably have OSS installed then. OSS/ALSA are the two major sound drivers for FreeBSD.

Have you used a package manager before? You're going to have to learn some configuration and settings stuff for FreeBSD before starting with SFML on it. It's pretty different from Windows.

You'll have to go through the man pages for OSS to figure out how to configure it.

 

anything