Author Topic: Feature: Ogg Vorbis support  (Read 7284 times)

Zorchenhimer

  • Autococker
  • Posts: 2614
Feature: Ogg Vorbis support
« on: January 05, 2008, 08:53:03 PM »
So we could replace all the .wav files with .ogg files, thus saving some space.

jitspoe

  • Administrator
  • Autococker
  • Posts: 18801
Re: Feature: Ogg Vorbis support
« Reply #1 on: January 05, 2008, 09:39:25 PM »
http://dplogin.com/dplogin/featurevote/feature.php?id=10022

Though unless we add music or some form of large audio clips, the sounds don't really take up that much space.

ViciouZ

  • Map Committee
  • Autococker
  • Posts: 2227
Re: Feature: Ogg Vorbis support
« Reply #2 on: January 06, 2008, 10:35:18 AM »
Zorch could make an OGG player menu :D

Zorchenhimer

  • Autococker
  • Posts: 2614
Re: Feature: Ogg Vorbis support
« Reply #3 on: January 06, 2008, 02:04:59 PM »
Zorch could make an OGG player menu :D

The funny thing is, I was thinking the same thing.  :D
Think it was originally {appy Hamper's idea though.

Garrett

  • Autococker
  • Posts: 1372
Re: Feature: Ogg Vorbis support
« Reply #4 on: January 06, 2008, 03:13:00 PM »
What is Ogg Vorbis?

ViciouZ

  • Map Committee
  • Autococker
  • Posts: 2227
Re: Feature: Ogg Vorbis support
« Reply #5 on: January 06, 2008, 03:32:13 PM »
Audio format, like MP3 but open sourced.

y00tz

  • Autococker
  • Posts: 2742
Re: Feature: Ogg Vorbis support
« Reply #6 on: January 06, 2008, 03:40:00 PM »
Ogg is a container, vorbis is a format/codec.

ViciouZ

  • Map Committee
  • Autococker
  • Posts: 2227
Re: Feature: Ogg Vorbis support
« Reply #7 on: November 30, 2008, 06:26:40 AM »
I got ogg vorbis support (for music only) working on windows. I took 90% of the code from the linux-based QuDoS' engine, so there shouldn't be many, if any portability issues. Now I need to check it compiles on linux, and add a hook in the map loader to download/play whatever music that map lists in the worldspawn, and make it work for looping sound entities :-)

KnacK

  • Global Moderator
  • Autococker
  • Posts: 3039
Re: Feature: Ogg Vorbis support
« Reply #8 on: November 30, 2008, 07:55:39 AM »
You've been a little code monkey lately V - Good Job!

ViciouZ

  • Map Committee
  • Autococker
  • Posts: 2227
Re: Feature: Ogg Vorbis support
« Reply #9 on: November 30, 2008, 11:21:42 AM »
Edited the makefile a bit so it works on linux too (libvorbis-dev package for the headers) - looks like the worldspawn stuff will need to be done in the gamecode.

Here is the patch:

http://www.viciouz.co.uk/other/miscfiles/paintball2_oggvorbis_basic.patch

Zorchenhimer

  • Autococker
  • Posts: 2614
Re: Feature: Ogg Vorbis support
« Reply #10 on: November 30, 2008, 09:09:12 PM »
You've been busy, haven't you?

Haha.

Garrett

  • Autococker
  • Posts: 1372
Re: Feature: Ogg Vorbis support
« Reply #11 on: November 30, 2008, 09:47:47 PM »
The beauty of open source code at work.  Good job Vic

jitspoe

  • Administrator
  • Autococker
  • Posts: 18801
Re: Feature: Ogg Vorbis support
« Reply #12 on: January 21, 2009, 10:32:27 AM »
Tested this out last night.  Seems to work pretty well.  Only problem I found was that it got choppy when loading maps.  At some point, I'd like to put the sound in a separate thread, which would probably fix that issue.  Another thing that would be nice is to have an option to make the music play only when in the menu.  Personally, I don't like to have music playing while playing a game, but some nice menu music when you start the game would be cool.  Another thing I'm curious of - if we make some ambient sounds specified in the worldspawn, wouldn't that mean nobody could play music and have ambient sound at the same time?  Will this work with regular sound clips (could we replace all the .wav files with .ogg) or is this for music only at the moment?

ViciouZ

  • Map Committee
  • Autococker
  • Posts: 2227
Re: Feature: Ogg Vorbis support
« Reply #13 on: January 21, 2009, 11:08:38 AM »
Only for music at the moment, I just ported QuDoS's code, which was just a linux compatible port of Q2E's code.

I think there is a bug when using the snd_alsa driver on linux - snd_oss works fine.

jitspoe

  • Administrator
  • Autococker
  • Posts: 18801
Re: Feature: Ogg Vorbis support
« Reply #14 on: January 21, 2009, 11:15:04 PM »
I hate Linux.  I went to get the vorbis dev files, and ftp.us.debian.org was completely down or something, so I couldn't apt-get anything.  I switced my sources.list over to just ftp.debian.org, and now I get this error:

Quote
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.

Since you only requested a single operation it is extremely likely that
the package is simply not installable and a bug report against
that package should be filed.
The following information may help to resolve the situation:

The following packages have unmet dependencies.
  libvorbis-dev: Depends: libvorbis0a (= 1.1.2.dfsg-1.4) but 1.2.0.dfsg-2 is to be installed
                 Depends: libvorbisenc2 (= 1.1.2.dfsg-1.4) but 1.2.0.dfsg-2 is to be installed
                 Depends: libvorbisfile3 (= 1.1.2.dfsg-1.4) but 1.2.0.dfsg-2 is to be installed
E: Broken packages

Am I reading this right?  It can't install because what it depends on is a newer version?  Ugh.

Zorchenhimer

  • Autococker
  • Posts: 2614
Re: Feature: Ogg Vorbis support
« Reply #15 on: January 21, 2009, 11:38:26 PM »
http://packages.ubuntu.com/intrepid/libvorbis0a
http://packages.ubuntu.com/intrepid/libvorbisenc2
http://packages.ubuntu.com/intrepid/libvorbisfile3

Those are the Ubuntu packages, but they might work.

And ftp.us.debian.org works for me when I try it in Firefox.

T3RR0R15T

  • Map Committee
  • Autococker
  • Posts: 2593
Re: Feature: Ogg Vorbis support
« Reply #16 on: January 29, 2009, 12:51:24 PM »
A volume control would be cool.
The background music is a little bit loud, but it works good :D
I hope u release a (playlist) menu for it soon :P

jitspoe

  • Administrator
  • Autococker
  • Posts: 18801
Re: Feature: Ogg Vorbis support
« Reply #17 on: January 29, 2009, 05:35:15 PM »
There actually is a volume control - ogg_volume or something like that (forgot to note this in the readme).

T3RR0R15T

  • Map Committee
  • Autococker
  • Posts: 2593
Re: Feature: Ogg Vorbis support
« Reply #18 on: January 30, 2009, 09:03:22 AM »
Oh nice :D