Dolby Pro Logic support

An area for discussing new ideas and additions to Oolite.

Moderators: winston, another_commander

Post Reply
mcarans
---- E L I T E ----
---- E L I T E ----
Posts: 320
Joined: Sun Jun 20, 2010 6:00 pm

Dolby Pro Logic support

Post 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.
User avatar
aegidian
Master and Commander
Master and Commander
Posts: 1161
Joined: Thu May 20, 2004 10:46 pm
Location: London UK
Contact:

Post 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!)
"The planet Rear is scourged by well-intentioned OXZs."

Oolite models and gear? click here!
User avatar
DaddyHoggy
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 8515
Joined: Tue Dec 05, 2006 9:43 pm
Location: Newbury, UK
Contact:

Post 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:
Selezen wrote:
Apparently I was having a DaddyHoggy moment.
Oolite Life is now revealed here
User avatar
Kaks
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 3009
Joined: Mon Jan 21, 2008 11:41 pm
Location: The Big Smoke

Post by Kaks »

Good to 'see' you, sir! :D

And yes, can't help but agree with what DaddyHoggy said! :D
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post 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.
Last edited by JensAyton on Sun Jun 27, 2010 5:33 pm, edited 1 time in total.
mcarans
---- E L I T E ----
---- E L I T E ----
Posts: 320
Joined: Sun Jun 20, 2010 6:00 pm

Post 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?
mcarans
---- E L I T E ----
---- E L I T E ----
Posts: 320
Joined: Sun Jun 20, 2010 6:00 pm

Post 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?
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post 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.
mcarans
---- E L I T E ----
---- E L I T E ----
Posts: 320
Joined: Sun Jun 20, 2010 6:00 pm

Post by mcarans »

I can understand that it isn't a small task.

But I look forward to it whenever it comes.
User avatar
Killer Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 2279
Joined: Tue Jan 02, 2007 12:38 pm

Post 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.
Ganelon
---- E L I T E ----
---- E L I T E ----
Posts: 534
Joined: Fri Jul 02, 2010 11:45 am
Location: Around Rabiarce or Lasoce

Post 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.
Sleep? Who needs sleep? Got game. No need sleep.
User avatar
zeep
Competent
Competent
Posts: 33
Joined: Sun Jan 07, 2007 1:10 pm

Post 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!
Ganelon
---- E L I T E ----
---- E L I T E ----
Posts: 534
Joined: Fri Jul 02, 2010 11:45 am
Location: Around Rabiarce or Lasoce

Post 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.
Sleep? Who needs sleep? Got game. No need sleep.
Post Reply