05 Nissan Altima 2.5S Whining noise when accelerating but only when I have the heat turned on. Once I turn it off it doesn't do it. Any answers to why it's doing this?
Just from your brief description, I'd have to say the blower motor for the HVAC system is going out. They tend to last a long time, but when they start to go out, the bushings which support them (which the shaft of the blower motor rides on) starts to wear and dry out. The first sign of it is when you accelerate, there's a specific whining noise. You could also hear it during braking. When it gets bad enough, you'll hear it all the time, then the motor will just seize up and quit working.
I don't know about your Altima, but newer vehicles have made it a lot easier to change these out. Looking at the one specific to your vehicle, if you were to purchase it with the housing and the fan wheel as a unit, it looks to be a pretty straight forward replacement item. If you bought just the motor, taking it apart from the housing and fan would be a little bit more difficult.
Does the noise appear to be coming from the engine compartment?
It might be that your A/C compressor is engaged (yes it often operates with heat on). Or its belt is loose. Have you tried turn on the A/C and compare?
Is the sound from within the passenger compartment?
Is it from the radio maybe? (Turn it off / on and compare to see)
Does the speed setting of the heater's fan matter?