OpenAl for Blitz Here. :)

Blitz3D Forums/Blitz3D Userlibs/OpenAl for Blitz Here. :)

Yue(Posted 2015) [#1]
https://drive.google.com/file/d/0B0cnvAXVOxEOOXltaGdqLXJsNkU/view

Thanks to Andrey Svershko :)


Rick Nasher(Posted 2015) [#2]
Many thanks.


3DRCzy(Posted 2015) [#3]
Thank you so much.


MadJack(Posted 2016) [#4]
I'm finding that if I set up multiple 3d sounds from the same audiodata, I get bad popping cropping up after a few seconds.

For example

Local AUDIO_DATA = alCreateAudioData("test.wav", False) //load my audiodata

Local AUDIO_SOURCE1 = alCreateEmptySource(True) //create an empty audio emitter
alSourceSetLoop(AUDIO_SOURCE1 ,1) 
alSourceSetData(AUDIO_SOURCE1 , AUDIO_DATA) //set the emitter to use AUDIO_DATA 
alSourcePlay3D(AUDIO_SOURCE1 ,True)

Local AUDIO_SOURCE2 = alCreateEmptySource(True) //create a 2nd empty audio emitter
..
alSourceSetData(AUDIO_SOURCE2 , AUDIO_DATA) //also use AUDIO_DATA 


Anyone else using BlitzAL for their 3d sounds?


MadJack(Posted 2016) [#5]
Can I ask a few blitzers to try the the stress test below?
It's written in Nuclear Basic but an exe is included.

Use spacebar to add sound sources up to the maximum.
http://madjack.fileburst.com/BlitzAL_stresstest.rar

Would be really keen to know how it goes on other's rigs - particularly less powerful laptops.
And what the max no' of sources for your rig is as well.


RGR(Posted 2016) [#6]
Pressing Spacebar results in:

Debug Error
Memory Exception.


In NB Debug Mode I get an Array out of bounds error
OB_CARSOURCE = AudioSource(CAR_INDEX,0)


MadJack(Posted 2016) [#7]
RGR

What OS are you running?


RGR(Posted 2016) [#8]
Win 7
I edited the post above


MadJack(Posted 2016) [#9]
RGR

When you run it in NB debugmode, is it possible to see what value SOURCE_MAX has?

If it's 0, can you try changing it to 256 and see if that stops the crash?


RGR(Posted 2016) [#10]
MadJack

It was 0

	Local SOURCE_MAX =   alGetMaxNumSources(-1)//THIS SEEMS TO STOP SOUNDS FROM PLAYING
	SOURCE_MAX = 256


Stops crashing, indeed

Remark ... the sound could be louder ... I have to turn the volume up very high to hear it. At least 5 times louder than usual movies, youtube videos, other games, etc


MadJack(Posted 2016) [#11]
BlitzAL seems to have issues under W7. On my own W7 rig it's very quiet and then cuts out altogether.

My W8 rig's fine and another user reported it was ok under W10.

Thanks for taking the time on this.

<edit> do we know who put this lib together? Perhaps they'd be up for an update.

<edit> another user is reporting it doesn't output to rear speakers as well.


MadJack(Posted 2016) [#12]
As OpenAl is a bust, I've updated the stress test demo to use Fmod3.

http://madjack.fileburst.com/fmod_stresstest.rar

Could a few blitzers give it a whirl and let me know how it goes?

Again, it's in Nuclear Basic but there's an exe in the rar file as well.


Flanker512(Posted 2016) [#13]
Tested the .exe on windows 8.1 (64bits), works well even with 127 sound sources.

What is the benefit of openAL compared to native blitz 3d sound ?


MadJack(Posted 2016) [#14]
F

I'm being sneaky - I'm actually looking for a solid alternative to Nuclear Basic's 3d sound system, which has problems.


RemiD(Posted 2016) [#15]
@Madjack>>Seems to work well here (Windows 7)


MadJack(Posted 2016) [#16]
RemiD

Thanks for that.

I found that if I enable Vsync all glitches disappear on my lesser powered W7 rig.
So I think that I'll use Fmod and set Vsync ON by default. It's not ideal but it'll do for the interim and people can choose to turn Vsync on/off as needed.


Blitzplotter(Posted 2016) [#17]
Will aim to try this weekend.... on my W7 box


RustyKristi(Posted 2016) [#18]
This is cool and I got to try the sample. I have to ask if there's a licensing scheme or is this totally free and opensource like MIT/ZLIB?


gpete(Posted 2016) [#19]
awesome demo Mad Jack. I also have Nuclear Basic although it is not good that they do not have a command reference that is complete.


gpete(Posted 2016) [#20]
I ran the stress test program on my main computer- (I have Nuke Basic too)

At 100 sound objects I was getting 640 to 650 FPS. I did not hear any popping unless you mean the "frogvoice" sound.

My computer: AMD FX-6300, 8 gig mem, Nvidia GTX 960, 2 gig hard drive.