0
0

I`m So Sorry, Because my English level is lower

I have one question

I wanna use a Load into Memory

So I coded like this
[code:2sfhdey6]
if( !ERRCHK(m_pEventSystem->init( 64, FMOD_INIT_NORMAL, 0, FMOD_EVENT_INIT_NORMAL ) ) ) return false;

memset( &pInfo->kSoundInfo, 0, sizeof( FMOD_CREATESOUNDEXINFO ) );

/* We need to create a FMOD_SOUND object to use with preloadFSB */
pInfo->kSoundInfo.cbsize = sizeof(FMOD_CREATESOUNDEXINFO);
pInfo->kSoundInfo.length = pInfo->pkFileInfo->uiFileSize;
if( !ERRCHK(g_pSoundSystem->GetSystem()->createSound( (char*)pInfo->pkFileInfo->pFileMem, 
                                                        FMOD_OPENMEMORY_POINT | FMOD_CREATECOMPRESSEDSAMPLE, 
                                                        &pInfo->kSoundInfo,
                                                        &pInfo->pSound)) ) 
                                                        return false;

FMOD::Event* pEvent = NULL;     

/* Tell FMOD that we have loaded this FSB */
if( !ERRCHK(g_pSoundSystem->GetEventSystem()->preloadFSB(pInfo->pkFileInfo->pFileMem, 0, pInfo->pSound))) return false;      

[/code:2sfhdey6]

but I can`t set setMediaPath because Sound resources were packed by Some Tool

[code:2sfhdey6]
if( !ERRCHK( pGroup->getEvent( szName, FMOD_EVENT_ERROR_ON_DISKACCESS, &pEvent ) ) ) return NULL;
[/code:2sfhdey6]

Resultingly I got a message FMOD_ERR_FILE_UNWANTED .

How can I get event from Just a memory data.

I got a memory data that loaded by tutorial function "loadFileIntoMemory".

Please help me

  • You must to post comments
Showing 0 results
Your Answer

Please first to submit.