Microsoft DirectX 8.0 (Visual Basic) |
Creates a secondary buffer to mix audio samples into the primary buffer, and loads data from a file into the buffer.
object.CreateSoundBufferFromFile( _ filename As String, _ bufferDesc As DSBUFFERDESC _ ) As DirectSoundSecondaryBuffer8
Returns a DirectSoundSecondaryBuffer8 object.
If the method fails, an error is raised and Err.Number may be one of the following error values.
DSERR_ALLOCATED |
DSERR_BADFORMAT |
DSERR_BUFFERTOOSMALL |
DSERR_CONTROLUNAVAIL |
DSERR_INVALIDCALL |
DSERR_OUTOFMEMORY |
DSERR_UNINITIALIZED |
DSERR_UNSUPPORTED |
If an attempt is made to create a buffer with the DSBCAPS_LOCHARDWARE flag on a system where hardware acceleration is not available, the method fails with DSERR_CONTROLUNAVAIL on Windows 95 and Windows 98. On Windows 2000, it returns DSERR_INVALIDCALL.
DirectSound8.CreateSoundBuffer, DirectSound8.CreateSoundBufferFromResource, DirectSound8.DuplicateSoundBuffer