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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T16:33:00+00:00 2026-05-17T16:33:00+00:00

I’m trying to set up 3D sounds with FMOD in a game which uses

  • 0

I’m trying to set up 3D sounds with FMOD in a game which uses Ogre. The sound listener is attached to the camera which runs on a spline. I have footstep sounds attached to the player, and the volume should be determined by how far the player is from the camera.

The foot step sounds are acting as though the sound listener is not moving from its start position. At the start of the level, the footsteps are loud, and as you move away from the start they get quieter until you can’t hear them anymore. If you run back to the start, they get louder. However, the position of the sound listener’s scene node is updating and staying in sync with the camera.

In code there is an FMOD error being generated every frame on the following line:

result = m_system->set3DListenerAttributes(0, &pos, &vel, &forward, &up);

result is always returning FMOD_ERR_INVALID_HANDLE, with the following error string – ‘An invalid object handle was used’. I can’t figure out why this error is being generated. All the FMOD_VECTORs being passed in as parameters are initialised and I appear to be setting up the system correctly. The code is all over the place in different classes but here are the important bits:

// Initialise FMOD system
result = m_system->init(4093, FMOD_INIT_3D_RIGHTHANDED, 0);
result = m_system->set3DSettings(1.0f, 1.0f, 1.0f);

// Create sound
FMOD_MODE mode = FMOD_SOFTWARE;
if(a_positional)
{
    mode |= FMOD_3D;
}
FMOD_CREATESOUNDEXINFO info;
memset(&info, 0, sizeof(FMOD_CREATESOUNDEXINFO));
info.cbsize = sizeof(FMOD_CREATESOUNDEXINFO);
r = sys->_getFMODSystem()->createSound(a_file.c_str(), mode, &info, &retVal);

// Update sound listener
FMOD_VECTOR pos, vel, forward, up;

pos.x = m_sceneNode->getParentSceneNode()->_getDerivedPosition().x;
pos.y = m_sceneNode->getParentSceneNode()->_getDerivedPosition().y;
pos.z = m_sceneNode->getParentSceneNode()->_getDerivedPosition().z;

vel.x = 0;
vel.y = 0;
vel.z = 0;

forward.x = 0;
forward.y = 0;
forward.z = 1;

up.x = 0;
up.y = 1;
up.z = 0;

result = m_system->set3DListenerAttributes(0, &pos, &vel, &forward, &up);
// FMOD error: (36) An invalid object handle was used.

Any ideas as to why ‘result’ is returning this error? I’m assuming it’s the reason why the 3D sounds aren’t playing correctly.

  • 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-17T16:33:01+00:00Added an answer on May 17, 2026 at 4:33 pm

    An invalid handle error (FMOD_ERR_INVALID_HANDLE) is referring to the object you are calling functions on, in this case it means the m_system handle is invalid.

    Firstly I noticed you have omited the code to create the FMOD::System object, can you confirm you are doing the following:

    result = FMOD::System_Create(&m_system);
    

    Secondly, provided you have that code somewhere can you verify that the value of m_system remains unchanged between when it is created and when it is used (perhaps something is corrupting the handle).

    Finally (as a long shot) if your headers and lib are out of sync you might be getting a different error message, ensure the headers and libs you are using are all from the same version of FMOD.

    Extra note, try linking with the logging version of FMOD, you should get some useful debug output on the TTY that might help your situation.

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

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I used javascript for loading a picture on my website depending on which small
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am trying to render a haml file in a javascript response like so:
I would like to run a str_replace or preg_replace which looks for certain words
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have a text area in my form which accepts all possible characters from
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out

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.