Home  
Login
Username:

Password:

Remember me



Lost Password?

Register now!
Sections
Who's Online
56 user(s) are online (50 user(s) are browsing Forums)

Members: 0
Guests: 56

more...
Support us!
Recent OS4 Files
OS4Depot.net





OpenAL-soft for AmigaOS
Just can't stay away
Joined:
2006/11/30 11:30
From Finland
Posts: 1575
I've created a repository on github for the port I'm working on of OpenAL-soft to AmigaOS (currently the 1.18.2 version).

https://github.com/salass00/openal_lib

It is working at least insofar as that it builds without errors or warnings (I'm using gcc 6.1.0 for this) and the alloopback example seems to be working (it outputs a sine wave to the speakers using AHI).

Some more testing will still have to be done before a first binary release is made.

Edit: The alloopback example didn't test the AHI backend, instead it outputs through SDL. The altonegen example which I just enabled building of does use the AHI backend and it uncovered a bug that is now fixed.


Edited by salass00 on 2017/12/13 16:00:32
Edited by salass00 on 2017/12/13 16:01:02
   Report Go to top

Re: OpenAL-soft for AmigaOS
Just can't stay away
Joined:
2006/11/30 11:30
From Finland
Posts: 1575
I just looked into why UQM crashes when using OpenAL and it seems that the reason is most likely that it's using OpenAL from an SDL thread and the fact that OpenAL uses pthread calls.

UQM could in theory be compiled using pthreads instead of SDL threads but this option fails for now because of missing <semaphore.h> (it can be worked around but it takes some work).

   Report Go to top

Re: OpenAL-soft for AmigaOS
Just can't stay away
Joined:
2007/1/26 21:48
From New Zealand
Posts: 1908
@salass00

Is this related to the OpenAL on os4depot at all?

Hans

_________________
http://hdrlab.org.nz/ - Amiga OS 4 projects, programming articles and more.
https://keasigmadelta.com/ - more of my work
   Report Go to top

Re: OpenAL-soft for AmigaOS
Just can't stay away
Joined:
2006/11/30 11:30
From Finland
Posts: 1575
@Hans

That's an old port of openal-soft that I did years ago.

The AHI backend in this is an updated version of the one I used for 1.16.0 (not released), which in turn was an updated version of the one used in the 1.7.411 port.

Because the OpenAL-soft backend API changes between releases the AHI backend code has to change too. Also I rewrote the code for dealing with the mixer process so that it sends the kill signal using the Process ID instead so it is a bit safer.

BTW if you try to use the old link to get the openal-soft sources (http://connect.creativelabs.com/openal/default.aspx) it doesn't work because it is now hosted in a different place with source code also on github:

http://kcat.strangesoft.net/openal.html
http://github.com/kcat/openal-soft

   Report Go to top

Re: OpenAL-soft for AmigaOS
Not too shy to talk
Joined:
2007/7/14 20:30
From Lothric
Posts: 409
@salass00

Thanks for this.

I'm trying to use this in an SDL game port. Some random issues that I have encountered. Should I create tickets?

Using AmigaShell and GCC 5.

1) make fails due to DATE? gmake works
2) issue with missing timespec definition
3) building stopped due to missing directories inside obj dir. Created those manually as a workaround
4) ProbeDevices crashes (line 1305 IIRC). Didn't investigate further but seems to be related to alcGetString

Now I have to figure out how to get that sound out...

   Report Go to top

Re: OpenAL-soft for AmigaOS
Just can't stay away
Joined:
2006/11/30 11:30
From Finland
Posts: 1575
@Capehill

Quote:

2) issue with missing timespec definition


Just remove the "#ifdef CLIB2" around the timespec definition in "SDK:local/common/pthread.h".

I don't know why this check was added there because the timespec structure is not defined in the newlib includes any more than it is defined in clib2 ones.

Quote:

3) building stopped due to missing directories inside obj dir. Created those manually as a workaround


They should be created automatically by "mkdir -p" commands in the makefile. Probably there is some problem with the coreutils port.

   Report Go to top

Re: OpenAL-soft for AmigaOS
Just can't stay away
Joined:
2006/11/30 11:30
From Finland
Posts: 1575
@Capehill

Quote:

4) ProbeDevices crashes (line 1305 IIRC). Didn't investigate further but seems to be related to alcGetString


Please open an issue with whatever further information you can find out about this crash.

I'm currently working on a native threading implementation to replace pthreads in openal.

   Report Go to top

Re: OpenAL-soft for AmigaOS
Just popping in
Joined:
2017/1/3 6:03
From Atlanta GA
Posts: 44
@salass00

Is this possible to dynamically load with NEWLIB? I have tried to get it to work with elf library and got it close but ran into pthreading issues.

Regards
Doug

   Report Go to top

Re: OpenAL-soft for AmigaOS
Home away from home
Joined:
2006/11/20 16:26
From Norway
Posts: 2685
@DStastny

Yes, but it uses one single global variable that will be shared between threads.

So you can't really solve this, kind of problem.

If you need instance of newlib it be really tidies to code around that, you need to swap out the pointer.

an option be that some code be run from different program instead of being thread. I know bitty hack but that was what I did with libcurl, that kept crashing if was in a thread.

_________________
(NutsAboutAmiga)

Basilisk II for AmigaOS4
AmigaInputAnywhere
Excalibur
and other tools and apps.
   Report Go to top

Re: OpenAL-soft for AmigaOS
Just popping in
Joined:
2017/1/3 6:03
From Atlanta GA
Posts: 44
@LiveForIt

Thanks for the information. OpenAL Audio is option for my BlitzMax port but it uses dynamic loading to test for existence of the shared object. So all coded to fail right now on my part. I have made audio driver that works but would love to have access to the spatial audio in OpenAL.

Added to the list of things to look at someday


Regards
Doug

   Report Go to top

Re: OpenAL-soft for AmigaOS
Just can't stay away
Joined:
2006/11/30 11:30
From Finland
Posts: 1575
@DStastny

Quote:

Is this possible to dynamically load with NEWLIB? I have tried to get it to work with elf library and got it close but ran into pthreading issues.


So you built the libopenal.so and tried to load it with dlopen()? Did the dlopen() call fail or did it crash when you tried to call a function from it?

   Report Go to top

Re: OpenAL-soft for AmigaOS
Just popping in
Joined:
2017/1/3 6:03
From Atlanta GA
Posts: 44
@salass00
I was playing with the prebuilt shared object on OS4Depot.

I got it to load and bind functions. Got the proper calls in place for the constructor/destructors so cleanly loaded and unloaded.

I dont have source handy but it crashed in stack trace in pthreads call. It was basically open the device close it. Died on the open.

I tabled it until I had more time to look at then saw this thread here about you reworking it.

Ill build from your git repo and retry and show my simple example.


Thanks
Doug

   Report Go to top

Re: OpenAL-soft for AmigaOS
Just can't stay away
Joined:
2006/11/30 11:30
From Finland
Posts: 1575
Using the latest github version of openal Ur-Quan Masters is now working with openal audio. The crash on startup related to altss_* functions and the main process hanging on exit are both now fixed.

   Report Go to top

Re: OpenAL-soft for AmigaOS
Quite a regular
Joined:
2008/10/29 10:20
From Uppsala, Sweden
Posts: 681
@salass00

Looks like a game in my taste and it reminds me of [url=http://www.lemonamiga.com/games/details.php?id=1635]Starflight[/url]

   Report Go to top

Re: OpenAL-soft for AmigaOS
Just can't stay away
Joined:
2006/11/30 11:30
From Finland
Posts: 1575
@Joeled

If you want to play it on AmigaOS there is a port already on OS4Depot.

Pretty much the only major differences to the version I'm using to test libopenal now is that I have enabled openal as an alternative audio backend to SDL and changed the makefile back to linking the exe statically, and FWIW I don't think the positional audio adds all that much to the game.

   Report Go to top

Re: OpenAL-soft for AmigaOS
Quite a regular
Joined:
2008/10/29 10:20
From Uppsala, Sweden
Posts: 681
@salass00
Thanks! Playing it right now.

   Report Go to top

Re: OpenAL-soft for AmigaOS
Just can't stay away
Joined:
2006/11/30 11:30
From Finland
Posts: 1575
I just made a new release on github with the latest fixes to the AmigaOS port:

https://github.com/salass00/openal_lib/releases

   Report Go to top





[Advanced Search]


Powered by XOOPS 2.0 © 2001-2016 The XOOPS Project