IDirectSound3DListener::SetOrientation

HRESULT SetOrientation(D3DVALUE xFront,

D3DVALUE yFront, D3DVALUE zFront,

D3DVALUE xTop, D3DVALUE yTop,

D3DVALUE zTop, DWORD dwApply);

Sets the listener's current orientation in terms of two vectors: a front vector and a top vector.

·Returns DS_OK if successful, or DSERR_INVALIDPARAM otherwise.

xFront, yFront, and zFront

Values whose types are D3DVALUE and that represent the coordinates of the front orientation vector.

xTop, yTop, and zTop

Values whose types are D3DVALUE and that represent the coordinates of the top orientation vector.

dwApply

Value indicating when the setting should be applied. This value must be one of the following:

DS3D_DEFERRED Settings are not applied until the application calls the IDirectSound3DListener::CommitDeferredSettings method. This allows the application to change several settings and generate a single recalculation.

DS3D_IMMEDIATE Settings are applied immediately, causing the system to recalculate the 3D coordinates for all 3D sound buffers.

The front vector points in the direction of the listener's nose, and the top vector points out the top of the listener's head. By default, the front vector is (0,0,1.0) and the top vector is (0,1.0,0).