ホーム › Media.KernelStreaming › KS_AM_ExactRateChange
KS_AM_ExactRateChange
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| OutputZeroTime | LONGLONG | 8 | +0 | +0 | 出力タイムスタンプの基準ゼロ時刻を100ナノ秒単位で示す。 |
| Rate | INT | 4 | +8 | +8 | 適用する再生レートを示す(10000=等倍などの固定小数)。 |
各言語での定義
#include <windows.h>
// KS_AM_ExactRateChange (x64 16 / x86 16 バイト)
typedef struct KS_AM_ExactRateChange {
LONGLONG OutputZeroTime;
INT Rate;
} KS_AM_ExactRateChange;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct KS_AM_ExactRateChange
{
public long OutputZeroTime;
public int Rate;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure KS_AM_ExactRateChange
Public OutputZeroTime As Long
Public Rate As Integer
End Structureimport ctypes
from ctypes import wintypes
class KS_AM_ExactRateChange(ctypes.Structure):
_fields_ = [
("OutputZeroTime", ctypes.c_longlong),
("Rate", ctypes.c_int),
]#[repr(C)]
pub struct KS_AM_ExactRateChange {
pub OutputZeroTime: i64,
pub Rate: i32,
}import "golang.org/x/sys/windows"
type KS_AM_ExactRateChange struct {
OutputZeroTime int64
Rate int32
}type
KS_AM_ExactRateChange = record
OutputZeroTime: Int64;
Rate: Integer;
end;const KS_AM_ExactRateChange = extern struct {
OutputZeroTime: i64,
Rate: i32,
};type
KS_AM_ExactRateChange {.bycopy.} = object
OutputZeroTime: int64
Rate: int32struct KS_AM_ExactRateChange
{
long OutputZeroTime;
int Rate;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; KS_AM_ExactRateChange サイズ: 16 バイト(x64)
dim st, 4 ; 4byte整数×4(構造体サイズ 16 / 4 切り上げ)
; OutputZeroTime : LONGLONG (+0, 8byte) qpoke st,0,値 / qpeek(st,0) ※IronHSPのみ。3.7/3.8は lpoke st,0,下位 : lpoke st,4,上位
; Rate : INT (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global KS_AM_ExactRateChange
#field int64 OutputZeroTime
#field int Rate
#endstruct
stdim st, KS_AM_ExactRateChange ; NSTRUCT 変数を確保
st->OutputZeroTime = 100
mes "OutputZeroTime=" + st->OutputZeroTime