Music fading different on the iPhone than the PC?
by Mike Mann · in iTorque 2D · 08/19/2009 (7:39 pm) · 0 replies
I'm just doing a standard implementation (although I've seen it called a hack on these boards) of a music fade, which works great on the PC/Mac. Unfortunately, on the iPhone, it does nothing. Code below:
Like I said...works great until I do a device build and then the volume just stays at the constantly highest level. Is there something special I need to do specifically for the iPhone/iPod Touch device builds?
Thanks!
%volume = alxgetchannelvolume(2);
if($fadingMusic && %volume > 0.3) //Moving the music volume down here.
{
%volume -= 0.1;
alxSetChannelVolume(2, %volume);
schedule(300,0,fadeMusic);
}
else if(!$fadingMusic && %volume< 1.0) //Moving the music volume up here.
{
%volume += 0.1;
alxSetChannelVolume(2, %volume);
schedule(300,0,fadeMusic);
}Like I said...works great until I do a device build and then the volume just stays at the constantly highest level. Is there something special I need to do specifically for the iPhone/iPod Touch device builds?
Thanks!
About the author