Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Ali on Tue 16/09/2008 13:31:42

Title: Sound Enumeration Oddities [Explained]
Post by: Ali on Tue 16/09/2008 13:31:42
I've been having trouble using .ogg files as speech. Occasionally a file simply will not play, but if I change its number, it will.

Things got stranger when I had a footstep sound effect called 9001. When the walking animation happened, the music stopped and I cot an message in the warning log that "music 8001" couldn't be found. Replacing the files with .Wavs solved the problem.

I'm using version 3.0.2 and the .ogg files were created in Audacity.
Title: Re: Ogg Oddities
Post by: Pumaman on Wed 17/09/2008 20:52:32
Can you be more specific about any of this? As far as I know there are no known issues with OGG music/speech/sound.
Title: Sound Enumeration Oddities (Not OGG, it seems!)
Post by: Ali on Sat 20/09/2008 11:43:54
I've done some more careful checking now. I've been trying to use prefixes for the lines of speech in order to indicate which room/part of the game they belong to. This didn't work if I used more than 5 digits, but I've had the following problems with longer numbers.

Firstly I have a speech sound called BARO90002.ogg. It playes fine when I run the game from within AGS, but it does not play in the compiled game. This error is logged:

(in room 1): Speech load failure: '~speech.vox~Baro90002.mp3'

I don't believe there is a problem with the file, because renaming it BARO90030.ogg mysteriously solves the problem.

I was wrong to say all these issues occurred with OGG files. The following problem occurs with WAVs as well. I set SOUND90002 to play as a frame sound in the view editor  by typing 90002 into the relevant property. When the game runs, the midi music cuts out on that frame and this error is logged:

(in room 1): Music 79002 not found

Changing the number and file to 9002 results in:

(in room 1): Music 8002 not found

Losing the prefix, and calling it SOUND2.ogg works, so perhaps it is a problem with longer numbers. I would find it very useful to be able to number speech using prefixes to help organise sounds. This would be particularly helpful because I am using a custom dialogue module so I have to number every line manually.

Hope this makes things clearer!
Title: Re: Sound Enumeration Oddities (Not OGG, it seems!)
Post by: Pumaman on Sun 28/09/2008 14:52:19
Thanks for the details. I've looked into this and there are two separate issues here:

1. If you use a PlaySound number > 1000, it actually does PlayMusic(number - 1000) instead. This dates back to a very old version of AGS that just had a PlaySound command, and if you wanted to play music you passed in a number 1000 higher instead.
I will change this for the next version to remove this behaviour, since it's no longer needed and obsolete.

2. Speech filenames are still limited to the 8.3 filename format, which means that you can't use a speech number over 9999. I will update the editor in the next version to detect this situation, rather than leading to random errors at run-time.
Title: Re: Sound Enumeration Oddities (Not OGG, it seems!)
Post by: Ali on Mon 29/09/2008 10:49:02
Thanks for the explanation! If the number limit remains in place, a note in the manual would be helpful to people in my position. Would there be any possibility of removing or extending the number limit? As I said, the ability to organise sppech files using a prefix would be very useful to me:

Numbering sound and speech file like this:

0010001 (A character's first line (0001) from room 1 (001))

9990001 (A character's first line (0001) within dialogues / the Global Script (999))

Would make organising them a lot easier for me.
Title: Re: Sound Enumeration Oddities (Not OGG, it seems!)
Post by: Pumaman on Mon 29/09/2008 20:19:28
Well, the number limit isn't actually a number limit as such, it's a limitation of the current SPEECH.VOX file format that only allows 8.3 filenames. I could update the file format to allow this, but so far there hasn't been any call for it... I guess it depends on whether anybody else wants to use high speech numbers too?

In the meantime I'll add a note to the manual to mention it. Incidentally if the character's script name only has 3 characters (like EGO does), then you can have up to EGO99999.OGG because of the extra character it frees up ;)
Title: Re: Sound Enumeration Oddities [Explained]
Post by: Ali on Tue 30/09/2008 10:07:05
Thanks for the tip. To be honest, it suprises me that people who've made entire games with voice acting haven't come across this issue and requested higher speech numbers. Maybe I'm just awkward!