Author Topic: Audio Help  (Read 1617 times)

Hey guys. I'm trying to add really cool sound effects, I got the Audio Description made, however no sound is made. I even used the Advance Music addon as a reference for the sound source. Heres the Audio Description I used:

Code: [Select]
new AudioDescription(TC_SFX)
{
is3D = 0;
isLooping = 1;
loopcount = -1;
type = 8;
volume = 100;
};

Heres the console.txt:

Code: [Select]
Datablock Report:
  Base:    424
  Paint:   252
  Add-Ons: 393
  Music:   15
  Total:   1084


*** CREATING MISSION
*** Stage 1 create
136 environmental resource files found
Regenerating file manifest
Got 1429 items in manifest, 0 files hashed
Can't post to master server in LAN game
Got connect request from IPX:00000000:000000000000:0
  lan name = Blockhead
Connection established
Connected successfully, killing other pending connections
AUTHCHECK: Blockhead = LAN client -> LAN server, loading
CADD: 6352 local
 +- bl_id = 999999
 +- no auto admin
Can't post to master server in LAN game
*** New Mission
*** Phase 1: Download Datablocks & Targets
Received manifest and requested 1033 blobs. (396 duplicates removed)
Got non-CURLE_OK result on a request, result was 3 'URL using bad/illegal format or missing URL'
 - Request was for ''
Got non-CURLE_OK result on a request, result was 3 'URL using bad/illegal format or missing URL'
 - Request was for ''
Got non-CURLE_OK result on a request, result was 3 'URL using bad/illegal format or missing URL'
 - Request was for ''
Got non-CURLE_OK result on a request, result was 3 'URL using bad/illegal format or missing URL'
 - Request was for ''
Got non-CURLE_OK result on a request, result was 3 'URL using bad/illegal format or missing URL'
 - Request was for ''
Got non-CURLE_OK result on a request, result was 3 'URL using bad/illegal format or missing URL'
 - Request was for ''
Got non-CURLE_OK result on a request, result was 3 'URL using bad/illegal format or missing URL'
 - Request was for ''
Got non-CURLE_OK result on a request, result was 3 'URL using bad/illegal format or missing URL'
 - Request was for ''
CDN Download finished
Authentication: SUCCESS
*** Phase 2: Download Ghost Objects
*** Phase 3: Mission Lighting
Mission lighting done
Blockhead spawned.
Unable to locate audio profile '0'
Window reactivating...
Window reactivating...
Window reactivating...
Window reactivating...
Issuing Disconnect packet.
Exporting server prefs
Exporting client prefs
Exporting client config
Shutting down the OpenGL display device...
Making the GL rendering context not current...
Deleting the GL rendering context...
Releasing the device context...

It doesn't have any errors, which is rather weird. The audio file type is .ogg, which is compatible with blockland. What am I doing wrong?

Heres the CS file:

Code: [Select]
function playsfx(%filename)
{
if(isFile("Add-Ons/Server_TCcoreAlpha/TimeControl stuff/sfx/" @ %filename @ ".ogg"))
{
if(alxIsPlaying($Client::PlayingMusic))
alxStop($Client::PlayingMusic);
$Client::PlayingMusic = alxCreateSource(TC_SFX, "Add-Ons/Server_TCCcoreAlpha/TimeControl stuff/" @ %filename @ ".ogg");
alxPlay($Client::PlayingMusic);
}
}
function stopsfx()
{
if(alxIsPlaying($Client::PlayingMusic))
alxStop($Client::PlayingMusic);
$Client::PlayingMusic = "";
}

If it's in a zip file then the oggs will not work. This caused me hours of frustration - use .wav.

It still doesn't play the audio. Even as a wav. It's for some reason thinking that's there's a profile 0.


This is not how a sound file should be created.
Here is how.
Quote
datablock AudioProfile([soundname])
{
   filename = "./[filename].wav"; (obv)
   description = [audioclosest3d / audioclose3d / audiodefault3d];   (closest is quiet, close is a bit louder, default is the range of a missile explosion for example)
   preload = false; (dont worry about this, just have it.)
};

Should also be .wav

Also, I wouldn't mess with the description stuff. It's possible, but I don't exactly know how to do it. It'd be easy to find out.
« Last Edit: June 14, 2014, 12:46:06 PM by Arekan »

This is not how a sound file should be created.
Here is how.
Should also be .wav

Also, I wouldn't mess with the description stuff. It's possible, but I don't exactly know how to do it. It'd be easy to find out.

The problem with the file name it's in a folder. I have a variable for the directory, would I put like:
Code: [Select]
filename = "./" @ $TCSFXDir @"Slow.wav;"
Plus, I don't want it in 3D

EDIT: Found the problem. It was a directory typo, the script works if I had the files in the main folder I was using. It works
« Last Edit: June 20, 2014, 06:36:49 AM by Quinn Mallory »