Jump to content
Sign in to follow this  
KeyCat

Ambient sounds

Recommended Posts

Anyone knows how to use the CfgEnvSounds class to add your own ambient/environment sounds in OFP?

By using the CfgSounds class in descritption.ext I'm able to add own sounds to the Effects/Sounds/Anonymous (and Voice) listbox (or call them by script) in the editor and the work just fine. Trying the same with the CfgEnvSounds class but nothing shows up in the Effects/Sounds/Enviroment listbox?

Been reading Bloodmixers great sound tutorial but his ZIP-file example does not include this, he just list it as a class. Anyone knows how to add your own ambient sounds in a mission? Maybe a example someone could share?

/Christer (a.k.a KeyCat)

Share this post


Link to post
Share on other sites

I took this out directly out of Bloodmixer's sound tutorial that I have, and to warn you i've never messed with Env. sounds yet...The tutorial explains things about it a little bit so you might want to take a look. Note that you can make both daytime and nightime sounds, kinda cool. If you don't get a chance to check out the tutorial Bloodmixer says that if you use stereo sounds only 22050Khz sounds work. Higher Khz may cut out the sound.

class CfgEnvSounds

{

sounds[]={mortarambient,rain};

class mortarambient

{

name="mortarambient";

sound[]={"mortarambient.ogg",db-0,0,1};

soundNight[]={"mgunambient2.ogg",db-0,0,1};

};

class rain

{

name="rain";

sound[]={"rainyday.ogg",db-0,0,1};

soundNight[]={"rainynight.ogg",db-0,0,1};

};

};

Share this post


Link to post
Share on other sites

Nic, thats what I also used but couldn't get to work? Can you get it to work? Does your sounds shows up in the Effects/Sounds/Enviroment listbox in the editor or how do you call it?

May be the OGG-files I tried with but have currently no way of checking their sample rate.

/Christer (a.k.a KeyCat)

Share this post


Link to post
Share on other sites

Well, I havent actually used env sounds yet, only music and voice sounds, I also never really use the effects dropdown box,I always use scripting to call on sounds... but the only thing i can think of is trying to re convert your sound samples to the right specs to make sure. Also, do you have the current upgrade..It aparantly fixes a problem with ambient sounds, in older versions i guess the game sometimes didnt recognize longer ambient sounds or something.

I would test some env sounds out myself but I think I missed something when I typed up the description for the sounds and or music..whenever I try to use the effects dropdown box the game crashes cause it cant find the sounds. Havent really needed to otherwise cause of scripting.

But anyway, let me know if ya figure it out dude confused.gif

Share this post


Link to post
Share on other sites

I have downloaded Winamps 2.8 and installed in_vorbis.exe--a plug in for ogg support.

I can't get it to play .ogg files. Winamps 2.8 says it has ogg support.

How do you play ogg files? When I click on a MP3 or WAV file, winapms opens, and it plays. When I click on a ogg file, nothing happens.

Share this post


Link to post
Share on other sites

I actually havent installed the winamp, I usually just use my creative playcenter..though now that I have litestep I should probably install winamp since it works so well with it... but maybe there is some option on winamp that you have to set too make it look for and recognize the .ogg's, maybe...ohterwise im not really sure why it doesnt automatically open them. You have a lot of ogg files you listen to or something?

Share this post


Link to post
Share on other sites

Winamp 2.8 sucks when playing ogg files. I can't get it to play ogg files with ogg plug-in installed.

I said to hell with it and installed Freeamp 2.1 and it plays ogg files just fine without annoying little plug-ins. Freeamp appears to only play ogg and MP3 and not Wav files.

Go here to get it: FREE AMP 2.1

Share this post


Link to post
Share on other sites

Yeah, ill probably still intall the winamp because of the way the volume controls are implemented into LiteStep(KICKASS windows replacement shell). Really the only time I use .ogg files are when I have them created to put into flashpoint, and I ususally use wavesurfer to do that,but otherwise just for listening to music..I really havent seen the need to convert 100 albums of mp3's into ogg's so there's not much need for me. But I might check out freeamp if it converts files as wafesurfer seems to be kinda buggy.

Share this post


Link to post
Share on other sites

Oh and getting back to KEYCAT...

I fixed my problem, i was missing the tracks[] = (blahblah...

So I tested out the Env sounds...The sounds showed up in the effects dropdown box for me, but, they had no effect when I previewed the level, also the pre-made ones that came with the game seemed to have no effect..So, it may be because I havent bothered to get the newest patch,or maybe the level has to be exported first, or maybe..uh..well..I really dont know. Did the Env sounds that came with the game work for you?

Share this post


Link to post
Share on other sites

Interesting! I see no reference to "tracks[] = ..." in the CfgEnvSounds class only the CfgMusic class? Could you please elaborate how you got your sounds listed in the Effects/Sounds/Enviroment listbox?

Yes, I can trigger and use the environmental sound that comes along with OFP. I'm using 1.46.

/Christer (a.k.a KeyCat)

Share this post


Link to post
Share on other sites

Oh, no...I meant i was missing the tracks[]= etc.... for my music and such, not the env sounds..and the game crashed when i attempted to use the effects button(all better now). The env sounds should look just as it says in the tutorial with the exception of different named sounds. But since you have the latest patch and if your sounds are converted with the right specs, I really have no idea why they don't work. Sorry dude. confused.gif

Share this post


Link to post
Share on other sites

Hey Nic, does winamp just not auto-open .ogg files, or does it still not work when you drag ogg's into winamp or use winamp's open menu to find them. If your only problem is it doesn't auto-open them, then do this.

wink.gif Open up a window like my computer.

wink.gif Go to view - Folder Options

wink.gif Go to the last tab in the folder options window 'File Types'

wink.gif Look through the list and find .ogg files

wow.gif (If it doesn't appear in the list click on New Type)

In the new type window put this info:

Description of type: audio or whatever desc. you want

Associated extention: ogg

Content Type (MIME): audio/ogg

Click New at the bottom and

In action window type 'open'

In app used to preform action click browse and find

your winamp executable

click ok

wow.gif (If it DOES appear in the list, just click edit and change

the same info)

Hope this helps.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×