diff options
author | Chris Robinson <[email protected]> | 2019-09-12 04:17:21 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2019-09-12 04:17:21 -0700 |
commit | 6699f3cf1cd563814ec5c4513613d588a05e2941 (patch) | |
tree | dafedbf37905362a75c37df184f73843c30f6b33 /alc/alcmain.h | |
parent | 4c76f32ddac5145231609b1cb4f28028abed814b (diff) |
Use unsigned channel indices
Diffstat (limited to 'alc/alcmain.h')
-rw-r--r-- | alc/alcmain.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/alc/alcmain.h b/alc/alcmain.h index 556268ce..fb93488f 100644 --- a/alc/alcmain.h +++ b/alc/alcmain.h @@ -183,7 +183,7 @@ struct MixParams { }; struct RealMixParams { - std::array<ALint,MaxChannels> ChannelIndex{}; + std::array<ALuint,MaxChannels> ChannelIndex{}; al::span<FloatBufferLine> Buffer; }; @@ -374,11 +374,12 @@ const ALCchar *DevFmtChannelsString(DevFmtChannels chans) noexcept; /** * GetChannelIdxByName * - * Returns the index for the given channel name (e.g. FrontCenter), or -1 if it - * doesn't exist. + * Returns the index for the given channel name (e.g. FrontCenter), or + * INVALID_CHANNEL_INDEX if it doesn't exist. */ -inline ALint GetChannelIdxByName(const RealMixParams &real, Channel chan) noexcept +inline ALuint GetChannelIdxByName(const RealMixParams &real, Channel chan) noexcept { return real.ChannelIndex[chan]; } +#define INVALID_CHANNEL_INDEX ~0u al::vector<std::string> SearchDataFiles(const char *match, const char *subdir); |