Doubling the frequency of a sound fragment in real time?
After loads of research, I found a really good article about Short Time Fourier Transform (STFT), which can apply FT to a really small buffer, change it's frequency and apply IFT. There's even an implementation in C. You can find it here : http://blogs.zynaptiq.com/bernsee/pitch-shifting-using-the-ft/

As a "side effect", you also know the pitch of your signal in almost real time 

HTH