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 7409721
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T06:07:33+00:00 2026-05-29T06:07:33+00:00

I plan to use multiple AVAudioPlayers to play different audio files simultaneously. They are

  • 0

I plan to use multiple AVAudioPlayers to play different audio files simultaneously. They are triggered by user-initiated events. I am using ARC for the first time, and there is not much documentation out there as to how ARC might apply to setting up AVAudioPlayers (Apple’s sample code is pre-ARC, as are most tutorials I can find).

The app works fine with one AVAudioPlayer instance, but throws a SIGABRT once a second is added. My guess is that it has something to do with the player instances being released prematurely by ARC, but am not sure how to prevent this.

Code is as follows:

@interface LocationTracker : UIViewController <AVAudioPlayerDelegate> {

AVAudioPlayer *mainLoopPlayer;
AVAudioPlayer *sea1Player;

}

@property (strong, nonatomic) AVAudioPlayer *mainLoopPlayer;
@property (strong, nonatomic) AVAudioPlayer *sea1Player;

@end

implementation (in viewDidLoad):

NSURL *mainLoopURL = [[NSURL alloc] initFileURLWithPath: [[NSBundle mainBundle] pathForResource:@"wind" ofType:@"aiff"]];   
self.mainLoopPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL:mainLoopURL error:nil];  
mainLoopPlayer.numberOfLoops = -1;
mainLoopPlayer.delegate = self;
[mainLoopPlayer prepareToPlay];

NSURL *sea1URL = [[NSURL alloc] initFileURLWithPath: [[NSBundle mainBundle] pathForResource:@"sea1" ofType:@"aiff"]];   
self.sea1Player = [[AVAudioPlayer alloc] initWithContentsOfURL:sea1URL error:nil];  
sea1Player.numberOfLoops = -1;
sea1Player.delegate = self;
[mainLoopPlayer prepareToPlay];

Any help much appreciated.

  • 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-29T06:07:34+00:00Added an answer on May 29, 2026 at 6:07 am

    Okay, found the problem, and it wasn’t to do with memory management, but instead the use of a referenced folder to link to the audio files.

    I have previously used referenced folders to store images in without any problems, but this is a no-go when dealing with multiple audio files, apparently.

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

Sidebar

Related Questions

I am using mod_perl for my web application. Currently, I plan to use a
I've been trying to load multiple files into a table, so that they would
I plan to use PyInstaller to create a stand-alone python executable. PythonInstaller comes with
I plan to use a distributed cache in my load-balanced webapp. So I'm going
If I plan to use data caching do I have to worry about conflicts
If you do not plan to use lazy loading, should deferred loading be explicity
If I do a query (I plan to use SDS.P) against the global catalog,
I have a constant value that I only plan to use once in my
I am developing a web app for which I plan to use InnoDB. However
I'm looking for a a mouseover sound script (for button). I plan to use

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.