ソースの表示以前のリビジョンバックリンク全て展開する/折り畳む文書の先頭へ Share via Share via... Twitter LinkedIn Facebook Pinterest Telegram WhatsApp Yammer Reddit Teams最近の変更Send via e-Mail印刷パーマリンク × 目次 AudioHardware.h 抄訳 はじめに AudioDevice系ルーチン AudioObject系ルーチン AudioDevice Properties Implemented via AudioControl objects AudioStream Properties 文書の過去の版を表示しています。 AudioHardware.h 抄訳 はじめに オーディオHALは、それを通してアプリケーションがオーディオハードウェアへのアクセスを可能にする、抽象的概念を提供する。 これを達成するために、HALはシステムの様々な構成部位へのアクセスを行う、小さなAudioObjectセットを備える。 全てのAudioObjectはプロパティの集合を持ち、状態の取得や操作を行うことが出来る。プロパティは三次元座標(ordered triple)的にアクセスされる。 1つめの軸はプロパティを分類する(describe)セレクタである。 他の2つの軸はAudioObjectの特定の部分を識別するスコープとエレメントで、その中からセレクタを探す。 AudioObjectPropertyAddress構造体はプロパティのアドレスをカプセル化する。 プロパティの値は型付けされていないデータブロックで、その内容はセレクターの仕様に依存する。 いくつかのセレクタは問い合わせ時に修飾データ(qualifier)を要求する。 修飾データはプロパティ操作のために使う追加情報を提供する。 プロパティ値の変化は常に非同期であることを考慮せよ。 アプリケーションは AudioObjectHasProperty(), AudioObjectIsPropertySettable() and AudioObjectGetPropertyDataSize() ルーチンを使い、プロパティに関する有益なメタ情報を取得する。 また、アプリはAudioObjectGetPropertyData()とAudioObjectSetPropertyData()でプロパティの値を操作する。 アプリはAudioObjectAddPropertyListener()とAudioObjectRemovePropertyListener()で、プロパティの値が変化した際に呼ばれる関数の登録と削除を行う。 The class of an AudioObject determines the basic functionality of the object in terms of what functions will operate on it as well as the set of properties that can be expected to be implemented by the object. オブジェクトのために利用可能なクラスセットは、ここで定義されているものに限られる。 これら以外のクラスは存在しない。 クラスセットは、あるクラスがその親クラスのプロパティやルーチンを継承するといった、階層構造にまとめられている。 全てのAudioObjectクラス群の基底クラスがAudioObjectクラスである。 そのようなものとして、AudioObjectクラスは、分類、人間が読める名前といった基本プロパティを提供し、各々のAudioObjectオブジェクトはそれらを持つ。 他の重要なクラスとして、AudioSystemObject, AudioDeviceそしてAudioStreamがある。 HAL中のAudioObjectは包含階層で並べられている。 階層の根本は1つで、それはAudioSystemObjectクラスの唯一のインスタンスである。 AudioSystemObjectのプロパティは、様々なデフォルトデバイスや通知ランループといった、プロセス全体にまたがる設定を表す。 またAudioSystemObjectは利用可能な全てのAudioDeviceを持つ。 AudioDeviceクラスのインスタンスは個々のオーディオ装置をカプセル化したものである。 AudioDeviceはIOの基本ユニットとしての役割を果たす。 1つのIOサイクルを提供し、サイクルに基づくタイミングソースや全てのバッファとサイクルの同期を提供する。 The IO cycle presents all the synchronized buffers to the client in the same call out along with time stamps that specify the current time, when the input data was acquired and when the output data will be presented. AudioDeviceはAudioStreamクラスのインスタンスを含む。 AudioStreamはユーザー・カーネル領域にまたがって転送されるデータの1つのバッファを表す。 それだけに、AudioStreamはフォーマット情報の門番である。 各々がそれ自身のフォーマットと利用可能なフォーマットの一覧を持っている。 AudioStreamは、エンコードされたフォーマットや非オーディオフォーマットを含む、あらゆる形式のデータを提供することが出来る。 フォーマットがリニアPCMの場合、そのデータは常にネイティブエンディアンの32ビット浮動小数点数として表される。 ハードウェアの実際の物理フォーマットとの全ての変換は、デバイスドライバーによって行われる。 AudioDeviceとAudioStreamの両者は、AudioControlクラスあるいはその多くのサブクラスのインスタンスを含むことが出来る。 AudioControlは、ゲイン、ミュート、データソース選択などといった、そのオブジェクトの特定の側面を表し、操作するプロパティを提供する。 多くの共通コントロールは、AudioDeviceかAudioStreamのプロパティとして利用可能である。 AudioDevice系ルーチン AudioDeviceAddIOProc 説明 AudioDeviceに指定のAudioDeviceIOProcを登録する。 引数 AudioDeviceID inDevice AudioDeviceIOProc inProc 登録するAudioDeviceIOProc void*inClientData IOProc呼び出し時に渡されるユーザーデータへのポインタ 返値 OSStatus 成功または失敗を返す。 詳解 クライアントは指定したデバイス用に複数のIOProcを持つかもしれないが、デバイスは扱える数しか受け入れない。クライアントが一時に2つ以上のIOProcを登録するのは推奨されず、システムリソースを浪費する可能性がある事に注意されたい。正確にいえば、必要なミキシングはクライアントで全て行う事が推奨されているので、1つのIOProcしか必要ないのである。 互換性 Mac OS X v10.0以降 AudioDeviceAddPropertyListener 説明 プロパティ変化時の通知を受け取るAudioDevicePropertyListenerProcを登録する。 引数 AudioDeviceID inDevice リスナーを登録するAudioDevice UInt32 inChannel 監視するプロパティのチャンネル Boolean isInput 監視するAudioDeviceが入力デバイスか AudioDevicePropertyID inPropertyID 監視するプロパティのAudioDevicePropertyID AudioDevicePropertyListenerProc inProc リスナーとなるAudioDevicePropertyListenerProc void*inClientData リスナー呼び出し時に渡されるユーザーデータへのポインタ 返値 OSStatus 成功または失敗を返す。 詳解 AudioObjectAddPropertyListenerとAudioObjectPropertyListenerProcが同等の機能を提供している。 互換性 Mac OS X v10.0以降 AudioDeviceGetCurrentTime 説明 AudioDeviceの現在の時間を取得する。注意事項:デバイスは実行中でなければならない。 引数 AudioDeviceID inDevice 時間を取得するAudioDevice AudioTimeStamp*outTimel 得られたAudioTimeStamp型の現在時間 返値 OSStatus 成功または失敗を返す。kAudioHardwareNotRunningErrorならAudioDeviceが実行中ではない。 詳解 AudioObjectAddPropertyListenerとAudioObjectPropertyListenerProcが同等の機能を提供している。 互換性 Mac OS X v10.0以降 AudioDeviceGetNearestStartTime 説明 Query an AudioDevice to get a time equal to or later than the given time that is the best time to start IO. 引数 AudioDeviceID inDevice 問い合わせるAudioDevice AudioTimeStamp*ioRequestedStartTime AudioTimeStampのポインタで、入力では要求開始時間を入れる。出力では、要求時間と同値ないし、それ以降が返る。これはそのデバイスの制限によって決定される。 UInt32 inFlags 関数の挙動を変えるフラグ 返値 OSStatus 成功または失敗を返す。kAudioHardwareNotRunningErrorならAudioDeviceが実行中ではない。kAudioHardwareNotRunningErrorならAudioDeviceは本機能をサポートしていない。 詳解 返値の時間はデバイスとシステムの制限により決定される。例えば、音声と映像データを扱うデバイスドライバーはビデオフレーム単位での開始時間しか対応していないかもしれない。同様に、デバイスが既に1つ以上の有効なIOProcを持っていた場合、現在のIOProc処理が途切れないように、開始時間が次のIOサイクルの開始までズレるだろう。開始時間がズレる別の理由に、最適なバッファアクセスに揃える準備のためがある。本関数を使うにはデバイスが実行中でなければならない。 互換性 Mac OS X v10.3以降 AudioDeviceGetProperty 説明 AudioDeviceオブジェクトにプロパティを問い合わせ、指定のバッファにプロパティデータを置く。 引数 AudioDeviceID inDevice 問い合わせるAudioDevice UInt32 inChannel プロパティを問い合わせるチャンネル。0はマスターチャンネルである。 Boolean isInput 問い合わせるAudioDeviceが入力デバイスか。 AudioDevicePropertyID inPropertyID 問い合わせるプロパティの AudioDevicePropertyID UInt32 *ioPropertyDataSize outPropertyDataが指すバッファのサイズを入れる。出力ではバッファの使用量が返る。 void *outPropertyData プロパティデータが置かれるバッファ 返値 OSStatus 成功または失敗を返す。 詳解 AudioObjectGetPropertyDataが同等の機能を提供している。 互換性 Mac OS X v10.0以降 AudioDeviceGetPropertyInfo 説明 指定のAudioDeviceプロパティの情報を取得する。 引数 AudioDeviceID inDevice 問い合わせるAudioDevice UInt32 inChannel プロパティを問い合わせるチャンネル。0はマスターチャンネルである。 Boolean isInput 問い合わせるAudioDeviceが入力デバイスか。 AudioDevicePropertyID inPropertyID 問い合わせるプロパティの AudioDevicePropertyID UInt32 *outSize UInt32のポインタで、プロパティデータのバイト数が返る。サイズ情報が必要なければNULLでよい。 Boolean *outWritable Booleanのポインタで、プロパティが設定可能かどうかが返る。書き込み可能性が必要なければNULLでよい。 返値 OSStatus 成功または失敗を返す。 詳解 AudioObjectHasProperty(), AudioObjectIsPropertySettable(), AudioObjectGetPropertyDataSize()が同等の機能を提供している。 互換性 Mac OS X v10.0以降 AudioDeviceRead 説明 Read some data from an AudioDevice starting at the given time. 引数 AudioDeviceID inDevice 読み取るAudioDevice const AudioTimeStamp *inStartTime データを読み取る時間を表すAudioTimeStamp。一般的に、有効な時間範囲(フレーム数)は、「(現在の時間) - (最大IOバッファサイズ)」から「(現在の時間) - (安全オフセット)」である。 AudioBufferList *outData kAudioDevicePropertyStreamConfigurationで得られるのと同じサイズかつ同じ形式のAudioBufferList。加えて、このAudioBufferListはkAudioDevicePropertyRegisterBufferListを通して登録済みのものでなければならない。出力では、mDataSizeフィールドが読み込んだデータ量で更新される。 返値 OSStatus 成功または失敗を返す。kAudioHardwareUnsupportedOperationErrorならばAudioDeviceは直接読込みをサポートしていない。 詳解 機器セットの登場で、AudioDeviceReadの必要性はなくなった。従って、本関数は将来廃止予定である。 互換性 Mac OS X v10.1以降 AudioDeviceRemoveIOProc 説明 AudioDeviceから指定のAudioDeviceIOProcの登録を解除する。 引数 AudioDeviceID inDevice IOProcの登録を解除するAudioDevice AudioDeviceIOProc inProc 登録解除するIOProc 返値 OSStatus 成功または失敗を返す。 互換性 Mac OS X v10.0以降 AudioDeviceRemovePropertyListener 説明 プロパティ変化時の通知を受け取るAudioDevicePropertyListenerProcの登録を解除する。 引数 AudioDeviceID inDevice リスナーの登録を解除するAudioDevice UInt32 inChannel 登録を解除するプロパティのチャンネル Boolean isInput 登録を解除するAudioDeviceが入力デバイスかどうか AudioDevicePropertyID inPropertyID 監視を止めるプロパティのAudioDevicePropertyID AudioDevicePropertyListenerProc inProc 登録を解除するAudioDevicePropertyListenerProc 返値 OSStatus 成功または失敗を返す。 詳解 AudioObjectRemovePropertyListenerとAudioObjectPropertyListenerProcが同等の機能を提供している。 互換性 Mac OS X v10.0以降 AudioDeviceSetProperty 説明 AudioObjectのプロパティ値を指定したデータで変更する。 引数 AudioDeviceID inDevice 変更するAudioObject const AudioTimeStamp *inWhen プロパティ値を変更するデバイス時間を示したAudioTimeStampのポインタ。NULLなら直ちに変更する。 UInt32 inChannel 変更するプロパティのチャンネル。0はマスターチャンネルである。 Boolean isInput 変更するAudioDeviceのセクション AudioDevicePropertyID inPropertyID 変更するプロパティのAudioDevicePropertyID UInt32 inPropertyDataSize inPropertyDataが指すバッファの大きさ const void* inPropertyData 変更するプロパティデータを含むバッファ 返値 OSStatus 成功または失敗を返す。 詳解 多くのプロパティは非同期的に変更され、HALがリスナーを呼び出すまでプロパティの値が更新されたと見なすべきではない点に注意されたい。また、AudioObjectGetPropertyData()が同等の機能を提供している。 互換性 Mac OS X v10.0以降 AudioDeviceStart 説明 指定したAudioDeviceIOProcのIO処理を開始する。 引数 AudioDeviceID inDevice IOProcを開始するAudioDevice AudioDeviceIOProc inProc 開始するAudioDeviceIOProc。NULLを指定した場合、IOProcが登録されているか否かに関わらずハードウェアの処理を開始する点に注意されたい。これは、AudioDeviceのいずれかのタイミングサービスが使用される事になっている場合に有用である。対するAudioDeviceStopのIOProcをNULLで呼び出すと、ハードウェアの停止をリクエストする。 返値 OSStatus 成功または失敗を返す。 互換性 Mac OS X v10.0以降 AudioDeviceStartAtTime 説明 指定したAudioDeviceIOProcのIO処理を開始し、AudioDeviceのIOサイクルを指定の時間に揃える。 引数 AudioDeviceID inDevice IOProcを開始するAudioDevice AudioDeviceIOProc inProc 開始するAudioDeviceIOProc。 NULLを指定した場合、IOProcが登録されているか否かに関わらずハードウェアの処理を開始する点に注意されたい。 AudioTimeStamp *ioRequestedStartTime AudioTimeStampのポインタで、入力ではIOProcの開始時間を指定する。出力はIOProcが実際に開始された時間が返る。 UInt32 inFlags 関数の挙動を変えるフラグ。inProcとioRequestedStartTimeがNULLではなくkAudioHardwareUnsupportedOperationErrorが返ったならば、AudioDeviceは時間指定による開始に対応していない。 返値 OSStatus 成功または失敗を返す。 互換性 Mac OS X v10.3以降 AudioDeviceStop 説明 指定したAudioDeviceIOProcのIO処理を停止する。 引数 AudioDeviceID inDevice IOProcを止めるAudioDevice AudioDeviceIOProc inProc 停止するAudioDeviceIOProc 返値 OSStatus 成功または失敗を返す。 互換性 Mac OS X v10.0以降 AudioDeviceTranslateTime 説明 指定のAudioDevice基準時間を別のAudioDevice基準時間に変換する。デバイスは実行中でなければならない点に注意されたい。 引数 AudioDeviceID inDevice 基準時間変換先のAudioDevice const AudioTimeStamp *inTime 変換する時間 AudioTimeStamp *outTime 変換された時間が出力される。入力ではmFlagフィールドでどの時間形式に変換するか指定する。全てのデバイスが全ての時間形式に対応するわけではないので、出力ではmFlagフィールドに実際に行われた変換形式が入る。 返値 OSStatus 成功または失敗を返す。kAudioHardwareNotRunningErrorならばAudioDeviceは実行中ではない事を示す。 互換性 Mac OS X v10.0以降 AudioHardwareAddPropertyListener 説明 指定のプロパティ変化時に通知を受け取るAudioHardwarePropertyListenerProcを登録する。 AudioHardwarePropertyID inPropertyID 監視するプロパティのAudioHardwarePropertyID AudioHardwarePropertyListenerProc inProc 呼ばれるAudioHardwarePropertyListenerProc void *inClientData リスナー呼び出し時に渡されるユーザーデータへのポインタ 返値 OSStatus 成功または失敗を返す。 詳解 AudioObjectAddPropertyListenerとAudioObjectPropertyListenerProcが同等の機能を提供している。 互換性 Mac OS X v10.0以降 AudioHardwareAddRunLoopSource 説明 指定のCFRunLoopSourceをHALの通知用CFRunLoopに追加する。 引数 CFRunLoopSourceRef inRunLoopSource 追加するCFRunLoopSource 返値 OSStatus 成功または失敗を返す。 詳解 HALが通知のために使うCFRunLoopSourceはkAudioHardwarePropertyRunLoopによって規定される。kAudioHardwarePropertyRunLoopが変化した場合、本関数で追加されたCFRunLoopSourceは自動的に新しいCFRunLoopに転送されるだろう。 互換性 Mac OS X v10.3以降 AudioHardwareGetProperty 説明 AudioSystemObjectにプロパティを問い合わせ、指定のバッファにそのデータを置く。 引数 AudioHardwarePropertyID inPropertyID 問い合わせるプロパティのAudioHardwarePropertyID UInt32 *ioPropertyDataSize UInt32で、入力ではoutPropertyDataが指すバッファサイズを示す。出力ではバッファの使用量が返る。 void *outPropertyData AudioSystemObjectがプロパティのデータを置くバッファ 返値 OSStatus 成功または失敗を返す。 詳解 AudioObjectGetPropertyData()が同等の機能を提供している。 互換性 Mac OS X v10.0以降 AudioHardwareGetPropertyInfo 説明 指定のプロパティに関する情報を取得する。 引数 AudioHardwarePropertyID inPropertyID 問い合わせるプロパティのAudioHardwarePropertyID UInt32 *outSize プロパティデータサイズのバイト数を受け取るUInt32へのポインタ。サイズ情報が不要ならばNULLとすることが出来る。 Boolean *outWritable 指定プロパティの書き込み可能フラグを受け取るBooleanへのポインタ。書き込み可能情報が不要ならばNULLとすることが出来る。 返値 OSStatus 成功または失敗を表す。 詳解 AudioObjectHasProperty(), AudioObjectIsPropertySettable(), AudioObjectGetPropertyDataSize()が同等の機能を提供している。 互換性 Mac OS X v10.0以降 AudioHardwareRemovePropertyListener 説明 指定のプロパティの変化時に通知を受け取るAudioHardwarePropertyListenerProcの登録を解除する 引数 AudioHardwarePropertyID inPropertyID リッスンを止めるプロパティのAudioHardwarePropertyID AudioHardwarePropertyListenerProc inProc 登録を解除するAudioHardwarePropertyListenerProc 返値 OSStatus 成功または失敗を表す。 詳解 AudioObjectPropertyListenerProcと併せてAudioObjectRemovePropertyListener()が同等の機能を提供している。 互換性 Mac OS X v10.0以降 AudioHardwareRemoveRunLoopSource 説明 指定のCFRunLoopSourceをHALの通知CFRunLoopから削除する。 引数 CFRunLoopSourceRef inRunLoopSource 削除するCFRunLoopSource 返値 OSStatus 成功または失敗を表す。 詳解 HALが通知用に使用するCFRunLoopはkAudioHardwarePropertyRunLoopで特定できる。 互換性 Mac OS X v10.3以降 AudioHardwareSetProperty 説明 指定プロパティの値を提供データで変更するようにAudioSystemObjectに伝える 引数 AudioHardwarePropertyID inPropertyID 変更するプロパティのAudioHardwarePropertyID UInt32 inPropertyDataSize inPropertyDataが指すバッファのサイズを表すUInt32値 const void*inPropertyData プロパティ値の変更に使うデータを含むバッファ 返値 OSStatus 成功または失敗を表す。 詳解 多くのプロパティ値は非同期で変化するので、HALがリスナーを呼び出すまでプロパティ値が変更されたと考えるべきではない。また、AudioObjectGetPropertyData()が同等の機能を提供している。 互換性 Mac OS X v10.0以降 AudioHardwareUnload 説明 このルーチンが呼ばれると、処理中の全デバイスの全てのI/Oが終了し、解放可能な全てのリソースが解放される。本ルーチンは本質的にHALを非初期化状態へと戻す。 引数 なし 返値 OSStatus 成功または失敗を表す。 互換性 Mac OS X v10.1以降 AudioObject系ルーチン AudioObjectAddPropertyListener 説明 プロパティ変化の通知を受け取るAudioObjectPropertyListenerProcを登録する。 引数 AudioObjectID inObjectID const AudioObjectPropertyAddress *inAddress リスナーに通知されるプロパティ。 AudioObjectPropertyListenerProc inListener リスナー void *inClientData リスナーが呼ばれた際に渡されるユーザーデータのポインタ。 返値 OSStatus 成功または失敗を返す。 互換性 Mac OS X v10.4以降 AudioObjectGetPropertyData 説明 AudioObjectにプロパティを問い合わせ、指定したバッファにそのデータを置く。 引数 AudioObjectID inObjectID const AudioObjectPropertyAddress *inAddress 問い合わせるプロパティを示すAudioObjectPropertyAddress UInt32 inQualifierDataSize inQualifierDataが指しているバッファの大きさ。全てのプロパティが修飾データを要求するわけではなく、必要のないものは0にする。 const void*inQualifierData 問い合わせるプロパティ値の決定に使われる修飾データのバッファ。全てのプロパティが修飾データを要求するわけではなく、必要のないものはNULLにする。 UInt32*ioDataSize outDataが指しているバッファのサイズを渡す。関数呼び出し後、バッファの使用量が返る。 void*outData AudioObjectがプロパティのデータを置くバッファ。 返値 OSStatus 成功または失敗を返す。 互換性 Mac OS X v10.4以降 AudioObjectGetPropertyDataSize 説明 AudioObjectにプロパティのデータサイズを問い合わせる。 引数 AudioObjectID inObjectID 問い合わせるAudioObject。 const AudioObjectPropertyAddress*inAddress 問い合わせるプロパティを示すAudioObjectPropertyAddress UInt32 inQualifierDataSize inQualifierDataが指しているバッファの大きさ。全てのプロパティが修飾データを要求するわけではなく、必要のないものは0にする。 const void*inQualifierData 問い合わせるプロパティ値の決定に使われる修飾データのバッファ。全てのプロパティが修飾データを要求するわけではなく、必要のないものはNULLにする。 UInt32*outDataSize プロパティデータが必要とするバイト数。 返値 OSStatus 成功または失敗を返す。 互換性 Mac OS X v10.4以降 AudioObjectHasProperty 説明 AudioObjectにプロパティを持っているかどうかを問い合わせる。 引数 AudioObjectID inObjectID 問い合わせるAudioObject。 const AudioObjectPropertyAddress*inAddress 問い合わせるプロパティを示すAudioObjectPropertyAddress 返値 Boolean AudioObjectがプロパティを持っているかどうか。 互換性 Mac OS X v10.4以降 AudioObjectIsPropertySettable 説明 AudioObjectにプロパティがAudioObjectSetPropertyDataで設定できるかどうか問い合わせる。 引数 AudioObjectID inObjectID 問い合わせるAudioObject const AudioObjectPropertyAddress*inAddress 問い合わせるプロパティを示すAudioObjectPropertyAddress Boolean*outIsSettable プロパティが設定可能かどうか 返値 OSStatus 成功または失敗を返す。 互換性 Mac OS X v10.4以降 AudioObjectRemovePropertyListener 説明 プロパティ変化時の通知の受信リストからAudioObjectPropertyListenerProcの登録を解除する。 引数 AudioObjectID inObjectID リスナーの登録を解除するAudioObject const AudioObjectPropertyAddress*inAddress 削除するリスナーのプロパティを示すAudioObjectPropertyAddress AudioObjectPropertyListenerProc inListener 削除するリスナー void*inClientData リスナー呼び出し時に渡されるユーザーデータへのポインタ 返値 OSStatus 成功または失敗を返す。 互換性 Mac OS X v10.4以降 AudioObjectSetPropertyData 説明 与えられたデータでAudioObjectのプロパティを変更する。 引数 AudioObjectID inObjectID 変更するAudioObject const AudioObjectPropertyAddress*inAddress 変更するプロパティを示すAudioObjectPropertyAddress UInt32 inQualifierDataSize inQualifierDataが指しているバッファの大きさ。全てのプロパティが修飾データを要求するわけではなく、必要のないものは0にする。 const void*inQualifierData 問い合わせるプロパティ値の決定に使われる修飾データのバッファ。全てのプロパティが修飾データを要求するわけではなく、必要のないものはNULLにする。 UInt32 inDataSize inDataが指すバッファのサイズ const void*inData 変更するプロパティデータを含むバッファ 返値 OSStatus 成功または失敗を返す。 詳解 プロパティの多くが非同期的に変更されると共に、HALがリスナーを呼び出すまで、値が反映されたと見なすべきではない。 互換性 Mac OS X v10.4以降 AudioObjectShow 説明 AudioObjectのテキスト形式の説明を標準出力に表示する。 引数 AudioObjectID inObjectID 表示するAudioObject 返値 void 互換性 Mac OS X v10.4以降 kAudioDevicePropertyPlugIn [OSStatus] AudioDevice用のIOAudioドライバープラグイン読込みで発生する何らかのエラーコード、もしくはプラグイン読込みが成功すればkAudioHardwareNoErrorを得る。このプロパティはプラグイン読込みに対応するIOAudioベースAudioDeviceドライバーにのみ存在する。 kAudioDevicePropertyConfigurationApplication [CFString] AudioDevice設定GUIを提供するアプリケーションのバンドルID。デフォルト値はオーディオMIDI設定.appのバンドルIDである。返されたCFObjectの解放は呼び出し側が責を負う。 kAudioDevicePropertyDeviceUID [CFString] AudioDeviceの永続的な識別子。AudioDeviceのUIDはシステムの起動をまたいでも持続する。UID文字列の中身はブラックボックスであり、個々のAudioDeviceハードウェアインスタンスに特有、ないしCPUに特有の内容を含む可能性がある。故に、それらはCPUを間の受け渡しやハードウェアの類似モデルの識別には適さない。 kAudioDevicePropertyModelUID A CFString that contains a persistent identifier for the model of an AudioDevice. The identifier is unique such that the identifier from two AudioDevices are equal if and only if the two AudioDevices are the exact same model from the same manufacturer. Further, the identifier has to be the same no matter on what machine the AudioDevice appears. kAudioDevicePropertyTransportType [UInt32] AudioDeviceとCPUの接続方法。Constants for some of the values for this property can be found in . kAudioDevicePropertyRelatedDevices [AudioDeviceIDの配列] 関連するAudioDevice装置を表す。IOAudioベースの装置では、同一のIOAudioDeviceオブジェクトを共有するAudioDevic同士は関連付けられる。 kAudioDevicePropertyClockDomain [UInt32] AudioDeviceが属するクロックドメイン。同じ値を持つAudioDeviceはハードウェア的に同期を取ることが出来る。しかし、値が0の場合、そのデバイスのクロックドメインは不定であることを表し、他の全てのデバイスから分離されていると考えるべし。たとえ、それらが同様にクロックドメインとして0を持っていたとしても。 kAudioDevicePropertyDeviceIsAlive [UInt32] 1はデバイスの準備が出来ており利用可能、0はデバイスは利用可能だが間もなく使えなくなることを表す。 kAudioDevicePropertyDeviceHasChanged [UInt32] 値は意味を持たない。The type of this property is a UInt32, but it's value has no meaning. This property exists so that clients can listen to it and be told when the configuration of the AudioDevice has changed in ways that cannot otherwise be conveyed through other notifications. In response to this notification, clients should re-evaluate everything they need to know about the device, particularly the layout and values of the controls. kAudioDevicePropertyDeviceIsRunning [UInt32] 0はAudioDeviceがIO処理を行っていない状態、1は処理を行っている状態を表す。留意すべきは、IOProcにNULLを渡しAudioDeviceStart()を呼ぶといった、実効性のないIOProcでもデバイスは走るという事である。また、このプロパティの通知は常にAudioDeviceのIOスレッドから送信される点にも留意されたい。 kAudioDevicePropertyDeviceIsRunningSomewhere [UInt32] 1はAudioDeviceがシステムの少なくとも1つのプロセスで実行中、0は全く実行していない状態を表す。 kAudioDevicePropertyDeviceCanBeDefaultDevice [UInt32] 1はAudioDeviceがkAudioHardwarePropertyDefaultInputDeviceかkAudioHardwarePropertyDefaultOutputDeviceの選択肢となれる事を示す。どちらのプロパティかはスコープに依存する。 kAudioDevicePropertyDeviceCanBeDefaultSystemDevice [UInt32] 1はAudioDeviceがkAudioHardwarePropertyDefaultSystemOutputDeviceの選択肢となれる事を示す。 kAudioDeviceProcessorOverload [UInt32] 値は意味を持たない。このプロパティは、AudioDeviceがIOサイクルのデッドラインを超えてしまった時に、それをクライアントに通知するために存在している。留意すべきは、本プロパティの通知は常にAudioDeviceのIOスレッドから送信される事である。 kAudioDevicePropertyHogMode [pid_t] 現在AudioDeviceに排他アクセスを行っているプロセスIDを表す。-1の時は全てのプロセスで利用可能な事を示す。AudioDeviceがnon-mixableモードの場合、そのHALはIOProcを開始する最初のプロセスに代わって自動で占有モード(hog mode)に切り替わる。 kAudioDevicePropertyLatency [UInt32] AudioDeviceの遅延フレーム数を表す。入力と出力の遅延時間は異なる可能性に注意すべきである。加えて、AudioDeviceのAudioStreamは更なる遅延を持つ可能性があるため、同様に問い合わせるべし。入出力デバイスとその各ストリームにレイテンシがあった場合、ストリームの総レイテンシはデバイスレイテンシとストリームレイテンシの合算である。 kAudioDevicePropertyBufferFrameSize [UInt32] IOバッファのフレーム数を表す。 kAudioDevicePropertyBufferFrameSizeRange [AudioValueRange] kAudioDevicePropertyBufferFrameSizeに関する最少~最大の包括的な値を表す。 kAudioDevicePropertyUsesVariableBufferFrameSizes A UInt32 that, if implemented by a device, indicates that the sizes of the buffers passed to an IOProc will vary by a small amount. The value of this property will indicate the largest buffer that will be passed and kAudioDevicePropertyBufferFrameSize will indicate the smallest buffer that will get passed to the IOProc. The usage of this property is narrowed to only allow for devices whose buffer sizes vary by small amounts greater than kAudioDevicePropertyBufferFrameSize. It is not intended to be a license for devices to be able to send buffers however they please. Rather, it is intended to allow for hardware whose natural rhythms lead to this necessity. kAudioDevicePropertyStreams [AudioStreamID配列] AudioDeviceのAudioStreamを表す。このプロパティの通知を受け取った場合、そのデバイスの取得済みAudioStreamIDは全て無効となり、再取得が必要な点に留意されたし。 kAudioDevicePropertySafetyOffset [UInt32] whose value indicates the number for frames in ahead (for output) or behind (for input the current hardware position that is safe to do IO. kAudioDevicePropertyIOCycleUsage [Float32] A Float32 whose range is from 0 to 1. This value indicates how much of the client portion of the IO cycle the process will use. The client portion of the IO cycle is the portion of the cycle in which the device calls the IOProcs so this property does not the apply to the duration of the entire cycle. kAudioDevicePropertyStreamConfiguration This property returns the stream configuration of the device in an AudioBufferList (with the buffer pointers set to NULL) which describes the list of streams and the number of channels in each stream. This corresponds to what will be passed into the IOProc. kAudioDevicePropertyIOProcStreamUsage An AudioHardwareIOProcStreamUsage structure which details the stream usage of a given IO proc. If a stream is marked as not being used, the given IOProc will see a corresponding NULL buffer pointer in the AudioBufferList passed to it's IO proc. Note that the number of streams detailed in the AudioHardwareIOProcStreamUsage must include all the streams of that direction on the device. Also, when getting the value of the property, one must fill out the mIOProc field of the AudioHardwareIOProcStreamUsage with the address of the of the IOProc whose stream usage is to be retrieved. kAudioDevicePropertyPreferredChannelsForStereo [UInt32の配列] デバイスのステレオIOと使用するチャンネル番号の関係を示す。第1要素が左チャンネルで、第2要素が右チャンネルである。このプロパティは入力と出力で異なる値を取ることができ、使用するチャンネル番号に制限はない。 kAudioDevicePropertyPreferredChannelLayout [AudioChannelLayout] AudioDeviceのチャンネルをそれぞれどのように使うべきかを表す。 kAudioDevicePropertyNominalSampleRate [Float64] AudioDeviceの現在の公称サンプリングレート。 kAudioDevicePropertyAvailableNominalSampleRates [AudioValueRangeの配列] AudioDeviceの公称サンプリングレートの有効な範囲。 kAudioDevicePropertyActualSampleRate [Float64] AudioDeviceのタイムスタンプによって計測された現在の実際のサンプリングレート。 AudioDevice Properties Implemented via AudioControl objects kAudioDevicePropertyJackIsConnected UInt32 0ならばエレメントとスコープに対応するジャックに何も差さっていない事を意味する。AudioBooleanControlのサブクラスAudioJackControlで実装されている。 kAudioDevicePropertyVolumeScalar Float32 音量。0.0~1.0の値を取る。AudioControlのサブクラスAudioVolumeControlで実装されている。 kAudioDevicePropertyVolumeDecibels Float32 音量のdB値。 AudioControlのサブクラスAudioVolumeControlで実装されている。 kAudioDevicePropertyVolumeRangeDecibels AudioValueRange 制御可能な最小~最大のdB値。AudioControlのサブクラスAudioVolumeControlで実装されている。 kAudioDevicePropertyVolumeScalarToDecibels Float32 音量のスカラー値を入力に取り、等価なdB値を出力する。AudioControlのサブクラスAudioVolumeControlで実装されている。 kAudioDevicePropertyVolumeDecibelsToScalar Float32 音量のdB値を入力に取り、等価なスカラー値を出力する。AudioControlのサブクラスAudioVolumeControlで実装されている。 kAudioDevicePropertyStereoPan Float32 0.0が完全に左、1.0が完全に右、0.5が中央の定位。 AudioControlのサブクラスAudioStereoPanControlで実装されている。 kAudioDevicePropertyStereoPanChannels UInt32配列 An array of two UInt32s that indicate which elements of the owning object the signal is being panned between. This property is implemented by an AudioControl object that is a subclass of AudioStereoPanControl. kAudioDevicePropertyMute UInt32 1はミュートが有効であることを意味し、エレメントは無音状態になる。AudioControlのサブクラスAudioMuteControlで実装されている。 kAudioDevicePropertySolo UInt32 1はそのエレメントの音だけが聞こえ、他のエレメントは無音状態であることを示す。AudioControlのサブクラスAudioMuteControlで実装されている。 kAudioDevicePropertyDataSource UInt32 現在選択中のデータソースのアイテムID。AudioControlのサブクラスAudioDataSourceControlで実装されている。 kAudioDevicePropertyDataSources UInt32配列 現在利用可能なすべてのデータソースのIDを表す。AudioControlのサブクラスAudioDataSourceControlで実装されている。 kAudioDevicePropertyDataSourceNameForIDCFString AudioValueTranslation データソースIDを人間が読める名前に変換する。入力データは変換したいUInt32のアイテムIDで、出力データはCFStringである。返されたCFObject解放の責は呼び出し側が負う。AudioControlのサブクラスAudioDataSourceControlで実装されている。 kAudioDevicePropertyClockSource UInt32 現在選択中のクロックソースのアイテムID。AudioControlのサブクラスAudioClockControlで実装されている。 kAudioDevicePropertyClockSources UInt32配列 現在利用可能な全クロックソースの全てのID。AudioControlのサブクラスAudioClockControlで実装されている。 kAudioDevicePropertyClockSourceNameForIDCFString AudioValueTranslation クロックソースIDを人間が読める名前に変換する。入力データは変換したいUInt32のアイテムIDで、出力データはCFStringである。返されたCFObject解放の責は呼び出し側が負う。AudioControlのサブクラスAudioClockControlで実装されている。 kAudioDevicePropertyClockSourceKindForID This property returns a UInt32 that identifies the kind of clock source the item ID refers to using an AudioValueTranslation structure. The input data is the UInt32 containing the item ID and the output data is the UInt32. Values for this property are defined in . kAudioDevicePropertyPlayThru UInt32 0はスルー再生が無効、1は有効を表す。AudioControlのサブクラスAudioMuteControlで実装されている。Further, the control that implements this property is only available through kAudioDevicePropertyScopePlayThrough. kAudioDevicePropertyPlayThruSolo A UInt32 where a value of 1 means that just that play through element is audible and the other elements are inaudible. The property is implemented by an AudioControl object that is a subclass of AudioSoloControl. Further, the control that implements this property is only available through kAudioDevicePropertyScopePlayThrough. kAudioDevicePropertyPlayThruVolumeScalar A Float32 that represents the value of the volume control. The range is between 0.0 and 1.0 (inclusive). This property is implemented by an AudioControl object that is a subclass of AudioVolumeControl.Further, the control that implements this property is only available through kAudioDevicePropertyScopePlayThrough. kAudioDevicePropertyPlayThruVolumeDecibels A Float32 that represents the value of the volume control in dB. This property is implemented by an AudioControl object that is a subclass of AudioVolumeControl. Further, the control that implements this property is only available through kAudioDevicePropertyScopePlayThrough. kAudioDevicePropertyPlayThruVolumeRangeDecibels An AudioValueRange that contains the minimum and maximum dB values the control can have. This property is implemented by an AudioControl object that is a subclass of AudioVolumeControl. Further, the control that implements this property is only available through kAudioDevicePropertyScopePlayThrough. kAudioDevicePropertyPlayThruVolumeScalarToDecibels A Float32 that on input contains a scalar volume value for the and on exit contains the equivalent dB value. This property is implemented by an AudioControl object that is a subclass of AudioVolumeControl. Further, the control that implements this property is only available through kAudioDevicePropertyScopePlayThrough. kAudioDevicePropertyPlayThruVolumeDecibelsToScalar A Float32 that on input contains a dB volume value for the and on exit contains the equivalent scalar value. This property is implemented by an AudioControl object that is a subclass of AudioVolumeControl. Further, the control that implements this property is only available through kAudioDevicePropertyScopePlayThrough. kAudioDevicePropertyPlayThruStereoPan A Float32 where 0.0 is full left, 1.0 is full right, and 0.5 is center. This property is implemented by an AudioControl object that is a subclass of AudioStereoPanControl. Further, the control that implements this property is only available through kAudioDevicePropertyScopePlayThrough. kAudioDevicePropertyPlayThruStereoPanChannels An array of two UInt32s that indicate which elements of the owning object the signal is being panned between. This property is implemented by an AudioControl object that is a subclass of AudioStereoPanControl. Further, the control that implements this property is only available through kAudioDevicePropertyScopePlayThrough. kAudioDevicePropertyPlayThruDestination A UInt32 whose value is the item ID for the currently selected play through data destination. This property is implemented by an AudioControl object that is a subclass of AudioDataDestinationControl. Further, the control that implements this property is only available through kAudioDevicePropertyScopePlayThrough. kAudioDevicePropertyPlayThruDestinations An array of UInt32s that are represent all the IDs of all the play through data destinations currently available. This property is implemented by an AudioControl object that is a subclass of AudioDataDestinationControl. Further, the control that implements this property is only available through kAudioDevicePropertyScopePlayThrough. kAudioDevicePropertyPlayThruDestinationNameForIDCFString This property translates the given play through data destination item ID into a human readable name using an AudioValueTranslation structure. The input data is the UInt32 containing the item ID to translated and the output data is a CFString. The caller is responsible for releasing the returned CFObject. This property is implemented by an AudioControl object that is a subclass of AudioDataDestinationControl. Further, the control that implements this property is only available through kAudioDevicePropertyScopePlayThrough. kAudioDevicePropertyChannelNominalLineLevel UInt32 現在選択中のラインレベルのアイテムID。AudioControlのサブクラスAudioLineLevelControlで実装されている。 kAudioDevicePropertyChannelNominalLineLevels An array of UInt32s that represent all the IDs of all the nominal line levels currently available. This property is implemented by an AudioControl object that is a subclass of AudioLineLevelControl. kAudioDevicePropertyChannelNominalLineLevelNameForIDCFString This property translates the given nominal line level item ID into a human readable name using an AudioValueTranslation structure. The input data is the UInt32 containing the item ID to be translated and the output data is a CFString. The caller is responsible for releasing the returned CFObject. This property is implemented by an AudioCOntrol object that is a subclass of AudioLineLevelControl. kAudioDevicePropertyDriverShouldOwniSub A UInt32 where a value of 0 means that the AudioDevice should not claim ownership of any attached iSub and a value of 1 means that it should. Note that this property is only available for built-in devices and for USB Audio devices that use the standard class compliant driver. This property is implemented by an AudioControl object that is a subclass of AudioISubOwnerControl. kAudioDevicePropertySubVolumeScalar A Float32 that represents the value of the LFE volume control. The range is between 0.0 and 1.0 (inclusive). This property is implemented by an AudioControl object that is a subclass of AudioLFEVolumeControl. kAudioDevicePropertySubVolumeDecibels A Float32 that represents the value of the LFE volume control in dB. This property is implemented by an AudioControl object that is a subclass of AudioLFE VolumeControl. kAudioDevicePropertySubVolumeRangeDecibels An AudioValueRange that contains the minimum and maximum dB values the control can have. This property is implemented by an AudioControl object that is a subclass of AudioLFEVolumeControl. kAudioDevicePropertySubVolumeScalarToDecibels A Float32 that on input contains a scalar volume value for the and on exit contains the equivalent dB value. This property is implemented by an AudioControl object that is a subclass of AudioLFEVolumeControl. kAudioDevicePropertySubVolumeDecibelsToScalar A Float32 that on input contains a dB volume value for the and on exit contains the equivalent scalar value. This property is implemented by an AudioControl object that is a subclass of AudioLFEVolumeControl. kAudioDevicePropertySubMute UInt32 where a value of 1 means that mute is enabled making the LFE on that element inaudible. The property is implemented by an AudioControl object that is a subclass of AudioLFEMuteControl. AudioStream Properties kAudioStreamPropertyDirection UInt32 0はAudioStreamが出力ストリーム、1は入力ストリームを表す。 kAudioStreamPropertyTerminalType UInt32 whose value describes the general kind of functionality attached to the AudioStream. Constants that describe some of the values of this property are defined in kAudioStreamPropertyStartingChannel UInt32 that specifies the first element in the owning device that corresponds to element one of this stream. kAudioStreamPropertyLatency A UInt32 containing the number of frames of latency in the AudioStream. Note that the owning AudioDevice may have additional latency so it should be queried as well. If both the device and the stream say they have latency, then the total latency for the stream is the device latency summed with the stream latency. kAudioStreamPropertyVirtualFormat AudioStreamBasicDescription AudioStreamの現在の仮想データ形式。 仮想フォーマットは、所有するAudioDeviceがIOトランザクション処理を行うための全てのIOProc内でのデータ形式を指す。 kAudioStreamPropertyAvailableVirtualFormats AudioStreamRangedDescription配列 AudioStreamが利用可能な仮想データ形式リスト。 仮想フォーマットは、所有するAudioDeviceがIOトランザクションを処理を行うためのハードウェア内でのデータ形式を指す。 kAudioStreamPropertyPhysicalFormat AudioStreamBasicDescription AudioStreamの現在の物理データ形式。物理フォーマットは、所有するAudioDeviceがIOトランザクションを処理を行うためのハードウェア内でのデータ形式を指す。 kAudioStreamPropertyAvailablePhysicalFormats AudioStreamRangedDescription配列 AudioStreamが利用可能な物理データ形式リスト。 物理フォーマットは、所有するAudioDeviceがIOトランザクションを処理を行うためのハードウェア内でのデータ形式を指す。 Discussion AudioStream is a subclass of AudioObject and has only the single scope, kAudioObjectPropertyScopeGlobal. They have a master element and an element for each channel in the stream numbered upward from 1. Note that AudioStream objects share AudioControl objects with their owning AudioDevice. Consequently, all the standard AudioControl related property selectors implemented by AudioDevices are also implemented by AudioStreams. The same constants are to be used for such properties. translation/working/翻訳2.1421809277.txt.gz 最終更新: 2015-01-21 12:01by Decomo