HRESULT Init(PVOID pInterface, IID iid);
An application should call IAudioDirect::Init as soon as it creates the DirectSound audio source/destination object.
pInterface
[in] Pointer to the interface. The audio object will release this interface when it is finished with it, so the application may wish to AddRef the interface before passing it to Init. The audio object will create a direct sound buffer using the interface.
iid
[in] Interface ID. Use IID_IDirectSound for the audio destination, and IID_IDirectSoundCapture for the audio source.
Before the DirectSound Audio Destination object can play any sound buffers, the application must specify a cooperative level for a DirectSound object by using the IDirectSound::SetCooperativeLevel method.
· Returns NOERROR if successful, or one of these error values:
E_INVALIDARG