Win32 API 日本語リファレンス
ホームMedia.KernelStreaming › KSDS3D_HRTF_FILTER_FORMAT_MSG

KSDS3D_HRTF_FILTER_FORMAT_MSG

構造体
サイズx64: 16 バイト / x86: 16 バイト

サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。

フィールド

フィールドサイズx64x86説明
FilterMethodKSDS3D_HRTF_FILTER_METHOD4+0+0使用するHRTFフィルタ計算手法を示す列挙値である。
CoeffFormatKSDS3D_HRTF_COEFF_FORMAT4+4+4フィルタ係数のフォーマットを示す列挙値である。
VersionKSDS3D_HRTF_FILTER_VERSION4+8+8HRTFフィルタのバージョンを示す列挙値である。
ReservedDWORD4+12+12予約フィールドで、0を設定する。

各言語での定義

#include <windows.h>

// KSDS3D_HRTF_FILTER_FORMAT_MSG  (x64 16 / x86 16 バイト)
typedef struct KSDS3D_HRTF_FILTER_FORMAT_MSG {
    KSDS3D_HRTF_FILTER_METHOD FilterMethod;
    KSDS3D_HRTF_COEFF_FORMAT CoeffFormat;
    KSDS3D_HRTF_FILTER_VERSION Version;
    DWORD Reserved;
} KSDS3D_HRTF_FILTER_FORMAT_MSG;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct KSDS3D_HRTF_FILTER_FORMAT_MSG
{
    public int FilterMethod;
    public int CoeffFormat;
    public int Version;
    public uint Reserved;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure KSDS3D_HRTF_FILTER_FORMAT_MSG
    Public FilterMethod As Integer
    Public CoeffFormat As Integer
    Public Version As Integer
    Public Reserved As UInteger
End Structure
import ctypes
from ctypes import wintypes

class KSDS3D_HRTF_FILTER_FORMAT_MSG(ctypes.Structure):
    _fields_ = [
        ("FilterMethod", ctypes.c_int),
        ("CoeffFormat", ctypes.c_int),
        ("Version", ctypes.c_int),
        ("Reserved", wintypes.DWORD),
    ]
#[repr(C)]
pub struct KSDS3D_HRTF_FILTER_FORMAT_MSG {
    pub FilterMethod: i32,
    pub CoeffFormat: i32,
    pub Version: i32,
    pub Reserved: u32,
}
import "golang.org/x/sys/windows"

type KSDS3D_HRTF_FILTER_FORMAT_MSG struct {
	FilterMethod int32
	CoeffFormat int32
	Version int32
	Reserved uint32
}
type
  KSDS3D_HRTF_FILTER_FORMAT_MSG = record
    FilterMethod: Integer;
    CoeffFormat: Integer;
    Version: Integer;
    Reserved: DWORD;
  end;
const KSDS3D_HRTF_FILTER_FORMAT_MSG = extern struct {
    FilterMethod: i32,
    CoeffFormat: i32,
    Version: i32,
    Reserved: u32,
};
type
  KSDS3D_HRTF_FILTER_FORMAT_MSG {.bycopy.} = object
    FilterMethod: int32
    CoeffFormat: int32
    Version: int32
    Reserved: uint32
struct KSDS3D_HRTF_FILTER_FORMAT_MSG
{
    int FilterMethod;
    int CoeffFormat;
    int Version;
    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_FILTER_FORMAT_MSG サイズ: 16 バイト(x64)
dim st, 4    ; 4byte整数×4(構造体サイズ 16 / 4 切り上げ)
; FilterMethod : KSDS3D_HRTF_FILTER_METHOD (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; CoeffFormat : KSDS3D_HRTF_COEFF_FORMAT (+4, 4byte)  st.1 = 値  /  値 = st.1   (lpoke/lpeek も可)
; Version : KSDS3D_HRTF_FILTER_VERSION (+8, 4byte)  st.2 = 値  /  値 = st.2   (lpoke/lpeek も可)
; Reserved : DWORD (+12, 4byte)  st.3 = 値  /  値 = st.3   (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global KSDS3D_HRTF_FILTER_FORMAT_MSG
    #field int FilterMethod
    #field int CoeffFormat
    #field int Version
    #field int Reserved
#endstruct

stdim st, KSDS3D_HRTF_FILTER_FORMAT_MSG        ; NSTRUCT 変数を確保
st->FilterMethod = 100
mes "FilterMethod=" + st->FilterMethod