ホーム › 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 | 原音と残響音の混合比をパーセントで示す。 |
| Room | INT | 4 | +4 | +4 | 全周波数の残響音レベルをミリベルで示す。 |
| RoomHF | INT | 4 | +8 | +8 | 高域の残響音レベルをミリベルで示す。 |
| RoomRolloffFactor | FLOAT | 4 | +12 | +12 | 距離による残響音の減衰係数を示す。 |
| DecayTime | FLOAT | 4 | +16 | +16 | 残響の減衰時間を秒で示す。 |
| DecayHFRatio | FLOAT | 4 | +20 | +20 | 高域減衰時間と全域減衰時間の比を示す。 |
| Reflections | INT | 4 | +24 | +24 | 初期反射音のレベルをミリベルで示す。 |
| ReflectionsDelay | FLOAT | 4 | +28 | +28 | 初期反射音の遅延時間を秒で示す。 |
| Reverb | INT | 4 | +32 | +32 | 後期残響音のレベルをミリベルで示す。 |
| ReverbDelay | FLOAT | 4 | +36 | +36 | 後期残響音の遅延時間を秒で示す。 |
| Diffusion | FLOAT | 4 | +40 | +40 | 残響の拡散度をパーセントで示す。 |
| Density | FLOAT | 4 | +44 | +44 | 残響の密度をパーセントで示す。 |
| HFReference | FLOAT | 4 | +48 | +48 | 高域処理の基準周波数をHzで示す。 |
各言語での定義
#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