mirror of
https://github.com/bjornbytes/lovr.git
synced 2024-07-05 13:53:38 +00:00
rm spatial blend for now;
This commit is contained in:
parent
cb1b78f2cc
commit
92492dcef1
|
@ -95,20 +95,6 @@ static int l_lovrSourceIsSpatial(lua_State* L) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int l_lovrSourceGetSpatialBlend(lua_State* L) {
|
|
||||||
Source* source = luax_checktype(L, 1, Source);
|
|
||||||
float blend = lovrSourceGetSpatialBlend(source);
|
|
||||||
lua_pushnumber(L, blend);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int l_lovrSourceSetSpatialBlend(lua_State* L) {
|
|
||||||
Source* source = luax_checktype(L, 1, Source);
|
|
||||||
float blend = luax_checkfloat(L, 2);
|
|
||||||
lovrSourceSetSpatialBlend(source, blend);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int l_lovrSourceGetInterpolation(lua_State* L) {
|
static int l_lovrSourceGetInterpolation(lua_State* L) {
|
||||||
Source* source = luax_checktype(L, 1, Source);
|
Source* source = luax_checktype(L, 1, Source);
|
||||||
SourceInterpolation interpolation = lovrSourceGetInterpolation(source);
|
SourceInterpolation interpolation = lovrSourceGetInterpolation(source);
|
||||||
|
@ -303,8 +289,6 @@ const luaL_Reg lovrSource[] = {
|
||||||
{ "tell", l_lovrSourceTell },
|
{ "tell", l_lovrSourceTell },
|
||||||
{ "getDuration", l_lovrSourceGetDuration },
|
{ "getDuration", l_lovrSourceGetDuration },
|
||||||
{ "isSpatial", l_lovrSourceIsSpatial },
|
{ "isSpatial", l_lovrSourceIsSpatial },
|
||||||
{ "getSpatialBlend", l_lovrSourceGetSpatialBlend },
|
|
||||||
{ "setSpatialBlend", l_lovrSourceSetSpatialBlend },
|
|
||||||
{ "getInterpolation", l_lovrSourceGetInterpolation },
|
{ "getInterpolation", l_lovrSourceGetInterpolation },
|
||||||
{ "setInterpolation", l_lovrSourceSetInterpolation },
|
{ "setInterpolation", l_lovrSourceSetInterpolation },
|
||||||
{ "getPosition", l_lovrSourceGetPosition },
|
{ "getPosition", l_lovrSourceGetPosition },
|
||||||
|
|
|
@ -483,14 +483,6 @@ bool lovrSourceIsSpatial(Source *source) {
|
||||||
return source->spatial;
|
return source->spatial;
|
||||||
}
|
}
|
||||||
|
|
||||||
float lovrSourceGetSpatialBlend(Source* source) {
|
|
||||||
return source->blend;
|
|
||||||
}
|
|
||||||
|
|
||||||
void lovrSourceSetSpatialBlend(Source* source, float blend) {
|
|
||||||
source->blend = blend;
|
|
||||||
}
|
|
||||||
|
|
||||||
SourceInterpolation lovrSourceGetInterpolation(Source* source) {
|
SourceInterpolation lovrSourceGetInterpolation(Source* source) {
|
||||||
return source->bilinear ? SOURCE_BILINEAR : SOURCE_NEAREST;
|
return source->bilinear ? SOURCE_BILINEAR : SOURCE_NEAREST;
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,8 +60,6 @@ void lovrSourceSeek(Source* source, double time, TimeUnit units);
|
||||||
double lovrSourceTell(Source* source, TimeUnit units);
|
double lovrSourceTell(Source* source, TimeUnit units);
|
||||||
double lovrSourceGetDuration(Source* source, TimeUnit units);
|
double lovrSourceGetDuration(Source* source, TimeUnit units);
|
||||||
bool lovrSourceIsSpatial(Source* source);
|
bool lovrSourceIsSpatial(Source* source);
|
||||||
float lovrSourceGetSpatialBlend(Source* source);
|
|
||||||
void lovrSourceSetSpatialBlend(Source* source, float blend);
|
|
||||||
SourceInterpolation lovrSourceGetInterpolation(Source* source);
|
SourceInterpolation lovrSourceGetInterpolation(Source* source);
|
||||||
void lovrSourceSetInterpolation(Source* source, SourceInterpolation interpolation);
|
void lovrSourceSetInterpolation(Source* source, SourceInterpolation interpolation);
|
||||||
void lovrSourceGetPose(Source* source, float position[4], float orientation[4]);
|
void lovrSourceGetPose(Source* source, float position[4], float orientation[4]);
|
||||||
|
|
|
@ -249,7 +249,7 @@ uint32_t phonon_apply(Source* source, const float* input, float* output, uint32_
|
||||||
|
|
||||||
phonon_iplApplyDirectSoundEffect(state.directSoundEffect[index], in, path, options, tmp);
|
phonon_iplApplyDirectSoundEffect(state.directSoundEffect[index], in, path, options, tmp);
|
||||||
|
|
||||||
float blend = lovrSourceGetSpatialBlend(source);
|
float blend = 1.f;
|
||||||
IPLHrtfInterpolation interpolation = lovrSourceGetInterpolation(source) == SOURCE_BILINEAR ? IPL_HRTFINTERPOLATION_BILINEAR : IPL_HRTFINTERPOLATION_NEAREST;
|
IPLHrtfInterpolation interpolation = lovrSourceGetInterpolation(source) == SOURCE_BILINEAR ? IPL_HRTFINTERPOLATION_BILINEAR : IPL_HRTFINTERPOLATION_NEAREST;
|
||||||
phonon_iplApplyBinauralEffect(state.binauralEffect[index], state.binauralRenderer, tmp, path.direction, interpolation, blend, out);
|
phonon_iplApplyBinauralEffect(state.binauralEffect[index], state.binauralRenderer, tmp, path.direction, interpolation, blend, out);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue