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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T18:23:55+00:00 2026-06-12T18:23:55+00:00

I am making a soundboard app and i am using sounds with over 30sec

  • 0

I am making a soundboard app and i am using sounds with over 30sec duration. I am playing the sound by connecting in IB my action with a “touch down” event, however the sound keeps playing once started. I connected in the some button a “touch cancel” & “touch up outside” event that is supposed to stop the sound but for some reason it doesn’t.
Can anybody provide a solution to my problem?

—Edit—
Here is my code:

-(IBAction)playSound:(id)sender {
     NSString *soundFile;
    soundFile = [[NSBundle mainBundle] pathForResource:@"testSound" ofType:@"mp3"];
    audioPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:soundFile] error:nil];
    audioPlayer.volume = volumeSlider.value;
    audioPlayer.numberOfLoops = -1;
    [audioPlayer prepareToPlay];
    [audioPlayer play];
}

-(IBAction)stopSound:(id)sender {
    [audioPlayer stop];
}
  • 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-12T18:23:56+00:00Added an answer on June 12, 2026 at 6:23 pm

    “Touch up outside” refers to when the button is pressed down and the user’s finger moves and lifts outside of the control.

    It sounds like you’re looking for the “Touch up inside” event.

    However, just to be sure, you should post the code you’re using to start and stop the sound.

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

Sidebar

Related Questions

I'm making a soundboard with sound effects and I'm getting : A first chance
I am making a simple soundboard app - buttons should appear in two columns,
Making a painting app using HTML5 and Canvas. I think I want to have
Making a drop down list for my JSP and the values I'm entering won't
Making an app where we want to send a photo to a server along
Making an Flex App. Just wondering if anyone has created something that fits automatically
I'm trying to create a Soundboard app, but I'm having difficulty finding a way
Making a new class in VS10 gives me using System; using System.Collections.Generic; using System.Linq;
I'm making an Android soundboard. I currently have 12 pages for this specific category.
I´m making an Android App with a Google Map. This app must alert you

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.