Volume emission of pions in relativistic heavy-ion collisions