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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T11:13:15+00:00 2026-06-11T11:13:15+00:00

I have a simple set of FMOD actions that each play various sounds separately.

  • 0

I have a simple set of FMOD actions that each play various sounds separately. The problem comes in that I have a button that stops all the sounds. FMOD crashes my program if we try to stop a sound that isn’t playing. Makes sense. But I’ve decided that there has to be a way to call a simple if statement to find out “if” and only “if” somethings playing, then stop it.

- (IBAction)myButton:(id)sender {


    if "FMOD CHANNEL IS PLAYING" {

        result = fmodChannel->stop();

    }

}

Any help would be 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-06-11T11:13:16+00:00Added an answer on June 11, 2026 at 11:13 am

    I wouldn’t say it “makes sense” that FMOD crashes if you call stop on a channel that isn’t playing. It’s documented to return an error code on failure. Are you sure fmodChannel is still a valid pointer when you call stop?

    Anyway, you can try the isPlaying method:

    bool isPlaying;
    if (fmodChannel->isPlaying(&isPlaying) == FMOD_OK && isPlaying) {
        fmodChannel->stop();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Right so I have a simple app that consists of a calendar a Set
I have a simple problem with SQL SERVER charindex function. DECLARE @VAR1 varchar SET
I have a simple set of data that I am having trouble figuring out
I have a simple chat client set up that allows users to login with
I have a simple set of two buttons that when hovered should make a
I have two simple programs set up that share data through a unix domain
I have a very simple set of styles that I'm using in a couple
I have a very simple set of comands that just create a text of
I have a simple fiddle set up that attempts to illustrate this, but essentially
What I am trying to do: I have a simple set union function in

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.