Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3D audio support #10

Closed
amerkoleci opened this issue Feb 1, 2018 · 12 comments
Closed

3D audio support #10

amerkoleci opened this issue Feb 1, 2018 · 12 comments

Comments

@amerkoleci
Copy link

Hi,
Excellent work on this library, any plan to add 3D audio support?

Thanks

@mackron
Copy link
Owner

mackron commented Feb 1, 2018

3D audio is the most requested feature I get asked for so I'm open to the idea. My main focus in the immediate term is to get the low level stuff working well, then I'll look into 3D and WAV/FLAC/Vorbis/MP3 loading.

@r-lyeh
Copy link

r-lyeh commented Sep 14, 2018

Hey @mackron ,

how much %completed is the low-level stuff atm?
will 3d mixing be the next thing to do? (since wav/flac/vorbis/mp3 loading is already there somehow)

ty :D

@mackron
Copy link
Owner

mackron commented Sep 14, 2018

3D is a ways away. Definitely not this year. Major things left to go are:

  • A WebAssembly backend for Emscripten (SDL is currently used for this, but shouldn't be necessary). Done
  • Improvements to resampling Done
  • Support for deinterleaved streams Abandoned
  • A blocking API Abandoned
  • Support for full duplex Done

But even then, the 3D stuff is part of a broader mixing API which hasn't even begun yet (and probably won't start until the above is done) which itself will take time. Also, I'm going to be busy in the coming months so development will likely be slowing down during that period.

Got any rough ideas on what the 3D API should look like?

@r-lyeh
Copy link

r-lyeh commented Sep 14, 2018

Ah cool.

A stripped down / simplified parts of relevant OpenAL api would be a good starting point (also, see MojoAL impl for references): listener pos, listener vel, listener cone shape, source dir & attenuation model.

A second pass could include sound occlusion (low-pass filters), materials and callbacks for raycasting against game environment.

And then HRTF and then sound synthesis before ruling the world! \o/ :D

@r-lyeh
Copy link

r-lyeh commented Sep 14, 2018

PS: It would be also super nice to have support for different speaker setups (2.1,4.0,4.1,5.0,5.1,7.0,7.1,etc)

@tapir
Copy link

tapir commented Sep 19, 2019

Any updates on this one? Like @r-lyeh already stated MojoAL looks like a good place to start.
It's using SDL for the heavylifting and only implements a threading strategy and 3D mixing.

@mackron
Copy link
Owner

mackron commented Sep 19, 2019

Next year. I need to do a new resampler and fix some full duplex bugs first, which I'm hoping to get done by the end of this year. After that work begins on pushing miniaudio into the game dev space.

@raysan5
Copy link
Sponsor Contributor

raysan5 commented Sep 19, 2019

@mackron take it easy! miniaudio is awesome! 👍😊

@Chamberlain91
Copy link

Next year. I need to do a new resampler and fix some full duplex bugs first, which I'm hoping to get done by the end of this year. After that work begins on pushing miniaudio into the game dev space.

I'm already using this in a game dev space ;D

@frink
Copy link

frink commented Sep 3, 2020

SIDE NOTE: You might look a SoLoad as a reference implementation for 3D audio. I don't know if it's advisable to use MiniAudio and SoLoud together, but it's probably worth mentioning their code as a reference at least. They have a pretty impressive implementation. Their licensing is Zlib/MIT, so "borrowing code" should not be problematic although you will have to back-port things to C from C++ if you decide you want to go that way...

@mackron
Copy link
Owner

mackron commented Sep 3, 2020

It's more just finding time that's the problem, but in any case work has begun on this in the research folder and I'll be creating a separate GitHub issue to track progress and gather feedback in the coming days.

@mackron
Copy link
Owner

mackron commented Sep 5, 2020

As I mentioned in my previous comment, I've begun work on a high level API which will include some 3D spatialization functionality. I'm going to go ahead and close this issue and refer everyone to a new issue I've created for the purpose of tracking development and gathering feedback on the high level API as a whole: #196

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants