ホーム › Media.Audio.XAudio2 › XAUDIO2FX_REVERB_PARAMETERS
XAUDIO2FX_REVERB_PARAMETERS
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| WetDryMix | FLOAT | 4 | +0 | +0 | 原音と残響音の混合比をパーセントで示す。 |
| ReflectionsDelay | DWORD | 4 | +4 | +4 | 初期反射音の遅延時間をミリ秒で示す。 |
| ReverbDelay | BYTE | 1 | +8 | +8 | 残響音の遅延時間をミリ秒で示す。 |
| RearDelay | BYTE | 1 | +9 | +9 | 後方チャンネルの遅延時間をミリ秒で示す。 |
| SideDelay | BYTE | 1 | +10 | +10 | 側方チャンネルの遅延時間をミリ秒で示す。 |
| PositionLeft | BYTE | 1 | +11 | +11 | 左チャンネルの音像位置を示す。 |
| PositionRight | BYTE | 1 | +12 | +12 | 右チャンネルの音像位置を示す。 |
| PositionMatrixLeft | BYTE | 1 | +13 | +13 | 左チャンネルのマトリックス音像位置を示す。 |
| PositionMatrixRight | BYTE | 1 | +14 | +14 | 右チャンネルのマトリックス音像位置を示す。 |
| EarlyDiffusion | BYTE | 1 | +15 | +15 | 初期反射音の拡散度を示す。 |
| LateDiffusion | BYTE | 1 | +16 | +16 | 後期残響音の拡散度を示す。 |
| LowEQGain | BYTE | 1 | +17 | +17 | 低域イコライザーのゲインを示す。 |
| LowEQCutoff | BYTE | 1 | +18 | +18 | 低域イコライザーのカットオフ周波数を示す。 |
| HighEQGain | BYTE | 1 | +19 | +19 | 高域イコライザーのゲインを示す。 |
| HighEQCutoff | BYTE | 1 | +20 | +20 | 高域イコライザーのカットオフ周波数を示す。 |
| RoomFilterFreq | FLOAT | 4 | +21 | +21 | ルームフィルターの基準周波数をHzで示す。 |
| RoomFilterMain | FLOAT | 4 | +25 | +25 | ルームフィルターの全帯域の減衰量をデシベルで示す。 |
| RoomFilterHF | FLOAT | 4 | +29 | +29 | ルームフィルターの高域減衰量をデシベルで示す。 |
| ReflectionsGain | FLOAT | 4 | +33 | +33 | 初期反射音のゲインをデシベルで示す。 |
| ReverbGain | FLOAT | 4 | +37 | +37 | 残響音のゲインをデシベルで示す。 |
| DecayTime | FLOAT | 4 | +41 | +41 | 残響の減衰時間を秒で示す。 |
| Density | FLOAT | 4 | +45 | +45 | 残響モードの密度をパーセントで示す。 |
| RoomSize | FLOAT | 4 | +49 | +49 | 仮想的な部屋の大きさを示す。 |
| DisableLateField | BOOL | 4 | +53 | +53 | 後期残響フィールドを無効化するかを示す真偽値。 |
各言語での定義
#include <windows.h>
// XAUDIO2FX_REVERB_PARAMETERS (x64 57 / x86 57 バイト)
#pragma pack(push, 1)
typedef struct XAUDIO2FX_REVERB_PARAMETERS {
FLOAT WetDryMix;
DWORD ReflectionsDelay;
BYTE ReverbDelay;
BYTE RearDelay;
BYTE SideDelay;
BYTE PositionLeft;
BYTE PositionRight;
BYTE PositionMatrixLeft;
BYTE PositionMatrixRight;
BYTE EarlyDiffusion;
BYTE LateDiffusion;
BYTE LowEQGain;
BYTE LowEQCutoff;
BYTE HighEQGain;
BYTE HighEQCutoff;
FLOAT RoomFilterFreq;
FLOAT RoomFilterMain;
FLOAT RoomFilterHF;
FLOAT ReflectionsGain;
FLOAT ReverbGain;
FLOAT DecayTime;
FLOAT Density;
FLOAT RoomSize;
BOOL DisableLateField;
} XAUDIO2FX_REVERB_PARAMETERS;
#pragma pack(pop)using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, Pack = 1, CharSet = CharSet.Unicode)]
public struct XAUDIO2FX_REVERB_PARAMETERS
{
public float WetDryMix;
public uint ReflectionsDelay;
public byte ReverbDelay;
public byte RearDelay;
public byte SideDelay;
public byte PositionLeft;
public byte PositionRight;
public byte PositionMatrixLeft;
public byte PositionMatrixRight;
public byte EarlyDiffusion;
public byte LateDiffusion;
public byte LowEQGain;
public byte LowEQCutoff;
public byte HighEQGain;
public byte HighEQCutoff;
public float RoomFilterFreq;
public float RoomFilterMain;
public float RoomFilterHF;
public float ReflectionsGain;
public float ReverbGain;
public float DecayTime;
public float Density;
public float RoomSize;
[MarshalAs(UnmanagedType.Bool)] public bool DisableLateField;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, Pack:=1, CharSet:=CharSet.Unicode)>
Public Structure XAUDIO2FX_REVERB_PARAMETERS
Public WetDryMix As Single
Public ReflectionsDelay As UInteger
Public ReverbDelay As Byte
Public RearDelay As Byte
Public SideDelay As Byte
Public PositionLeft As Byte
Public PositionRight As Byte
Public PositionMatrixLeft As Byte
Public PositionMatrixRight As Byte
Public EarlyDiffusion As Byte
Public LateDiffusion As Byte
Public LowEQGain As Byte
Public LowEQCutoff As Byte
Public HighEQGain As Byte
Public HighEQCutoff As Byte
Public RoomFilterFreq As Single
Public RoomFilterMain As Single
Public RoomFilterHF As Single
Public ReflectionsGain As Single
Public ReverbGain As Single
Public DecayTime As Single
Public Density As Single
Public RoomSize As Single
<MarshalAs(UnmanagedType.Bool)> Public DisableLateField As Boolean
End Structureimport ctypes
from ctypes import wintypes
class XAUDIO2FX_REVERB_PARAMETERS(ctypes.Structure):
_pack_ = 1
_fields_ = [
("WetDryMix", ctypes.c_float),
("ReflectionsDelay", wintypes.DWORD),
("ReverbDelay", ctypes.c_ubyte),
("RearDelay", ctypes.c_ubyte),
("SideDelay", ctypes.c_ubyte),
("PositionLeft", ctypes.c_ubyte),
("PositionRight", ctypes.c_ubyte),
("PositionMatrixLeft", ctypes.c_ubyte),
("PositionMatrixRight", ctypes.c_ubyte),
("EarlyDiffusion", ctypes.c_ubyte),
("LateDiffusion", ctypes.c_ubyte),
("LowEQGain", ctypes.c_ubyte),
("LowEQCutoff", ctypes.c_ubyte),
("HighEQGain", ctypes.c_ubyte),
("HighEQCutoff", ctypes.c_ubyte),
("RoomFilterFreq", ctypes.c_float),
("RoomFilterMain", ctypes.c_float),
("RoomFilterHF", ctypes.c_float),
("ReflectionsGain", ctypes.c_float),
("ReverbGain", ctypes.c_float),
("DecayTime", ctypes.c_float),
("Density", ctypes.c_float),
("RoomSize", ctypes.c_float),
("DisableLateField", wintypes.BOOL),
]#[repr(C, packed(1))]
pub struct XAUDIO2FX_REVERB_PARAMETERS {
pub WetDryMix: f32,
pub ReflectionsDelay: u32,
pub ReverbDelay: u8,
pub RearDelay: u8,
pub SideDelay: u8,
pub PositionLeft: u8,
pub PositionRight: u8,
pub PositionMatrixLeft: u8,
pub PositionMatrixRight: u8,
pub EarlyDiffusion: u8,
pub LateDiffusion: u8,
pub LowEQGain: u8,
pub LowEQCutoff: u8,
pub HighEQGain: u8,
pub HighEQCutoff: u8,
pub RoomFilterFreq: f32,
pub RoomFilterMain: f32,
pub RoomFilterHF: f32,
pub ReflectionsGain: f32,
pub ReverbGain: f32,
pub DecayTime: f32,
pub Density: f32,
pub RoomSize: f32,
pub DisableLateField: i32,
}import "golang.org/x/sys/windows"
type XAUDIO2FX_REVERB_PARAMETERS struct {
WetDryMix float32
ReflectionsDelay uint32
ReverbDelay byte
RearDelay byte
SideDelay byte
PositionLeft byte
PositionRight byte
PositionMatrixLeft byte
PositionMatrixRight byte
EarlyDiffusion byte
LateDiffusion byte
LowEQGain byte
LowEQCutoff byte
HighEQGain byte
HighEQCutoff byte
RoomFilterFreq float32
RoomFilterMain float32
RoomFilterHF float32
ReflectionsGain float32
ReverbGain float32
DecayTime float32
Density float32
RoomSize float32
DisableLateField int32
}type
XAUDIO2FX_REVERB_PARAMETERS = packed record
WetDryMix: Single;
ReflectionsDelay: DWORD;
ReverbDelay: Byte;
RearDelay: Byte;
SideDelay: Byte;
PositionLeft: Byte;
PositionRight: Byte;
PositionMatrixLeft: Byte;
PositionMatrixRight: Byte;
EarlyDiffusion: Byte;
LateDiffusion: Byte;
LowEQGain: Byte;
LowEQCutoff: Byte;
HighEQGain: Byte;
HighEQCutoff: Byte;
RoomFilterFreq: Single;
RoomFilterMain: Single;
RoomFilterHF: Single;
ReflectionsGain: Single;
ReverbGain: Single;
DecayTime: Single;
Density: Single;
RoomSize: Single;
DisableLateField: BOOL;
end;const XAUDIO2FX_REVERB_PARAMETERS = extern struct {
WetDryMix: f32,
ReflectionsDelay: u32,
ReverbDelay: u8,
RearDelay: u8,
SideDelay: u8,
PositionLeft: u8,
PositionRight: u8,
PositionMatrixLeft: u8,
PositionMatrixRight: u8,
EarlyDiffusion: u8,
LateDiffusion: u8,
LowEQGain: u8,
LowEQCutoff: u8,
HighEQGain: u8,
HighEQCutoff: u8,
RoomFilterFreq: f32,
RoomFilterMain: f32,
RoomFilterHF: f32,
ReflectionsGain: f32,
ReverbGain: f32,
DecayTime: f32,
Density: f32,
RoomSize: f32,
DisableLateField: i32,
};type
XAUDIO2FX_REVERB_PARAMETERS {.packed.} = object
WetDryMix: float32
ReflectionsDelay: uint32
ReverbDelay: uint8
RearDelay: uint8
SideDelay: uint8
PositionLeft: uint8
PositionRight: uint8
PositionMatrixLeft: uint8
PositionMatrixRight: uint8
EarlyDiffusion: uint8
LateDiffusion: uint8
LowEQGain: uint8
LowEQCutoff: uint8
HighEQGain: uint8
HighEQCutoff: uint8
RoomFilterFreq: float32
RoomFilterMain: float32
RoomFilterHF: float32
ReflectionsGain: float32
ReverbGain: float32
DecayTime: float32
Density: float32
RoomSize: float32
DisableLateField: int32align(1)
struct XAUDIO2FX_REVERB_PARAMETERS
{
float WetDryMix;
uint ReflectionsDelay;
ubyte ReverbDelay;
ubyte RearDelay;
ubyte SideDelay;
ubyte PositionLeft;
ubyte PositionRight;
ubyte PositionMatrixLeft;
ubyte PositionMatrixRight;
ubyte EarlyDiffusion;
ubyte LateDiffusion;
ubyte LowEQGain;
ubyte LowEQCutoff;
ubyte HighEQGain;
ubyte HighEQCutoff;
float RoomFilterFreq;
float RoomFilterMain;
float RoomFilterHF;
float ReflectionsGain;
float ReverbGain;
float DecayTime;
float Density;
float RoomSize;
int DisableLateField;
}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_PARAMETERS サイズ: 57 バイト(x64)
dim st, 15 ; 4byte整数×15(構造体サイズ 57 / 4 切り上げ)
; WetDryMix : FLOAT (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; ReflectionsDelay : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; ReverbDelay : BYTE (+8, 1byte) poke st,8,値 / 値 = peek(st,8)
; RearDelay : BYTE (+9, 1byte) poke st,9,値 / 値 = peek(st,9)
; SideDelay : BYTE (+10, 1byte) poke st,10,値 / 値 = peek(st,10)
; PositionLeft : BYTE (+11, 1byte) poke st,11,値 / 値 = peek(st,11)
; PositionRight : BYTE (+12, 1byte) poke st,12,値 / 値 = peek(st,12)
; PositionMatrixLeft : BYTE (+13, 1byte) poke st,13,値 / 値 = peek(st,13)
; PositionMatrixRight : BYTE (+14, 1byte) poke st,14,値 / 値 = peek(st,14)
; EarlyDiffusion : BYTE (+15, 1byte) poke st,15,値 / 値 = peek(st,15)
; LateDiffusion : BYTE (+16, 1byte) poke st,16,値 / 値 = peek(st,16)
; LowEQGain : BYTE (+17, 1byte) poke st,17,値 / 値 = peek(st,17)
; LowEQCutoff : BYTE (+18, 1byte) poke st,18,値 / 値 = peek(st,18)
; HighEQGain : BYTE (+19, 1byte) poke st,19,値 / 値 = peek(st,19)
; HighEQCutoff : BYTE (+20, 1byte) poke st,20,値 / 値 = peek(st,20)
; RoomFilterFreq : FLOAT (+21, 4byte) lpoke st,21,値 / 値 = lpeek(st,21)
; RoomFilterMain : FLOAT (+25, 4byte) lpoke st,25,値 / 値 = lpeek(st,25)
; RoomFilterHF : FLOAT (+29, 4byte) lpoke st,29,値 / 値 = lpeek(st,29)
; ReflectionsGain : FLOAT (+33, 4byte) lpoke st,33,値 / 値 = lpeek(st,33)
; ReverbGain : FLOAT (+37, 4byte) lpoke st,37,値 / 値 = lpeek(st,37)
; DecayTime : FLOAT (+41, 4byte) lpoke st,41,値 / 値 = lpeek(st,41)
; Density : FLOAT (+45, 4byte) lpoke st,45,値 / 値 = lpeek(st,45)
; RoomSize : FLOAT (+49, 4byte) lpoke st,49,値 / 値 = lpeek(st,49)
; DisableLateField : BOOL (+53, 4byte) lpoke st,53,値 / 値 = lpeek(st,53)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global XAUDIO2FX_REVERB_PARAMETERS, pack=1
#field float WetDryMix
#field int ReflectionsDelay
#field byte ReverbDelay
#field byte RearDelay
#field byte SideDelay
#field byte PositionLeft
#field byte PositionRight
#field byte PositionMatrixLeft
#field byte PositionMatrixRight
#field byte EarlyDiffusion
#field byte LateDiffusion
#field byte LowEQGain
#field byte LowEQCutoff
#field byte HighEQGain
#field byte HighEQCutoff
#field float RoomFilterFreq
#field float RoomFilterMain
#field float RoomFilterHF
#field float ReflectionsGain
#field float ReverbGain
#field float DecayTime
#field float Density
#field float RoomSize
#field bool DisableLateField
#endstruct
stdim st, XAUDIO2FX_REVERB_PARAMETERS ; NSTRUCT 変数を確保
st->WetDryMix = 100
mes "WetDryMix=" + st->WetDryMix