SFML community forums

Bindings - other languages => C => Topic started by: maurus on April 16, 2023, 07:59:33 pm

Title: 3d audio in C
Post by: maurus on April 16, 2023, 07:59:33 pm
Hi guys, good morning everyone.
I'm building a small game, but I'm stuck on the functions of the 3d audio in c.

Is there any example that you can give me to know how to make a mono audio move in space? I took the c++ documentation as an example but it still doesn't work.

Many thanks in advance to anyone who can help me,

greetings.
Title: Re: 3d audio in C
Post by: Hapax on April 16, 2023, 11:01:35 pm
Hi and welcome! :)

Also, yes!

Have a look at this:
https://github.com/Hapaxia/OrbitingSound

This should get you started with 3D audio. It's simply a mono sound orbiting the listener in 3D.
Title: Re: 3d audio in C
Post by: maurus on April 17, 2023, 01:01:25 am
Hi and welcome! :)

Also, yes!

Have a look at this:
https://github.com/Hapaxia/OrbitingSound

This should get you started with 3D audio. It's simply a mono sound orbiting the listener in 3D.

Thanks a lot mate for the link, I'll give it a try.

Only that I am looking for the same thing, but using the C library.
I am programming my game with free basic, and since it uses the library compiled in c, I came here thinking that if I found how to do it in C, which has more instructions and I can't get it to work, maybe I can make it work in my game.
Title: Re: 3d audio in C
Post by: Hapax on April 17, 2023, 03:14:21 pm
I completely overlooked the fact that you mentioned C, didn't I? Apologies!

The concept should be the same and, I believe, most of the code should be the same excepting the names tend to be all one word: e.g. sf::Sound would be sfSound.

I haven't used the C binding of SFML though so maybe someone else could help you if you have further issues.