ENGINE MAKES WHISTLING NOISE

Subaru Other

My engine, on my 2.2L subaru impreza 5 speed, is making a whistling noise when I drive. I took it to my mechanic and he said it was air coming in through the firewall or the engine sucking air in through the intake but that does not make sense to me. When I drive I can drive from 0-redline (6000ish) at about half throttle and the car will not make the noise no matter what gear I am in. So speed does not seem to have anything to do with it. But when I floor the gas so the throttle is wide open the noise starts at about 3400rpm it gets louder all the way up to 5300rpm, at that point it changes pitch to a much higher pitch sound all the way to red line. Also if I am on the highway or just cruising down the road and the engine is higher than 3400rpm it will make the noise every time I ”floor” the gas. Even if it is just for a split second it will still make a short churp of a whistle. I usually don’t get replies when I post in the Subaru forum (maybe too small) but if someone has any information I would greatly appreciate it.
Thank you very much