1
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

AudioUnitV2のExampleを動かす

Posted at

はじめに

AppleサイトにおけるAudioUnitプラグイン開発の最新のサンプルはAudioUnitV3のサンプルのみとなっています。

AudioUnitV2のサンプルXcodeプロジェクトはここにありますが、2016年を最後にメンテナンスはされておらず、最新の環境(2021年9月現在)ではそのままでは動きません。

ここでは、AudioUnitEffectExample内のFilterDemoプロジェクト をXcode 12.5, Mac OSX 10.15の環境でビルドするための手順をメモしておきます。(BigSurやApple Sillicon環境では試せていません)

AudioUnitEffectExample\FilterDemo.xcodeprojを開いて下記の手順で修正します。

1. "error: implicit declaration of function 'verify_noerr' is invalid in C99" の修正

HighSierraからマクロがリネームされ、アンダーバーを二つ頭につける形になったようです。昔の名前を使うには、プリプロセッサー定義で"-D__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES=1"を付加します。

FilterDemo, CocoaUIターゲットそれぞれについて"Build Settings"から下記のように設定してください。(実際のところ全てに設定しなくても良いかもしれませんが、どれが効いているかわからないので全部に設定しました)。

スクリーンショット 2021-09-06 4.51.52.png

2. "'CADebugMacros.h' file not found" の修正

PublicUtilityフォルダにあるファイルのうちサンプルで使っているファイルがXcodeのプロジェクトに追加されていないのが原因です。PublicUtilityフォルダにあるファイルを全て選択してXcodeのPublicUtilityフォルダ以下にドラッグアンドドロップで追加します

スクリーンショット 2021-09-06 4.54.32.png

3. ビルド&インストール

これでとりあえずビルドは通るようになりました。

Xcode上で、Products\Filter.componentを右クリックして、"Open in finder"でcomponentファイルのあるフォルダを開きます。

Filter.componentを下記のいずれかにコピーしてください。これでLogic等から読み込めるようになるはずです。

  • ~Library/Audio/Plug-Ins/Components/
  • /Library/Audio/Plug-Ins/Components

スクリーンショット 2021-09-06 5.03.14.png

1
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?