The engine computer monitors crankshaft rotation to determine misfires. Since it knows where the crankshaft is at all times, it can tell which cylinder is misfiring.
If you can't feel the misfire, suspect a fuel injector. If you can feel it, suspect ignition. To test, move a suspect component to another cylinder and see if the code indicates the misfire moved.
Of course, there could also be some sort of internal issue.
I suspect the air flow sensor has nothing to do with the misfire. I would expect it to affect all cylinders equally, resulting in a "random misfire/p0300" code). Beware, though, GM's tool (TECH2) will only report the P0300 code and will not report the trouble code for the individual cylinder.