Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6154025
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T20:11:29+00:00 2026-05-23T20:11:29+00:00

I am new to sound in XCode, I am using sound effects. I want

  • 0

I am new to sound in XCode, I am using sound effects. I want a sound effect and I know that for sound effects you should use audio toolbox framework, what is the code? How do I code it, what are the variables and properties?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T20:11:30+00:00Added an answer on May 23, 2026 at 8:11 pm

    First, convert the sound to lei16 caf. Here’s a good write up that explains why you should use that format.

    afconvert -d LEI16 -f caff /path/to/mp3-or-wav-or-whatever
    

    Here’s the code to play it.

    // I usually store "mySound" in an instance variable in the view
    // controller init
    CFURLRef mySoundUrl = CFBundleCopyResourceURL(CFBundleGetMainBundle(), CFSTR("my_sound"), CFSTR("caf"), NULL);
    SystemSoundID mySound;
    AudioServicesCreateSystemSoundID(mySoundUrl, &mySound);
    CFRelease(mySoundUrl);
    
    // Plays the sound.
    AudioServicesPlaySystemSound(mySound);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am doing the following in my code: _sound = new Sound(); _sound.addEventListener( SampleDataEvent.SAMPLE_DATA,
Im a newb. I have a audio sound playing as soon as the new
So If I play one sound I use sound = new Sound(); ... sound.addEventListener(
In AS3 i've created a code that load a sound and execute it in
New to IOS dev, I'm testing AVAudioplayer to play sound on iPad2 (Xcode 4.2
var sound:Sound = new Sound(); var req:URLRequest = new URLRequest(url); sound.load(url) I want to
Having the following code: var loadingSoundTitle:String; var loadingSound:Sound = new Sound(); function loadFile(str:String) {
I'm struggling with a flash file that I want to play two different sound
has anyone been able to use the new Sound method loadPCMFromByteArray in Flash 11
My as3 code to load external sound: var s:Sound = new Sound(); s.addEventListener(Event.COMPLETE, onSoundLoaded);

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.