Microsoft DirectX 9.0 SDK Update (October 2004) |
The CreateAudioPath method creates an audiopath from a configuration object.
Syntax
HRESULT CreateAudioPath(
IUnknown *pSourceConfig,
BOOL fActivate,
IDirectMusicAudioPath **ppNewPath
);
Parameters
pSourceConfig
Address of an interface that represents the audiopath configuration. See Remarks.
fActivate
Boolean value that specifies whether to activate the path on creation.
ppNewPath
Address of a variable that receives an IDirectMusicAudioPath8 interface pointer for the audiopath.
Return Values
If the method succeeds, the return value is S_OK.
If it fails, the method can return one of the error values shown in the following table.
Return code |
DMUS_E_AUDIOPATHS_NOT_VALID |
DMUS_E_NOT_INIT |
DSERR_BUFFERLOST |
E_NOINTERFACE |
E_OUTOFMEMORY |
E_POINTER |
Remarks
The object addressed by pSourceConfig can be obtained from a segment by using the IDirectMusicSegment8::GetAudioPathConfig method or can be loaded directly from a file.
The method fails with DSERR_BUFFERLOST if any application has initialized DirectSound with the write-primary cooperative level.
If the audiopath configuration specifies a sound device that is not available, the method returns E_NOINTERFACE.
Requirements
Header: Dmusici.h
Library: Dmime.dll, Dmimed.dll
See Also