Page 1 of 1

Dolby Pro Logic support

Posted: Fri Jun 25, 2010 11:53 am
by mcarans
Hi,

Does Oolite have Dolby Pro Logic surround support?

If it does, will I hear ships behind me or is it just the music that comes out all speakers?

If not, could this be added? As Pro Logic is just encoded onto the stereo output, it wouldn't be as complicated as digital multichannel sound. Obviously, digital multichannel sound would be even better, but I realise it might not be so easy to implement across all OSs.

Posted: Fri Jun 25, 2010 12:49 pm
by aegidian
In theory, most of the sounds you hear in Oolite are supposed to be generated by the ship's console and as such wouldn't even be in stereo.

But there are the sounds of things banging against the hull, and the roar of the fuel injectors which could be positioned spatially.

It would be possible to re-re-write the audio code to use OpenAL to allow for multiple speaker set-ups, but it's likely that the gains to the gaming experience would be minimal.


(First post after 1.74, and I must say I'm very, very impressed. You guys have done stuff with the graphics that I really wanted to do when I first started this, but just didn't have the skillz for, thanks folks!)

Posted: Fri Jun 25, 2010 1:02 pm
by DaddyHoggy
aegidian wrote:
In theory, most of the sounds you hear in Oolite are supposed to be generated by the ship's console and as such wouldn't even be in stereo.

But there are the sounds of things banging against the hull, and the roar of the fuel injectors which could be positioned spatially.

It would be possible to re-re-write the audio code to use OpenAL to allow for multiple speaker set-ups, but it's likely that the gains to the gaming experience would be minimal.


(First post after 1.74, and I must say I'm very, very impressed. You guys have done stuff with the graphics that I really wanted to do when I first started this, but just didn't have the skillz for, thanks folks!)
But without you, there would be no giants for the next gen to stand on the shoulders of! :wink:

Posted: Fri Jun 25, 2010 9:47 pm
by Kaks
Good to 'see' you, sir! :D

And yes, can't help but agree with what DaddyHoggy said! :D

Posted: Sat Jun 26, 2010 3:15 pm
by JensAyton
aegidian wrote:
It would be possible to re-re-write the audio code to use OpenAL to allow for multiple speaker set-ups,
Since the Mac sound code is quite broken, I intend to rewrite in OpenAL after the next stable release (for all platforms, to reduce redundancy). Positional audio should be quite simple, and the high-level infrastructure is already there. Apart from hull bangs, hostile ship and missile alarms will probably be positional, and scripts will be able to play positional sound (by setting the position of a SoundSource, optionally relative to an entity).

The supported output formats will be dependent on the OpenAL implementation.

Posted: Sun Jun 27, 2010 4:55 pm
by mcarans
I got a bit over excited when I read that this was coming, so I started trying to configure Ubuntu for surround sound.

I used the .asoundrc from here: http://www.johannes-bauer.com/linux/dolby/?menuid=3 to enable on the fly ac3 encoding for my SPDIF output.

I also recompiled libasound2-plugins on Ubuntu to include the a52 plugin as per here:http://old.nabble.com/Re%3A-Openal%2C-S ... 98950.html

I also uninstalled Pulseaudio.

I cam play an mp3 and get it come out the SPDIF in Dolby Digital now, but unfortunately Oolite hangs on startup. Is there some setting somewhere to make it use Alsa audio or does it need the Alsa OSS plugin for example?

Posted: Sun Jun 27, 2010 5:09 pm
by mcarans
mcarans wrote:
I got a bit over excited when I read that this was coming, so I started trying to configure Ubuntu for surround sound.

I used the .asoundrc from here: http://www.johannes-bauer.com/linux/dolby/?menuid=3 to enable on the fly ac3 encoding for my SPDIF output.

I also recompiled libasound2-plugins on Ubuntu to include the a52 plugin as per here:http://old.nabble.com/Re%3A-Openal%2C-S ... 98950.html

I also uninstalled Pulseaudio.

I cam play an mp3 and get it come out the SPDIF in Dolby Digital now, but unfortunately Oolite hangs on startup. Is there some setting somewhere to make it use Alsa audio or does it need the Alsa OSS plugin for example?
I see in the log:
[sdl.init.audio.failed]: Mix_OpenAudio: Couldn't set hardware audio parameters: Success

Is there somewhere I can configure the audio setup for Oolite as I expect I might have to tell it which audio device to use?

Posted: Sun Jun 27, 2010 5:33 pm
by JensAyton
mcarans wrote:
I got a bit over excited when I read that this was coming,
Realistically, this won’t be done for another year at least, and I can’t tell you what the requirements will be.

Posted: Sun Jun 27, 2010 6:05 pm
by mcarans
I can understand that it isn't a small task.

But I look forward to it whenever it comes.

Posted: Mon Jun 28, 2010 6:59 pm
by Killer Wolf
to be honest, i agree w/ the fact that (personally, of course) it wouldn't add that much. i'd prefer a more "realistic" set of sounds that upgraded sound systems; say a few different laser hits sound, sounding louder/worse as it hits your hull rather than shields, and a huge resounding crang of impact if you twag a boulder or buoy etc etc.

Posted: Sat Jul 17, 2010 8:40 am
by Ganelon
Maybe not Dolby Pro Logic, but I *think* it might be possible at least to a degree with the system as it is. Ogg files can be at least 4 channel, from what I understand. So if a sound like the thrusters was recorded for the rear right and left channels, then it should come out of the rear speakers if the player's soundcard is equipped to do that.

Assuming that Oolite just passes a played ogg to the soundcard, then if the ogg had rear channel sounds, they'd show up on the rear channels.

I doubt it'd add that much to the game's immersion factor, so I doubt the people who have recorded sounds for the game are very likely to run right off and redo them all as 4 channel. But if anyone was really keen on it, they could tinker with the files in the sound editor of their choice easily enough.

Posted: Thu Dec 23, 2010 2:02 am
by zeep
Ahruman wrote:
aegidian wrote:
It would be possible to re-re-write the audio code to use OpenAL to allow for multiple speaker set-ups,
Since the Mac sound code is quite broken, I intend to rewrite in OpenAL after the next stable release (for all platforms, to reduce redundancy). Positional audio should be quite simple, and the high-level infrastructure is already there. Apart from hull bangs, hostile ship and missile alarms will probably be positional, and scripts will be able to play positional sound (by setting the position of a SoundSource, optionally relative to an entity).

The supported output formats will be dependent on the OpenAL implementation.
I'm sorry for bumping this but i came back to the forum looking for exactly this news!

May i ask, how far away is this development at the moment? Please tell me it has not been cancelled..

I always wished for positional audio in Oolite!! Yay!

Posted: Thu Dec 23, 2010 4:57 am
by Ganelon
I may or may not be correct in this. But since ogg files can be 4 channel, *if* they were recorded that way and you have a soundcard that can handle that, and if Oolite basically passes the file unaltered to the soundcard.. Then a system it could be done by might already be in place.

A 4 channel ogg file will play as a stereo file on a computer/soundcard set up for stereo, or mono if that's what the system has.

I've never actually tested it, and I don't know how Oolite sound exactly, but it might work if the sound set used actually had the rear channels and etc. I don't imagine any of them do at present.