diff --git a/src/output/plugins/WinmmOutputPlugin.cxx b/src/output/plugins/WinmmOutputPlugin.cxx index 7301cf369..a92286166 100644 --- a/src/output/plugins/WinmmOutputPlugin.cxx +++ b/src/output/plugins/WinmmOutputPlugin.cxx @@ -28,6 +28,8 @@ #include "util/Macros.hxx" #include "util/StringCompare.hxx" +#include + #include #include @@ -51,7 +53,7 @@ class WinmmOutput { */ HANDLE event; - WinmmBuffer buffers[8]; + std::array buffers; unsigned next_buffer; public: @@ -275,7 +277,7 @@ WinmmOutput::Play(const void *chunk, size_t size, Error &) } /* mark our buffer as "used" */ - next_buffer = (next_buffer + 1) % ARRAY_SIZE(buffers); + next_buffer = (next_buffer + 1) % buffers.size(); return size; } @@ -283,7 +285,7 @@ WinmmOutput::Play(const void *chunk, size_t size, Error &) void WinmmOutput::DrainAllBuffers() { - for (unsigned i = next_buffer; i < ARRAY_SIZE(buffers); ++i) + for (unsigned i = next_buffer; i < buffers.size(); ++i) DrainBuffer(buffers[i]); for (unsigned i = 0; i < next_buffer; ++i)