fantasian
16-10-2010 19:43:01
Hello. I have just downloaded OgreOggSound and during compilation, I get this error :
Error 1 error C2664: 'alGetSourcef' : cannot convert parameter 3 from 'Ogre::Real *' to 'ALfloat *' d:\projects\ogreoggsound\src\ogreoggisound.cpp 446
The reason for this is that I have defined Ogre::Real as double. The best (logical?) solution would be to use a simple float as the function's return value. A simpler hack is this :
Ogre::Real OgreOggISound::getVolume() const
{
ALfloat vol; // <- the only change made
if(mSource != AL_NONE)
{
alGetSourcef(mSource, AL_GAIN, &vol);
}
return vol; // conversion done here by the compiler, although I see no reason to return an Ogre::Real rather than a float
}
Cheers!
Error 1 error C2664: 'alGetSourcef' : cannot convert parameter 3 from 'Ogre::Real *' to 'ALfloat *' d:\projects\ogreoggsound\src\ogreoggisound.cpp 446
The reason for this is that I have defined Ogre::Real as double. The best (logical?) solution would be to use a simple float as the function's return value. A simpler hack is this :
Ogre::Real OgreOggISound::getVolume() const
{
ALfloat vol; // <- the only change made
if(mSource != AL_NONE)
{
alGetSourcef(mSource, AL_GAIN, &vol);
}
return vol; // conversion done here by the compiler, although I see no reason to return an Ogre::Real rather than a float
}
Cheers!