aboutsummaryrefslogtreecommitdiffstats
path: root/alc/hrtf.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2020-04-08 10:15:43 -0700
committerChris Robinson <[email protected]>2020-04-08 10:15:43 -0700
commitd67cba99bd97d42e7e52c6dfd7a08c288b1539c0 (patch)
tree014425832a37173da8d9c3b2377526ce41d58d36 /alc/hrtf.cpp
parent8a5153ce0dee072c283b04ff5a61faa764f81743 (diff)
Clean up some more unnecessary uses of AL types
Diffstat (limited to 'alc/hrtf.cpp')
-rw-r--r--alc/hrtf.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/alc/hrtf.cpp b/alc/hrtf.cpp
index 8078bbc3..6a9c187e 100644
--- a/alc/hrtf.cpp
+++ b/alc/hrtf.cpp
@@ -100,7 +100,7 @@ constexpr ALchar magicMarker03[8]{'M','i','n','P','H','R','0','3'};
/* First value for pass-through coefficients (remaining are 0), used for omni-
* directional sounds. */
-constexpr ALfloat PassthruCoeff{0.707106781187f/*sqrt(0.5)*/};
+constexpr float PassthruCoeff{0.707106781187f/*sqrt(0.5)*/};
std::mutex LoadedHrtfLock;
al::vector<LoadedHrtf> LoadedHrtfs;
@@ -559,7 +559,7 @@ ALushort GetLE_ALushort(std::istream &data)
return static_cast<ALushort>(ret);
}
-ALint GetLE_ALint24(std::istream &data)
+int GetLE_ALint24(std::istream &data)
{
int ret = data.get();
ret |= data.get() << 8;
@@ -569,11 +569,11 @@ ALint GetLE_ALint24(std::istream &data)
ALuint GetLE_ALuint(std::istream &data)
{
- int ret = data.get();
- ret |= data.get() << 8;
- ret |= data.get() << 16;
- ret |= data.get() << 24;
- return static_cast<ALuint>(ret);
+ ALuint ret{static_cast<ALuint>(data.get())};
+ ret |= static_cast<ALuint>(data.get()) << 8;
+ ret |= static_cast<ALuint>(data.get()) << 16;
+ ret |= static_cast<ALuint>(data.get()) << 24;
+ return ret;
}
std::unique_ptr<HrtfStore> LoadHrtf00(std::istream &data, const char *filename)
@@ -1381,7 +1381,7 @@ HrtfStorePtr GetLoadedHrtf(const std::string &name, const char *devname, const A
}
std::unique_ptr<std::istream> stream;
- ALint residx{};
+ int residx{};
char ch{};
if(sscanf(fname.c_str(), "!%d%c", &residx, &ch) == 2 && ch == '_')
{