Pages: [1]
  Print  
Author Topic: Repost: Programmers!  (Read 10447 times)
trigger_david
Nub


Cakes 0
Posts: 13



« on: September 17, 2007, 02:55:11 PM »

Hi, everyone.

I made a post over at ioquake3 requesting programmer assistance with something, but then I realized that I'm probably better off asking around to increase my chances of finding someone, so here goes...

The post:

http://www.chatbear.com/unity2/6079/843,1190039936,1714/1056679?v=flatold

Feel free to reply here! The gist of my request is that I'm looking for the means to control (.ogg) music playback via an in-level trigger. Just something that, when triggered, would send the music music/example cvar to the console, or even just a new generic cvar trigger (preferable).

I'm also very open to suggestions. Further details in the above post, including my background and intentions, if at all interested.

Thank you for reading!

David K.
Logged
dmn_clown
Posts a lot
*

Cakes 1
Posts: 1324


« Reply #1 on: September 17, 2007, 06:39:05 PM »

This might be what you are looking for, though there are issues with sounds getting chopped.

http://openarena.ws/svn/source/ioq3_1106_oggsub.diff
Logged

trigger_david
Nub


Cakes 0
Posts: 13



« Reply #2 on: September 17, 2007, 09:29:50 PM »

Thanks for the reply!

This might be what you are looking for, though there are issues with sounds getting chopped.

http://openarena.ws/svn/source/ioq3_1106_oggsub.diff

Is this the OA code for .ogg support? As mentioned in my original post @ ioquake3, I'm not a programmer, so I'm afraid I'm not really sure what I'm looking at (but I have programmer friends who can compile this for me.) Is this all that's needed, or are there other files needed (codec .dlls, etc.)? Thanks for sharing!

And is the chopping issue related to music, or using .ogg for target_speakers (if that's even possible)? I did a test using an .ogg file for music (by bringing down the console and typing /music music/test) and it worked great for me, no issues. I didn't test looping, though.

David K.
Logged
dmn_clown
Posts a lot
*

Cakes 1
Posts: 1324


« Reply #3 on: September 17, 2007, 11:33:14 PM »

Is this the OA code for .ogg support?

No, this code isn't in OA but is something that may be included in the future to reduce filesize.

Quote
I'm not a programmer, so I'm afraid I'm not really sure what I'm looking at

What it does is strip the file extension off any wav file compiled into a map and replaces it with ogg, allowing oggs with the same filename to be substituted, there are better solutions for what you want, but this is existing code that will accomplish the same thing plus you get the added bonus of leaving off the file extension when mapping to play whichever sound file exists.

Quote
Is this all that's needed, or are there other files needed (codec .dlls, etc.)?

After this patch is applied to your code base, you'll need to compile the binary with ogg support, just change
Code:
ifndef USE_CODEC_VORBIS
USE_CODEC_VORBIS=0
endif
to this
Code:
ifndef USE_CODEC_VORBIS
USE_CODEC_VORBIS=1
endif

in the makefile.  You'll also need the ogg and vorbis headers along with a slew of libs for the ogg support to be compiled properly (as outlined here).  To hear the ogg's ingame you need the libogg, libvorbis, and libvorbisfile dll's.

Quote
And is the chopping issue related to music, or using .ogg for target_speakers (if that's even possible)? I did a test using an .ogg file for music (by bringing down the console and typing /music music/test) and it worked great for me, no issues. I didn't test looping, though.

The chopping doesn't happen in music which is handled separately, it just happens in sound effects.  It might also be an issue with the sound files themselves as I just tested that patch in our experimental branch to see what would happen and didn't notice any chopping from one sound file.

Quote
Thanks for sharing!

Not a problem.
« Last Edit: September 18, 2007, 12:12:17 AM by dmn_clown » Logged

trigger_david
Nub


Cakes 0
Posts: 13



« Reply #4 on: September 18, 2007, 10:53:58 AM »

Wow, thanks so much for taking the time to provide all those details. It's much appreciated. Who do I give credit to, and what website would you like to list? Or should I credit all of OA?
Logged
iLeft.bye
Member


Cakes 1
Posts: 187



« Reply #5 on: September 19, 2007, 12:19:27 AM »

Logged
dmn_clown
Posts a lot
*

Cakes 1
Posts: 1324


« Reply #6 on: September 19, 2007, 03:16:10 AM »

Wow, thanks so much for taking the time to provide all those details. It's much appreciated. Who do I give credit to, and what website would you like to list? Or should I credit all of OA?

The code is from Thilo's star trek voyager: elite force mod, beyond that just credit the OA team.
Logged

De@thByBl@st
Half-Nub


Cakes 0
Posts: 67


« Reply #7 on: September 26, 2007, 02:03:45 PM »

 If I understood that, I would say that trigger_once or trigger_multiple would meet your needs, assuming Ogg support is enabled.
Logged
fromhell
Administrator
GET A LIFE!
**********

Cakes 35
Posts: 14520



WWW
« Reply #8 on: September 26, 2007, 04:02:52 PM »

doing that kind of thing would cause the entire song to be loaded in memory, which isn't really nice.
Logged

asking when OA3 will be done won't get OA3 done.
Progress of OA3 currently occurs behind closed doors alone

I do not provide technical support either.

new code development on github
Pages: [1]
  Print  
 
Jump to: