Platform SDK: DirectX

IDirectSoundBuffer::Initialize

IDirectSoundBuffer::Initialize メソッドは、初期化されていない DirectSoundBuffer オブジェクトを初期化する。

HRESULT Initialize(
  LPDIRECTSOUND lpDirectSound,  
  LPCDSBUFFERDESC lpcDSBufferDesc  
);

パラメータ

lpDirectSound
DirectSoundBuffer オブジェクトに関連付けられた DirectSound オブジェクトのアドレス。
lpcDSBufferDesc
このサウンド バッファを初期化するために使われる値を保持する DSBUFFERDESC 構造体のアドレス。

戻り値

成功すれば DS_OK、失敗すれば次のエラー値のいずれかを返す。

DSERR_INVALIDPARAM
DSERR_ALREADYINITIALIZED

注意

IDirectSound::CreateSoundBuffer メソッドは内部で IDirectSoundBuffer::Initialize を呼び出すので、現在のリリースの DirectSound では Initialize を明示的に呼び出す必要はない。Initialize メソッドは将来の拡張性に備えて用意されている。

動作環境

  Windows NT/2000 : Service Pack 3 を適用した Windows NT バージョン 4.0 以降が必要。
  Windows 95/98 : Windows 95 以降が必要。Windows 95 用に再配布可能な形で使用可能。
  ヘッダー : dsound.h で宣言。
  インポート ライブラリ : dsound.lib を使用。

参照

DSBUFFERDESCIDirectSound::CreateSoundBufferIDirectSoundBuffer