If you want to double the sampling frequency from 22050Hz
to 44100Hz
(which is the double of 22050) you might do some linear interpolation:
vector<short> m_shorts;
vector<short> outputs;
unsigned inplen = m_shorts.length();
output.resize(2*inplen+1);
for (unsigned ix = 0; ix < inplen; ix++) { // not sure of the bounds
output[2*ix] = m_shorts[ix];
output[2*ix+1] = (m_shorts[ix] + m_shorts[ix+1])/2;
}
But I am not an audio or signal processing expert. There could be more clever ways... (perhaps a Fourier transform then an inverse Fourier).
And I am not sure that "would sounds better".