ホーム › Media.KernelStreaming › KSDS3D_HRTF_PARAMS_MSG
KSDS3D_HRTF_PARAMS_MSG
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| Size | DWORD | 4 | +0 | +0 | この構造体のサイズをバイト単位で示す。 |
| Enabled | DWORD | 4 | +4 | +4 | HRTF処理が有効かどうかを示すフラグである。 |
| SwapChannels | BOOL | 4 | +8 | +8 | 左右チャンネルを入れ替えるかを示すブール値である。 |
| ZeroAzimuth | BOOL | 4 | +12 | +12 | 方位角をゼロに固定するかを示すブール値である。 |
| CrossFadeOutput | BOOL | 4 | +16 | +16 | 出力をクロスフェードするかを示すブール値である。 |
| FilterSize | DWORD | 4 | +20 | +20 | 適用するHRTFフィルタのサイズを示す。 |
各言語での定義
#include <windows.h>
// KSDS3D_HRTF_PARAMS_MSG (x64 24 / x86 24 バイト)
typedef struct KSDS3D_HRTF_PARAMS_MSG {
DWORD Size;
DWORD Enabled;
BOOL SwapChannels;
BOOL ZeroAzimuth;
BOOL CrossFadeOutput;
DWORD FilterSize;
} KSDS3D_HRTF_PARAMS_MSG;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct KSDS3D_HRTF_PARAMS_MSG
{
public uint Size;
public uint Enabled;
[MarshalAs(UnmanagedType.Bool)] public bool SwapChannels;
[MarshalAs(UnmanagedType.Bool)] public bool ZeroAzimuth;
[MarshalAs(UnmanagedType.Bool)] public bool CrossFadeOutput;
public uint FilterSize;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure KSDS3D_HRTF_PARAMS_MSG
Public Size As UInteger
Public Enabled As UInteger
<MarshalAs(UnmanagedType.Bool)> Public SwapChannels As Boolean
<MarshalAs(UnmanagedType.Bool)> Public ZeroAzimuth As Boolean
<MarshalAs(UnmanagedType.Bool)> Public CrossFadeOutput As Boolean
Public FilterSize As UInteger
End Structureimport ctypes
from ctypes import wintypes
class KSDS3D_HRTF_PARAMS_MSG(ctypes.Structure):
_fields_ = [
("Size", wintypes.DWORD),
("Enabled", wintypes.DWORD),
("SwapChannels", wintypes.BOOL),
("ZeroAzimuth", wintypes.BOOL),
("CrossFadeOutput", wintypes.BOOL),
("FilterSize", wintypes.DWORD),
]#[repr(C)]
pub struct KSDS3D_HRTF_PARAMS_MSG {
pub Size: u32,
pub Enabled: u32,
pub SwapChannels: i32,
pub ZeroAzimuth: i32,
pub CrossFadeOutput: i32,
pub FilterSize: u32,
}import "golang.org/x/sys/windows"
type KSDS3D_HRTF_PARAMS_MSG struct {
Size uint32
Enabled uint32
SwapChannels int32
ZeroAzimuth int32
CrossFadeOutput int32
FilterSize uint32
}type
KSDS3D_HRTF_PARAMS_MSG = record
Size: DWORD;
Enabled: DWORD;
SwapChannels: BOOL;
ZeroAzimuth: BOOL;
CrossFadeOutput: BOOL;
FilterSize: DWORD;
end;const KSDS3D_HRTF_PARAMS_MSG = extern struct {
Size: u32,
Enabled: u32,
SwapChannels: i32,
ZeroAzimuth: i32,
CrossFadeOutput: i32,
FilterSize: u32,
};type
KSDS3D_HRTF_PARAMS_MSG {.bycopy.} = object
Size: uint32
Enabled: uint32
SwapChannels: int32
ZeroAzimuth: int32
CrossFadeOutput: int32
FilterSize: uint32struct KSDS3D_HRTF_PARAMS_MSG
{
uint Size;
uint Enabled;
int SwapChannels;
int ZeroAzimuth;
int CrossFadeOutput;
uint FilterSize;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; KSDS3D_HRTF_PARAMS_MSG サイズ: 24 バイト(x64)
dim st, 6 ; 4byte整数×6(構造体サイズ 24 / 4 切り上げ)
; Size : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; Enabled : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; SwapChannels : BOOL (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; ZeroAzimuth : BOOL (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; CrossFadeOutput : BOOL (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; FilterSize : DWORD (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global KSDS3D_HRTF_PARAMS_MSG
#field int Size
#field int Enabled
#field bool SwapChannels
#field bool ZeroAzimuth
#field bool CrossFadeOutput
#field int FilterSize
#endstruct
stdim st, KSDS3D_HRTF_PARAMS_MSG ; NSTRUCT 変数を確保
st->Size = 100
mes "Size=" + st->Size