[OpenAL][ALUT] Need some help loading files.

Phantom Lord thephantomlord at gmail.com
Thu Dec 7 17:23:46 PST 2006


Hi you all!, i'm having trouble with the following function i'd write:

void CaelisEngine_CSOUNDSAMPLE::load(const char *filename)
    {
    mBuffer = alutCreateBufferFromFile(filename);
    alGenBuffers(1,&mBuffer);
    alGenSources(1,&mSource);
    alSourcei (mSource, AL_BUFFER, mBuffer);
    alSourcef (mSource, AL_PITCH, 1.0f);
    alSourcef (mSource, AL_GAIN, 1.0f);
    alSourcefv(mSource, AL_POSITION, mSourcePosition);
    alSourcefv(mSource, AL_VELOCITY, mSourceSpeed);
    alSourcei (mSource, AL_LOOPING, AL_FALSE);
    }

I'm not shure at all that the marked functions are used fine, or not.
Anyway, how i should proceed whener i use alutCreateBufferFromFile with the
buffer returned?...
is that buffer a generated Source ready to use?.

Thanxs you all.

-- 
Phantom Lord
Caelis Studios ---> From Gods Hands To Yours
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://opensource.creative.com/pipermail/openal/attachments/20061208/2974ed1d/attachment.html


More information about the Openal mailing list