ホーム › Media.Audio.DirectSound › DSFXWavesReverb
DSFXWavesReverb
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| fInGain | FLOAT | 4 | +0 | +0 | 入力ゲイン(-96〜0dB)。 |
| fReverbMix | FLOAT | 4 | +4 | +4 | リバーブ成分の混合量(-96〜0dB)。 |
| fReverbTime | FLOAT | 4 | +8 | +8 | 残響時間(0.001〜3000ミリ秒)。 |
| fHighFreqRTRatio | FLOAT | 4 | +12 | +12 | 高周波数帯の残響時間比率(0.001〜0.999)。 |
各言語での定義
#include <windows.h>
// DSFXWavesReverb (x64 16 / x86 16 バイト)
typedef struct DSFXWavesReverb {
FLOAT fInGain;
FLOAT fReverbMix;
FLOAT fReverbTime;
FLOAT fHighFreqRTRatio;
} DSFXWavesReverb;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DSFXWavesReverb
{
public float fInGain;
public float fReverbMix;
public float fReverbTime;
public float fHighFreqRTRatio;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DSFXWavesReverb
Public fInGain As Single
Public fReverbMix As Single
Public fReverbTime As Single
Public fHighFreqRTRatio As Single
End Structureimport ctypes
from ctypes import wintypes
class DSFXWavesReverb(ctypes.Structure):
_fields_ = [
("fInGain", ctypes.c_float),
("fReverbMix", ctypes.c_float),
("fReverbTime", ctypes.c_float),
("fHighFreqRTRatio", ctypes.c_float),
]#[repr(C)]
pub struct DSFXWavesReverb {
pub fInGain: f32,
pub fReverbMix: f32,
pub fReverbTime: f32,
pub fHighFreqRTRatio: f32,
}import "golang.org/x/sys/windows"
type DSFXWavesReverb struct {
fInGain float32
fReverbMix float32
fReverbTime float32
fHighFreqRTRatio float32
}type
DSFXWavesReverb = record
fInGain: Single;
fReverbMix: Single;
fReverbTime: Single;
fHighFreqRTRatio: Single;
end;const DSFXWavesReverb = extern struct {
fInGain: f32,
fReverbMix: f32,
fReverbTime: f32,
fHighFreqRTRatio: f32,
};type
DSFXWavesReverb {.bycopy.} = object
fInGain: float32
fReverbMix: float32
fReverbTime: float32
fHighFreqRTRatio: float32struct DSFXWavesReverb
{
float fInGain;
float fReverbMix;
float fReverbTime;
float fHighFreqRTRatio;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; DSFXWavesReverb サイズ: 16 バイト(x64)
dim st, 4 ; 4byte整数×4(構造体サイズ 16 / 4 切り上げ)
; fInGain : FLOAT (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; fReverbMix : FLOAT (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; fReverbTime : FLOAT (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; fHighFreqRTRatio : FLOAT (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global DSFXWavesReverb
#field float fInGain
#field float fReverbMix
#field float fReverbTime
#field float fHighFreqRTRatio
#endstruct
stdim st, DSFXWavesReverb ; NSTRUCT 変数を確保
st->fInGain = 100
mes "fInGain=" + st->fInGain