The following line of code was calling the currentPlaybackTime method on my singleton MAMusicPlayer class twice:
float trackPosition = MAX(floor([[MAMusicPlayer sharedPlayer] currentPlaybackTime]),0.0f);
[scrubber setValue:trackPosition];
Through trial and error I managed to resolve the issue by adjusting the code to:
float trackPosition = floor([[MAMusicPlayer sharedPlayer] currentTrackPosition]);
[scrubber setValue:MAX(trackPosition,0.0f)];
However I still do not understand why the first example should call the method twice. Since this is probably fairly fundamental, I thought it best to ask for clarification.
MAX(a, b)is probably a macro defined as((a > b) ? a : b), so when terms are substituted foraandb, each term is evaluated twice.