So what happens is called alternator whine. This happens when whatever is connected to the audio signal, could be anything, is improperly grounded and is grounding itself through the audio signal, hence you hear the alternator whine change as you accelerate. You said it only happens when you charge huh? This is a good sign in that it seems to only be because of whatever unit is charging your device is not grounded correctly or it is also possible that when some electronics are grounded dangerously, there is a small fuse on the ground that will blow, thus giving you a really sh*&&y ground, this the audio issue. So, first I would look at the ground on whatever device charges your phone, then, if your issue still persists and your confidant you have a good ground, take the thing apart and take a look at where it is internally grounded and test a second wire. Let me know of your progress!