HI
The following setup works fine on the mobile previewer and has worked intermittently in the past on iDevices (seems to randomly break every so often without being changed). I can't get it to work at all now on an iDevice.
I'm using the July 2012 SDK.
I've added my own custom sound mode to the SoundClassesAndModes package.
I've added 2 sound classes to the sound mode - "Music" and "SFX" - which existed already.
My music sound cues are set to use the "Music" Sound class.
My SFX sound cues are set to use the "SFX" Sound class.
The SoundClassesAndModes package is included as a startup package.
I have an audio options menu that has 2 sliders to control the desired voulme (scaled 0 to 1)
They control VolumeMusic & VolulmeSFX float vars in the range 0 to 1
sMode.GetPackageName() returns "soundclassesandmodes" for the Previewer
sMode.GetPackageName() returns "SoundClassesAndModes" on the iDevice (note caps)
Does that matter (I've tried various combinations)?
Is there something else I should be doing?
This seems to be incredibly problematic/erratic for what should be a very simple task.
Any ideas or suggestions would be greatly appreciated - it's driving me nuts.
Cheers
William
The following setup works fine on the mobile previewer and has worked intermittently in the past on iDevices (seems to randomly break every so often without being changed). I can't get it to work at all now on an iDevice.
I'm using the July 2012 SDK.
I've added my own custom sound mode to the SoundClassesAndModes package.
I've added 2 sound classes to the sound mode - "Music" and "SFX" - which existed already.
My music sound cues are set to use the "Music" Sound class.
My SFX sound cues are set to use the "SFX" Sound class.
The SoundClassesAndModes package is included as a startup package.
I have an audio options menu that has 2 sliders to control the desired voulme (scaled 0 to 1)
They control VolumeMusic & VolulmeSFX float vars in the range 0 to 1
Code:
/** Set the music and SFX volume levels */ /* function SetVolumeLevels() { local SoundMode sMode; // Nothing works without doing this first for some reason ???? class'Engine'.static.GetAudioDevice().SetSoundMode('Default'); sMode = SoundMode'SoundClassesAndModes.GUG_SoundMode'; class'Engine'.static.GetAudioDevice().SetSoundMode(sMode.Name); // Use the sound mode we actually want sMode.SoundClassEffects[0].VolumeAdjuster = VolumeMusic; // MUSIC sMode.SoundClassEffects[1].VolumeAdjuster = VolumeSFX; // SFX }
sMode.GetPackageName() returns "SoundClassesAndModes" on the iDevice (note caps)
Does that matter (I've tried various combinations)?
Is there something else I should be doing?
This seems to be incredibly problematic/erratic for what should be a very simple task.
Any ideas or suggestions would be greatly appreciated - it's driving me nuts.
Cheers
William
Comment