Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
110 user(s) are online (96 user(s) are browsing Forums)

Members: 0
Guests: 110

more...

Support us!

Headlines

 
  Register To Post  

(1) 2 »
OpenAL-soft for AmigaOS
Just can't stay away
Just can't stay away


See User information
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
Go to top
Re: OpenAL-soft for AmigaOS
Just can't stay away
Just can't stay away


See User information
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).

Go to top
Re: OpenAL-soft for AmigaOS
Home away from home
Home away from home


See User information
@salass00

Is this related to the OpenAL on os4depot at all?

Hans

Join Kea Campus' Amiga Corner and support Amiga content creation
https://keasigmadelta.com/ - see more of my work
Go to top
Re: OpenAL-soft for AmigaOS
Just can't stay away
Just can't stay away


See User information
@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

Go to top
Re: OpenAL-soft for AmigaOS
Just can't stay away
Just can't stay away


See User information
@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...

Go to top
Re: OpenAL-soft for AmigaOS
Just can't stay away
Just can't stay away


See User information
@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.

Go to top
Re: OpenAL-soft for AmigaOS
Just can't stay away
Just can't stay away


See User information
@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.

Go to top
Re: OpenAL-soft for AmigaOS
Just popping in
Just popping in


See User information
@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

Go to top
Re: OpenAL-soft for AmigaOS
Home away from home
Home away from home


See User information
@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.
Go to top
Re: OpenAL-soft for AmigaOS
Just popping in
Just popping in


See User information
@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

Go to top
Re: OpenAL-soft for AmigaOS
Just can't stay away
Just can't stay away


See User information
@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?

Go to top
Re: OpenAL-soft for AmigaOS
Just popping in
Just popping in


See User information
@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

Go to top
Re: OpenAL-soft for AmigaOS
Just can't stay away
Just can't stay away


See User information
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.

Go to top
Re: OpenAL-soft for AmigaOS
Quite a regular
Quite a regular


See User information
@salass00

Looks like a game in my taste and it reminds me of Starflight

AmigaOne X5000
Radeon HD 7700
Go to top
Re: OpenAL-soft for AmigaOS
Just can't stay away
Just can't stay away


See User information
@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.

Go to top
Re: OpenAL-soft for AmigaOS
Quite a regular
Quite a regular


See User information
@salass00
Thanks! Playing it right now.

AmigaOne X5000
Radeon HD 7700
Go to top
Re: OpenAL-soft for AmigaOS
Just can't stay away
Just can't stay away


See User information
I just made a new release on github with the latest fixes to the AmigaOS port:

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

Go to top
Re: OpenAL-soft for AmigaOS
Home away from home
Home away from home


See User information
@salas00
I use your latest release of openal with some port, which with version from os4depot have 2 issues in sound-module : sometime crashes on exit in pthreads coming from SDL_Thread, and when cleanup of sound-module happens it take for about 5-7 seconds.

With your last version from github i have no more crashes , as well as cleanup which done on exit happens to be really faster (not 5-7 seconds, but 2-3).

Thanks !

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: OpenAL-soft for AmigaOS
Just can't stay away
Just can't stay away


See User information
@kas1e

You're welcome.

Go to top
Re: OpenAL-soft for AmigaOS
Home away from home
Home away from home


See User information
@salas00

Maybe you can give some advice about: I use your latest version of openal, and in the game i have that piece of code :

OpenALAudioSystem::~OpenALAudioSystem() {
  
// Free sound instances before deleting sound manager, else
  // querying if sounds are streams when deleting instances will fail
  
FreeSoundInstances();

  
SafeDelete(m_SoundManager);

  
alcMakeContextCurrent(nullptr);
  if (
contextalcDestroyContext(context);
  if (
devicealcCloseDevice(device);
  
alutExit();
}


Then on exit, I have :

AL lib: (EE) alc_cleanup: 1 device not closed.

And have a warning window with "parent process has tried to exit before all children have". Error process "alsoft-mixer".

And stack tracepoint out on "ALCplaybackAHI_mixerProc"

Maybe have some ideas about it? I am sure it can be / will be the game's code in end. Or maybe the issue is that "alut" is also used, and that one from the year 2009 on os4depot.

EDIT: what is interesting is that if I print how many times it opens, it says "1". But then if I comment on the whole "free resources" function, then it says about 2 devices not closed. Like, does not matter what, but 1 device always there and opened by openall itself

EDIT2: and compiling with the old version of openall (which was previously on os4depot) shows no crash. So chances that something in the new port seems to be high.


Edited by kas1e on 2020/10/20 20:13:58
Edited by kas1e on 2020/10/20 20:19:03
Join us to improve dopus5!
AmigaOS4 on youtube
Go to top

  Register To Post
(1) 2 »

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project