ホーム › Media.KernelStreaming › TRANSPORTAUDIOPARMS
TRANSPORTAUDIOPARMS
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| EnableOutput | INT | 4 | +0 | +0 | 音声出力を有効にするかを示す。 |
| EnableRecord | INT | 4 | +4 | +4 | 音声録音を有効にするかを示す。 |
| EnableSelsync | INT | 4 | +8 | +8 | セルシンク(同期録音)を有効にするかを示す。 |
| Input | INT | 4 | +12 | +12 | 選択された音声入力を示す値。 |
| MonitorSource | INT | 4 | +16 | +16 | 音声モニタのソースを示す値。 |
各言語での定義
#include <windows.h>
// TRANSPORTAUDIOPARMS (x64 20 / x86 20 バイト)
typedef struct TRANSPORTAUDIOPARMS {
INT EnableOutput;
INT EnableRecord;
INT EnableSelsync;
INT Input;
INT MonitorSource;
} TRANSPORTAUDIOPARMS;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct TRANSPORTAUDIOPARMS
{
public int EnableOutput;
public int EnableRecord;
public int EnableSelsync;
public int Input;
public int MonitorSource;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure TRANSPORTAUDIOPARMS
Public EnableOutput As Integer
Public EnableRecord As Integer
Public EnableSelsync As Integer
Public Input As Integer
Public MonitorSource As Integer
End Structureimport ctypes
from ctypes import wintypes
class TRANSPORTAUDIOPARMS(ctypes.Structure):
_fields_ = [
("EnableOutput", ctypes.c_int),
("EnableRecord", ctypes.c_int),
("EnableSelsync", ctypes.c_int),
("Input", ctypes.c_int),
("MonitorSource", ctypes.c_int),
]#[repr(C)]
pub struct TRANSPORTAUDIOPARMS {
pub EnableOutput: i32,
pub EnableRecord: i32,
pub EnableSelsync: i32,
pub Input: i32,
pub MonitorSource: i32,
}import "golang.org/x/sys/windows"
type TRANSPORTAUDIOPARMS struct {
EnableOutput int32
EnableRecord int32
EnableSelsync int32
Input int32
MonitorSource int32
}type
TRANSPORTAUDIOPARMS = record
EnableOutput: Integer;
EnableRecord: Integer;
EnableSelsync: Integer;
Input: Integer;
MonitorSource: Integer;
end;const TRANSPORTAUDIOPARMS = extern struct {
EnableOutput: i32,
EnableRecord: i32,
EnableSelsync: i32,
Input: i32,
MonitorSource: i32,
};type
TRANSPORTAUDIOPARMS {.bycopy.} = object
EnableOutput: int32
EnableRecord: int32
EnableSelsync: int32
Input: int32
MonitorSource: int32struct TRANSPORTAUDIOPARMS
{
int EnableOutput;
int EnableRecord;
int EnableSelsync;
int Input;
int MonitorSource;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; TRANSPORTAUDIOPARMS サイズ: 20 バイト(x64)
dim st, 5 ; 4byte整数×5(構造体サイズ 20 / 4 切り上げ)
; EnableOutput : INT (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; EnableRecord : INT (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; EnableSelsync : INT (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; Input : INT (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; MonitorSource : INT (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global TRANSPORTAUDIOPARMS
#field int EnableOutput
#field int EnableRecord
#field int EnableSelsync
#field int Input
#field int MonitorSource
#endstruct
stdim st, TRANSPORTAUDIOPARMS ; NSTRUCT 変数を確保
st->EnableOutput = 100
mes "EnableOutput=" + st->EnableOutput