ホーム › Media.KernelStreaming › KSDS3D_HRTF_INIT_MSG
KSDS3D_HRTF_INIT_MSG
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| Size | DWORD | 4 | +0 | +0 | この構造体のサイズをバイト単位で示す。 |
| Quality | KSDS3D_HRTF_FILTER_QUALITY | 4 | +4 | +4 | HRTFフィルタの品質レベルを示す列挙値である。 |
| SampleRate | FLOAT | 4 | +8 | +8 | 処理対象のサンプリングレートをHz単位で表す。 |
| MaxFilterSize | DWORD | 4 | +12 | +12 | 使用するフィルタの最大サイズを示す。 |
| FilterTransientMuteLength | DWORD | 4 | +16 | +16 | フィルタ遷移時にミュートするサンプル長を示す。 |
| FilterOverlapBufferLength | DWORD | 4 | +20 | +20 | フィルタ重畳バッファの長さを示す。 |
| OutputOverlapBufferLength | DWORD | 4 | +24 | +24 | 出力重畳バッファの長さを示す。 |
| Reserved | DWORD | 4 | +28 | +28 | 予約フィールドで、0を設定する。 |
各言語での定義
#include <windows.h>
// KSDS3D_HRTF_INIT_MSG (x64 32 / x86 32 バイト)
typedef struct KSDS3D_HRTF_INIT_MSG {
DWORD Size;
KSDS3D_HRTF_FILTER_QUALITY Quality;
FLOAT SampleRate;
DWORD MaxFilterSize;
DWORD FilterTransientMuteLength;
DWORD FilterOverlapBufferLength;
DWORD OutputOverlapBufferLength;
DWORD Reserved;
} KSDS3D_HRTF_INIT_MSG;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct KSDS3D_HRTF_INIT_MSG
{
public uint Size;
public int Quality;
public float SampleRate;
public uint MaxFilterSize;
public uint FilterTransientMuteLength;
public uint FilterOverlapBufferLength;
public uint OutputOverlapBufferLength;
public uint Reserved;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure KSDS3D_HRTF_INIT_MSG
Public Size As UInteger
Public Quality As Integer
Public SampleRate As Single
Public MaxFilterSize As UInteger
Public FilterTransientMuteLength As UInteger
Public FilterOverlapBufferLength As UInteger
Public OutputOverlapBufferLength As UInteger
Public Reserved As UInteger
End Structureimport ctypes
from ctypes import wintypes
class KSDS3D_HRTF_INIT_MSG(ctypes.Structure):
_fields_ = [
("Size", wintypes.DWORD),
("Quality", ctypes.c_int),
("SampleRate", ctypes.c_float),
("MaxFilterSize", wintypes.DWORD),
("FilterTransientMuteLength", wintypes.DWORD),
("FilterOverlapBufferLength", wintypes.DWORD),
("OutputOverlapBufferLength", wintypes.DWORD),
("Reserved", wintypes.DWORD),
]#[repr(C)]
pub struct KSDS3D_HRTF_INIT_MSG {
pub Size: u32,
pub Quality: i32,
pub SampleRate: f32,
pub MaxFilterSize: u32,
pub FilterTransientMuteLength: u32,
pub FilterOverlapBufferLength: u32,
pub OutputOverlapBufferLength: u32,
pub Reserved: u32,
}import "golang.org/x/sys/windows"
type KSDS3D_HRTF_INIT_MSG struct {
Size uint32
Quality int32
SampleRate float32
MaxFilterSize uint32
FilterTransientMuteLength uint32
FilterOverlapBufferLength uint32
OutputOverlapBufferLength uint32
Reserved uint32
}type
KSDS3D_HRTF_INIT_MSG = record
Size: DWORD;
Quality: Integer;
SampleRate: Single;
MaxFilterSize: DWORD;
FilterTransientMuteLength: DWORD;
FilterOverlapBufferLength: DWORD;
OutputOverlapBufferLength: DWORD;
Reserved: DWORD;
end;const KSDS3D_HRTF_INIT_MSG = extern struct {
Size: u32,
Quality: i32,
SampleRate: f32,
MaxFilterSize: u32,
FilterTransientMuteLength: u32,
FilterOverlapBufferLength: u32,
OutputOverlapBufferLength: u32,
Reserved: u32,
};type
KSDS3D_HRTF_INIT_MSG {.bycopy.} = object
Size: uint32
Quality: int32
SampleRate: float32
MaxFilterSize: uint32
FilterTransientMuteLength: uint32
FilterOverlapBufferLength: uint32
OutputOverlapBufferLength: uint32
Reserved: uint32struct KSDS3D_HRTF_INIT_MSG
{
uint Size;
int Quality;
float SampleRate;
uint MaxFilterSize;
uint FilterTransientMuteLength;
uint FilterOverlapBufferLength;
uint OutputOverlapBufferLength;
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_HRTF_INIT_MSG サイズ: 32 バイト(x64)
dim st, 8 ; 4byte整数×8(構造体サイズ 32 / 4 切り上げ)
; Size : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; Quality : KSDS3D_HRTF_FILTER_QUALITY (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; SampleRate : FLOAT (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; MaxFilterSize : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; FilterTransientMuteLength : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; FilterOverlapBufferLength : DWORD (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; OutputOverlapBufferLength : DWORD (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; Reserved : DWORD (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global KSDS3D_HRTF_INIT_MSG
#field int Size
#field int Quality
#field float SampleRate
#field int MaxFilterSize
#field int FilterTransientMuteLength
#field int FilterOverlapBufferLength
#field int OutputOverlapBufferLength
#field int Reserved
#endstruct
stdim st, KSDS3D_HRTF_INIT_MSG ; NSTRUCT 変数を確保
st->Size = 100
mes "Size=" + st->Size