ホーム › Media.DirectShow › DVD_MultichannelAudioAttributes
DVD_MultichannelAudioAttributes
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| Info | DVD_MUA_MixingInfo | 160 | +0 | +0 | 各チャンネルのミキシング情報を示すDVD_MUA_MixingInfo配列。 |
| Coeff | DVD_MUA_Coeff | 128 | +160 | +160 | 各チャンネルのミキシング係数を示すDVD_MUA_Coeff配列。 |
各言語での定義
#include <windows.h>
// DVD_MUA_MixingInfo (x64 20 / x86 20 バイト)
typedef struct DVD_MUA_MixingInfo {
BOOL fMixTo0;
BOOL fMixTo1;
BOOL fMix0InPhase;
BOOL fMix1InPhase;
DWORD dwSpeakerPosition;
} DVD_MUA_MixingInfo;
// DVD_MUA_Coeff (x64 16 / x86 16 バイト)
typedef struct DVD_MUA_Coeff {
DOUBLE log2_alpha;
DOUBLE log2_beta;
} DVD_MUA_Coeff;
// DVD_MultichannelAudioAttributes (x64 288 / x86 288 バイト)
typedef struct DVD_MultichannelAudioAttributes {
DVD_MUA_MixingInfo Info[8];
DVD_MUA_Coeff Coeff[8];
} DVD_MultichannelAudioAttributes;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DVD_MUA_MixingInfo
{
[MarshalAs(UnmanagedType.Bool)] public bool fMixTo0;
[MarshalAs(UnmanagedType.Bool)] public bool fMixTo1;
[MarshalAs(UnmanagedType.Bool)] public bool fMix0InPhase;
[MarshalAs(UnmanagedType.Bool)] public bool fMix1InPhase;
public uint dwSpeakerPosition;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DVD_MUA_Coeff
{
public double log2_alpha;
public double log2_beta;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DVD_MultichannelAudioAttributes
{
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] public DVD_MUA_MixingInfo[] Info;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] public DVD_MUA_Coeff[] Coeff;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DVD_MUA_MixingInfo
<MarshalAs(UnmanagedType.Bool)> Public fMixTo0 As Boolean
<MarshalAs(UnmanagedType.Bool)> Public fMixTo1 As Boolean
<MarshalAs(UnmanagedType.Bool)> Public fMix0InPhase As Boolean
<MarshalAs(UnmanagedType.Bool)> Public fMix1InPhase As Boolean
Public dwSpeakerPosition As UInteger
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DVD_MUA_Coeff
Public log2_alpha As Double
Public log2_beta As Double
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DVD_MultichannelAudioAttributes
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=8)> Public Info() As DVD_MUA_MixingInfo
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=8)> Public Coeff() As DVD_MUA_Coeff
End Structureimport ctypes
from ctypes import wintypes
class DVD_MUA_MixingInfo(ctypes.Structure):
_fields_ = [
("fMixTo0", wintypes.BOOL),
("fMixTo1", wintypes.BOOL),
("fMix0InPhase", wintypes.BOOL),
("fMix1InPhase", wintypes.BOOL),
("dwSpeakerPosition", wintypes.DWORD),
]
class DVD_MUA_Coeff(ctypes.Structure):
_fields_ = [
("log2_alpha", ctypes.c_double),
("log2_beta", ctypes.c_double),
]
class DVD_MultichannelAudioAttributes(ctypes.Structure):
_fields_ = [
("Info", DVD_MUA_MixingInfo * 8),
("Coeff", DVD_MUA_Coeff * 8),
]#[repr(C)]
pub struct DVD_MUA_MixingInfo {
pub fMixTo0: i32,
pub fMixTo1: i32,
pub fMix0InPhase: i32,
pub fMix1InPhase: i32,
pub dwSpeakerPosition: u32,
}
#[repr(C)]
pub struct DVD_MUA_Coeff {
pub log2_alpha: f64,
pub log2_beta: f64,
}
#[repr(C)]
pub struct DVD_MultichannelAudioAttributes {
pub Info: [DVD_MUA_MixingInfo; 8],
pub Coeff: [DVD_MUA_Coeff; 8],
}import "golang.org/x/sys/windows"
type DVD_MUA_MixingInfo struct {
fMixTo0 int32
fMixTo1 int32
fMix0InPhase int32
fMix1InPhase int32
dwSpeakerPosition uint32
}
type DVD_MUA_Coeff struct {
log2_alpha float64
log2_beta float64
}
type DVD_MultichannelAudioAttributes struct {
Info [8]DVD_MUA_MixingInfo
Coeff [8]DVD_MUA_Coeff
}type
DVD_MUA_MixingInfo = record
fMixTo0: BOOL;
fMixTo1: BOOL;
fMix0InPhase: BOOL;
fMix1InPhase: BOOL;
dwSpeakerPosition: DWORD;
end;
DVD_MUA_Coeff = record
log2_alpha: Double;
log2_beta: Double;
end;
DVD_MultichannelAudioAttributes = record
Info: array[0..7] of DVD_MUA_MixingInfo;
Coeff: array[0..7] of DVD_MUA_Coeff;
end;const DVD_MUA_MixingInfo = extern struct {
fMixTo0: i32,
fMixTo1: i32,
fMix0InPhase: i32,
fMix1InPhase: i32,
dwSpeakerPosition: u32,
};
const DVD_MUA_Coeff = extern struct {
log2_alpha: f64,
log2_beta: f64,
};
const DVD_MultichannelAudioAttributes = extern struct {
Info: [8]DVD_MUA_MixingInfo,
Coeff: [8]DVD_MUA_Coeff,
};type
DVD_MUA_MixingInfo {.bycopy.} = object
fMixTo0: int32
fMixTo1: int32
fMix0InPhase: int32
fMix1InPhase: int32
dwSpeakerPosition: uint32
DVD_MUA_Coeff {.bycopy.} = object
log2_alpha: float64
log2_beta: float64
DVD_MultichannelAudioAttributes {.bycopy.} = object
Info: array[8, DVD_MUA_MixingInfo]
Coeff: array[8, DVD_MUA_Coeff]struct DVD_MUA_MixingInfo
{
int fMixTo0;
int fMixTo1;
int fMix0InPhase;
int fMix1InPhase;
uint dwSpeakerPosition;
}
struct DVD_MUA_Coeff
{
double log2_alpha;
double log2_beta;
}
struct DVD_MultichannelAudioAttributes
{
DVD_MUA_MixingInfo[8] Info;
DVD_MUA_Coeff[8] Coeff;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; DVD_MultichannelAudioAttributes サイズ: 288 バイト(x64)
dim st, 72 ; 4byte整数×72(構造体サイズ 288 / 4 切り上げ)
; Info : DVD_MUA_MixingInfo (+0, 160byte) varptr(st)+0 を基点に操作(160byte:入れ子/配列)
; Coeff : DVD_MUA_Coeff (+160, 128byte) varptr(st)+160 を基点に操作(128byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global DVD_MUA_MixingInfo
#field bool fMixTo0
#field bool fMixTo1
#field bool fMix0InPhase
#field bool fMix1InPhase
#field int dwSpeakerPosition
#endstruct
#defstruct global DVD_MUA_Coeff
#field double log2_alpha
#field double log2_beta
#endstruct
#defstruct global DVD_MultichannelAudioAttributes
#field DVD_MUA_MixingInfo Info 8
#field DVD_MUA_Coeff Coeff 8
#endstruct
stdim st, DVD_MultichannelAudioAttributes ; NSTRUCT 変数を確保