Hello. I have this weird bug with the AudioMixer:
I'm using Chanel 2 and 3, but when I save the project, leave ZGE, and come back to it later, extra channels 2 and 3 are deactivated.
In fact, none of the settings in the AudioMixer seems to be saved, since Volume and DelayLength of channel 0 and 1 goes back to their factory reset.
I can't set all manually at the start of the game either using:
AudioMixer.Ch2Active = 1;
AudioMixer.Ch2Volume = 0.5;
AudioMixer.Ch3Active = 1;
AudioMixer.Ch3Volume = 0.5;
I get an AccessViolation Error...
AudioMixer resets when loading the project
Moderator: Moderators
Re: AudioMixer resets when loading the project
Hi Ats,
No idea what's going on.
K
Strange .. i just tried this to double-check and it works just fine for me.
Also weird .. i initially thought because you named your AudioMixer component "AudioMixer" that might have caused some problems, but it doesn't seem like AudioMixer is a reserved keyword so i'm not getting any errors even when i use that name.
No idea what's going on.
K
Re: AudioMixer resets when loading the project
I'll try to make a strip down example from my game. But apart from using SunVox library, I'm not doing much with the sound.
This time around, everything was kept when I opened the project. But the problem happened to me four times already in the past few days, that's why I noted it. I'll see if I can find what is breaking the thing.
I tried renaming the AudioMixer to something else already, but still got the AccessViolation Error...
Edit:
Ok, preview works, but F9 gives the AccessViolation error only with that:
Edit 2:
Here's the repro:
And I'm still searching why Ch2Active and Ch3Active are deactivating from time to time...
This time around, everything was kept when I opened the project. But the problem happened to me four times already in the past few days, that's why I noted it. I'll see if I can find what is breaking the thing.
I tried renaming the AudioMixer to something else already, but still got the AccessViolation Error...
Edit:
Ok, preview works, but F9 gives the AccessViolation error only with that:
Code: Select all
<?xml version="1.0" encoding="iso-8859-1" ?>
<ZApplication Name="App" Caption="ZGameEditor application" FileVersion="2">
<OnLoaded>
<ZExpression Expression="test.Ch2Active = 1;"/>
</OnLoaded>
<Content>
<AudioMixer Name="test" Ch0Active="1" Ch0Volume="0.5" Ch0DelayLength="0.1" Ch1Active="1" Ch1Volume="0.5" Ch1DelayLength="0.1" Ch2Active="1"/>
</Content>
</ZApplication>
Edit 2:
Here's the repro:
- Add an AudioMixer
- Deactivate Ch0Active (or change Ch0Volume)
- Save the project
- Reload the project
And I'm still searching why Ch2Active and Ch3Active are deactivating from time to time...
Re: AudioMixer resets when loading the project
AudioMixer is treated specially in the engine so there is a possibility something got wrong in the transition to 64-bit. I'll investigate.
Re: AudioMixer resets when loading the project
I'VE FOUND IT!!!
- Add an AudioMixer
- Activate Ch2Active
- Edit Project as XML
- Add a spacebar somewhere so that ZGE thinks the code has been changed and Validate
- AudioMixer is now factory reset
Re: AudioMixer resets when loading the project
So far it seems to be two separate problems:
- Channel 0 and 1 active and volume are set to default values by the designer. This seems to override settings in zgeproj files.
- Assigning audiomixer properties in expressions fails with player.bin that is built with Freepascal in 64-bit build.
I'll continue to check for a solution.
- Channel 0 and 1 active and volume are set to default values by the designer. This seems to override settings in zgeproj files.
- Assigning audiomixer properties in expressions fails with player.bin that is built with Freepascal in 64-bit build.
I'll continue to check for a solution.
Re: AudioMixer resets when loading the project
Oh yes! Sorry I saw that the other day, and everything was still broken, so I went for another thing and forgot about it. So, now:
- F9 bug is corrected
- Editing XML bug isn't corrected: AudioMixer keeps resetting to factory after editing the XML
- Saving/Loading project keeps resetting AudioMixer channels 0 and 1
Re: AudioMixer resets when loading the project
Hello VilleK, just a friendly reminder that those two bugs are still present in ZGE. I forgot about them and was wondering why the sound wasn't working properly all of a sudden...
RESULT: Ch0Active is reactivated
- Add an AudioMixer
- Deactivate Ch0Active (or change Ch0Volume)
- Save the project
- Reload the project
RESULT: Ch2Active is deactivated
- Add an AudioMixer
- Activate Ch2Active
- Edit Project as XML
- Add a spacebar somewhere so that ZGE thinks the code has been changed and Validate
- AudioMixer is now factory reset