My whistle is for cars first, because that's where I ride. But I don't mind letting a pedestrian know they are about to step out in front of me. This happened this morning. I was in the right lane, going about 25 mph. A bunch of school kids were horsing around on the sidewalk and one of them, laughing with his back turned to me, jumped out into the street in my path. But I saw it happening and blew my whistle. He zig-zagged right back onto the sidewalk, saving both of us a possible trip to the hospital. It was a close call.
Also today (this afternoon), a truck started out of a sidestreet into my path, his view of me obstructed by tree branches. My whistle made him stop and look.
The point is, an adequate sound device is important. Imagine a car without a horn (I could dream about that one, for sure.) The problem is that most bicycle sound devices are toys, or are only loud enough to alert a nearby pedestrian. We really need something to put us on par with motor vehicles.
I may try that compressed air horn thingy sometime. But a whistle is fine for me.