dynamic_mp3.h
author Ozkan Sezer <sezeroz@gmail.com>
Thu, 11 Oct 2018 11:50:10 +0300
branchSDL-1.2
changeset 902 6c862e733898
parent 542 3de4970b36d4
permissions -rw-r--r--
remove smpeg support completely and backport libmpg123 support instead.
slouken@314
     1
/*
slouken@518
     2
  SDL_mixer:  An audio mixer library based on the SDL library
slouken@518
     3
  Copyright (C) 1997-2012 Sam Lantinga <slouken@libsdl.org>
slouken@314
     4
slouken@518
     5
  This software is provided 'as-is', without any express or implied
slouken@518
     6
  warranty.  In no event will the authors be held liable for any damages
slouken@518
     7
  arising from the use of this software.
slouken@314
     8
slouken@518
     9
  Permission is granted to anyone to use this software for any purpose,
slouken@518
    10
  including commercial applications, and to alter it and redistribute it
slouken@518
    11
  freely, subject to the following restrictions:
slouken@314
    12
slouken@518
    13
  1. The origin of this software must not be misrepresented; you must not
slouken@518
    14
     claim that you wrote the original software. If you use this software
slouken@518
    15
     in a product, an acknowledgment in the product documentation would be
slouken@518
    16
     appreciated but is not required.
slouken@518
    17
  2. Altered source versions must be plainly marked as such, and must not be
slouken@518
    18
     misrepresented as being the original software.
slouken@518
    19
  3. This notice may not be removed or altered from any source distribution.
slouken@314
    20
*/
slouken@314
    21
slouken@314
    22
#ifdef MP3_MUSIC
sezeroz@902
    23
sezeroz@902
    24
#include <mpg123.h>
slouken@314
    25
slouken@314
    26
typedef struct {
slouken@314
    27
	int loaded;
slouken@314
    28
	void *handle;
slouken@314
    29
sezeroz@902
    30
	int (*mpg123_close)(mpg123_handle *mh);
sezeroz@902
    31
	void (*mpg123_delete)(mpg123_handle *mh);
sezeroz@902
    32
	void (*mpg123_exit)(void);
sezeroz@902
    33
	int (*mpg123_format)( mpg123_handle *mh, long rate, int channels, int encodings );
sezeroz@902
    34
	int (*mpg123_format_none)(mpg123_handle *mh);
sezeroz@902
    35
	int (*mpg123_getformat)( mpg123_handle *mh, long *rate, int *channels, int *encoding );
sezeroz@902
    36
	int (*mpg123_init)(void);
sezeroz@902
    37
	mpg123_handle *(*mpg123_new)(const char* decoder, int *error);
sezeroz@902
    38
	int (*mpg123_open_handle)(mpg123_handle *mh, void *iohandle);
sezeroz@902
    39
	const char* (*mpg123_plain_strerror)(int errcode);
sezeroz@902
    40
	void (*mpg123_rates)(const long **list, size_t *number);
sezeroz@902
    41
	int (*mpg123_read)(mpg123_handle *mh, unsigned char *outmemory, size_t outmemsize, size_t *done );
sezeroz@902
    42
	int (*mpg123_replace_reader_handle)( mpg123_handle *mh, ssize_t (*r_read) (void *, void *, size_t), off_t (*r_lseek)(void *, off_t, int), void (*cleanup)(void*) );
sezeroz@902
    43
	off_t (*mpg123_seek)( mpg123_handle *mh, off_t sampleoff, int whence );
sezeroz@902
    44
	const char* (*mpg123_strerror)(mpg123_handle *mh);
sezeroz@902
    45
} mpg123_loader;
sezeroz@902
    46
sezeroz@902
    47
extern mpg123_loader mpg123;
sezeroz@902
    48
sezeroz@902
    49
extern int Mix_InitMP3 (void);
sezeroz@902
    50
extern void Mix_QuitMP3 (void);
slouken@314
    51
slouken@470
    52
#endif /* MUSIC_MP3 */