Announcements
The Scaleform forum is now read-only. Please head to the Gamedev site for product support.
Scaleform Forum (Read Only)
Scaleform enables developers to leverage the power of the Adobe® Flash® tool set to create powerful user interface environments for video games.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Does the sound streaming feature requires license?

1 REPLY 1
SOLVED
Reply
Message 1 of 2
dani_mrquez
483 Views, 1 Reply

Does the sound streaming feature requires license?

Hi! I've almost port a game to scaleform but when profiling and debugging it I've seen that the game sounds are not being streammed. The function:

SoundRendererFMODImpl::CreateSampleFromFile(const char* fname, bool streaming)

 is always receiving the 'streaming' parameter as false. My question is, Do I have to do something "special" to use this feature? Right now I'm still using a trial license. Is it neccesary to have an official license to activate the streaming? Obviously, I can edit the code and ignore this parameter, but I not sure about the consequences.

 

Thanks in advance!

1 REPLY 1
Message 2 of 2
dani_mrquez
in reply to: dani_mrquez

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
Tags (1)

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report