• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Can't load preset into iOS Audio Unit Sampler
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can't load preset into iOS Audio Unit Sampler


  • Subject: Re: Can't load preset into iOS Audio Unit Sampler
  • From: Douglas Scott <email@hidden>
  • Date: Wed, 13 Feb 2013 08:13:50 -0800

Just to head off future confusion:  There is no "root" in an iOS app.  There is only the bundle directory and the "utility" directories like Documents/ and Downloads/, which are up one level in the installed app from the bundle directory.  No audio files load via absolute path.  All paths are remapped according to the rules described in TN2283.

Changing the content of your project has no effect on the already-installed content on your device.  New things will be added, but old things will remain until you delete the app.  Beyond this, I do not know what caused your problem described below.

Glad you are up and running.

-DS

On Feb 12, 2013, at 11:58 PM, Jeffrey Fried wrote:

I finally got my app to load the trombone samples.  I tracked down the file locations: the samples were where they were supposed to be, in a path Sounds/Tbone relative to the root.  But they were also in the root path as well.  Interestingly, this is also true for the LoadPresetsDemo.

Anyway, I got the sampler to load the samples in the root directory using an absolute path, but I could not get at the samples in Sounds/Tbone with an absolute path.  Thinking that meant I chose the wrong options when loading adding the samples, I tried all the combinations with no luck.  Finally, I deleted references to the sample files and folders from the project thinking this would remove them from the phone.  Imagine my surprise when it not only didn't remove them, but my app load the trombone samples successfully.  My aupreset file was pointing to the absolute path ending Sounds/Tbone/, so I decided to change it back to the original replaceable paths (e.g. ...Library/Audio/Sounds…) from the demo and that also worked.  I then tried it with the samples added back to the project and it still works.

Very strange.  All I can think of is that there must have been some bad configuration that got cleared out when I removed the references.  I had tried cleaning the project earlier to no avail.

Anyway, thanks for everyone's suggestions.   Even the lack of coffee inspired suggestion to check the bundle was helpful;  Finding where the files were located started the serendipity leading to a solution.  I'd still like to know what happened as I copied the layout of LoadPresetDemo exactly at least as far as audio goes: it has a Classes folder for its objective C files whereas mine are in the root directory; it has Resources, I have Supporting Files.


On Feb 12, 2013, at 9:40 AM, Douglas Scott wrote:

It is not the preset file that is not found -- it is the set of audio samples which are referenced by the (trombone) preset that AUSampler cannot find.
The vibes preset uses no external audio samples, which is why it works for you.

Please look at Tech Note TN2283 in the iOS Dev Library for information about how to set up your audio samples.

-DS

On Feb 12, 2013, at 8:59 AM, Gregory Wieber <email@hidden> wrote:

You'll want to go to build setting, and make sure the file is included in your target's bundle resources.

Best,

Gregory

Sent from my iPhone

On Feb 11, 2013, at 5:06 PM, Jeffrey Fried <email@hidden> wrote:

It appears that -43 is file not found.  From CoreAudioTypes.h: 43. Assuming that's the error, the quest is how the file could found in LoadPresetDemo, but not my project.  Is there another way to add audio files to an Xcode project besides the add Files option inside the Project Navigator?

Thanks -- Jeff Fried.
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
References: 
 >Re: Can't load preset into iOS Audio Unit Sampler (From: Jeffrey Fried <email@hidden>)
 >Re: Can't load preset into iOS Audio Unit Sampler (From: Gregory Wieber <email@hidden>)
 >Re: Can't load preset into iOS Audio Unit Sampler (From: Douglas Scott <email@hidden>)
 >Re: Can't load preset into iOS Audio Unit Sampler (From: Jeffrey Fried <email@hidden>)

  • Prev by Date: Re: Some questions and problems on recording in measurement mode
  • Next by Date: AUGraph init sequence questions
  • Previous by thread: Re: Can't load preset into iOS Audio Unit Sampler
  • Next by thread: Crash in AUGraphInitialize()
  • Index(es):
    • Date
    • Thread