Officially, interrupting the 1-hour of meditation or study results in no spells prepared...
Using a strict reading of the rules as they are written, that's exactly how long spell preparationpreparing all of the appropriate caster's spells takes, and stopping early means no prepared spells. Yes, the day after the massive battle that exhausted all his spells, even Count Slimeheart, Archmage of the Drooling Tower, if interrupted 1 min. before finishing his hour of study, will find himself with no spells prepared.
But, as per Preparing Wizard Spells, a wizard
[p]reparing some smaller portion of his daily capacity takes a proportionally smaller amount of time, but always at least 15 minutes, the minimum time required to achieve the proper mental state.
Thus, a wizard can choose beforehand after resting to prepare a fraction of his spells, yet it's up to the DM if the wizard who planned to spend an hour preparing but actually spent less time preparing has prepared some of his spells or none at all.
Likewise, as per Preparing Divine Spells, divine spell casters who prepare spells must meditate for at least 15 min. at their appointed or chosen time, but can also leave spell slots unfilled for filling later, taking 15 min. per quarter of spells.
(A clever wizard or divine caster of prepared spells may start preparing 25% of his spells in 15-min. bursts instead of 1-hour long stretches, or the DM can just assume every experienced caster does this. I'm going to go out on a limb and say that this isn't the default method of spell preparation because the default method of 1 hour and get 'em all makes bookkeeping easier and arguments fewer.)
However, a GM who makes such a house rule mid-campaign then attacks the party of sorcerers 16 min. into their preparation time is really just asking his players to leave.