Jump to content
Sign in to follow this  
sic-disaster

sound format and inclusion

Recommended Posts

My question is, is ArmA 2 still using .ogg's as sound format?

And how does one get them to work in a mission?

I've tried a OFP/ArmA sound tutorial and it worked fine in those games, but when i try to use it in ArmA 2 the game crashes.

So is there a new format and a new way of including sounds?

Share this post


Link to post
Share on other sites

As far as i can say you can't define sounds in the "Descripted.ext" of a mission.

Sounds only can be definied by using/creating a AddOn with a "Config.cpp"

Share this post


Link to post
Share on other sites

you can use do them you just need to make sure it ends with 3 of these }; at the end of the description..

// Include spectating script resource

class Header
{
 gameType = Coop;
 minPlayers = 1;
 maxPlayers = 8;
};



OnLoadMission = "CRUISE CONTROL";
OnloadMissionTime = False;


class RscStdText
 {
type=0;
idc=-1;
style=2;
colorBackground[]={0,0,0,0}; 
colorText[]={1,1,1,1};       
font="TahomaB";
size=1;
 };

class RscTitles
{
titles[]={fog1,fog2,fog3,fog4,fog5,fog6,fog7,test1}; 



class fog1
{
  	idd=-1;
  	movingEnable=0;
  	duration=10;
  	fadein=2;
	fadeout=2;
  	name="fog1";
	sizeEx=1;
  	controls[]={"Pic","Text",};

  	class Pic : RscStdText
	{
  	  	style=48; 
  	  	text="image\cctitle.paa";
  	  	x=0.25;
  	  	y=0.2;
  	  	w=0.5;
  	  	h=0.5;
		sizeEx=0.05;
	};
  	class Text : RscStdText 
	{
  	  	text="";
		colorText[]={1,1,1,1};
		font="TahomaB";
		size=0.8;	  	  	
  	  	x=0.095;
  	  	y=0.3;
  	  	w=0.8;
  	  	h=0.05;
		sizeEx=0.03;
	};

};

class fog2
{
  	idd=-1;
  	movingEnable=0;
  	duration=5;
  	fadein=0;
	fadeout=0;
  	name="fog2";
	sizeEx=1;
  	controls[]={"Pic","Text",};

  	class Pic : RscStdText
	{
  	  	style=48; 
  	  	text="image\fog2.JPG";
  	  	x=0.0;
  	  	y=0.0;
  	  	w=1.0;
  	  	h=1.0;
		sizeEx=0.05;
	};
  	class Text : RscStdText 
	{
  	  	text="";
		colorText[]={1,1,1,1};
		font="TahomaB";
		size=0.8;	  	  	
  	  	x=0.095;
  	  	y=0.3;
  	  	w=0.8;
  	  	h=0.05;
		sizeEx=0.03;
	};

};

class fog3
{
  	idd=-1;
  	movingEnable=0;
  	duration=5;
  	fadein=0;
	fadeout=0;
  	name="fog3";
	sizeEx=1;
  	controls[]={"Pic","Text",};

  	class Pic : RscStdText
	{
  	  	style=48; 
  	  	text="image\fog3.JPG";
  	  	x=0.0;
  	  	y=0.0;
  	  	w=1.0;
  	  	h=1.0;
		sizeEx=0.05;
	};
  	class Text : RscStdText 
	{
  	  	text="";
		colorText[]={1,1,1,1};
		font="TahomaB";
		size=0.8;	  	  	
  	  	x=0.095;
  	  	y=0.3;
  	  	w=0.8;
  	  	h=0.05;
		sizeEx=0.03;
	};

};

class fog4
{
  	idd=-1;
  	movingEnable=0;
  	duration=5;
  	fadein=0;
	fadeout=0;
  	name="fog4";
	sizeEx=1;
  	controls[]={"Pic","Text",};

  	class Pic : RscStdText
	{
  	  	style=48; 
  	  	text="image\fog4.JPG";
  	  	x=0.0;
  	  	y=0.0;
  	  	w=1.0;
  	  	h=1.0;
		sizeEx=0.05;
	};
  	class Text : RscStdText 
	{
  	  	text="";
		colorText[]={1,1,1,1};
		font="TahomaB";
		size=0.8;	  	  	
  	  	x=0.095;
  	  	y=0.3;
  	  	w=0.8;
  	  	h=0.05;
		sizeEx=0.03;
	};

};

class fog5
{
  	idd=-1;
  	movingEnable=0;
  	duration=5;
  	fadein=0;
	fadeout=0;
  	name="fog5";
	sizeEx=1;
  	controls[]={"Pic","Text",};

  	class Pic : RscStdText
	{
  	  	style=48; 
  	  	text="image\fog5.JPG";
  	  	x=0.0;
  	  	y=0.0;
  	  	w=1.0;
  	  	h=1.0;
		sizeEx=0.05;
	};
  	class Text : RscStdText 
	{
  	  	text="";
		colorText[]={1,1,1,1};
		font="TahomaB";
		size=0.8;	  	  	
  	  	x=0.095;
  	  	y=0.3;
  	  	w=0.8;
  	  	h=0.05;
		sizeEx=0.03;
	};

};

class fog6
{
  	idd=-1;
  	movingEnable=0;
  	duration=5;
  	fadein=0;
	fadeout=0;
  	name="fog6";
	sizeEx=1;
  	controls[]={"Pic","Text",};

  	class Pic : RscStdText
	{
  	  	style=48; 
  	  	text="image\fog6.JPG";
  	  	x=0.0;
  	  	y=0.0;
  	  	w=1.0;
  	  	h=1.0;
		sizeEx=0.05;
	};
  	class Text : RscStdText 
	{
  	  	text="";
		colorText[]={1,1,1,1};
		font="TahomaB";
		size=0.8;	  	  	
  	  	x=0.095;
  	  	y=0.3;
  	  	w=0.8;
  	  	h=0.05;
		sizeEx=0.03;
	};

};

class fog7
{
  	idd=-1;
  	movingEnable=0;
  	duration=1;
  	fadein=0;
	fadeout=5;
  	name="fog7";
	sizeEx=1;
  	controls[]={"Pic","Text",};

  	class Pic : RscStdText
	{
  	  	style=48; 
  	  	text="image\fog7.JPG";
  	  	x=0.0;
  	  	y=0.0;
  	  	w=1.0;
  	  	h=1.0;
		sizeEx=0.05;
	};
  	class Text : RscStdText 
	{
  	  	text="";
		colorText[]={1,1,1,1};
		font="TahomaB";
		size=0.8;	  	  	
  	  	x=0.095;
  	  	y=0.3;
  	  	w=0.8;
  	  	h=0.05;
		sizeEx=0.03;
	};

};

class test1
{
  	idd=-1;
  	movingEnable=0;
  	duration=10;
  	fadein=0;
	fadeout=0;
  	name="test1";
	sizeEx=1;
  	controls[]={"Pic","Text",};

  	class Pic : RscStdText
	{
  	  	style=48; 
  	  	text="image\test1.PAA";
  	  	x=0.0;
  	  	y=0.0;
  	  	w=1.0;
  	  	h=1.0;
		sizeEx=0.05;
	};
  	class Text : RscStdText 
	{
  	  	text="";
		colorText[]={1,1,1,1};
		font="TahomaB";
		size=0.8;	  	  	
  	  	x=0.095;
  	  	y=0.3;
  	  	w=0.8;
  	  	h=0.05;
		sizeEx=0.03;
	};

};

};

class CfgMusic
    {
    tracks[] = {junkz};

    class junkz
    {
         name = "junkz";
         sound[] = {\music\junkz.ogg, 1.0,1.0};
         titles[] = 
         {
        [color="Red"] };
    };

};[/color]

Plus when it does drop u to desk top you should get an error box telling you what you are missing..

Share this post


Link to post
Share on other sites

Thanks for the info guys.

Gonna try it again, it seems it was missing a }; at the bottom of the file.

---------- Post added at 02:02 PM ---------- Previous post was at 01:52 PM ----------

Edit: it still doesnt work.

It gave me the same error as it gave me before:

line 53:/CfgMusic/: Missing '}'

But i dont know where to put it, it's confusing as i really can't read code without getting a major headache. It's at the bottom, that i know. I put 3x }; there, that didnt work.

Then i put the last one } instead of }; and that didnt work either.

Could any of you be so kind as to make the file for me? That would be really appreciated.

Soundfile should be called Sample1.

Share this post


Link to post
Share on other sites

class CfgMusic
{
tracks[]={};

class Sample1
{
 name = "";
 sound[] = {"Sample1.ogg", db+0, 1.0};
};

};

just put that in the description file.

Share this post


Link to post
Share on other sites
Thanks for the info guys.

Gonna try it again, it seems it was missing a }; at the bottom of the file.

---------- Post added at 02:02 PM ---------- Previous post was at 01:52 PM ----------

Edit: it still doesnt work.

It gave me the same error as it gave me before:

line 53:/CfgMusic/: Missing '}'

But i dont know where to put it, it's confusing as i really can't read code without getting a major headache. It's at the bottom, that i know. I put 3x }; there, that didnt work.

Then i put the last one } instead of }; and that didnt work either.

Could any of you be so kind as to make the file for me? That would be really appreciated.

Soundfile should be called Sample1.

can u post the description in here so we can see where your going wrong..? :)

But looking at the error u need to count down to line 53 and see whats missing along that line.

Share this post


Link to post
Share on other sites

This is the stuff from the .Ext file.

class CfgMusic

{

tracks[]={};

class Music1

{

name = "Music1";

sound[] = {\music\Music1.ogg, db+40, 1.0};

};

class Music2

{

name = "Music2";

sound[] = {\music\Music2.ogg, db+40, 1.0};

};

class CfgEnvSounds

{

sounds[]={Ambience1};

class Ambience1

{

name="Ambience1";

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

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

};

};

class CfgSounds

{

sounds[] = { Sample1, Sound2, };

class Sample1

{

name = "Sample1";

sound[] = {"Sample1.ogg", db+20, 1.0};

titles[] =

{

0, $STRM_Sample1

};

};

class Sound2

{

name = "Sound2";

sound[] = {"Sound2.ogg", db+20, 1.0};

titles[] =

{

0, $STRM_Sound2

};

};

}

Share this post


Link to post
Share on other sites

try this

I highlighted the stuff for you to see where i adjusted it :)

class CfgMusic
{
tracks[]={[color="Red"]Music1, Music2[/color]};

class Music1
{
name = "Music1";
sound[] = {\music\Music1.ogg, db+40, 1.0};
};
[color="Red"]};[/color]
class Music2
{
name = "Music2";
sound[] = {\music\Music2.ogg, db+40, 1.0};
};
[color="Red"]};[/color]


class CfgEnvSounds
{
sounds[]={Ambience1};

class Ambience1
{
name="Ambience1";
sound[]={"Ambience1.ogg",db-20,0,1};
soundNight[]={"Ambience1.ogg",db-40,0,1};
};
};



class CfgSounds
{
sounds[] = {Sample1, Sound2};
class Sample1
{
name = "Sample1";
sound[] = {"Sample1.ogg", db+20, 1.0};
titles[] =
{
0, $STRM_Sample1
};
};
class Sound2
{
name = "Sound2";
sound[] = {"Sound2.ogg", db+20, 1.0};
titles[] =
{
0, $STRM_Sound2
};
};
[color="Red"]};[/color]

Edited by Junker

Share this post


Link to post
Share on other sites

Thanks alot Junker, but i'm afraid i crashed again :\

Config: some input after EndOfFile. is what it says. I'm at a loss to what that might mean?

Share this post


Link to post
Share on other sites

ok i tested it and tried to fix it with no joy, so i started from scratch and got it going 1st time :P

class CfgSounds
{

sounds[] = {sound1, sound2};


class sound1
{
	name = "sound1"; 
	sound[] = {\sound\sound1.ogg, db + 0, 1.0};
	titles[] = {0, ""};
};
class sound2
{
	name = "sound2"; 
	sound[] = {\sound\sound2.ogg, db + 0, 1.0};
	titles[] = {0, ""};
};
};

class CfgMusic
{

tracks[] = {music1, music2};


class music1
{
	name = "music1"; 
	sound[] = {\music\music1.ogg, db + 0, 1.0};
	titles[] = {0, ""};
};
class change
{
	name = "music2"; 
	sound[] = {\music\music2.ogg, db + 0, 1.0};
	titles[] = {0, ""};
};
};

class CfgEnvSounds
{

sounds[] = {Ambience1};


class Ambience1
{
	name = "Ambience1"; 
	sound[] = {\sound\Ambience1.ogg, db + 0, 1.0};
	soundNight[]={"Ambience1.ogg",db-40,0,1};
	title = ""; 
};
};

Share this post


Link to post
Share on other sites

Thanks a lot Junker, i got it to work!

I'll be sure to put you in the credits :D

Share this post


Link to post
Share on other sites

Hey guys,

I'm getting a server report error

Error: sample mpmissions\__cur_mp.utes\revive_sqf\sound\univ_v51 .ogg with unsupported sample frequency: 44100

The sample still plays but it also seems to be happening with the default game sounds

Error: sample ca\weapons\data\sound\z_sinus.wss with unsupported sample frequency: 44100

Is 44100 Hz still the correct frequency for sounds in ArmA2?

Share this post


Link to post
Share on other sites

i tend to use 16000 hz but thats just to bring down the file size..

Plus all sounds should be in mono.

Share this post


Link to post
Share on other sites

Got it in mono and just using some sound bytes for call-outs taken directly from ArmA. Thanks for the tip Junker I'll see if the smaller sample rate makes any difference - it will certainly make revive users happier if I can decrease the sample size. :)

Share this post


Link to post
Share on other sites

I use a program called Goldwave to record my sounds.

After recording it you have to save a file in .ogg, sound format is Vorbis 44100 Hz, 120 kbps (0.7q), mono.

Share this post


Link to post
Share on other sites
I use a program called Goldwave to record my sounds.

After recording it you have to save a file in .ogg, sound format is Vorbis 44100 Hz, 120 kbps (0.7q), mono.

i use that too :D

@norrin : maybe those errors are due to the fact the server has no sound ?

Edited by Junker

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  

×