Smokeless powder is combustible, but requires containment for the progressive burning that makes it an effective propellant. It will detonate only under very specific and unlikely circumstances. In a fire, uncontained rounds will pop off their bullets with little force and burn out a little spurt. Black powder is a whole different animal, it burns rapidly at the same rate whether contained or not. It's possible to have black powder fixed ammunition. They would explode like firecrackers in a fire but the velocity of the freed bullet still would be much less than from a barrel.
Rounds in barrels in a fire will cook-off, where the pressure will build up due to the containment of the chamber and rifling retarding the bullet travel. The round will fire at full velocity. Fortunately, many powerful long guns are stored muzzle up in racks or safes, and pistol rounds are significantly less energetic.
I see.