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

Author Topic: 3d audio in C  (Read 1885 times)

0 Members and 1 Guest are viewing this topic.

maurus

  • Newbie
  • *
  • Posts: 2
    • View Profile
    • Email
3d audio in C
« 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.

Hapax

  • Hero Member
  • *****
  • Posts: 3372
  • My number of posts is shown in hexadecimal.
    • View Profile
    • Links
Re: 3d audio in C
« Reply #1 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.
Selba Ward -SFML drawables
Cheese Map -Drawable Layered Tile Map
Kairos -Timing Library
Grambol
 *Hapaxia Links*

maurus

  • Newbie
  • *
  • Posts: 2
    • View Profile
    • Email
Re: 3d audio in C
« Reply #2 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.

Hapax

  • Hero Member
  • *****
  • Posts: 3372
  • My number of posts is shown in hexadecimal.
    • View Profile
    • Links
Re: 3d audio in C
« Reply #3 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.
Selba Ward -SFML drawables
Cheese Map -Drawable Layered Tile Map
Kairos -Timing Library
Grambol
 *Hapaxia Links*