(Solved)Problem with invalid channel ID

Started by FanOfHumor, Tue 28/12/2021 19:26:53

Previous topic - Next topic

FanOfHumor

Hello Everybody
       I have a problem with this simple problem but I couldn't find it anywhere. I can't get past this "Invalid channel ID" error for all sounds imported under a new type I made. I't seemed like there would be instructions on how to make a new sound type but there isn't.   

The setting I have for the type seem altogether basic but all sounds imported under this have an invalid channel ID. Step by step instructions on this would be appreciated.

arj0n

#1
Looks more like an error with the audio channel(s) you have created and are using.


Anyway, here's the steps for adding a new audio type and importing an audio clip connected to that type:

  • Add new audio type in Audio>folder Types
  • Give the new type a name and save new audio type
  • Add new folder in Audio with same name as newly added audio type
  • Import an audio file into this new folder (I used an ogg file and named it aTest in the AGS editor)
  • Select the correct Type if needed

Quick test if audio file plays fine through an audio channel:

  • Add the following line in the end of function game_start(): AudioChannel *test = aTest.Play();
  • Run the game
  • Audio should play fine

If something is wrong with the cached audio files, just delete one or all of them:

  • In the AGS editor, lookup the cache name by opening the imported audio file, under 'Cache File Name'
  • Using the Windows explorer, go to folder C:\...\<your project folder>\AudioCache
  • Delete the file (or just all files
  • Back in the AGS editor rebuild your project and all cache files will be re-created

FanOfHumor

That's what I can't figure out.The sound files work anywhere else in AGS just not under the new tyThpe.
All of those steps were followed through with complete detail. Could the problem be the type settings or the particular audio settings.

The Settings for the audio type are-

crossfade tracks = no

maxchannels =90

name =talk

script id=eAudioTypeTalk

type id =4

volume reduction while speech playing =0




The settings for the audio folder and its sounds are-

Default bundling Type=  In separate vox

Default Priority=high

default repeat =false

default type =talk

default volume=100

name=talk

Do you have any suggestions of what I should do?

Crimson Wizard

#3
Quote from: Pajama Sam on Tue 28/12/2021 20:13:56
maxchannels =90

AGS has a fixed number of 8 channels (16 in the new 3.6.0 version), one of which is reserved for the speech voice-over, so 7 total for your sounds.
As all the "MaxChannels" settings take these channels from the same pool, their total sum should not exceed this limit, or the remaining types will not be able to play.

FanOfHumor

Thanks for the tip Crimson Wizard. Not to get off the subject but is there any way to have more than 7 channels.like 50! It may seem extreme but I actually need that many.

Crimson Wizard

#5
Quote from: Pajama Sam on Tue 28/12/2021 21:56:22
Thanks for the tip Crimson Wizard. Not to get off the subject but is there any way to have more than 7 channels.like 50! It may seem extreme but I actually need that many.

No, but why do you need 50? Channels mean how many sounds play at the same time. If there is more than several simultaneous sounds they will likely become unrecognizable.
We raised this number to 16 in the next version to allow people arrange sound types on them more easily, but this is the first time someone mentions numbers like 50, and you had 90 all in one type. How do you suppose to use these?

FanOfHumor

          I suppose I meant to say 20 or even just 10. It varies because even though the sounds would become a little indistinguishable the amount of sounds played depends on how many clickpoints the player clicks on.Plus It would be better to be over each other instead of another sound cutting it off. It's important that no sounds are cut. Besides,these sounds are  in the background.Not too bad if its gets covered.

Crimson Wizard

#7
Quote from: Pajama Sam on Tue 28/12/2021 23:40:49
          I suppose I meant to say 20 or even just 10.

Well, like I mentioned, the upcoming version 3.6.0 has 16, we did not increase further because no one ever mentioned they need more. The main reason for increase was not exactly the need to play more sounds at once, but rather to be able to reserve fixed channels to more sound types.

Quote from: Pajama Sam on Tue 28/12/2021 23:40:49
It varies because even though the sounds would become a little indistinguishable the amount of sounds played depends on how many clickpoints the player clicks on.Plus It would be better to be over each other instead of another sound cutting it off. It's important that no sounds are cut. Besides,these sounds are  in the background.Not too bad if its gets covered.

To be honest, I still have difficulty to imagine how this is supposed to work, because even the exact amount of sounds may become hard to notice when they begin cover each other.
Whether sound is in background or not does not matter, as they will merge with "foreground" sounds making these harder to distinguish as well.
Maybe I just don't understand what are you trying to accomplish with this.

FanOfHumor

I also forgot to mention that the reason I need so many is because my game has an average of 20 small cartoon jokes per room that can be started by clicking on them. I have seen a few games with this many small cartoons per room and it give a certain fullness to the game.Even though the sounds would get covered a little somehow It was still understandable because you could see the animations and still understand what sounds went to them. I want to give this same effect.

Crimson Wizard

Quote from: Pajama Sam on Tue 28/12/2021 23:51:41
I also forgot to mention that the reason I need so many is because my game has an average of 20 small cartoon jokes per room that can be started by clicking on them. I have seen a few games with this many small cartoons per room and it give a certain fullness to the game.

Could you give an example of such game? i'm now curious to understand this use case.

How necessary it is to allow have them all playing at the same time?

FanOfHumor

#10
Sure I know that most all of Humoungus entertainment's  games have this.
I grew up playing Humoungus entertainment games and I still havent found all of the fun little cartoons in the background. I can't really show you a video because I don't know how to do that but if you want to see an example you should look up some walkthrough's of some games like Pajama sam,Freddi fish and Putt putt.These games are more geared toward kids but I enjoy them since thats who my customers are anyway.

Crimson Wizard

#11
Well, in regards to the technical issue, there's not much possible to do here, except to upgrade to 3.6.0 when you'll have a chance. In theory we maybe will be able to increase channels little more, because the new audio system in 3.6.0 may allow that, but I'd have to make a proper test first.

And, it's best to have some prototype scene to see how it works when there's that many cartoons with sounds playing at once; whether it's essential to have them all playing together, or limiting simultaneous plays may be an option, etc.

FanOfHumor

#12
Do you think you'll be able to put that in the next release?
Im stopping on this forum after this because I know I'm not supposed to change the subject to this.

Crimson Wizard

#13
Quote from: Pajama Sam on Wed 29/12/2021 00:23:10
Also what do you mean by a demo scene.I assume you just mean a test room right?

Yes, for example a game with one room which tests this kind of behavior.


I found the playthrough video for "Pajama Sam":
https://www.youtube.com/watch?v=5vte0EXhK3Y

TBH I am not certain that playing more than 3-4 of cartoon sounds like that simultaneously would make much sense from player's perspective, as they would just blend together, but maybe it's just me...

FanOfHumor

#14
Well, the basic point is to not suddenly cut off the sound abruptly because then it just looks weird.
Alot less limit on this could be useful.Just having the ability to do many channels might be usefull for idle background sounds or something else.

Actually I suppose it wouldn't be necessary for me to have more than five channels though.

Pax Animo

#15
Watching that YouTube playthrough with headphones on is extremely annoying, is the background music restarting on every new sound effect? was it intended to be that way or what?
   
Misunderstood

FanOfHumor

#16
That's because the video quality isn't too good.
they only have the music change when the room changes or when a special scene is played.

Pax Animo

#17
Quote from: Pajama Sam on Wed 29/12/2021 00:51:10
That's because the video quality isn't too good.
they only have the music change when the room changes or when a special scene is played.

I'm not so sure it's down to the video quality.

Ok after watching and listening further, the background music seems to be pausing for a split second rather than restarting. Maybe?
It just seems to have a very glitchy sound.

Sorry, that's all a bit off topic of your original question or maybe not in some way or another.
Misunderstood

FanOfHumor

#18
I forgot to ask you Crimson Wizard.Would creating more sound types allow you to play more channels at once.


also I forgot to mention that I can give you perfect examples of 10 sounds playing at once without becoming indistinguishable. The Freddi fish game series has this constantly. they have a spot that the player can click a whole bunch of times as fast as they can and more animations with their sounds keep coming.
And there were many spots like this not shown in that video. Just saying this if your still curious of what possibly could use so many channels.

Crimson Wizard

#19
Quote from: Pajama Sam on Wed 29/12/2021 05:30:58
I forgot to ask you Crimson Wizard.Would creating more sound types allow you to play more channels at once.

No, like i mentioned, all sound types take channels from one limited pool.


Quote from: Pajama Sam on Wed 29/12/2021 05:30:58
also I forgot to mention that I can give you perfect examples of 10 sounds playing at once without becoming indistinguishable. The Freddi fish game series has this constantly. they have a spot that the player can click a whole bunch of times as fast as they can and more animations with their sounds keep coming.
And there were many spots like this not shown in that video. Just saying this if your still curious of what possibly could use so many channels.

Sorry, but that is not an example; the example would be an actual video demonstrating this, or a demo scene that one could run and observe. It's possible to make up to 8 sounds playing simultaneously with the current stable version of AGS (7 + 1 played as a voice-over), or 16 sounds (15 + 1 voice-over) played in 3.6.0 wip version, so it is quite possible to create such demo and experiment with it.
My doubts come from the fact that personally I have trouble distincting 4+ sounds already, they become a merged ambience at that point if they have same volume. This is why I wonder if there's an actual sense to play as much as 10 at the same time, let alone more. In the referenced case this is also not a gameplay necessity (like, to indicate some important events).

In any case, I am not in a position to suggest you how to make your game. I voice my doubts about meaningfullness of supporting more simultanous sounds, as increasing channels would come at certain perfomance cost when playing all of them at once. If it's found absolutely necessary, I may increase their limit further, but I would have to first test whether the engine is capable of perfoming that.

SMF spam blocked by CleanTalk