-/*
- * Copyright (C) 2010 Andre Noll <maan@tuebingen.mpg.de>
- *
- * Licensed under the GPL v2. For licencing details see COPYING.
- */
+/* Copyright (C) 2010 Andre Noll <maan@tuebingen.mpg.de>, see file COPYING. */
/* This file is based on speexdec.c, by Jean-Marc Valin, see below. */
struct afh_info *afhi)
{
struct private_spx_data psd;
- struct ogg_afh_callback_info spx_callback_info = {
+ struct oac_callback_info spx_callback_info = {
.packet_callback = spx_packet_callback,
.private_data = &psd,
};
memset(&psd, 0, sizeof(psd));
- return ogg_get_file_info(map, numbytes, afhi, &spx_callback_info);
+ return oac_get_file_info(map, numbytes, afhi, &spx_callback_info);
}
static size_t spx_make_meta_packet(struct taginfo *tags, char **result)
int ret;
meta_sz = spx_make_meta_packet(tags, &meta_packet);
- ret = ogg_rewrite_tags(map, mapsize, output_fd, meta_packet, meta_sz);
+ ret = oac_rewrite_tags(map, mapsize, output_fd, meta_packet, meta_sz);
free(meta_packet);
return ret;
}
static const char * const speex_suffixes[] = {"spx", "speex", NULL};
/**
- * The init function of the ogg/speex audio format handler.
+ * The ogg/speex audio format handler.
*
- * \param afh Pointer to the struct to initialize.
+ * This codec is considered obsolete because the opus codec surpasses its
+ * performance in all areas. It is only compiled in if both the ogg and the
+ * speex library are installed.
*/
-void spx_afh_init(struct audio_format_handler *afh)
-{
- afh->get_file_info = spx_get_file_info,
- afh->suffixes = speex_suffixes;
- afh->rewrite_tags = spx_rewrite_tags;
-}
+const struct audio_format_handler spx_afh = {
+ .get_file_info = spx_get_file_info,
+ .suffixes = speex_suffixes,
+ .rewrite_tags = spx_rewrite_tags,
+};