One of the tricky things about building products is defining the details. When you say “mute switch” as you’d see on a phone like the iPhone, what exactly do you mean my “mute”? App sounds? Calls? What about an alarm? Muting an alarm sounds reasonable, but perhaps the reason for using the switch is so you can sleep until your phone wakes you up in the AM (I suspect that’s actually a very common use case).
John Gruber has a pretty good insight on the iPhones mute switch design, which doesn’t cover alarms as one New York Philharmonic audience member learned the other night. I agree that it’s an edge case, however think an alert the first time you switch it (and then never again) would be a reasonably good UX. Doing so every time as he explains wouldn’t be workable since you often do use the switch without taking your phone out of your pocket. I know I do it all the time.
In “the old days”, you’d just make that a 3 way selector: mute all sounds, mute all but alarm, all sounds on. 5% of users would figure out how it works.