It turned out it wasn't so difficult. Reading fmod documentation pointed me the necessary flags to create an streamed buffer.
SoundSampleFMODImpl* SoundRendererFMODImpl::CreateSampleFromFile(const char* fname, bool streaming)
{
SoundSampleFMODImpl* psample = NULL;
{
Lock::Locker lock(&SampleListLock);
psample = SF_NEW SoundSampleFMODImpl(this);
}
FMOD_MODE flags = FMOD_SOFTWARE | FMOD_LOOP_NORMAL | FMOD_2D | FMOD_CREATESTREAM;// FMOD_LOOP_NORMAL is not necessary, I just needed it too. You can leave FMOD_LOOP_OFF
#if defined(SF_OS_WINMETRO)
flags |= FMOD_NONBLOCKING;
#endif
FMOD_RESULT result;
if (streaming)
{
result = pDevice->createStream(fname, flags, NULL, &(psample->pSound));
}
else
result = pDevice->createSound(fname, flags, NULL, &(psample->pSound));
if (result != FMOD_OK)
{
LogError(result);
psample->pSound = NULL;
psample->Release();
return NULL;
}
return psample;
}
FMod doesn't create streamed sounds by default, so you need to use:
FMOD_CREATESTREAM