0
0

I think I’ve run into a bug on the Xbox 360 when playing hardware sounds. Any sound played through the hardware mixer never reports that it is done playing (Channel::isPlaying() returns true). This happens with both XMA compressed waves and uncompressed waves. I’m currently using 4.02.10 since 4.02.09 was no longer on the FTP.

To reproduce, just run the playsound example and notice the “Channels Playing” counter never returns to zero after a hardware sound is complete. Software based sounds seem to work fine.

-Chris

  • You must to post comments
0
0

Out of interest, on the xbox360 version, when using SOFTWARE mode and playing XMA files with CREATECOMPRESSEDSAMPLE, do the files play using the hardware decoding?

Thanks

Justin

  • You must to post comments
0
0

Sounds great! Looking forwards to working with fmod on the xbox360 :)

  • You must to post comments
0
0

yes, I got your email – thanks! I assume its just in an updated 4.02.09?

  • You must to post comments
0
0

On the Xbox360 version (actually the most recent V10 prerelease), I’m getting lots of deadlocks and crashes when trying to use FMOD_CREATECOMPRESSEDSAMPLE sounds on the software mixer. All of my sounds are XMA compressed. I don’t have problems if I either use hardware mixing or if I don’t specify FMOD_CREATECOMPRESSEDSAMPLE.

The deadlocks always occur in system::playSound(). The call never returns. The callstack shows it waiting on a critical section. My call to playSound looks like this:
[quote:2a7ri9q7] if(FMOD_OK != system->playSound( (FMOD_CHANNELINDEX)channelIndex, sound, true, &channel ))
[/quote:2a7ri9q7]
All the sounds are created with these flags:
[quote:2a7ri9q7]FMOD_OPENMEMORY | FMOD_SOFTWARE | FMOD_IGNORETAGS | FMOD_CREATECOMPRESSEDSAMPLE | FMOD_3D | FMOD_LOOP_OFF
[/quote:2a7ri9q7]

This crash happened while loading a sound:
[quote:2a7ri9q7]
First-chance exception at 0x82FFC8B8 in E:\XeDebug.exe: 0xC0000005: Access violation reading location 0x00000000.
Unhandled XAPI Exception. Exception Pointers = 0x301F7A90
Code c0000005 Addr 82FFC8B8
Info0 00000000 Info1 00000000 Info2 00000001 Info3 FFFFFFFF
Unhandled exception at 0x82FFC8B8 in E:\XeDebug.exe: 0xC0000005: Access violation reading location 0x00000000.
The thread ‘Xbox Thread’ (0xf900002c) has exited with code 0 (0x0).

XeDebug.exe!memcpy() line 147 MASM
XeDebug.exe!?createSoundInternal@SystemI@FMOD@@QAA?AW4FMOD_RESULT@@PBDIPAUFMOD_CREATESOUNDEXINFO@@PAPAVSoundI@2@@Z() + 0x664 bytes C++
XeDebug.exe!?createSound@SystemI@FMOD@@QAA?AW4FMOD_RESULT@@PBDIPAUFMOD_CREATESOUNDEXINFO@@PAPAVSoundI@2@@Z() + 0x28C bytes C++
XeDebug.exe!?createSound@System@FMOD@@QAA?AW4FMOD_RESULT@@PBDIPAUFMOD_CREATESOUNDEXINFO@@PAPAVSound@2@@Z() + 0x44 bytes C++
XeDebug.exe!FmodAudioDevice::CreateFmodSound(const unsigned char * data=0x59ea7800, unsigned int dataSize=0x0000205c, int useSpatialization=0x00000001, int useLooping=0x00000000) line 447 + 0x1C bytes C++
XeDebug.exe!FmodSoundSource::Init(FWaveInstance * InWaveInstance=0x53520f00) line 503 + 0x18 bytes C++
XeDebug.exe!AudioDevice::Update(int bRealtime=0x00000001) line 298 + 0x1C bytes C++
XeDebug.exe!FmodAudioDevice::Update(int Realtime=0x00000001) line 260 C++
XeDebug.exe!GameEngine::Tick(float DeltaSeconds=0.247263521) line 1049 C++
XeDebug.exe!EngineLoop::Tick() line 1596 C++
XeDebug.exe!GuardedMain(const unsigned short * CmdLine=0x301fac20) line 164 C++
XeDebug.exe!main() line 261 C++
XeDebug.exe!mainCRTStartup() line 287 + 0x10 bytes C
xboxkrnl.exe!XexpEntryPointThreadStartup() + 0x34 bytes
xboxkrnl.exe!KiThreadStartup() + 0x38 bytes
[/quote:2a7ri9q7]

This one occurred during gameplay:
[quote:2a7ri9q7]
First-chance exception at 0x831E451C in E:\XeDebug.exe: 0xC0000005: Access violation reading location 0x00000124.
Unhandled XAPI Exception. Exception Pointers = 0x308357E0
Code c0000005 Addr 831E451C
Info0 00000000 Info1 00000124 Info2 30837770 Info3 00000000
Unhandled exception at 0x831E451C in E:\XeDebug.exe: 0xC0000005: Access violation reading location 0x00000124.

XeDebug.exe!?readInternal@DSPCodec@FMOD@@AAA?AW4FMOD_RESULT@@PAM0IHH@Z() + 0x74 bytes C++
XeDebug.exe!?execute@DSPResampler@FMOD@@UAA?AW4FMOD_RESULT@@PAMPAPAMPAIHPAHW4FMOD_SPEAKERMODE@@@Z() + 0xA8 bytes C++
XeDebug.exe!?execute@DSPFilter@FMOD@@MAA?AW4FMOD_RESULT@@PAMPAPAMPAIHPAHW4FMOD_SPEAKERMODE@@@Z() + 0x12C bytes C++
XeDebug.exe!?execute@DSPFilter@FMOD@@MAA?AW4FMOD_RESULT@@PAMPAPAMPAIHPAHW4FMOD_SPEAKERMODE@@@Z() + 0x12C bytes C++
XeDebug.exe!?execute@DSPFilter@FMOD@@MAA?AW4FMOD_RESULT@@PAMPAPAMPAIHPAHW4FMOD_SPEAKERMODE@@@Z() + 0x12C bytes C++
XeDebug.exe!?execute@DSPFilter@FMOD@@MAA?AW4FMOD_RESULT@@PAMPAPAMPAIHPAHW4FMOD_SPEAKERMODE@@@Z() + 0x12C bytes C++
XeDebug.exe!?execute@DSPFilter@FMOD@@MAA?AW4FMOD_RESULT@@PAMPAPAMPAIHPAHW4FMOD_SPEAKERMODE@@@Z() + 0x12C bytes C++
XeDebug.exe!?execute@DSPSoundCard@FMOD@@EAA?AW4FMOD_RESULT@@PAXPAPAXPAIHPAHW4FMOD_SPEAKERMODE@@@Z() + 0x8C bytes C++
XeDebug.exe!?mix@Output@FMOD@@QAA?AW4FMOD_RESULT@@PAXI@Z() + 0xC4 bytes C++
XeDebug.exe!?threadFunc@OutputPolled@FMOD@@EAA?AW4FMOD_RESULT@@XZ() + 0x16C bytes C++
XeDebug.exe!?callback@Thread@FMOD@@CAIPAX@Z() + 0x64 bytes C++
XeDebug.exe!XapiThreadStartup(void (void ) StartRoutine=0xffffffff, void * StartContext=0xffffffff) line 47 + 0xC bytes C
xboxkrnl.exe!KiThreadStartup() + 0x38 bytes
[/quote:2a7ri9q7]

I know these callstacks aren’t always the most helpful thing, but it’s about all the information I’ve got right now. I’ve been unsuccessful reproducing the errors in a test app, but I’m hesitant to point the finger at game code since the only thing I’ve changed in our game is the new version of FMOD.

Any ideas? I’ll continue to try and repro it, but I’ve already spent the whole day with no luck.

-Chris

  • You must to post comments
Showing 4 results
Your Answer

Please first to submit.