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/VorbisDecoderPlugin.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/decoder/VorbisDecoderPlugin.cxx') diff --git a/src/decoder/VorbisDecoderPlugin.cxx b/src/decoder/VorbisDecoderPlugin.cxx index 55ce943e8..9ef5e2eea 100644 --- a/src/decoder/VorbisDecoderPlugin.cxx +++ b/src/decoder/VorbisDecoderPlugin.cxx @@ -26,6 +26,7 @@ #include "OggCodec.hxx" #include "util/Error.hxx" #include "util/UriUtil.hxx" +#include "util/Macros.hxx" #include "CheckAudioFormat.hxx" #include "tag/TagHandler.hxx" #include "Log.hxx" @@ -226,7 +227,7 @@ vorbis_stream_decode(struct decoder *decoder, #else float buffer[2048]; const int frames_per_buffer = - G_N_ELEMENTS(buffer) / audio_format.channels; + ARRAY_SIZE(buffer) / audio_format.channels; const unsigned frame_size = sizeof(buffer[0]) * audio_format.channels; #endif -- cgit v1.2.3