OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: Ext3rmin4tor on 27 Dec 2008, 19:30:12

Title: .ogg sound in Arma
Post by: Ext3rmin4tor on 27 Dec 2008, 19:30:12
I'm trying to play a sound in a script. The  file is the Geiger counter sound and I converted it from .wav format into .ogg with Audacity but the game doesn't play it. The Cfgsound classes in Description.ext are correct, so I'm wondering if there are specific values to use for ArmA .ogg files (i.e. bitrate, frequency, ecc.)? I used this program also for musics and it works perfectly so I don't know why it doesn't play the sound.
Title: Re: .ogg sound in Arma
Post by: WinKIller0 on 27 Dec 2008, 19:41:39
Can't tell for sure but I have this problem too with some files. Don't know what causes it but you just can't play this file even if everything would be O.K.

I think you should try to change the file a bit (so the 101010 line would be a bit differen) and rename the newly made file something else like from sound1.ogg to copy_sound_22.ogg and make a new description "call" for the file (dunno if you should leave the old description line there though) then it should work*, at least I think I made few files roll wiht that tactic

*Really can't tell for sure, it was this or I just got lucky
Title: Re: .ogg sound in Arma
Post by: Tyger on 27 Dec 2008, 20:40:09
Quote
so I'm wondering if there are specific values to use for ArmA .ogg files (i.e. bitrate, frequency, ecc.)?
Yes  :D
MusicSpeechRadio
Freqency44100kHz22050-44100kHz11025-44100kHz
Bit-size16bit16bit16bit
Stereo/MonoStereoMonoMono
BitrateConstantConstantConstant
LengthAny lengthAny lengthCertain size

Sorry i forget the size, but i'm sure you'll find out if you need to.. lol  :whistle:
Anyway, the biggest reason for sound failure is that you've compiled at a non-constant bit-rate or that you compiled in the wrong stereo vs. mono.

[EDIT] Any bit rate is compatible, as long as it is constant.
Title: Re: .ogg sound in Arma
Post by: Ext3rmin4tor on 28 Dec 2008, 12:29:31
Probably I compiled the file with stereo output and not mono since usually the default option is stereo.

EDIT: Lol now don't laugh at me but I found the error... In the sound path I put

sound[] = {"Sound\GeigerCounter.ogg", +10db, 1.0};

instead of

sound[] = {"\Sound\GeigerCounter.ogg", +10db, 1.0};

and the game couldn't read the path correctly