Skip to main content
GameDev.net gamedev.net
🔒 Locked

Fmod problems *solved*

Started by utilae Apr 7, 2005 at 5:06 AM 3 replies 1.2k views
Original Post
utilae
utilae
Hi, I am using C++ and FMod. I am trying to play an mp3. My code compiles, but I keep getting and error when I run the exe file: "An unhandled exception of type 'System.TypeLoadException' occured." Aditional info: Could not load type FSOUND_SAMPLE from assembly. Culture=neutral, publickeytoken=null //this is where the problem lies. I debug and it stops on the line 'm_sampSoundHandle=FSOUND_Sample_Load(FSOUND_FREE,sFilename.c_str(),0,0,0);'

void CSoundManager::LoadSound(const string &sFilename)
{
//load sound
m_sampSoundHandle=FSOUND_Sample_Load(FSOUND_FREE,sFilename.c_str(),0,0,0);
}


Can someone help? I'm sure lots of people use Fmod, and can solve my problem. [Edited by - utilae on April 9, 2005 4:45:32 AM]
HTML5, iOS and Android Game Development using Corona SDK and moai SDK
CloudNine
CloudNine
Are you compiling a managed application? The System.TypeLoadException error seems to suggest that, and I don't think FMOD have a managed version of their library out. It's crashing out because it can't find a managed type 'FSOUND_SAMPLE', simply because there isn't one.
utilae
utilae
I'm using MS Visual Studio .NET 2003. How do I turn managed off (I think I'm on unmanaged though).
HTML5, iOS and Android Game Development using Corona SDK and moai SDK
CloudNine
CloudNine
I think the documentation in help will cover that. Search for managed.
utilae
utilae
I thought I was using unmanaged code, but it seems that I was using managed code by default. So I changed the visual studio compiler options:
'Use Managed Extensions' to NO.

My sounds play without problem.

Thanks guys.

[Edited by - utilae on April 9, 2005 4:16:53 AM]
HTML5, iOS and Android Game Development using Corona SDK and moai SDK

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.