ホーム › Media.KernelStreaming › KSDS3D_ITD_PARAMS_MSG
KSDS3D_ITD_PARAMS_MSG
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| Enabled | DWORD | 4 | +0 | +0 | ITD処理が有効かどうかを示すフラグである。 |
| LeftParams | KSDS3D_ITD_PARAMS | 24 | +4 | +4 | 左チャンネルのITDパラメータを保持する。 |
| RightParams | KSDS3D_ITD_PARAMS | 24 | +28 | +28 | 右チャンネルのITDパラメータを保持する。 |
| Reserved | DWORD | 4 | +52 | +52 | 予約フィールドで、0を設定する。 |
各言語での定義
#include <windows.h>
// KSDS3D_ITD_PARAMS (x64 24 / x86 24 バイト)
typedef struct KSDS3D_ITD_PARAMS {
INT Channel;
FLOAT VolSmoothScale;
FLOAT TotalDryAttenuation;
FLOAT TotalWetAttenuation;
INT SmoothFrequency;
INT Delay;
} KSDS3D_ITD_PARAMS;
// KSDS3D_ITD_PARAMS_MSG (x64 56 / x86 56 バイト)
typedef struct KSDS3D_ITD_PARAMS_MSG {
DWORD Enabled;
KSDS3D_ITD_PARAMS LeftParams;
KSDS3D_ITD_PARAMS RightParams;
DWORD Reserved;
} KSDS3D_ITD_PARAMS_MSG;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct KSDS3D_ITD_PARAMS
{
public int Channel;
public float VolSmoothScale;
public float TotalDryAttenuation;
public float TotalWetAttenuation;
public int SmoothFrequency;
public int Delay;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct KSDS3D_ITD_PARAMS_MSG
{
public uint Enabled;
public KSDS3D_ITD_PARAMS LeftParams;
public KSDS3D_ITD_PARAMS RightParams;
public uint Reserved;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure KSDS3D_ITD_PARAMS
Public Channel As Integer
Public VolSmoothScale As Single
Public TotalDryAttenuation As Single
Public TotalWetAttenuation As Single
Public SmoothFrequency As Integer
Public Delay As Integer
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure KSDS3D_ITD_PARAMS_MSG
Public Enabled As UInteger
Public LeftParams As KSDS3D_ITD_PARAMS
Public RightParams As KSDS3D_ITD_PARAMS
Public Reserved As UInteger
End Structureimport ctypes
from ctypes import wintypes
class KSDS3D_ITD_PARAMS(ctypes.Structure):
_fields_ = [
("Channel", ctypes.c_int),
("VolSmoothScale", ctypes.c_float),
("TotalDryAttenuation", ctypes.c_float),
("TotalWetAttenuation", ctypes.c_float),
("SmoothFrequency", ctypes.c_int),
("Delay", ctypes.c_int),
]
class KSDS3D_ITD_PARAMS_MSG(ctypes.Structure):
_fields_ = [
("Enabled", wintypes.DWORD),
("LeftParams", KSDS3D_ITD_PARAMS),
("RightParams", KSDS3D_ITD_PARAMS),
("Reserved", wintypes.DWORD),
]#[repr(C)]
pub struct KSDS3D_ITD_PARAMS {
pub Channel: i32,
pub VolSmoothScale: f32,
pub TotalDryAttenuation: f32,
pub TotalWetAttenuation: f32,
pub SmoothFrequency: i32,
pub Delay: i32,
}
#[repr(C)]
pub struct KSDS3D_ITD_PARAMS_MSG {
pub Enabled: u32,
pub LeftParams: KSDS3D_ITD_PARAMS,
pub RightParams: KSDS3D_ITD_PARAMS,
pub Reserved: u32,
}import "golang.org/x/sys/windows"
type KSDS3D_ITD_PARAMS struct {
Channel int32
VolSmoothScale float32
TotalDryAttenuation float32
TotalWetAttenuation float32
SmoothFrequency int32
Delay int32
}
type KSDS3D_ITD_PARAMS_MSG struct {
Enabled uint32
LeftParams KSDS3D_ITD_PARAMS
RightParams KSDS3D_ITD_PARAMS
Reserved uint32
}type
KSDS3D_ITD_PARAMS = record
Channel: Integer;
VolSmoothScale: Single;
TotalDryAttenuation: Single;
TotalWetAttenuation: Single;
SmoothFrequency: Integer;
Delay: Integer;
end;
KSDS3D_ITD_PARAMS_MSG = record
Enabled: DWORD;
LeftParams: KSDS3D_ITD_PARAMS;
RightParams: KSDS3D_ITD_PARAMS;
Reserved: DWORD;
end;const KSDS3D_ITD_PARAMS = extern struct {
Channel: i32,
VolSmoothScale: f32,
TotalDryAttenuation: f32,
TotalWetAttenuation: f32,
SmoothFrequency: i32,
Delay: i32,
};
const KSDS3D_ITD_PARAMS_MSG = extern struct {
Enabled: u32,
LeftParams: KSDS3D_ITD_PARAMS,
RightParams: KSDS3D_ITD_PARAMS,
Reserved: u32,
};type
KSDS3D_ITD_PARAMS {.bycopy.} = object
Channel: int32
VolSmoothScale: float32
TotalDryAttenuation: float32
TotalWetAttenuation: float32
SmoothFrequency: int32
Delay: int32
KSDS3D_ITD_PARAMS_MSG {.bycopy.} = object
Enabled: uint32
LeftParams: KSDS3D_ITD_PARAMS
RightParams: KSDS3D_ITD_PARAMS
Reserved: uint32struct KSDS3D_ITD_PARAMS
{
int Channel;
float VolSmoothScale;
float TotalDryAttenuation;
float TotalWetAttenuation;
int SmoothFrequency;
int Delay;
}
struct KSDS3D_ITD_PARAMS_MSG
{
uint Enabled;
KSDS3D_ITD_PARAMS LeftParams;
KSDS3D_ITD_PARAMS RightParams;
uint Reserved;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; KSDS3D_ITD_PARAMS_MSG サイズ: 56 バイト(x64)
dim st, 14 ; 4byte整数×14(構造体サイズ 56 / 4 切り上げ)
; Enabled : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; LeftParams : KSDS3D_ITD_PARAMS (+4, 24byte) varptr(st)+4 を基点に操作(24byte:入れ子/配列)
; RightParams : KSDS3D_ITD_PARAMS (+28, 24byte) varptr(st)+28 を基点に操作(24byte:入れ子/配列)
; Reserved : DWORD (+52, 4byte) st.13 = 値 / 値 = st.13 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global KSDS3D_ITD_PARAMS
#field int Channel
#field float VolSmoothScale
#field float TotalDryAttenuation
#field float TotalWetAttenuation
#field int SmoothFrequency
#field int Delay
#endstruct
#defstruct global KSDS3D_ITD_PARAMS_MSG
#field int Enabled
#field KSDS3D_ITD_PARAMS LeftParams
#field KSDS3D_ITD_PARAMS RightParams
#field int Reserved
#endstruct
stdim st, KSDS3D_ITD_PARAMS_MSG ; NSTRUCT 変数を確保
st->Enabled = 100
mes "Enabled=" + st->Enabled