Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Pascal / OpenAL as alternative sound system

Author
Message
zog
16
Years of Service
User Offline
Joined: 13th Dec 2007
Location: Southport UK
Posted: 11th Jul 2014 07:23
Hi,
I have been working on my game and I noticed that the agk sdk support for sound is basic. I discovered that you can't change the pitch of a sound for example to reflect a revving engine. I was wondering has any one used openAL as it seems to be cross platform. I am a little worried as it does not seem to be maintained any more ?

Jack Taylor
JimHawkins
14
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 11th Jul 2014 08:06
AFAIK OAL is installed with OGL. Lots of games use it.

Bass is good, but expensive.

-- Jim - When is there going to be a release?
zog
16
Years of Service
User Offline
Joined: 13th Dec 2007
Location: Southport UK
Posted: 11th Jul 2014 13:39
Thanks Jim,
There is an openAL unit under fpc, but I think it just contains the imports for the c library.
I have started writing a wrapper class around OpenAL, if it works I will post it on to the code base. I also need to test the openAL code when music is playing.

PS I am making progress with my game but its been slow going due to the amount of time I get to program.

Jack

Jack Taylor
JimHawkins
14
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 16th Jul 2014 16:13
That's great. I'm sitting by the Ionian Sea in Greece at the moment, and won't touch a compiler for another 10 days! A good OAL interface could be useful in a lot of contexts...

-- Jim - When is there going to be a release?
zog
16
Years of Service
User Offline
Joined: 13th Dec 2007
Location: Southport UK
Posted: 18th Jul 2014 09:03
Hi,
Good for you Jim, have a good holiday.
I am making good progress with openAL, I have simplified its operation by wrapping it in a class, and have played a wav file in the uncompressed format PCM.
The biggest problem is that even within wav files the sound data is encoded in a large number of possible compressed formats, which have to be decompressed before openAL can play them. I am looking at the source forge Sox project to see if I can incorporate libsox to decompress the files for me as its going to take a very long time to write all the decompressors.



Jack

Jack Taylor
JimHawkins
14
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 20th Jul 2014 11:08
I wouldn't worry about non-PCM wav files. They are rare, and you need the codec to be installed.

FFMpeg is good. I have a cross-platform component for it - will post details when I get back from the beach!

-- Jim - When is there going to be a release?

Login to post a reply

Server time is: 2024-04-25 07:04:12
Your offset time is: 2024-04-25 07:04:12