Platform SDK: DirectX |
The DirectSound.CreateSoundBufferFromResource method creates a DirectSoundBuffer object to hold a sequence of audio samples, and loads the data from the resource into the buffer. The sound resource must be of type WAV or WAVE.
object.CreateSoundBufferFromResource( _ dll As String, _ resourceName As String, _ bufferDesc As DSBUFFERDESC, _ format As WAVEFORMATEX) As DirectSoundBuffer
If the method succeeds, a DirectSoundBuffer is returned.
If the method fails, an error is raised and Err.Number may be one of the following error values.
DSERR_ALLOCATED |
DSERR_BADFORMAT |
DSERR_OUTOFMEMORY |
DSERR_UNINITIALIZED |
DSERR_UNSUPPORTED |
DirectSound.CreateSoundBuffer, DirectSound.CreateSoundBufferFromFile, DirectSound.DuplicateSoundBuffer