예제 #1
0
	float lime_al_get_listenerf (int param) {
		
		ALfloat data;
		alGetListenerf (param, &data);
		return data;
		
	}
예제 #2
0
float Listener::getGlobalVolume()
{
    float volume = 0.f;
    alCheck(alGetListenerf(AL_GAIN, &volume));

    return volume * 100;
}
예제 #3
0
float NzAudio::GetGlobalVolume()
{
	ALfloat gain = 0.f;
	alGetListenerf(AL_GAIN, &gain);

	return gain*100.f;
}
예제 #4
0
float OpenALDevice::getVolume() const
{
	float result;

	alGetListenerf(AL_GAIN, &result);
	return result;
}
예제 #5
0
////////////////////////////////////////////////////////////
/// Get the current value of the global volume of all the sounds
////////////////////////////////////////////////////////////
float Listener::GetGlobalVolume()
{
    float Volume = 0.f;
    ALCheck(alGetListenerf(AL_GAIN, &Volume));

    return Volume;
}
예제 #6
0
value lime_al_get_listenerf (value param) {

    float data;
    alGetListenerf (val_int (param), &data);
    return alloc_float (data);

}
예제 #7
0
		//! Default constructor
		CSoundListenerOpenAL::CSoundListenerOpenAL()
		{
			Volume = 0.0f;
			Position = vector3df(0, 0, 0);
			Velocity = vector3df(0, 0, 0);
			RotationAt = vector3df(0, 0, -1);
			RotationUp = vector3df(0, 1, 0);

			alGetListenerf(AL_GAIN, &Volume);

			ALfloat ListenerPosition[3] =
			{ Position.X, Position.Y, Position.Z };

			alListenerfv(AL_POSITION, ListenerPosition);

			ALfloat ListenerVelocity[3] =
			{ Velocity.X, Velocity.Y, Velocity.Z };

			alListenerfv(AL_VELOCITY, ListenerVelocity);

			ALfloat ListenerOrientation[6] =
			{ RotationAt.X, RotationAt.Y, RotationAt.Z, RotationUp.X,
					RotationUp.Y, RotationUp.Z };

			alListenerfv(AL_ORIENTATION, ListenerOrientation);

			IRR_ASSERT(alGetError() == AL_NO_ERROR);
		}
예제 #8
0
float Listener::getVolume()
{
    float volume = 0.f;
    alGetListenerf(AL_GAIN, &volume);

    return volume;
}
예제 #9
0
void al_getlistenerf( int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[] ) {

	if (NULL == alGetListenerf) mogl_glunsupported("alGetListenerf");
	alGetListenerf((ALenum)mxGetScalar(prhs[0]),
		(ALfloat*)mxGetData(prhs[1]));

}
예제 #10
0
void alGetListenerfv(ALenum param, ALfloat *values)
{
    DEBUGLOGCALL(LCF_OPENAL);
    if (param == AL_GAIN)
        alGetListenerf(param, values);
    else
        debuglog(LCF_OPENAL, "Operation not supported");
}
예제 #11
0
		//! Returns volume of listener.
		f32 CSoundListenerOpenAL::getVolume()
		{
			f32 result = IrrNotFound;

			alGetListenerf(AL_GAIN, &result);

			return result;
		}
예제 #12
0
파일: listener.c 프로젝트: zhangsu/seal
static
seal_err_t
getf(int key, float* pval)
{
    alGetListenerf(key, pval);

    return _seal_get_openal_err();
}
예제 #13
0
float AudioSystem::getListenerGain() const {
   SHINY_CHECK_AUDIO_SYSTEM_VALID_CURRENT("getting listener gain");

   float gain = 1.0f;
   alGetListenerf(AL_GAIN, &gain);
   SHINY_CHECK_AL_ERROR("getting listener gain");

   return gain;
}
예제 #14
0
float Listener::getGlobalVolume()
{
    priv::ensureALInit();

    float volume = 0.f;
    alCheck(alGetListenerf(AL_GAIN, &volume));

    return volume * 100;
}
예제 #15
0
//Gets global gain for sound
float SoundManager::GetGain()
{
	float gain;
	alGetListenerf(AL_GAIN,&gain);
	ALenum error(alGetError());
	if(error != AL_NO_ERROR)
	{
		SingletonLogMgr::Instance()->AddNewLine("SoundManager::GetGain","Failure while changing main volume (" + GetALErrorString(error,false) + ")",LOGEXCEPTION);
	}
	return gain;
}
예제 #16
0
파일: openal.cpp 프로젝트: initramfs/qTox
/**
 * @brief Returns the current output volume (between 0 and 1)
 */
qreal OpenAL::outputVolume() const
{
    QMutexLocker locker(&audioLock);

    ALfloat volume = 0.0;

    if (alOutDev) {
        alGetListenerf(AL_GAIN, &volume);
        checkAlError();
    }

    return volume;
}
예제 #17
0
AL_API ALvoid AL_APIENTRY alGetListenerfv(ALenum eParam, ALfloat *pflValues)
{
    ALCcontext *Context;

    switch(eParam)
    {
        case AL_GAIN:
        case AL_METERS_PER_UNIT:
            alGetListenerf(eParam, pflValues);
            return;

        case AL_POSITION:
        case AL_VELOCITY:
            alGetListener3f(eParam, pflValues+0, pflValues+1, pflValues+2);
            return;
    }

    Context = GetContextRef();
    if(!Context) return;

    if(pflValues)
    {
        switch(eParam)
        {
            case AL_ORIENTATION:
                LockContext(Context);
                // AT then UP
                pflValues[0] = Context->Listener.Forward[0];
                pflValues[1] = Context->Listener.Forward[1];
                pflValues[2] = Context->Listener.Forward[2];
                pflValues[3] = Context->Listener.Up[0];
                pflValues[4] = Context->Listener.Up[1];
                pflValues[5] = Context->Listener.Up[2];
                UnlockContext(Context);
                break;

            default:
                alSetError(Context, AL_INVALID_ENUM);
                break;
        }
    }
    else
        alSetError(Context, AL_INVALID_VALUE);

    ALCcontext_DecRef(Context);
}
예제 #18
0
static int control(int cmd, void *arg) {
  switch (cmd) {
    case AOCONTROL_GET_VOLUME:
    case AOCONTROL_SET_VOLUME: {
      ALfloat volume;
      ao_control_vol_t *vol = (ao_control_vol_t *)arg;
      if (cmd == AOCONTROL_SET_VOLUME) {
        volume = (vol->left + vol->right) / 200.0;
        alListenerf(AL_GAIN, volume);
      }
      alGetListenerf(AL_GAIN, &volume);
      vol->left = vol->right = volume * 100;
      return CONTROL_TRUE;
    }
  }
  return CONTROL_UNKNOWN;
}
예제 #19
0
AL_API ALvoid AL_APIENTRY alGetListenerfv(ALenum param, ALfloat *values)
{
    ALCcontext *Context;

    switch(param)
    {
        case AL_GAIN:
        case AL_METERS_PER_UNIT:
            alGetListenerf(param, values);
            return;

        case AL_POSITION:
        case AL_VELOCITY:
            alGetListener3f(param, values+0, values+1, values+2);
            return;
    }

    Context = GetContextRef();
    if(!Context) return;

    al_try
    {
        CHECK_VALUE(Context, values);
        switch(param)
        {
            case AL_ORIENTATION:
                LockContext(Context);
                // AT then UP
                values[0] = Context->Listener->Forward[0];
                values[1] = Context->Listener->Forward[1];
                values[2] = Context->Listener->Forward[2];
                values[3] = Context->Listener->Up[0];
                values[4] = Context->Listener->Up[1];
                values[5] = Context->Listener->Up[2];
                UnlockContext(Context);
                break;

            default:
                al_throwerr(Context, AL_INVALID_ENUM);
        }
    }
    al_endtry;

    ALCcontext_DecRef(Context);
}
예제 #20
0
AL_API ALvoid AL_APIENTRY alGetListenerfv(ALenum param, ALfloat *values)
{
    ALCcontext *context;

    switch(param)
    {
    case AL_GAIN:
    case AL_METERS_PER_UNIT:
        alGetListenerf(param, values);
        return;

    case AL_POSITION:
    case AL_VELOCITY:
        alGetListener3f(param, values+0, values+1, values+2);
        return;
    }

    context = GetContextRef();
    if(!context) return;

    ReadLock(&context->PropLock);
    if(!(values))
        SET_ERROR_AND_GOTO(context, AL_INVALID_VALUE, done);
    switch(param)
    {
    case AL_ORIENTATION:
        // AT then UP
        values[0] = context->Listener->Forward[0];
        values[1] = context->Listener->Forward[1];
        values[2] = context->Listener->Forward[2];
        values[3] = context->Listener->Up[0];
        values[4] = context->Listener->Up[1];
        values[5] = context->Listener->Up[2];
        break;

    default:
        SET_ERROR_AND_GOTO(context, AL_INVALID_ENUM, done);
    }

done:
    ReadUnlock(&context->PropLock);
    ALCcontext_DecRef(context);
}
const float cSoundSystemOpenAl::GetVolume(){float x;alGetListenerf(AL_VELOCITY,&x);CheckOpenAl();return x;}
예제 #22
0
float AudioEngineAL::GetMasterVolume() const
{
    float volume = 0.0f;
    alGetListenerf(AL_GAIN, &volume);
    return volume;
}
JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL10_nalGetListenerf(JNIEnv *__env, jclass clazz, jint paramName, jlong valueAddress, jlong __functionAddress) {
	ALfloat *value = (ALfloat *)(intptr_t)valueAddress;
	alGetListenerfPROC alGetListenerf = (alGetListenerfPROC)(intptr_t)__functionAddress;
	UNUSED_PARAMS(__env, clazz)
	alGetListenerf(paramName, value);
}
예제 #24
0
파일: openal.c 프로젝트: AmesianX/RosWine
ALvoid CDECL wine_alGetListenerf(ALenum param, ALfloat* value)
{
    alGetListenerf(param, value);
}
예제 #25
0
	float Audio::getVolume() const
	{
		ALfloat volume;
		alGetListenerf(AL_GAIN, &volume);
		return volume;
	}
예제 #26
0
	const float32	COALListener::GetVolume() const {
		CR_ALBINDCHECK(this->m_pParent->GetContext());
		float32 fResult = 0.0f;
		alGetListenerf(AL_GAIN, &fResult);	CR_ALCHECK();
		return fResult;
	}
예제 #27
0
	const float32	COALDevice::GetGain() const {
		float32 fResult = 0.0f;
		alGetListenerf(AL_GAIN, &fResult);
		return fResult;
	}
예제 #28
0
파일: al.cpp 프로젝트: 2asoft/xray-16
//*****************************************************************************
// alGetListenerf
//*****************************************************************************
//
ALAPI ALvoid ALAPIENTRY alGetListenerf(ALenum param, ALfloat* value)
{
    AL_VOID_FXN(alGetListenerf(param, value));
}
예제 #29
0
	float SoundEngineOpenAL::getVolume()
	{
		float volume;
		alGetListenerf(AL_GAIN, &volume);
		return volume;
	}
예제 #30
0
파일: luaal.c 프로젝트: darkf/almixer
static int lua_alGetListener(lua_State* lua_state)
{
	ALenum enum_parameter;
	int openal_primitive_type;

	enum_parameter = lua_tointeger(lua_state, 1);

	openal_primitive_type = lua_getTypeForEnum(enum_parameter);

	switch(openal_primitive_type)
	{
		case LUAOPENAL_BOOL_TYPE:
		{
			ALint ret_val;
			alGetListeneri(enum_parameter, &ret_val);
			lua_pushboolean(lua_state, ret_val);
			return 1;
			break;
		}
		case LUAOPENAL_INT_TYPE:
		{
			ALint ret_val;
			alGetListeneri(enum_parameter, &ret_val);
			lua_pushinteger(lua_state, ret_val);
			return 1;
			break;
		}
		case LUAOPENAL_FLOAT_TYPE:
		{
			ALfloat ret_val;
			alGetListenerf(enum_parameter, &ret_val);
			lua_pushnumber(lua_state, ret_val);
			return 1;
			break;
		}
		case LUAOPENAL_INT_3_TYPE:
		{
			ALint ret_val[3];
			alGetListeneriv(enum_parameter, ret_val);
			lua_pushinteger(lua_state, ret_val[0]);
			lua_pushinteger(lua_state, ret_val[1]);
			lua_pushinteger(lua_state, ret_val[2]);
			return 3;
			break;	
		}
		case LUAOPENAL_FLOAT_3_TYPE:
		{
			ALfloat ret_val[3];
			alGetListenerfv(enum_parameter, ret_val);
			lua_pushnumber(lua_state, ret_val[0]);
			lua_pushnumber(lua_state, ret_val[1]);
			lua_pushnumber(lua_state, ret_val[2]);
			return 3;
			break;			
		}
		case LUAOPENAL_FLOAT_6_TYPE:
		{
			ALfloat ret_val[6];
			alGetListenerfv(enum_parameter, ret_val);
			lua_pushnumber(lua_state, ret_val[0]);
			lua_pushnumber(lua_state, ret_val[1]);
			lua_pushnumber(lua_state, ret_val[2]);
			lua_pushnumber(lua_state, ret_val[3]);
			lua_pushnumber(lua_state, ret_val[4]);
			lua_pushnumber(lua_state, ret_val[5]);
			return 6;
			break;			
		}
		default:
		{
			/* TODO: Figure out how to handle OpenAL extensions. */
			luaL_error(lua_state, "Unhandled parameter type for alGetSource*");
		}
	}
	return 0;
}