ホーム › Media.DirectShow › DVD_KaraokeAttributes
DVD_KaraokeAttributes
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| bVersion | BYTE | 1 | +0 | +0 | バージョン番号です。現在のカラオケバージョンは 1.0 です。 |
| fMasterOfCeremoniesInGuideVocal1 | BOOL | 4 | +4 | +4 | TRUE の場合、"Guide Vocal 1" チャネルに "Master of Ceremonies" のコンテンツが含まれます。 |
| fDuet | BOOL | 4 | +8 | +8 | この曲がデュエットとして歌われることを意図しているかどうかを示すブール値です。 |
| ChannelAssignment | DVD_KARAOKE_ASSIGNMENT | 4 | +12 | +12 | すべてのチャネルがミックスされるスピーカー構成を示す DVD_KARAOKE_ASSIGNMENT 値です。 |
| wChannelContents | WORD | 16 | +16 | +16 | 各チャネルのコンテンツを識別する、有効な DVD_KARAOKE_CONTENTS 値の配列です。 |
公式ドキュメント
[このページに関連する機能である DirectShow はレガシー機能です。この機能は MediaPlayer、IMFMediaEngine、および Audio/Video Capture in Media Foundation に置き換えられました。これらの機能は Windows 10 および Windows 11 向けに最適化されています。Microsoft は、可能な場合は新しいコードで DirectShow ではなく MediaPlayer、IMFMediaEngine、Audio/Video Capture in Media Foundation を使用することを強く推奨します。また、レガシー API を使用している既存のコードについても、可能であれば新しい API を使用するように書き換えることを推奨します。]
DVD_KaraokeAttributes 構造体は、カラオケオーディオストリームに関する情報を格納します。IDvdInfo2::GetKaraokeAttributes メソッドは、指定されたストリームについて DVD_KaraokeAttributes 構造体に情報を設定します。
出典・ライセンス: 上記「公式ドキュメント」の内容は 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>
// DVD_KaraokeAttributes (x64 32 / x86 32 バイト)
typedef struct DVD_KaraokeAttributes {
BYTE bVersion;
BOOL fMasterOfCeremoniesInGuideVocal1;
BOOL fDuet;
DVD_KARAOKE_ASSIGNMENT ChannelAssignment;
WORD wChannelContents[8];
} DVD_KaraokeAttributes;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DVD_KaraokeAttributes
{
public byte bVersion;
[MarshalAs(UnmanagedType.Bool)] public bool fMasterOfCeremoniesInGuideVocal1;
[MarshalAs(UnmanagedType.Bool)] public bool fDuet;
public int ChannelAssignment;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] public ushort[] wChannelContents;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DVD_KaraokeAttributes
Public bVersion As Byte
<MarshalAs(UnmanagedType.Bool)> Public fMasterOfCeremoniesInGuideVocal1 As Boolean
<MarshalAs(UnmanagedType.Bool)> Public fDuet As Boolean
Public ChannelAssignment As Integer
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=8)> Public wChannelContents() As UShort
End Structureimport ctypes
from ctypes import wintypes
class DVD_KaraokeAttributes(ctypes.Structure):
_fields_ = [
("bVersion", ctypes.c_ubyte),
("fMasterOfCeremoniesInGuideVocal1", wintypes.BOOL),
("fDuet", wintypes.BOOL),
("ChannelAssignment", ctypes.c_int),
("wChannelContents", ctypes.c_ushort * 8),
]#[repr(C)]
pub struct DVD_KaraokeAttributes {
pub bVersion: u8,
pub fMasterOfCeremoniesInGuideVocal1: i32,
pub fDuet: i32,
pub ChannelAssignment: i32,
pub wChannelContents: [u16; 8],
}import "golang.org/x/sys/windows"
type DVD_KaraokeAttributes struct {
bVersion byte
fMasterOfCeremoniesInGuideVocal1 int32
fDuet int32
ChannelAssignment int32
wChannelContents [8]uint16
}type
DVD_KaraokeAttributes = record
bVersion: Byte;
fMasterOfCeremoniesInGuideVocal1: BOOL;
fDuet: BOOL;
ChannelAssignment: Integer;
wChannelContents: array[0..7] of Word;
end;const DVD_KaraokeAttributes = extern struct {
bVersion: u8,
fMasterOfCeremoniesInGuideVocal1: i32,
fDuet: i32,
ChannelAssignment: i32,
wChannelContents: [8]u16,
};type
DVD_KaraokeAttributes {.bycopy.} = object
bVersion: uint8
fMasterOfCeremoniesInGuideVocal1: int32
fDuet: int32
ChannelAssignment: int32
wChannelContents: array[8, uint16]struct DVD_KaraokeAttributes
{
ubyte bVersion;
int fMasterOfCeremoniesInGuideVocal1;
int fDuet;
int ChannelAssignment;
ushort[8] wChannelContents;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; DVD_KaraokeAttributes サイズ: 32 バイト(x64)
dim st, 8 ; 4byte整数×8(構造体サイズ 32 / 4 切り上げ)
; bVersion : BYTE (+0, 1byte) poke st,0,値 / 値 = peek(st,0)
; fMasterOfCeremoniesInGuideVocal1 : BOOL (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; fDuet : BOOL (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; ChannelAssignment : DVD_KARAOKE_ASSIGNMENT (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; wChannelContents : WORD (+16, 16byte) varptr(st)+16 を基点に操作(16byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global DVD_KaraokeAttributes
#field byte bVersion
#field bool fMasterOfCeremoniesInGuideVocal1
#field bool fDuet
#field int ChannelAssignment
#field short wChannelContents 8
#endstruct
stdim st, DVD_KaraokeAttributes ; NSTRUCT 変数を確保
st->bVersion = 100
mes "bVersion=" + st->bVersion