Home   Help Search Login Register  

Author Topic: Cannot get custom sounds to work.  (Read 1412 times)

0 Members and 1 Guest are viewing this topic.

Offline ericstephenvorm

  • Members
  • *
Cannot get custom sounds to work.
« on: 22 Jan 2008, 22:58:20 »
Good evening. I have been combing OFPEC for the better part of an entire day (still in my jammies!) looking for the reason why my custom sounds are not working. I have read through every single post related to sound, and even browsed every post on every page just in case. I found several posts where people were able to get their problems similar to my own fixed, but nothing was really said as to how they did it.

I have read and followed both tutorials on the site. In fact, the tutorial by The Architect doesn't even work when I use his files in the tutorial! Very frustrating.

Here's what I've got.

A simple trigger, triggered by ANYONE. On activation: playSound "Sample1" (the .ogg file from the tutorial- nothing changed, placed in the Sound folder of the mission folder I'm working on).

When I preview the mission, I get a message that says "cannot find Sample1".

Again, I didn't change anything about the .ogg file, so I only assume that it's the right Hz and all that.

The file structure is exactly as it should be (ie \MyMission\sounds\Sample1.ogg).

My description file is an .ext, not an .ext.txt or anything like that. I am using Chris' Script Editor.

I reload the mission every time I make any changes. Heck, I even save and exit THE ENTIRE GAME just to make sure, but still the same problem.

Here is the Description file in its entirety, directly unzipped from the tutorial:

Quote
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
};
};



Let's see... what else have I tried??? Well, that's about it.

Using this file, with this .ogg (or any other I have), I cannot make this trigger work. I've tried to use the effects tab of the trigger, but the filenames don't show up there either.

Please, someone who knows 100% what the problem is, take away my headache. I've done my homework, and so far have not found any definitive answers as to why it's not working.

Thank you for your help.

Very Respectfully,

ESV

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Cannot get custom sounds to work.
« Reply #1 on: 22 Jan 2008, 23:09:56 »
Follow these steps:
1 - Open ArmA and create a mission named sound_test in Rahmadi map, save it to have its folder created.
2 - Create Sound folder inside sound_test.intro and copy there Sample1.ogg (make sure it is mono, not stereo)
3 - Create a description.ext file containing the following code:

Code: [Select]
// description.ext
class CfgSounds
{
   sounds[] = {};

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

4 - Add a single soldier there, the player.
5 - In the init field of the player put:
Code: [Select]
this Say "Sample1"6 - Save the mission
7 - Reload the mission
8 - Test the mission, you should hear sample1 sound

Now create sample2.ogg and add it after sample1 in description.ext, this time the ogg should be stereo.
In the init field of the player, remove the say command and change it by playSound "Sample2".

Code: [Select]
// description.ext
class CfgSounds
{
   sounds[] = {};

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

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

If you still have problems, exit ArmA completely, load again and test the mission.

EDIT:
Remember that after modifying anything in description.ext file, you must reload the mission for the changes to take effect
« Last Edit: 22 Jan 2008, 23:15:08 by Mandoble »

Offline ericstephenvorm

  • Members
  • *
Re: Cannot get custom sounds to work.
« Reply #2 on: 23 Jan 2008, 15:26:22 »
Mandoble,

Well, as always, your efforts are not wasted. Whatever you did differently worked perfectly, and I thank you.

However, this raises a few questions that I think should be answered.

1. Exactly what quality of .ogg files *can* work in the game, and under what circumstances should they be used. For example, you had a mono sound being used with the "say" command, but a stereo sound used with a "playSound" command. Is this always the case?

2. What are the exact sampling rates that must be used in ArmA? Example: 44100 hz, 80kbps, mono, etc.

3. I followed the sound tutorial posted on Ofpec exactly and was unable to get it to work using his files and following his tutorial. I do believe that means that someone should look into revising that tutorial. It is a wonderful piece of work, very nice with video and everything. But, if the end product doesn't work, then I'm afraid it's no good at all.

I hope this is the end of my sound issues. I thank you very much for your efforts on my behalf.

Very Respectfully,

ESV

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Cannot get custom sounds to work.
« Reply #3 on: 23 Jan 2008, 16:31:02 »
1) Say: for directional sounds with a sound source, for example a soldier screaming. The sound will fade in/out depending on the range too. In this case the ogg file must be mono.
playSound is like PlayMusic, it is not a directional sound, so the ogg may be stereo.

2) 44100 will work quite well for ogg files, these used with Say, mono, these used with playSound, stereo.

3) Which sound tutorial are you using?

Offline ericstephenvorm

  • Members
  • *
Re: Cannot get custom sounds to work.
« Reply #4 on: 25 Jan 2008, 01:41:28 »
Thank you for that explanation. I will keep that information handy.

I was using the tutorial posted on the OFPEC tutorials site made by The-Architect.

Thank you again.

Very Respectfully,

ESV