THX, I have the ultra-mirage resmed mask, and if yours is anything like mine, I can stop the whistling for you.
The Ultra-mirage mask is connected to an elbow-shaped plastic fitting by a swivel joint; and this swivel attachment is held in place with a small, omega-shaped clip (the smallest piece of the mask apparatus). It is this omega clip that can resonate like a tuning fork (whistling noises as air passes over it.)
The fix? Simple, looking down into the mask (with everything in place) just slide the clip around by pushing on the little "ears" at the open part of the clip. Just as if you were dialing an old-style telephone. 180 degrees of rotation should do it, but experiment.
Of course, the above only applies if there are commonalities between our two mask types. Good luck experimenting with your mask.