Util/Macros: replacement for GLib's G_N_ELEMENTS()

This commit is contained in:
Max Kellermann
2013-10-15 22:04:17 +02:00
parent 77429b6dd3
commit 509f8dab89
19 changed files with 100 additions and 58 deletions

View File

@@ -23,13 +23,12 @@
#include "DecoderAPI.hxx"
#include "CheckAudioFormat.hxx"
#include "util/Error.hxx"
#include "util/Macros.hxx"
#include "Log.hxx"
#include <adplug/adplug.h>
#include <adplug/emuopl.h>
#include <glib.h>
#include <assert.h>
static unsigned sample_rate;
@@ -65,7 +64,7 @@ adplug_file_decode(struct decoder *decoder, const char *path_fs)
player->songlength() / 1000.);
int16_t buffer[2048];
const unsigned frames_per_buffer = G_N_ELEMENTS(buffer) / 2;
const unsigned frames_per_buffer = ARRAY_SIZE(buffer) / 2;
DecoderCommand cmd;
do {