aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-01-28 13:18:33 -0800
committerChris Robinson <[email protected]>2018-01-28 13:18:33 -0800
commit782eb650c73fe01d1008a2a1bb9da56b65211eff (patch)
treee802fe7d2d008be671672f7bc0a72d295b3eb617 /examples
parent38a3ba74d4e078866678619588c7535d90ad52a7 (diff)
Use std::array instead of a plain array in alffplay
Diffstat (limited to 'examples')
-rw-r--r--examples/alffplay.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/alffplay.cpp b/examples/alffplay.cpp
index 6eedcd76..039f5d68 100644
--- a/examples/alffplay.cpp
+++ b/examples/alffplay.cpp
@@ -704,16 +704,16 @@ void AL_APIENTRY AudioState::EventCallback(ALenum eventType, ALuint object, ALui
int AudioState::handler()
{
- const ALenum types[5] = {
+ const std::array<ALenum,5> types{{
AL_EVENT_TYPE_BUFFER_COMPLETED_SOFT, AL_EVENT_TYPE_SOURCE_STATE_CHANGED_SOFT,
AL_EVENT_TYPE_ERROR_SOFT, AL_EVENT_TYPE_PERFORMANCE_SOFT, AL_EVENT_TYPE_DEPRECATED_SOFT
- };
+ }};
std::unique_lock<std::mutex> lock(mSrcMutex);
ALenum fmt;
if(alEventControlSOFT)
{
- alEventControlSOFT(5, types, AL_TRUE);
+ alEventControlSOFT(types.size(), types.data(), AL_TRUE);
alEventCallbackSOFT(EventCallback, this);
}
@@ -948,7 +948,7 @@ finish:
if(alEventControlSOFT)
{
- alEventControlSOFT(5, types, AL_FALSE);
+ alEventControlSOFT(types.size(), types.data(), AL_FALSE);
alEventCallbackSOFT(nullptr, nullptr);
}