ISpatialAudioObjectForHrtf::SetEnvironment method (spatialaudiohrtf.h)
Sets the type of acoustic environment that is simulated when audio is processed for the ISpatialAudioObjectForHrtf.
HRESULT SetEnvironment( [in] SpatialAudioHrtfEnvironmentType environment );
A value specifying the type of acoustic environment that is simulated when audio is processed for the ISpatialAudioObjectForHrtf.
If the method succeeds, it returns S_OK. If it fails, possible return codes include, but are not limited to, the values shown in the following table.
ISpatialAudioObjectRenderStreamBase::BeginUpdatingAudioObjects was not called before the call to SetEnvironment.
SetEndOfStream was called either explicitly or implicitly in a previous audio processing pass. SetEndOfStream is called implicitly by the system if GetBuffer is not called within an audio processing pass (between calls to ISpatialAudioObjectRenderStreamBase::BeginUpdatingAudioObjects and ISpatialAudioObjectRenderStreamBase::EndUpdatingAudioObjects).
If SetEnvironment is not called, the default value of SpatialAudioHrtfEnvironment_Small is used.