Closed HilbertCurve closed 2 years ago
I synched up the singleton getters, removed AudioTest
, and fixed some issues with AudioListener
and AudioSource
.
Added a dedicated scene for testing the driver.
Yeah, I don't think an audio batch makes sense: you're gonna call alPlaySource()
for each sound you play no matter what.
Audio streaming basically means your sound card isn't overloaded with 2.3 megabytes of data whenever you play a song; instead 8 chunks of data are queued and then refreshed once processed
Nice, I will try to take a look soon.
This is a good start for sure, and I am ready to merge. In the future, if you want to add more contributions, better error handling (not crashing when it can't find a file), wider filetype support, and spatial audio would be awesome.
In this PR, I coded up an audio driver using OpenAL. The audio driver is split into four main parts:
AL_VELOCITY
property usingalSourcef()
, OpenAL can apply the Doppler Effect to the outputted noise, in case we want to use that. We would attach this to a gameObject first to enable properties like it's position (this is easy to implement, I just haven't gotten around to it yet.)AudioSource
's are. At the end of runtime, some amount of cleanup is required before closing the program (sure, the library does it itself, but I'd prefer to do it manualy.)I tried to document most classes; that may need a little work, though. I hope this is a good start to the audio driver.