You need the DX SDK. This SDK contains many examples for DirectSound.

One important info: The DirectSound functions use DX7, not DX8. A sound buffer is a DIRECTSOUND3DBUFFER struct, not DIRECTSOUND3DBUFFER8.