ホーム › Media.Audio.XAudio2 › XAUDIO2FX_REVERB_I3DL2_PARAMETERS
XAUDIO2FX_REVERB_I3DL2_PARAMETERS
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| WetDryMix | FLOAT | 4 | +0 | +0 | 出力のうちリバーブが占める割合 (パーセント)。指定可能な値は 0 ~ 100 です。 |
| Room | INT | 4 | +4 | +4 | ルームエフェクトの減衰量。指定可能な値は 1/100 デシベル単位で -10000 ~ 0 です。 |
| RoomHF | INT | 4 | +8 | +8 | ルームの高周波エフェクトの減衰量。指定可能な値は 1/100 デシベル単位で -10000 ~ 0 です。 |
| RoomRolloffFactor | FLOAT | 4 | +12 | +12 | 反射音のロールオフ係数。指定可能な値は 0.0 ~ 10.0 です。組み込みのリバーブエフェクトでは、ロールオフ係数は無視されます。 |
| DecayTime | FLOAT | 4 | +16 | +16 | 低周波における残響の減衰時間。指定可能な値は秒単位で 0.1 ~ 20.0 です。 |
| DecayHFRatio | FLOAT | 4 | +20 | +20 | 低周波の減衰時間に対する高周波の減衰時間の比率。指定可能な値は 0.1 ~ 2.0 です。 |
| Reflections | INT | 4 | +24 | +24 | Room を基準とした初期反射音の減衰量。指定可能な値は 1/100 デシベル単位で -10000 ~ 1000 です。 |
| ReflectionsDelay | FLOAT | 4 | +28 | +28 | 直接音に対する最初の反射音の遅延時間。指定可能な値は秒単位で 0.0 ~ 0.3 です。 |
| Reverb | INT | 4 | +32 | +32 | Room を基準とした後期残響の減衰量。指定可能な値は 1/100 デシベル単位で -10000 ~ 2000 です。 |
| ReverbDelay | FLOAT | 4 | +36 | +36 | 最初の反射音の時点を基準とした、初期反射音と後期残響の間の時間の上限。指定可能な値は秒単位で 0.0 ~ 0.1 です。 |
| Diffusion | FLOAT | 4 | +40 | +40 | 後期残響の減衰におけるエコー密度。指定可能な値はパーセントで 0 ~ 100 です。 |
| Density | FLOAT | 4 | +44 | +44 | 後期残響の減衰におけるモード密度。指定可能な値はパーセントで 0 ~ 100 です。 |
| HFReference | FLOAT | 4 | +48 | +48 | 基準となる高周波数。指定可能な値は Hz 単位で 20.0 ~ 20000.0 です。 |
公式ドキュメント
ReverbConvertI3DL2ToNative 関数で使用する I3DL2 (Interactive 3D Audio Rendering Guidelines Level 2.0) のパラメーターを記述します。
解説(Remarks)
XAUDIO2FX_REVERB_I3DL2_PARAMETERS 構造体には、多数のプリセット値が定義されています。詳細については、XAUDIO2FX_I3DL2_PRESET を参照してください。
プラットフォーム要件
Windows 10 (XAudio2.9); Windows 8, Windows Phone 8 (XAudio 2.8); DirectX SDK (XAudio 2.7)出典・ライセンス: 上記「公式ドキュメント」の内容は Microsoft の Win32 API ドキュメント(MicrosoftDocs/sdk-api)を日本語に翻訳・改変したものです。© Microsoft Corporation. CC BY 4.0 で提供。
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
各言語での定義
#include <windows.h>
// XAUDIO2FX_REVERB_I3DL2_PARAMETERS (x64 52 / x86 52 バイト)
#pragma pack(push, 1)
typedef struct XAUDIO2FX_REVERB_I3DL2_PARAMETERS {
FLOAT WetDryMix;
INT Room;
INT RoomHF;
FLOAT RoomRolloffFactor;
FLOAT DecayTime;
FLOAT DecayHFRatio;
INT Reflections;
FLOAT ReflectionsDelay;
INT Reverb;
FLOAT ReverbDelay;
FLOAT Diffusion;
FLOAT Density;
FLOAT HFReference;
} XAUDIO2FX_REVERB_I3DL2_PARAMETERS;
#pragma pack(pop)using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, Pack = 1, CharSet = CharSet.Unicode)]
public struct XAUDIO2FX_REVERB_I3DL2_PARAMETERS
{
public float WetDryMix;
public int Room;
public int RoomHF;
public float RoomRolloffFactor;
public float DecayTime;
public float DecayHFRatio;
public int Reflections;
public float ReflectionsDelay;
public int Reverb;
public float ReverbDelay;
public float Diffusion;
public float Density;
public float HFReference;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, Pack:=1, CharSet:=CharSet.Unicode)>
Public Structure XAUDIO2FX_REVERB_I3DL2_PARAMETERS
Public WetDryMix As Single
Public Room As Integer
Public RoomHF As Integer
Public RoomRolloffFactor As Single
Public DecayTime As Single
Public DecayHFRatio As Single
Public Reflections As Integer
Public ReflectionsDelay As Single
Public Reverb As Integer
Public ReverbDelay As Single
Public Diffusion As Single
Public Density As Single
Public HFReference As Single
End Structureimport ctypes
from ctypes import wintypes
class XAUDIO2FX_REVERB_I3DL2_PARAMETERS(ctypes.Structure):
_pack_ = 1
_fields_ = [
("WetDryMix", ctypes.c_float),
("Room", ctypes.c_int),
("RoomHF", ctypes.c_int),
("RoomRolloffFactor", ctypes.c_float),
("DecayTime", ctypes.c_float),
("DecayHFRatio", ctypes.c_float),
("Reflections", ctypes.c_int),
("ReflectionsDelay", ctypes.c_float),
("Reverb", ctypes.c_int),
("ReverbDelay", ctypes.c_float),
("Diffusion", ctypes.c_float),
("Density", ctypes.c_float),
("HFReference", ctypes.c_float),
]#[repr(C, packed(1))]
pub struct XAUDIO2FX_REVERB_I3DL2_PARAMETERS {
pub WetDryMix: f32,
pub Room: i32,
pub RoomHF: i32,
pub RoomRolloffFactor: f32,
pub DecayTime: f32,
pub DecayHFRatio: f32,
pub Reflections: i32,
pub ReflectionsDelay: f32,
pub Reverb: i32,
pub ReverbDelay: f32,
pub Diffusion: f32,
pub Density: f32,
pub HFReference: f32,
}import "golang.org/x/sys/windows"
type XAUDIO2FX_REVERB_I3DL2_PARAMETERS struct {
WetDryMix float32
Room int32
RoomHF int32
RoomRolloffFactor float32
DecayTime float32
DecayHFRatio float32
Reflections int32
ReflectionsDelay float32
Reverb int32
ReverbDelay float32
Diffusion float32
Density float32
HFReference float32
}type
XAUDIO2FX_REVERB_I3DL2_PARAMETERS = packed record
WetDryMix: Single;
Room: Integer;
RoomHF: Integer;
RoomRolloffFactor: Single;
DecayTime: Single;
DecayHFRatio: Single;
Reflections: Integer;
ReflectionsDelay: Single;
Reverb: Integer;
ReverbDelay: Single;
Diffusion: Single;
Density: Single;
HFReference: Single;
end;const XAUDIO2FX_REVERB_I3DL2_PARAMETERS = extern struct {
WetDryMix: f32,
Room: i32,
RoomHF: i32,
RoomRolloffFactor: f32,
DecayTime: f32,
DecayHFRatio: f32,
Reflections: i32,
ReflectionsDelay: f32,
Reverb: i32,
ReverbDelay: f32,
Diffusion: f32,
Density: f32,
HFReference: f32,
};type
XAUDIO2FX_REVERB_I3DL2_PARAMETERS {.packed.} = object
WetDryMix: float32
Room: int32
RoomHF: int32
RoomRolloffFactor: float32
DecayTime: float32
DecayHFRatio: float32
Reflections: int32
ReflectionsDelay: float32
Reverb: int32
ReverbDelay: float32
Diffusion: float32
Density: float32
HFReference: float32align(1)
struct XAUDIO2FX_REVERB_I3DL2_PARAMETERS
{
float WetDryMix;
int Room;
int RoomHF;
float RoomRolloffFactor;
float DecayTime;
float DecayHFRatio;
int Reflections;
float ReflectionsDelay;
int Reverb;
float ReverbDelay;
float Diffusion;
float Density;
float HFReference;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; XAUDIO2FX_REVERB_I3DL2_PARAMETERS サイズ: 52 バイト(x64)
dim st, 13 ; 4byte整数×13(構造体サイズ 52 / 4 切り上げ)
; WetDryMix : FLOAT (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; Room : INT (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; RoomHF : INT (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; RoomRolloffFactor : FLOAT (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; DecayTime : FLOAT (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; DecayHFRatio : FLOAT (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; Reflections : INT (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; ReflectionsDelay : FLOAT (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; Reverb : INT (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; ReverbDelay : FLOAT (+36, 4byte) st.9 = 値 / 値 = st.9 (lpoke/lpeek も可)
; Diffusion : FLOAT (+40, 4byte) st.10 = 値 / 値 = st.10 (lpoke/lpeek も可)
; Density : FLOAT (+44, 4byte) st.11 = 値 / 値 = st.11 (lpoke/lpeek も可)
; HFReference : FLOAT (+48, 4byte) st.12 = 値 / 値 = st.12 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global XAUDIO2FX_REVERB_I3DL2_PARAMETERS, pack=1
#field float WetDryMix
#field int Room
#field int RoomHF
#field float RoomRolloffFactor
#field float DecayTime
#field float DecayHFRatio
#field int Reflections
#field float ReflectionsDelay
#field int Reverb
#field float ReverbDelay
#field float Diffusion
#field float Density
#field float HFReference
#endstruct
stdim st, XAUDIO2FX_REVERB_I3DL2_PARAMETERS ; NSTRUCT 変数を確保
st->WetDryMix = 100
mes "WetDryMix=" + st->WetDryMix