Soundformat OGG-Vorbis

Soundformat OGG-Vorbis

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

User avatar
Dr.InfernO
Posts: 223
Joined: 18 Nov 2005, 13:55

Soundformat OGG-Vorbis

Post by Dr.InfernO »

Hello guys!
Is it easy for you to include a ogg vorbis sound decoder?
I think this a bit better to handle the linux sound problem. Please correct me if I'm wrong.
I cannot see *.wav anymore! ;)
User avatar
Zenka
Posts: 1235
Joined: 05 Oct 2005, 15:29

Post by Zenka »

ogg would be better then wav on filesize.
It's discussed before and most of us generally agrees Spring should use ogg instead of wave.
User avatar
Tim Blokdijk
Posts: 1242
Joined: 29 May 2005, 11:18

Post by Tim Blokdijk »

+1
User avatar
SwiftSpear
Classic Community Lead
Posts: 7287
Joined: 12 Aug 2005, 09:29

Post by SwiftSpear »

most game engines use .wav because there is basicly no lost time decompressing or filtering anything. Wav's are an extreamly preformance friendly sound format. That being said, with current day computers you really don't lose that much processor time to the different audio formats out there... I'm not sure exactly how efficient ogg is compared to wav and mp3 though.
Egarwaen
Posts: 1207
Joined: 27 Feb 2006, 21:19

Post by Egarwaen »

More space-efficient than MP3 (files will be smaller), possibly less processor-efficient (takes more time to decode). However, it has the added benefit of being 100% free and unencumbered by patents.
User avatar
BvDorp
Posts: 439
Joined: 14 Oct 2005, 12:09

Re: Soundformat OGG-Vorbis

Post by BvDorp »

Dr.InfernO wrote:Hello guys!
Is it easy for you to include a ogg vorbis sound decoder?
I think this a bit better to handle the linux sound problem. Please correct me if I'm wrong.
I cannot see *.wav anymore! ;)
The sound problem is in the .wav extension? That'd be very odd..
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Post by zwzsg »

Zenka wrote:ogg would be better then wav on filesize.
It's discussed before and most of us generally agrees Spring should use ogg instead of wave.
I remember the consensus at the end of discussion being that ogg is only good for long sounds like music, and not approrpriate for short sounds clips that have to be loaded and played by the hundreds.

Odd how memory of past events differs depending on the beliefs of the one who remember.
User avatar
Zenka
Posts: 1235
Joined: 05 Oct 2005, 15:29

Post by Zenka »

zwzsg wrote:I remember the consensus at the end of discussion being that ogg is only good for long sounds like music, and not approrpriate for short sounds clips that have to be loaded and played by the hundreds.

Odd how memory of past events differs depending on the beliefs of the one who remember.
Hmmm quess I was wrong then.
Well I stick to the fact that modern computers has no trouble in decompiling ogg.
(how many people listen to music while they play sping? heh, remember the time where you played Prince of Percia and you could run winamp at the same time? very powerfull those Pentiums were. increddible)
User avatar
GrOuNd_ZeRo
Posts: 1370
Joined: 30 Apr 2005, 01:10

Post by GrOuNd_ZeRo »

.ogg is becoming the standard, but I don't really see why, the .wav files are compressed in a file to begin with and that being said, the extra compression will probably do very little for reducing filesize...

And alot of sounds would need to be converted to .ogg as well.

I suggest to add .ogg support, but keep .wav legacy support.
User avatar
SwiftSpear
Classic Community Lead
Posts: 7287
Joined: 12 Aug 2005, 09:29

Post by SwiftSpear »

I say add ogg support if oggs are acctually CPU friendly enough to support our bottom of the line users if used on mass. Recearch is needed before I'm going to throw eggs in this basket. Oggs achive thier low file sizes by doing more things procedurally, and more procedural work means more CPU overhead... We need to know how much more before it's realisic to say that it's a good idea to use them for spring's sound effects.
patmo98
Posts: 188
Joined: 09 Jan 2006, 17:51

Post by patmo98 »

Zenka wrote:Hmmm quess I was wrong then.
Well I stick to the fact that modern computers has no trouble in decompiling ogg.
(how many people listen to music while they play sping? heh, remember the time where you played Prince of Percia and you could run winamp at the same time? very powerfull those Pentiums were. increddible)
Just remember that Spring has to play more than one sound file at a time.
User avatar
Zenka
Posts: 1235
Joined: 05 Oct 2005, 15:29

Post by Zenka »

patmo98 wrote:Just remember that Spring has to play more than one sound file at a time.
Hmm thats true. Does anyone know how much of a processor it would require to play a ogg?
User avatar
Dr.InfernO
Posts: 223
Joined: 18 Nov 2005, 13:55

Post by Dr.InfernO »

If you have a 2.0Ghz you won't regonize 10 Songs playing at the same time. (under 5% CPU usage)
bamb
Posts: 350
Joined: 04 Apr 2006, 14:20

Post by bamb »

Why would anyone want to make the sounds ogg?
If there's a problem with wavs, fix that?
Ogg is only used to save space, the current sounds aren't that big, at least that I know of.
And the sounds would probably anyway have to be decompressed and cached to wav during running/loading mod/map/unit. Remember that if you're listening to music, there's a sizeable buffer where it decompresses the ogg or mp3 to wav before sending it to the sound card, while spring must play sounds immediately.
jouninkomiko
Posts: 436
Joined: 26 Aug 2004, 08:11

Post by jouninkomiko »

IMHO opinion it would only really make sense to compress the background, ongoing music. As for units shooting, and noises they make in general, it would be stupid to compress a < 1 sec soundbyte.
bamb
Posts: 350
Joined: 04 Apr 2006, 14:20

Post by bamb »

True, jouninkomiko.
Btw, it's really far down in the list, but it'd be nice to have winamp controls in spring so you can change song while playing. I know Quakeworld clients have this, maybe you could lift the code really easily. Like .mp3next and .mp3stop or something.
User avatar
Zenka
Posts: 1235
Joined: 05 Oct 2005, 15:29

Post by Zenka »

For the users who lack mutimedia keys on the keybord and and never botherd to set shortcuts for winamp. I think it's irralavant.

jouninkomiko is right (as always). very short wavs isn't worth encoding. and he haven't got background music anyway.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

I say add it in anyways and let modders test it out for themselves and use it where appropriate, as we'll need something like it anyways for when background music is implemented....
User avatar
BvDorp
Posts: 439
Joined: 14 Oct 2005, 12:09

Post by BvDorp »

So.. I still don't understand the problem with .wav and linux?

OGG is prolly a solution for enabling background music, where MP3 has licensing that keeps Spring from using that..
jouninkomiko
Posts: 436
Joined: 26 Aug 2004, 08:11

Post by jouninkomiko »

I am ALL about adding events to the game that can trigger new background music though, to give it an extra feel of excitement during a huge battle etc. Personally, I'd really like to see something like this happen in game :) This might have to wait for CEGUI to be embedded into Spring.
Post Reply

Return to “Engine”