Author Topic: audioProfile not working.  (Read 497 times)

Code: [Select]
for($f = findFirstFile("Add-Ons/Script_HEVSound/fvox/*.wav") ; $f !$= "" ; $f = findNextFile("Add-Ons/Script_HEVSound/fvox/*.wav")) {
   if(isObject(nameToID($n = "hevAudio_" @ strReplace(fileBase($f), " ", "_"))))
      continue;
   $a = new audioProfile() {
      filename = $f;
      description = audioClosest3D;
      preload = true;
   };
   $a.setName($n);
}

This code runs, and it creates the object "hevAudio_deactivated", but if I do serverPlay2D(hevAudio_deactivated); - I don't hear it at all. If I run the same function with Synth_00_Sound, I hear it. But they have the same description and classname, but still don't work. What's wrong?