For sound which has to travel through a medium you have a reference frame, the medium, relative to which you can measure the velocities of the observer, the source and the sound.
If an observer moves towards a source of sound and measures the speed of sound relative to the observer it will be greater than the speed of sound as measured relative to the medium.
There is no such reference frame for light and the speed of light is constant.
The best you can do in terms of measuring speeds is to measure the speed of the source relative to the observer.
Doppler effect for sound depends upon the relative motion of source and listener and it also depends upon that which one of these is in motion
The motion mentioned here is measured relative to the medium through which the sound is travelling.
So a moving source and a stationary observer means that the source is moving relative to the medium but the observer is not moving relative to the medium.
There is no such medium frame of reference for light.
If you know the Doppler factor for stationary emitter and moving receiver and vice versa, you can just imagine a stationary repeater in the middle that intercepts the signal and emits another signal at the same frequency that is detected by the real receiver. That shows that the Doppler shift factor between a general emitter and receiver is the product of the factors for the moving emitter, stationary receiver and the stationary emitter, moving receiver.
Here's a way to derive it directly. Suppose the source emits a pulse at time $0$ and position $\mathbf 0$, and another signal at time $δt_s$ and position $\mathbf v_s δt_s$, and the observer detects the pulses at times $t$ and $t+δt_o$ and positions $\mathbf x$ and $\mathbf x + \mathbf v_o δt_o$. Then you have
$$\begin{eqnarray} \lVert \mathbf x \rVert &=& vt \\ (\mathbf x + \mathbf v_o δt_o - \mathbf v_s δt_s)^2 &=& v^2 (t+δt_o-δt_s)^2 \end{eqnarray}$$
Substitute $t \to \lVert \mathbf x \rVert / v$ in the second equation, expand it, and discard terms that are second order in $δt_s$ and $δt_o$, to get
$$\mathbf x \cdot \mathbf v_o\,δt_o - \mathbf x \cdot \mathbf v_s\,δt_s = \lVert \mathbf x \rVert v (δt_o-δt_s)$$
Solve for $δt_s/δt_o = f_o/f_s$ to get
$$\frac{f_o}{f_s} = \frac{v - \mathbf v_o\cdot \mathbf{\hat x}}{v - \mathbf v_s\cdot \mathbf{\hat x}}$$
where $\mathbf{\hat x} = \mathbf x / \lVert \mathbf x \rVert$ is a unit vector pointing from the location of the source at the time of emission toward the location of the observer at the time of reception.
Incidentally, you can derive the special-relativistic Doppler shift for light in a similar way, getting $\displaystyle \frac{f_o}{f_s} = \frac{\mathbf v_o\cdot \mathbf x}{\mathbf v_s\cdot \mathbf x}$ where the $\mathbf v$s are four-velocities and $\mathbf x$ is a null four-vector.
Best Answer
Doppler effect is not valid only when the source velocity is greater than that of sound. In other situations, it is valid. When the source velocity approaches the speed of sound, the subsequent waves come closer and closer together and the wavelength approaches 0. At the speed of sound, this is what happens- the source gives off a wave which travels at the speed of sound and the source follows the wave as it is moving at the same speed. This means that the next wave that it gives off is along the first wave and subsequent waves all combine and get bunched up together, moving together. So instead of even rise and fall of air pressure, you get an abrupt dramatic increase then fall in air pressure, creating a shock wave, which is the sonic boom.
Resnick Halliday (Walker version) has a good diagram for this phenomenon, in the waves chapter. Try to get hold of a copy( actual or online).