0
0

hi,
I am trying to use FSOUND_Load_Sample for a resource.
code snip:

HRSRC rsrc = FindResource(_Module.m_hInst,MAKEINTRESOURCE, IDR_WAV_CROPDROP),MAKEINTRESOURCE(IDR_WAV_CROPDROP));
DWORD Size = SizeofResource(_Module.m_hInst, rsrc);
HGLOBAL MemoryHandle = LoadResource(_Module.m_hInst,rsrc);
const char *MemPtr = (const char*)LockResource(MemoryHandle);

snd->LoadSample(MemPtr,Size);

where LoadSample looks like this:

void Sound::LoadSample(const char * s,DWORD size)
{
// Load sound effect
if(m_size < MAX_SAMPLES)
{

m_sound[m_size] = FSOUND_Sample_Load(FSOUND_FREE, s, FSOUND_LOADMEMORY, size);
    m_size++;
}

}

I cant get any sound to play, can somebody see anything obvious I have missed?

thanks
jomarco

  • You must to post comments
Showing 0 results
Your Answer

Please first to submit.