From 782eb650c73fe01d1008a2a1bb9da56b65211eff Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sun, 28 Jan 2018 13:18:33 -0800 Subject: Use std::array instead of a plain array in alffplay --- examples/alffplay.cpp | 8 ++++---- 1 file 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 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 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); } -- cgit v1.2.3