0
0

I am in the process of adding the FMOD Designer/Event API to an existing project that already has the standard FMODEx API running and working (with large numbers of sounds, etc.). On PC, the following code works just fine:

// Create the main mpSystem object.
FMOD_ASSERT( FMOD::System_Create( &mpSystem ) );

ifdef PLATFORM_PS3

FMOD_PS3_EXTRADRIVERDATA extradriverdata;
memset(&extradriverdata, 0, sizeof(FMOD_PS3_EXTRADRIVERDATA));
extradriverdata.spurs = 0;
extradriverdata.spu_thread_priority = 16; /* Default /
extradriverdata.spu_thread_priority_streamer = 200; /
Default */

// Initialize FMOD.
FMOD_ASSERT( mpSystem->init(64, FMOD_INIT_NORMAL, &extradriverdata) );

else

// Initialize FMOD.
FMOD_ASSERT( mpSystem->init(32, FMOD_INIT_NORMAL, 0) );

endif

if defined( USE_FMOD_EVENT )

// also set up the event system and point it at the directory containing the events media
FMOD_ASSERT(FMOD::EventSystem_Create(&mpEventSystem));

ifdef PLATFORM_PS3

FMOD_ASSERT(mpEventSystem->init(64, FMOD_INIT_NORMAL, (void *)&extradriverdata, FMOD_EVENT_INIT_NORMAL));

else

FMOD_ASSERT(mpEventSystem->init(64, FMOD_INIT_NORMAL, 0, FMOD_EVENT_INIT_NORMAL));

endif

On PS3 the mpEventSystem->init() calls fails with error code 62. To make sure I wasn’t doing something dumb in our code, I decided to do a test by altering one of the basic FMOD Event system PS3 examples:

memset(&extradriverdata, 0, sizeof(FMOD_PS3_EXTRADRIVERDATA));

extradriverdata.spurs = 0; /* Not using SPURS / extradriverdata.spu_thread_priority = 16; / Default */
FMOD::System *system;
ERRCHECK(result = FMOD::System_Create(&system));
ERRCHECK(system->init(32, FMOD_INIT_NORMAL, &extradriverdata));

ERRCHECK(result = FMOD::EventSystem_Create(&eventsystem));
ERRCHECK(result = eventsystem->init(32, FMOD_INIT_NORMAL, (void *)&extradriverdata, FMOD_EVENT_INIT_NORMAL));

I got the same error.

Does this mean I cannot init both a System and an EventSystem on PS3?

(That would cause serious issues porting an existing project from one system to the other).

Some additional info (the Trace on PS3 when it fails):
FMOD: EventSystemI::init : maxchannels = 32. flags = 00000000
FMOD: SystemI::init : FMOD Ex Version: 00042807
FMOD: SystemI::init : maxchannels = 32, flags = 00000000, extradriverdata = d0010bf8
FMOD: SystemI::close :
FMOD: SystemI::close : Stop all sounds
FMOD: SystemI::close : Remove miscllaneous DSP stuff.
FMOD: SystemI::close : done.

FMOD: OutputPS3::init : SPURS mode set to FMOD_PS3_SPURSMODE_NOCONTEXT (default)
FMOD: OutputPS3::init : libaudio_latency set to 0
FMOD: OutputPS3::init : Using SPU threads.
FMOD: OutputPS3::init : Mixer SPU Thread priority will be set to 16.
FMOD: OutputPS3::init : MPEG stream decoder SPU Thread priority will be set to 200.
FMOD: OutputPS3::init : initialising…
FMOD error! (62) Error initializing output device.
FMOD: OutputPS3::init : Output device does not support Dolby Digital AC3 or DTS.
FMOD: OutputPS3::init : Audio output device supports 2 channels.
FMOD: OutputPS3::init : only 2 channels available, PS3 OS will downmix to stereo
FMOD: OutputPS3::init : cellAudioInit() returned -2144270591
FMOD: SystemI::close :
FMOD: SystemI::close : Stop all sounds
FMOD: SystemI::close : Remove miscllaneous DSP stuff.
FMOD: SystemI::close : done.

  • You must to post comments
0
0

The FMOD::EventSystem contains an FMOD::System object. You don’t need to use FMOD_SystemCreate at all. Just use EventSystem::getSystemObject in place of that. That is how it is done on all platforms.

To port a project from the FMOD::System to FMOD::EventSystem is quite easy, just port the initialization code for the FMOD::System object to FMOD::EventSystem. The getObject System pointer can be used for everything that the original System object was used for. You can still use createSound and playSound and all the other FMOD::System features.

  • You must to post comments
0
0

Thanks for the help on the systems compatibility issues. I am having an entirely different yet severely opaque problem with the PS3 version (the code works just fine on the PC version):

On PS3, the get Event call returns NULL with the error message of:

"FMOD error! (37) An invalid parameter was passed to this function."

This would seem a sane error (despite the same code working on PC), so I tried the same FEV file and parameters in the "Simple Event" sample, and it works (unsurprisingly). I figure that I must be doing something dumb in my code, so I cut-and-pasted the working sample code into my app.

My app still dies the same way.

The minorly-altered sample code (this code works):

memset(&extradriverdata, 0, sizeof(FMOD_PS3_EXTRADRIVERDATA));

extradriverdata.spurs                               = 0; /* Not using SPURS */
extradriverdata.spu_thread_priority                 = 16;  /* Default */

ERRCHECK(result = FMOD::EventSystem_Create(&eventsystem));
ERRCHECK(result = eventsystem->init(64, FMOD_INIT_NORMAL, (void *)&extradriverdata, FMOD_EVENT_INIT_NORMAL));
ERRCHECK(result = eventsystem->setMediaPath(MEDIA_PATH));
ERRCHECK(result = eventsystem->load("SupremacyTest.fev", 0, 0));
ERRCHECK(result = eventsystem->getEvent("SupremacyTest/SFX/Crowd/crowd_idle", FMOD_EVENT_DEFAULT, &event));

My app’s code (note similarity, LOL, but this fails):

FMOD_PS3_EXTRADRIVERDATA extradriverdata;
FMOD_RESULT result;
#define MEDIA_PATH "/app_home/Sounds/FMOD/ps3/"
FMOD::Event *pEvent;
FMOD::EventSystem *pEventSystem;

    memset(&extradriverdata, 0, sizeof(FMOD_PS3_EXTRADRIVERDATA));

    extradriverdata.spurs                               = 0; /* Not using SPURS */
    extradriverdata.spu_thread_priority                 = 16;  /* Default */

    ERRCHECK(result = FMOD::EventSystem_Create(&pEventSystem));
    ERRCHECK(result = pEventSystem->init(64, FMOD_INIT_NORMAL, (void *)&extradriverdata, FMOD_EVENT_INIT_NORMAL));
    ERRCHECK(result = pEventSystem->setMediaPath(MEDIA_PATH));
    ERRCHECK(result = pEventSystem->load("SupremacyTest.fev", 0, 0));
    ERRCHECK(result = pEventSystem->getEvent("SupremacyTest/SFX/Crowd/crowd_idle", FMOD_EVENT_DEFAULT, &pEvent));

The only suspect I have is that we may be doing something with the Sony video player at vaguely around that time.

What’s going on?

  • You must to post comments
0
0

Hard to tell exactly what is going on, based on that information and that error code. I suspect the error is coming from somewhere other than the getEvent call.

Are you sure the media path is correct?

  • You must to post comments
0
0

The answer is the media path is defnitely correct (I cut-and-pasted in from the sample app where it works). Also, that’s not the error you get when you media path is bad (I’m not at work right now, so I cannot tell you the exact wording you get when your media path is off, but it’s not "Invlaid Parameter.")

I generated the error mentioned using the SN Systems debugger and stepping line by line through the app-level code. It’s DEFINITELY the getEvent( ) that starts the chain of events causing the error. One thing to note, however, is that the getEvent( ), when (successfully) run in the sample app, causes trace messages about kicking FSB’s into memory (again, I am at home not at work, so I cannot quote you the messages directly). These messages do not happen and instead I get the error mentioned above. You have mentioned that the getEvent( ) can’t cause the message in question; maybe something in the FSB load that gets kicked off internally by getEvent( ) is causing that message.

If you want, I can put up the whole project on FTP and you guys can link in a debug version of FMOD on your end and see what’s going on.

On my end, I suspect a conflict between your stuff and our home-brew movie player. I will talk to the guy who wrote the movie player and see if we disable it, if FMOD gets all happy again.

Let me know if you want me to put stuff on our company FTP site.

  • You must to post comments
0
0

I understand the error is coming from getEvent. That doesn’t mean it isn’t getting caused by the media path, the media path is used internally when getEvent is called. Generally a FMOD_ERR_INVALID_PARAM return value from a function means that either the parameters passed in or some internal parameters are incorrect.

The reason I ask about the media path is because in the example it is:
[code:28548qg0]

define MEDIA_PATH SYS_APP_HOME"/"[/code:28548qg0]

but in your code you have changed it to:
[code:28548qg0]

define MEDIA_PATH "/app_home/Sounds/FMOD/ps3/" [/code:28548qg0]

I can’t see anything else that I would suspect from the code you posted.

[quote:28548qg0]On my end, I suspect a conflict between your stuff and our home-brew movie player. I will talk to the guy who wrote the movie player and see if we disable it, if FMOD gets all happy again. [/quote:28548qg0]
I think that kind of error would be more likely to occur in System::init. But if you suspect that is the problem, it would be good to rule it out.

-Pete

  • You must to post comments
0
0

OK now that I have an actual PS3 dev kit in front of me, I can actually see what error messages come up when the Media Path is incorrect. If you put a media path without a trailing slash, you get:

FMOD: EventSystemI::setMediaPath : Warning: Possibly forgot to put a slash/backslash at the end of media path: "/app_home/Sounds/FMOD/ps3/foo"

If you put in a path that doesn’t have the FEV file in it, you get:

FMOD error! (23) File not found.

If you have the FEV but not the FSB’s used by the FEV, you get:

FMOD error! (23) File not found.

If you ask for an event that’s not there, you get:

FMOD error! (91) The requested event, event group, event category or event property could not be found.

Basically, I can’t get an invalid parameter in the test app with the same data as is causing the puke in the game.

(I will let you know the results of the "disable movie player" test once the dude who wrote the movie player gets in…).

PS: I had the IT dude set up an FTP place, just in case the movie play doesn’t fix the issue. If that doesn’t work, I’d like to send you some code , so you can debug into FMOD and see what’s actually causing the error.

  • You must to post comments
0
0

Tried using the idea you mentioned before:

define MEDIA_PATH SYS_APP_HOME"/Sounds/FMOD/ps3/"

(Same errors — invalid parameter)

  • You must to post comments
0
0

It’s not the movie player (I commented it out). I think I need to FTP you some files and you tell me what’s broken, because clearly something we are doing is violating an FMOD PS3 assumption under the hood.

  • You must to post comments
0
0

Something you should do is link to the logging versions of FMOD (the libraries appended with "L"). The debug logging to the TTY might give us a clue as to what is going on.

  • You must to post comments
0
0

(the end of the load() call on the FEV file)
FMOD: File::read : 32414960 copied 4 bytes from mBufferPos = 561
FMOD: File::read : 32414960<—- done
FMOD: File::read : 32414960—-> want to read 4
FMOD: File::checkBufferedStatus : 32414960 mCurrentPosition 23093 mNextPosition 24576 nextpos diffbytes 1483 diff 1
FMOD: File::read : 32414960 copied 4 bytes from mBufferPos = 565
FMOD: File::read : 32414960<—- done
FMOD: File::read : 32414960—-> want to read 2
FMOD: File::checkBufferedStatus : 32414960 mCurrentPosition 23097 mNextPosition 24576 nextpos diffbytes 1479 diff 1
FMOD: File::read : 32414960 copied 2 bytes from mBufferPos = 569
FMOD: File::read : 32414960<—- done
FMOD: MemPool::alloc : 80 bytes (323795b0) (alloc 829)
FMOD: File::read : 32414960—-> want to read 80
FMOD: File::checkBufferedStatus : 32414960 mCurrentPosition 23099 mNextPosition 24576 nextpos diffbytes 1477 diff 1
FMOD: File::read : 32414960 copied 80 bytes from mBufferPos = 571
FMOD: File::read : 32414960<—- done
FMOD: MemPool::alloc : 0 bytes (32379620) (alloc 830)
FMOD: MemPool::alloc : 0 bytes (32379640) (alloc 831)
FMOD: MemPool::alloc : 28 bytes (32379660) (alloc 832)
FMOD: MemPool::alloc : 28 bytes (32379690) (alloc 833)
FMOD: MemPool::alloc : 28 bytes (323796c0) (alloc 834)
FMOD: MemPool::alloc : 4 bytes (323796f0) (alloc 835)
FMOD: MemPool::alloc : 4 bytes (32379710) (alloc 836)
FMOD: MemPool::alloc : 12 bytes (32379730) (alloc 837)
FMOD: MemPool::alloc : 28 bytes (32379750) (alloc 838)
FMOD: MemPool::alloc : 28 bytes (32379780) (alloc 839)
FMOD: MemPool::alloc : 28 bytes (323797b0) (alloc 840)
FMOD: MemPool::alloc : 32 bytes (323797e0) (alloc 841)
FMOD: MemPool::alloc : 4 bytes (32379820) (alloc 842)
FMOD: MemPool::alloc : 4 bytes (32379840) (alloc 843)
FMOD: MemPool::alloc : 16 bytes (32379860) (alloc 844)
FMOD: MemPool::alloc : 40 bytes (32379890) (alloc 845)
FMOD: MemPool::alloc : 40 bytes (323798d0) (alloc 846)
FMOD: MemPool::alloc : 4 bytes (32379910) (alloc 847)
FMOD: MemPool::alloc : 4 bytes (32379930) (alloc 848)
FMOD: MemPool::alloc : 20 bytes (32379950) (alloc 849)
FMOD: MemPool::alloc : 28 bytes (32379980) (alloc 850)
FMOD: MemPool::alloc : 28 bytes (323799b0) (alloc 851)
FMOD: MemPool::alloc : 28 bytes (323799e0) (alloc 852)
FMOD: MemPool::alloc : 28 bytes (32379a10) (alloc 853)
FMOD: MemPool::alloc : 4 bytes (32379a40) (alloc 854)
FMOD: MemPool::alloc : 4 bytes (32379a60) (alloc 855)
FMOD: MemPool::alloc : 8 bytes (32379a80) (alloc 856)
FMOD: MemPool::alloc : 40 bytes (32379aa0) (alloc 857)
FMOD: MemPool::alloc : 40 bytes (32379ae0) (alloc 858)
FMOD: MemPool::alloc : 40 bytes (32379b20) (alloc 859)
FMOD: MemPool::alloc : 40 bytes (32379b60) (alloc 860)
FMOD: MemPool::alloc : 40 bytes (32379ba0) (alloc 861)
FMOD: MemPool::alloc : 4 bytes (32379be0) (alloc 862)
FMOD: MemPool::alloc : 4 bytes (32379c00) (alloc 863)
FMOD: MemPool::alloc : 20 bytes (32379c20) (alloc 864)
FMOD: MemPool::alloc : 40 bytes (32379c50) (alloc 865)
FMOD: MemPool::alloc : 40 bytes (32379c90) (alloc 866)
FMOD: MemPool::alloc : 44 bytes (32379cd0) (alloc 867)
FMOD: MemPool::alloc : 48 bytes (32379d10) (alloc 868)
FMOD: MemPool::alloc : 32 bytes (32379d60) (alloc 869)
FMOD: MemPool::alloc : 40 bytes (32379da0) (alloc 870)
FMOD: MemPool::alloc : 4 bytes (32379de0) (alloc 871)
FMOD: MemPool::alloc : 4 bytes (32379e00) (alloc 872)
FMOD: MemPool::alloc : 32 bytes (32379e20) (alloc 873)
FMOD: MemPool::alloc : 28 bytes (32379e60) (alloc 874)
FMOD: MemPool::alloc : 28 bytes (32379e90) (alloc 875)
FMOD: MemPool::alloc : 28 bytes (32379ec0) (alloc 876)
FMOD: MemPool::alloc : 4 bytes (32379ef0) (alloc 877)
FMOD: MemPool::alloc : 4 bytes (32379f10) (alloc 878)
FMOD: MemPool::alloc : 12 bytes (32379f30) (alloc 879)
FMOD: MemPool::alloc : 52 bytes (32379f50) (alloc 880)
FMOD: MemPool::alloc : 36 bytes (32379fa0) (alloc 881)
FMOD: MemPool::alloc : 40 bytes (32379fe0) (alloc 882)
FMOD: MemPool::alloc : 28 bytes (3237a020) (alloc 883)
FMOD: MemPool::alloc : 28 bytes (3237a050) (alloc 884)
FMOD: MemPool::alloc : 36 bytes (3237a080) (alloc 885)
FMOD: MemPool::alloc : 8 bytes (3237a0c0) (alloc 886)
FMOD: MemPool::alloc : 8 bytes (3237a0e0) (alloc 887)
FMOD: MemPool::alloc : 76 bytes (3237a100) (alloc 888)
FMOD: MemPool::alloc : 8 bytes (3237a160) (alloc 889)
FMOD: MemPool::alloc : 4 bytes (3237a180) (alloc 890)
FMOD: MemPool::alloc : 160 bytes (3237a1a0) (alloc 891)
FMOD: MemPool::alloc : 328 bytes (3237a260) (alloc 892)
FMOD: MemPool::alloc : 608 bytes (3237a3c0) (alloc 893)
FMOD: MemPool::alloc : 13 bytes (3237a640) (alloc 894)
FMOD: MemPool::alloc : 320 bytes (3237a670) (alloc 895)
FMOD: MemPool::alloc : 176 bytes (3237a7d0) (alloc 896)
FMOD: MemPool::alloc : 608 bytes (3237a8a0) (alloc 897)
FMOD: MemPool::alloc : 15 bytes (3237ab20) (alloc 898)
FMOD: MemPool::alloc : 100 bytes (3237ab50) (alloc 899)
FMOD: MemPool::alloc : 40 bytes (3237abd0) (alloc 900)
FMOD: MemPool::alloc : 176 bytes (3237ac10) (alloc 901)
FMOD: MemPool::alloc : 608 bytes (3237ace0) (alloc 902)
FMOD: MemPool::alloc : 15 bytes (3237af60) (alloc 903)
FMOD: MemPool::alloc : 40 bytes (3237af90) (alloc 904)
FMOD: MemPool::alloc : 176 bytes (3237afd0) (alloc 905)
FMOD: MemPool::alloc : 608 bytes (3237b0a0) (alloc 906)
FMOD: MemPool::alloc : 15 bytes (3237b320) (alloc 907)
FMOD: MemPool::alloc : 40 bytes (3237b350) (alloc 908)
FMOD: MemPool::alloc : 176 bytes (3237b390) (alloc 909)
FMOD: MemPool::alloc : 608 bytes (3237b460) (alloc 910)
FMOD: MemPool::alloc : 15 bytes (3237b6e0) (alloc 911)
FMOD: MemPool::alloc : 40 bytes (3237b710) (alloc 912)
FMOD: MemPool::alloc : 176 bytes (3237b750) (alloc 913)
FMOD: MemPool::alloc : 608 bytes (3237b820) (alloc 914)
FMOD: MemPool::alloc : 15 bytes (3237baa0) (alloc 915)
FMOD: MemPool::alloc : 40 bytes (3237bad0) (alloc 916)
FMOD: MemPool::alloc : 176 bytes (3237bb10) (alloc 917)
FMOD: MemPool::alloc : 608 bytes (3237bbe0) (alloc 918)
FMOD: MemPool::alloc : 15 bytes (3237be60) (alloc 919)
FMOD: MemPool::alloc : 40 bytes (3237be90) (alloc 920)
FMOD: MemPool::alloc : 176 bytes (3237bed0) (alloc 921)
FMOD: MemPool::alloc : 608 bytes (3237bfa0) (alloc 922)
FMOD: MemPool::alloc : 15 bytes (3237c220) (alloc 923)
FMOD: MemPool::alloc : 40 bytes (3237c250) (alloc 924)
FMOD: MemPool::alloc : 176 bytes (3237c290) (alloc 925)
FMOD: MemPool::alloc : 608 bytes (3237c360) (alloc 926)
FMOD: MemPool::alloc : 15 bytes (3237c5e0) (alloc 927)
FMOD: MemPool::alloc : 40 bytes (3237c610) (alloc 928)
FMOD: MemPool::alloc : 176 bytes (3237c650) (alloc 929)
FMOD: MemPool::alloc : 608 bytes (3237c720) (alloc 930)
FMOD: MemPool::alloc : 15 bytes (3237c9a0) (alloc 931)
FMOD: MemPool::alloc : 40 bytes (3237c9d0) (alloc 932)
FMOD: MemPool::alloc : 176 bytes (3237ca10) (alloc 933)
FMOD: MemPool::alloc : 608 bytes (3237cae0) (alloc 934)
FMOD: MemPool::alloc : 15 bytes (3237cd60) (alloc 935)
FMOD: MemPool::alloc : 40 bytes (3237cd90) (alloc 936)
FMOD: MemPool::alloc : 80 bytes (3237cdd0) (alloc 937)
FMOD: MemPool::alloc : 100 bytes (3237ce40) (alloc 938)
FMOD: MemPool::alloc : 132 bytes (3237cec0) (alloc 939)
FMOD: EventSystemI::rebuildEventTable : 33 entries
FMOD: File::close : handle 32414960
FMOD: MemPool::alloc : 8208 bytes (3237cf60) (alloc 940)
FMOD: MemPool::alloc : 8208 bytes (3237ef90) (alloc 941)
FMOD: MemPool::free : 20 bytes (321bda60)
FMOD: File::close : free mBuffer (mBuffer = 321901d0, mBufferMemory = 321901d0)

FMOD: MemPool::free : 2048 bytes (321901d0)
FMOD: File::close : handle 32414960 done
FMOD: MemPool::free : 848 bytes (32414960)
FMOD: EventSystemI::load : done.

(and when the getEvent is called)
FMOD error! (37) An invalid parameter was passed to this function.

If you need to see the whole load() call trace, I will need to put together a smaller FEV. The one shown above is using your "examples.fev", but I get similar answers from all 3 FEV’s I tried — it fails on the getEvent() call but not with an error that corresponds to an "I can’t find something" problem.

  • You must to post comments
Showing 10 results
Your Answer

Please first to submit.