Running auval makes AUGraphOpen() return -50?
Running auval makes AUGraphOpen() return -50?
- Subject: Running auval makes AUGraphOpen() return -50?
- From: patrick machielse <email@hidden>
- Date: Tue, 30 Nov 2010 16:01:13 +0100
I have a project that uses 2 custom audio units in an AUGraph. During the build process the two audio units are rebuild in separate sub-projects and copied into the host app's resources bundle.
The last step in each sub-project's build process is running auval to test the newly build AU:
#
# Test our Audio Unit
#
# (1) copy Audio Unit to $USER_LIBRARY_DIR/Audio/Plug-Ins/Components/ for testing
cp -r "$BUILT_PRODUCTS_DIR/$FULL_PRODUCT_NAME" "$USER_LIBRARY_DIR/Audio/Plug-Ins/Components/"
# (2) only do a full test
/usr/bin/auval -v aufx clip Miik
# (3) remove test component
rm -r "$USER_LIBRARY_DIR/Audio/Plug-Ins/Components/$FULL_PRODUCT_NAME"
I believe the copy step is needed because it is not possible to point auval at an AU directly.
The Problem
-----------
4 times out of 5 my build host application won't work properly, returning '-50' from a call to AUGraphOpen(). The graph in question contains nodes for the tested AUs. Cleaning and rebuilding eventually makes 'something' happen to get things working correctly. After much agonizing and frustration it seems that 'touching' the ~/Library/Audio/Plug-Ins/Components/ folder resets some property on my system, and my application starts working properly...
However, adding the following line to my sub-project build script phase above does _not_ work reliably:
# (4) touch the Components folder, or AUGraphOpen may return -50
touch "$USER_LIBRARY_DIR/Audio/Plug-Ins/Components/"
It only works when I call this at the end of my host application's build process. Maybe there is a timing issue involved -- and if so my current solution probably isn't robust...
Questions
---------
- Am I doing something wrong, should I use auval diffrently?
- Which system component is monitoring ~/Library/Audio/Plug-Ins/Components/ and can I signal it directly?
Small aside: returning -50 from AUGraphOpen() is mostly no help at all. It would be great to get a more specific return code!
Thanks,
patrick
--
Patrick Machielse
Hieper Software
http://www.hieper.nl
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden