Mac OSX 10.7 Lion AUPinkNoise does not compile - macos

Apple Technical Note TN2276 lists changes to audio unit code for Lion. I successfully applied the changes to FilterDemo sample and it compiles ok. Then I apple same changes to AUPinkNoise sample, but I get a linker error says undefined symbol _FilterFactory. I changed code in AUPinkNoise.cpp from
COMPONENT_ENTRY(AUPinkNoise)
to
AUDIOCOMPONENT_ENTRY(AUBaseFactory, AUPinkNoise)
But that does not help. Being new to core audio I have no idea how to fix this. Any ideas?

I had a similar problem, except with another audio unit project. From your description of the error, I think you forgot to edit the .exp file. In the .exp file you should have _"name"Entry and _"name"Factory. For example, in your case in the .exp file (located in the AUSource folder) it should be as follows
1:_AUPinkNoiseEntry
2:_AUPinkNoiseFactory
3:
Remember to have a blank line at the very end.
Also, you will want to edit the info.plist file as well by adding an AudioComponents Array entry and add AUPluginDispatch.cpp/h (located in the AUBase folder).

Related

Cannot delete mac alias file

I am having severe issue with mac alias. I have ana xcode project working fine except recently it denied to find a View controller class ("A.swift") to set in storyboard. Tried many tweaks with zero results. Finally I searched in finder in my main project directory for that view controller file name, and I found that I have some alias file as well for that view controller.
I cannot delete that alias, cannot locate the original file (no information in Get Info, Select New Original... is grayed).
Any help for this?
Note: I have two A.swift files for Mac OS and iOS, both in different directories.
Give it a try with rollback/checkout you last changes if you haven't made big.

Xcode command failed with exit code 1 AND error reading xcodeproj file

The app is being built on another persons computer and then sent to me to test. I am extremely new to this but have been testing apps for a few months. I just don't do programming at all. I can maneuver my way around inside Xcode 7.1 pretty well. However, I do need to fix these errors in order to test this current app. Can someone help me out?
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1
I also have another error that reads
Error reading '/Users/logjam3/Desktop/Cosmo Client/Cosmo Client.xcodeproj'
This is exactly the path to where my project is so I don't know why I get this error.
You have to change the prefix header source location. You can do this by searching for prefix header then changing the location by pressing the 'file' icon on the right sidebar of Xcode.

User data in xcode executable

I opened an executable built for OSX in a text editor (TextMate).
Within the last line of text there is this string:
/Users/FOOBAR/Documents/macapp/macapp/macapp/
macapp is the name of the executable.
However, FOOBAR, seems to be the username of the person who compiled this.
Is this something that Xcode will put into your executable on build?
If it helps, there are other string indicating the name of the Xcode program to be "/Applications/Xcode 2.app".
That's clearly a mistake on the part of the developer and has possibly been left behind from a previous debugging or testing session.
Getting details of particular directories that can be used by the app must be done using APIs like [NSFileManager URLsForDirectory:inDomains:] or NSSearchPathDirectory.

Running AntlrWorks2 stand-alone on Windows 7

I must be missing something. After downloading AntlrWorks2 I found the executable bin/antlrworks2.exe and bin/antlrworks264.exe. Aren't these supposed to be the standalone version of the tool? Neither works for me; after a NetBeans splash screen, the first times around I got an error message on missing packages; after a couple of times I chose to go on regardless, but now (still after the initial spash screen) there is simply nothing happening at all.
I can't find any tutorial or manual detailing how to run AntlrWorks stand-alone, so any help is much appreciated.
This is due to a bug in the NetBeans platform. I filed a report but it hasn't received a reply yet:
Cannot launch platform application after moving installation folder
Here is a workaround that does not delete any preferences you have customized:
I found that deleting just the var folder under the user's generated
.antlrworks2 settings folder resolves the issue...
Still an issue as of date of this post. Deleting the .antlrworks2 folder from \users\username\AppData\Roaming does work - you can find this folder by putting %APPDATA% into your file explorer address bar (exactly as shown) - that will go to the app data folder for your current user login session. Delete the .antlrworks2 folder and then re-run the app.

xcode localized string not loaded

I have met a strange problem with the localized strings. I have only a 'Localizable.strings' in my 'en.lproj' folder and it works fine. all the strings are shown on device. but the next time i compile it and run, it shows only the ID of the strings. even if i change nothing and only click on build&debug. and the next time it works fine again and next time again shown with IDs.
so does anyone knows why this is happening? it's kind of annoying that i always need to build twice.
My SOLUTION is at bottom:
I've been running into the same problem: Alternating runs yield correct, then incorrect translations (only for English though).
Adding "-NSShowNonLocalizedStrings YES" as an argument to the app yielded:
Localizable string "MyKey" not found in strings table "Localizable" of bundle CFBundle
So, I tried loading the key file directly from the bundle as a string and dumping it. Well, the times it did NOT work correctly, it was displaying a bunch of built-in iOS messages. So, I went to the APP file that was built, opened the package contents, and viewed the en.lproj/Localizable.strings file...and voila!!! The file had been filled with Apple iOS key/value pairs. On the next build, it was filled as expected.
Of course, this has nothing to do with the encoding of the files (which should be UTF-16). I have not been able to locate anything with mention of this specific problem.
MY SOLUTION:
I copied the contents of the legitimate english Localizable.strings file FROM THE APP PACKAGE (not from my source) into an XML file (when compiled, the .strings file are converted into XML) and added to my project. I then loaded this file into a dictionary at startup, and if the call to NSLocalizedString returned the key instead of the value, I did a lookup on the dictionary I loaded. In theory, you could do this for all languages, but I was only having the problem with english.
Yes, it's not the answer to the problem, but it's a workaround.
Check if you have more than one Localizable.strings in your project. Merging them into one solved it for me. (Check any external code you use e.g. ShareKit)

Resources