Share via


IDirectSoundFXI3DL2Reverb8::SetPreset Method

[The feature associated with this page, DirectSound, is a legacy feature. It has been superseded by WASAPI and Audio Graphs. Media Casting have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use Media Casting instead of DirectSound, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

The SetPreset method sets standard reverberation parameters of a buffer.

Syntax

HRESULT SetPreset(
         DWORD dwPreset
)

Parameters

  • dwPreset
    Value that specifies a preset. The following constants are defined. See Dsound.h for the default parameters associated with each preset.
    Value
    DSFX_I3DL2_ENVIRONMENT_PRESET_DEFAULT
    DSFX_I3DL2_ENVIRONMENT_PRESET_GENERIC
    DSFX_I3DL2_ENVIRONMENT_PRESET_PADDEDCELL
    DSFX_I3DL2_ENVIRONMENT_PRESET_ROOM
    DSFX_I3DL2_ENVIRONMENT_PRESET_BATHROOM
    DSFX_I3DL2_ENVIRONMENT_PRESET_LIVINGROOM
    DSFX_I3DL2_ENVIRONMENT_PRESET_STONEROOM
    DSFX_I3DL2_ENVIRONMENT_PRESET_AUDITORIUM
    DSFX_I3DL2_ENVIRONMENT_PRESET_CONCERTHALL
    DSFX_I3DL2_ENVIRONMENT_PRESET_CAVE
    DSFX_I3DL2_ENVIRONMENT_PRESET_ARENA
    DSFX_I3DL2_ENVIRONMENT_PRESET_HANGAR
    DSFX_I3DL2_ENVIRONMENT_PRESET_CARPETEDHALLWAY
    DSFX_I3DL2_ENVIRONMENT_PRESET_HALLWAY
    DSFX_I3DL2_ENVIRONMENT_PRESET_STONECORRIDOR
    DSFX_I3DL2_ENVIRONMENT_PRESET_ALLEY
    DSFX_I3DL2_ENVIRONMENT_PRESET_FOREST
    DSFX_I3DL2_ENVIRONMENT_PRESET_CITY
    DSFX_I3DL2_ENVIRONMENT_PRESET_MOUNTAINS
    DSFX_I3DL2_ENVIRONMENT_PRESET_QUARRY
    DSFX_I3DL2_ENVIRONMENT_PRESET_PLAIN
    DSFX_I3DL2_ENVIRONMENT_PRESET_PARKINGLOT
    DSFX_I3DL2_ENVIRONMENT_PRESET_SEWERPIPE
    DSFX_I3DL2_ENVIRONMENT_PRESET_UNDERWATER
    DSFX_I3DL2_ENVIRONMENT_PRESET_SMALLROOM
    DSFX_I3DL2_ENVIRONMENT_PRESET_MEDIUMROOM
    DSFX_I3DL2_ENVIRONMENT_PRESET_LARGEROOM
    DSFX_I3DL2_ENVIRONMENT_PRESET_MEDIUMHALL
    DSFX_I3DL2_ENVIRONMENT_PRESET_LARGEHALL
    DSFX_I3DL2_ENVIRONMENT_PRESET_PLATE

Return Value

If the method succeeds, the return value is DS_OK. If the method fails, the return value may be DSERR_INVALIDPARAM.

Requirements

Header: Declared in DSound.h.

Library: Use Dsdmo.dll.

See Also

IDirectSoundFXI3DL2Reverb8