CRIWARE for C#
Search Results for

    Show / Hide Table of Contents

    Class CriAtomExOutputPort

    出力ポートハンドル

    Inheritance
    object
    CriAtomExOutputPort
    Implements
    IDisposable
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: CriWare
    Assembly: CriWare.CriAtom.dll
    Syntax
    public class CriAtomExOutputPort : IDisposable
    Remarks

    説明: CriAtomExOutputPort は、音声の出力先を指定するためのオブジェクトです。 出力ポートオブジェクトは、以下の2つの関数で取得することができます。

    • CriAtomExOutputPort(in Config) 関数で新しいオブジェクトを作成
    • GetOutputPortHnByName(ArgString) 関数でACF内の出力ポートオブジェクトを取得 ACF内の出力ポートオブジェクトは、ACFファイルを登録したとき自動的に作成されます。 プレーヤーに対して AddOutputPort(CriAtomExOutputPort) 関数または AddPreferredOutputPort(CriAtomExOutputPort) 関数にて 別の出力ポートオブジェクトが指定されていない場合、出力ポートが指定された音声の再生にはACF内の出力ポートが使用されます。

    備考: 出力ポートは、音声の出力先を抽象化した概念です。 音声トラックに予め出力先の名前を指定すると、再生するとき自動的に同じ名前の出力ポートオブジェクトが割り当てられます。 出力ポートはASRラックと紐付けられており、出力ポートオブジェクトが割り当てられた音声は、そのASRラックを介して再生されます。 そのため、ACF内の出力ポートオブジェクトを含め、全ての出力ポートオブジェクトは使用する前に必ず SetAsrRackId(CriAtomExAsrRack) 関数で適切なASRラックと紐付ける必要があります。

    Constructors

    CriAtomExOutputPort(in Config)

    出力ポートハンドルの作成

    Declaration
    • C#
    • C
    public CriAtomExOutputPort(in CriAtomExOutputPort.Config config)
    CriAtomExOutputPortHn CRIAPI criAtomExOutputPort_Create(const CriAtomExOutputPortConfig *config, void *work, CriSint32 work_size)
    Parameters
    Type Name Description
    CriAtomExOutputPort.Config config

    ASR初期化用コンフィグ構造体

    Remarks

    説明: 出力ポートオブジェクトの作成を行います。 出力ポートはASRラックと紐付けられ、出力ポートが指定されたボイスはその出力ポートに紐付けられた ASRラックにて再生されるようになります。

    備考: ACFファイルに設定された出力ポートオブジェクトは RegisterAcfFile(CriFsBinder, ArgString) 関数などを用いて ACFファイルを登録したとき、ACF内に自動的に作成されるため、 本関数で新たに作成する必要はありません。 ACF内の出力ポートオブジェクトは GetOutputPortHnByName(ArgString) 関数で取得できます。 そのため、本関数はアプリケーション上で新たに出力ポートオブジェクトが必要になった場合に使用してください。 引数 config の情報は、関数内でのみ参照されます。 関数を抜けた後は参照されませんので、関数実行後に config の領域を解放しても 問題ありません。 出力ポートオブジェクトの生成に成功した場合は、本関数は生成した出力ポートオブジェクトを返します。 生成に失敗した場合は null を返します。

    注意: 本関数で作成された出力ポートオブジェクトには、CriAtomExOutputPort.Config::type で指定したタイプによって 以下のASRラックIDが初期値としてセットされています。

    • Audio を指定:RackDefaultId
    • Vibration を指定:RackIllegalId

    出力ポートオブジェクトを使用する前に、必ず SetAsrRackId(CriAtomExAsrRack) 関数で適切なASRラックを設定してください。

    See Also
    Dispose()
    GetOutputPortHnByName(ArgString)
    AddOutputPort(CriAtomExOutputPort)
    AddPreferredOutputPort(CriAtomExOutputPort)

    Properties

    NativeHandle

    ネイティブハンドル

    Declaration
    public NativeHandleIntPtr NativeHandle { get; }
    Property Value
    Type Description
    NativeHandleIntPtr

    Methods

    CalculateWorkSize(in Config)

    LE Pro

    出力ポートハンドル作成用ワーク領域サイズの計算

    Declaration
    • C#
    • C
    public static int CalculateWorkSize(in CriAtomExOutputPort.Config config)
    CriSint32 CRIAPI criAtomExOutputPort_CalculateWorkSize(const CriAtomExOutputPortConfig *config)
    Parameters
    Type Name Description
    CriAtomExOutputPort.Config config

    出力ポートハンドル作成用コンフィグ構造体

    Returns
    Type Description
    int

    CriSint32 ワーク領域サイズ

    Remarks

    説明: 出力ポートオブジェクトの作成に必要なワーク領域のサイズを計算します。 SetUserAllocator(delegate* unmanaged[Cdecl]<IntPtr, uint, IntPtr>, delegate* unmanaged[Cdecl]<IntPtr, IntPtr, void>, IntPtr) メソッドによるアロケーター登録を行わずに CriAtomExOutputPort(in Config) 関数で出力ポートオブジェクトを作成する際には、 CriAtomExOutputPort(in Config) 関数に本関数が返すサイズ分のメモリをワーク 領域として渡す必要があります。 ワーク領域サイズの計算に失敗すると、本関数は -1 を返します。 ワーク領域サイズの計算に失敗した理由については、エラーコールバックのメッセージで確認可能です。

    備考: 引数 config の情報は、関数内でのみ参照されます。 関数を抜けた後は参照されませんので、関数実行後に config の領域を解放しても 問題ありません。

    注意: CriAtomExOutputPort.Config::name に指定する出力ポート名の長さは、 OutputPortMaxNameLength 以下である必要があります。

    See Also
    CriAtomExOutputPort(in Config)

    Dispose()

    LE Pro

    出力ポートハンドルの破棄

    Declaration
    • C#
    • C
    public void Dispose()
    void CRIAPI criAtomExOutputPort_Destroy(CriAtomExOutputPortHn output_port)
    Remarks

    説明: 出力ポートオブジェクトの破棄を行います。

    備考: IsDestroyable() 関数を使用することでオブジェクトが破棄できるか調べることができます。

    See Also
    CriAtomExOutputPort(in Config)
    IsDestroyable()

    IgnoreCategoryParametersById(uint, NativeBool)

    LE Pro

    出力ポートが指定カテゴリのパラメータを無視するかの設定

    Declaration
    • C#
    • C
    public void IgnoreCategoryParametersById(uint categoryId, NativeBool ignoreParameters)
    void CRIAPI criAtomExOutputPort_IgnoreCategoryParametersById(CriAtomExOutputPortHn output_port_hn, CriAtomExCategoryId category_id, CriBool ignore_parameters)
    Parameters
    Type Name Description
    uint categoryId

    カテゴリID

    NativeBool ignoreParameters

    無視設定パラメータ (CRI_TRUE:無視する, CRI_FALSE:無視しない)

    Remarks

    説明: 出力ポートに対して指定したカテゴリIDのパラメータを無視するかを設定します。

    備考: 出力ポートに対して指定したカテゴリIDのパラメータを無視させることでカテゴリの影響をなくすことができます。 同じカテゴリIDを指定して、カテゴリを無視する・無視しないを変更することも可能です。 設定できるカテゴリは最大4つまでです。4つ設定している状態でこの関数を実行すると警告が発生し、処理は行われません。

    備考: この関数で設定は再生時に反映されます。

    See Also
    CriAtomExOutputPort(in Config)
    GetOutputPortHnByName(ArgString)

    IsDestroyable()

    LE Pro

    出力ポートハンドルの破棄可能の判定

    Declaration
    • C#
    • C
    public bool IsDestroyable()
    CriBool CRIAPI criAtomExOutputPort_IsDestroyable(CriAtomExOutputPortHn output_port)
    Returns
    Type Description
    bool

    CriBool 破棄可能か?(true = 可能, false = 不可能)

    Remarks

    説明: 出力ポートオブジェクトの破棄が可能か判定します。

    備考: AddOutputPort(CriAtomExOutputPort) 関数または AddPreferredOutputPort(CriAtomExOutputPort) 関数を使用して プレーヤーに追加中の出力ポートオブジェクトは破棄することができません。 RemoveOutputPort(CriAtomExOutputPort) 関数または RemovePreferredOutputPort(CriAtomExOutputPort) 関数を使用して プレーヤーから取り外してから破棄してください。 また、ACFファイルの情報から作成されたACF内の出力ポートオブジェクトは破棄することができません。

    See Also
    Dispose()

    ResetIgnoreCategory()

    LE Pro

    出力ポートに設定した指定カテゴリのパラメータを無視する設定をリセット

    Declaration
    • C#
    • C
    public void ResetIgnoreCategory()
    void CRIAPI criAtomExOutputPort_ResetIgnoreCategory(CriAtomExOutputPortHn output_port_hn)
    Remarks

    説明: 出力ポートに設定した指定カテゴリのパラメータを無視する設定をリセットします。

    備考: 出力ポートに対して指定したカテゴリIDのパラメータを無視する設定をすべてリセットします。 設定されているカテゴリの数もリセットされるため新たにカテゴリを指定してカテゴリのパラメータを無視する設定を行えます。

    備考: この関数で設定は再生時に反映されます。

    See Also
    CriAtomExOutputPort(in Config)
    IgnoreCategoryParametersById(uint, NativeBool)

    SetAsrRackId(CriAtomExAsrRack)

    LE Pro

    ASRラックIDの指定

    Declaration
    • C#
    • C
    public void SetAsrRackId(CriAtomExAsrRack rackId)
    void CRIAPI criAtomExOutputPort_SetAsrRackId(CriAtomExOutputPortHn output_port, CriAtomExAsrRackId rack_id)
    Parameters
    Type Name Description
    CriAtomExAsrRack rackId

    ASRラックID

    Remarks

    説明: 出力ポートにASRラック指定します。 出力ポートが指定されたボイスは、その出力ポートに指定されているASRラックで再生されます。

    備考: ACFファイル登録時に作成された出力ポートオブジェクトや CriAtomExOutputPort(in Config) 関数で作成された 出力ポートオブジェクトには、必ず本関数で適切なASRラックを指定する必要があります。 出力ポートのタイプなどによって、指定できるASRラックに制限がある場合があります。 詳細に関しましてはマニュアルを参照してください。

    注意: 本関数で出力ポートのASRラックIDを変更しても、既に再生されている音声には影響しません。

    See Also
    CriAtomExOutputPort(in Config)
    GetOutputPortHnByName(ArgString)

    SetDefaultConfig(out Config, ArgString)

    LE Pro

    出力ポート作成用コンフィグ構造体にデフォルト値をセット

    Declaration
    • C#
    • C
    public static void SetDefaultConfig(out CriAtomExOutputPort.Config pConfig, ArgString outputportName)
    void criAtomExOutputPort_SetDefaultConfig_(CriAtomExOutputPortConfig *p_config, CriChar8 *outputport_name)
    Parameters
    Type Name Description
    CriAtomExOutputPort.Config pConfig

    出力ポート作成用コンフィグ構造体へのポインタ

    ArgString outputportName

    出力ポート名

    Remarks

    説明: CriAtomExOutputPort(in Config) 関数に設定するコンフィグ構造体 ( CriAtomExOutputPort.Config )に、デフォルトの値をセットします。

    See Also
    CriAtomExOutputPort.Config
    CriAtomExOutputPort(in Config)

    SetMonauralMix(NativeBool)

    LE Pro

    振動タイプの出力ポートのモノラルミックス有無設定

    Declaration
    • C#
    • C
    public void SetMonauralMix(NativeBool monauralMix)
    void CRIAPI criAtomExOutputPort_SetMonauralMix(CriAtomExOutputPortHn output_port, CriBool monaural_mix)
    Parameters
    Type Name Description
    NativeBool monauralMix

    モノラルミックス有無(CRI_TRUE = 有効, CRI_FALSE = 無効)

    Remarks

    説明: 振動タイプの出力ポートは2チャンネルで動作するため、入力されるボイスがステレオ以上の音声データか、 3Dパンが設定されている場合、その結果が振動デバイスの左右に伝わります。 モノラルミックスを有効にすると、振動デバイスへ出力する前に一度モノラルにダウンミックスを行うことでそれらの影響をなくすことができます。 SetVibrationChannelLevel(int, float) 関数を使用して、モノラルミックス後振動デバイスへ送られるレベルを設定することも可能です。

    備考: この関数で設定した値は、音が再生中でも即時反映されます。

    See Also
    SetVibrationChannelLevel(int, float)

    SetVibrationChannelLevel(int, float)

    LE Pro

    振動タイプの出力ポートのチャンネルレベルの設定

    Declaration
    • C#
    • C
    public void SetVibrationChannelLevel(int channel, float level)
    void CRIAPI criAtomExOutputPort_SetVibrationChannelLevel(CriAtomExOutputPortHn output_port, CriSint32 channel, CriFloat32 level)
    Parameters
    Type Name Description
    int channel

    チャンネルインデックス(0 = L, 1 = R)

    float level

    レベル(0 ~ 2.0)

    Remarks

    説明: 振動タイプの出力ポートに対し、振動デバイスの各チャンネルへの出力レベルを設定します。

    備考: 振動タイプの出力ポートは2チャンネルで動作しており、最終出力デバイスがモノラルの場合-3dBのダウンミックスが適用されます。 この関数で設定した値は、音が再生中でも即時反映されます。

    See Also
    SetMonauralMix(NativeBool)

    Implements

    IDisposable

    See Also

    CriAtomExOutputPort(in Config)
    GetOutputPortHnByName(ArgString)
    SetAsrRackId(CriAtomExAsrRack)
    In this article
    Back to top Generated by DocFX