From 509f8dab8946cfc311def89f62352c0881e73348 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 15 Oct 2013 22:04:17 +0200 Subject: Util/Macros: replacement for GLib's G_N_ELEMENTS() --- src/decoder/WavpackDecoderPlugin.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/decoder/WavpackDecoderPlugin.cxx') diff --git a/src/decoder/WavpackDecoderPlugin.cxx b/src/decoder/WavpackDecoderPlugin.cxx index 8ee898e30..8c6d9f927 100644 --- a/src/decoder/WavpackDecoderPlugin.cxx +++ b/src/decoder/WavpackDecoderPlugin.cxx @@ -26,6 +26,7 @@ #include "tag/ApeTag.hxx" #include "util/Error.hxx" #include "util/Domain.hxx" +#include "util/Macros.hxx" #include "Log.hxx" #include @@ -173,7 +174,7 @@ wavpack_decode(struct decoder *decoder, WavpackContext *wpc, bool can_seek) /* wavpack gives us all kind of samples in a 32-bit space */ int32_t chunk[1024]; - const uint32_t samples_requested = G_N_ELEMENTS(chunk) / + const uint32_t samples_requested = ARRAY_SIZE(chunk) / audio_format.channels; decoder_initialized(decoder, audio_format, can_seek, total_time); -- cgit v1.2.3