ホーム › Media.Audio › MIXERCAPSW
MIXERCAPSW
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| wMid | WORD | 2 | +0 | +0 | ミキサーデバイスドライバーの製造元識別子です。製造元識別子は「Manufacturer and Product Identifiers」で定義されています。 |
| wPid | WORD | 2 | +2 | +2 | ミキサーデバイスドライバーの製品識別子です。製品識別子は「Manufacturer and Product Identifiers」で定義されています。 |
| vDriverVersion | DWORD | 4 | +4 | +4 | ミキサーデバイスドライバーのバージョン番号です。上位バイトがメジャーバージョン番号、下位バイトがマイナーバージョン番号です。 |
| szPname | WCHAR | 64 | +8 | +8 | 製品の名前です。ミキサーデバイスドライバーが複数のカードをサポートする場合、この文字列は特定のカードを(ユーザーが判別できる形で)一意かつ容易に識別できるものでなければなりません。 |
| fdwSupport | DWORD | 4 | +72 | +72 | ミキサーデバイスドライバーに関するさまざまなサポート情報です。拡張サポートビットは現在定義されていません。 |
| cDestinations | DWORD | 4 | +76 | +76 | ミキサーデバイスを通じて利用できるオーディオラインのデスティネーション(出力先)の数です。すべてのミキサーデバイスは少なくとも 1 つのデスティネーションラインをサポートする必要があるため、このメンバーが 0 になることはありません。MIXERLINE 構造体の dwDestination メンバーで使用されるデスティネーションのインデックスは、0 から cDestinations メンバーで指定された値から 1 を引いた値までの範囲になります。 |
公式ドキュメント
MIXERCAPS 構造体は、ミキサーデバイスの機能を記述します。
解説(Remarks)
メモ
mmeapi.h ヘッダーは、UNICODE プリプロセッサ定数の定義に基づいてこの関数の ANSI 版または Unicode 版を自動的に選択するエイリアスとして MIXERCAPS を定義します。エンコーディング中立のエイリアスと、エンコーディング中立ではないコードを混在させて使用すると、不一致が生じ、コンパイルエラーや実行時エラーの原因となる可能性があります。詳細については、「Conventions for Function Prototypes」を参照してください。
出典・ライセンス: 上記「公式ドキュメント」の内容は Microsoft の Win32 API ドキュメント(MicrosoftDocs/sdk-api)を日本語に翻訳・改変したものです。© Microsoft Corporation. CC BY 4.0 で提供。
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
各言語での定義
#include <windows.h>
// MIXERCAPSW (x64 80 / x86 80 バイト)
#pragma pack(push, 1)
typedef struct MIXERCAPSW {
WORD wMid;
WORD wPid;
DWORD vDriverVersion;
WCHAR szPname[32];
DWORD fdwSupport;
DWORD cDestinations;
} MIXERCAPSW;
#pragma pack(pop)using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, Pack = 1, CharSet = CharSet.Unicode)]
public struct MIXERCAPSW
{
public ushort wMid;
public ushort wPid;
public uint vDriverVersion;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)] public string szPname;
public uint fdwSupport;
public uint cDestinations;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, Pack:=1, CharSet:=CharSet.Unicode)>
Public Structure MIXERCAPSW
Public wMid As UShort
Public wPid As UShort
Public vDriverVersion As UInteger
<MarshalAs(UnmanagedType.ByValTStr, SizeConst:=32)> Public szPname As String
Public fdwSupport As UInteger
Public cDestinations As UInteger
End Structureimport ctypes
from ctypes import wintypes
class MIXERCAPSW(ctypes.Structure):
_pack_ = 1
_fields_ = [
("wMid", ctypes.c_ushort),
("wPid", ctypes.c_ushort),
("vDriverVersion", wintypes.DWORD),
("szPname", ctypes.c_wchar * 32),
("fdwSupport", wintypes.DWORD),
("cDestinations", wintypes.DWORD),
]#[repr(C, packed(1))]
pub struct MIXERCAPSW {
pub wMid: u16,
pub wPid: u16,
pub vDriverVersion: u32,
pub szPname: [u16; 32],
pub fdwSupport: u32,
pub cDestinations: u32,
}import "golang.org/x/sys/windows"
type MIXERCAPSW struct {
wMid uint16
wPid uint16
vDriverVersion uint32
szPname [32]uint16
fdwSupport uint32
cDestinations uint32
}type
MIXERCAPSW = packed record
wMid: Word;
wPid: Word;
vDriverVersion: DWORD;
szPname: array[0..31] of WideChar;
fdwSupport: DWORD;
cDestinations: DWORD;
end;const MIXERCAPSW = extern struct {
wMid: u16,
wPid: u16,
vDriverVersion: u32,
szPname: [32]u16,
fdwSupport: u32,
cDestinations: u32,
};type
MIXERCAPSW {.packed.} = object
wMid: uint16
wPid: uint16
vDriverVersion: uint32
szPname: array[32, uint16]
fdwSupport: uint32
cDestinations: uint32align(1)
struct MIXERCAPSW
{
ushort wMid;
ushort wPid;
uint vDriverVersion;
wchar[32] szPname;
uint fdwSupport;
uint cDestinations;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; MIXERCAPSW サイズ: 80 バイト(x64)
dim st, 20 ; 4byte整数×20(構造体サイズ 80 / 4 切り上げ)
; wMid : WORD (+0, 2byte) wpoke st,0,値 / 値 = wpeek(st,0)
; wPid : WORD (+2, 2byte) wpoke st,2,値 / 値 = wpeek(st,2)
; vDriverVersion : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; szPname : WCHAR (+8, 64byte) varptr(st)+8 を基点に操作(64byte:入れ子/配列)
; fdwSupport : DWORD (+72, 4byte) st.18 = 値 / 値 = st.18 (lpoke/lpeek も可)
; cDestinations : DWORD (+76, 4byte) st.19 = 値 / 値 = st.19 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global MIXERCAPSW, pack=1
#field short wMid
#field short wPid
#field int vDriverVersion
#field wchar szPname 32
#field int fdwSupport
#field int cDestinations
#endstruct
stdim st, MIXERCAPSW ; NSTRUCT 変数を確保
st->wMid = 100
mes "wMid=" + st->wMid