Also rename the argument of the init function from "p" to "afh".
static const char* aac_suffixes[] = {"m4a", "mp4", NULL};
/** the init function of the aac audio format handler */
-void aac_afh_init(struct audio_format_handler *p)
+void aac_afh_init(struct audio_format_handler *afh)
{
- p->get_file_info = aac_get_file_info,
- p->close_audio_file = aac_close_audio_file;
- p->suffixes = aac_suffixes;
+ afh->get_file_info = aac_get_file_info,
+ afh->close_audio_file = aac_close_audio_file;
+ afh->suffixes = aac_suffixes;
}
static FILE *infile;
static struct mp3info mp3;
-static struct audio_format_handler *af;
static ssize_t num_chunks;
static int header_frequency(struct mp3header *h)
*
* \param p pointer to the struct to initialize
*/
-void mp3_init(struct audio_format_handler *p)
+void mp3_init(struct audio_format_handler *afh)
{
- af = p;
- af->get_file_info = mp3_get_file_info;
- af->close_audio_file = mp3_close_audio_file;
- af->suffixes = mp3_suffixes;
+ afh->get_file_info = mp3_get_file_info;
+ afh->close_audio_file = mp3_close_audio_file;
+ afh->suffixes = mp3_suffixes;
}
static double chunk_time = 0.25;
FILE *audio_file;
-static struct audio_format_handler *af;
static size_t cb_read(void *buf, size_t size, size_t nmemb, void *datasource)
{
*
* \param p pointer to the struct to initialize
*/
-void ogg_init(struct audio_format_handler *p)
+void ogg_init(struct audio_format_handler *afh)
{
- af = p;
- af->get_file_info = ogg_get_file_info,
- af->close_audio_file = ogg_close_audio_file;
- af->suffixes = ogg_suffixes;
+ afh->get_file_info = ogg_get_file_info,
+ afh->close_audio_file = ogg_close_audio_file;
+ afh->suffixes = ogg_suffixes;
}