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

  • Home
  • SEARCH
  • 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 465007
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T23:19:58+00:00 2026-05-12T23:19:58+00:00

How hard is it to do that? Someone told me that it’s incredible hard

  • 0

How hard is it to do that? Someone told me that it’s incredible hard playing audio on the iPhone. Can’t really believe it. But he said playing one is hard, but playing two or three at same time is incredible hard. Sounded scary. What can you guys say about this?

What I want to do: I have about 10 CAF files with little blips and beeps and button press sounds. Nothing really special. Now I want to play these files every time something happens. And several things could happen at same time. So it could happen that playbacks overlap.

Maybe there’s a framework I can use for doing this?

  • 1 1 Answer
  • 1 View
  • 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-12T23:19:59+00:00Added an answer on May 12, 2026 at 11:19 pm

    Playing small blips, beeps, etc (sounds less than 30 seconds) is actually pretty easy – this is exactly what AudioServices is meant to do. You need to first obtain an ID for each sound, using something like this:

    SystemSoundID soundID = 0;
    CFURLRef soundFileURL = (CFURLRef)[NSURL URLWithString:somePathString];
    OSStatus errorCode = AudioServicesCreateSystemSoundID(soundFileURL, &soundID);
    if (errorCode != 0) {
      // Handle failure here
    }
    

    You’ll then hold onto that ID until you need to use it, and then you can play the sound simply using this line:

    AudioServicesPlaySystemSound(soundID);
    

    There’s also AudioServicesPlayAlertSound() that will behave slightly differently depending on the device’s capability, such as vibrating an iPhone if the device is configured to by the user. You should read Apple’s notes in the docs for a more complete explanation.

    Note that you have minimal control over the playback of sounds using AudioServices – you can’t stop them, control the volume, etc. AudioServices is only meant for alert sounds and other such short beeps and blips. There is, of course, AVAudioPlayer but its a bit more heavyweight than what you need in this case. You’re probably better off sticking with AudioServices unless one of its constraints makes it unusable.

    You need to link AudioToolbox.framework in order to use these functions.

    P.S. Welcome to Stack Overflow! Don’t forget to read the FAQ and mark accepted answers for your questions (if they’re good answers worth accepting, of course).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just learned (the hard way) that Java Component s can only have one
I just learned the hard way that IntPtr.Zero cannot be compared to default(IntPtr). Can
I know this shouldn't be that hard, but I couldn't find the answer on
I've found some remnant documents on one of my hard drives that were somehow
I am trying really hard to grasp htaccess, but I am having a hard
I saw just two examples: one and two I've been told that those effects
From what I've read, code obfuscation isn't really that hard to crack, and it
I found the hard way that navigationController.navigationBarHidden = NO; and navigationController.navigationBar.hidden = NO; are
I learnt the hard way that it is not possible to slipstream Visual Studio
I know it is a condition of hard links that they cannot span filesystems.

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.