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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T07:19:08+00:00 2026-06-11T07:19:08+00:00

I have a table view of audio objects, each with a url property. I’m

  • 0

I have a table view of audio objects, each with a url property. I’m looking for the fastest way (for the user) to play each audio file on touch.

I tried getting the data first from the url:

-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    NSURL *audioURL = [NSURL URLWithString:(NSString *)[[[self.objects objectAtIndex:indexPath.row] objectForKey:@"audioFile"] url]];
    NSData *audioData = [NSData dataWithContentsOfURL:audioURL];
    NSError *error;

    self.player = [[AVAudioPlayer alloc] initWithData:audioData error:&error];
    self.player.delegate = self;
    [self.player play];
}

But it’s slow and unresponsive. I tried to go straight for the url:

self.player = [[AVAudioplayer alloc] initWithContentsOfURL:audioURL]

What’s the best way to load and play audio files in this situation? Asynchronously fetching the data?
Is AVfoundation the best way to stream down audio?

http://developer.apple.com/library/ios/#documentation/MusicAudio/Reference/AudioStreamReference/Reference/reference.html#//apple_ref/doc/uid/TP40006162

Should I try streaming it?

  • 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-06-11T07:19:10+00:00Added an answer on June 11, 2026 at 7:19 am

    The fastest way would be to set an audio service as such

    CFBundleRef mainbundle = CFBundleGetMainBundle();
    CFURLRef soundFileURLRef = CFBundleCopyResourceURL(mainbundle, CFSTR("soundhere"), CFSTR("extensionofsound"), NULL);
    AudioServicesCreateSystemSoundID(soundFileURLRef, &soundFileObject);
    

    If you are insistent on not using AudioServices then you can take a look at OpenAL (there are wrappers on Github for iOS)

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

Sidebar

Related Questions

I have a table view that has many cells. Each cell has its own
I have a table view with a list of categories and each category (understand
Alright I have two problems. I'm using AVAudioPlayer to play a simple audio file
I have table view which is populated from an array grabbed from a url.
i have a table view in which each cell has a TextField where the
I have a table view that displays managed objects (Tasks). I'd like to fetch
I have table view navigation controller and the data is loaded from url. I
i have table view and when user click on any row then he should
i have a view in which i have table view and when user taps
I have a table view of custom cells representing individual uploads and each cell

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.