dynamic_mp3.h
author Ozkan Sezer <sezeroz@gmail.com>
Sun, 07 Oct 2018 00:08:00 +0300
branchSDL-1.2
changeset 871 284d10d87cc9
parent 542 3de4970b36d4
child 601 05123263dab3
child 902 6c862e733898
permissions -rw-r--r--
backport fix for bug #1833. (from 2.0 branch commit 7ead8213dfb0).
     1 /*
     2   SDL_mixer:  An audio mixer library based on the SDL library
     3   Copyright (C) 1997-2012 Sam Lantinga <slouken@libsdl.org>
     4 
     5   This software is provided 'as-is', without any express or implied
     6   warranty.  In no event will the authors be held liable for any damages
     7   arising from the use of this software.
     8 
     9   Permission is granted to anyone to use this software for any purpose,
    10   including commercial applications, and to alter it and redistribute it
    11   freely, subject to the following restrictions:
    12 
    13   1. The origin of this software must not be misrepresented; you must not
    14      claim that you wrote the original software. If you use this software
    15      in a product, an acknowledgment in the product documentation would be
    16      appreciated but is not required.
    17   2. Altered source versions must be plainly marked as such, and must not be
    18      misrepresented as being the original software.
    19   3. This notice may not be removed or altered from any source distribution.
    20 */
    21 
    22 #ifdef MP3_MUSIC
    23 #include "smpeg.h"
    24 
    25 typedef struct {
    26 	int loaded;
    27 	void *handle;
    28 	void (*SMPEG_actualSpec)( SMPEG *mpeg, SDL_AudioSpec *spec );
    29 	void (*SMPEG_delete)( SMPEG* mpeg );
    30 	void (*SMPEG_enableaudio)( SMPEG* mpeg, int enable );
    31 	void (*SMPEG_enablevideo)( SMPEG* mpeg, int enable );
    32 	SMPEG* (*SMPEG_new_rwops)(SDL_RWops *src, SMPEG_Info* info, int sdl_audio);
    33 	void (*SMPEG_play)( SMPEG* mpeg );
    34 	int (*SMPEG_playAudio)( SMPEG *mpeg, Uint8 *stream, int len );
    35 	void (*SMPEG_rewind)( SMPEG* mpeg );
    36 	void (*SMPEG_setvolume)( SMPEG* mpeg, int volume );
    37 	void (*SMPEG_skip)( SMPEG* mpeg, float seconds );
    38 	SMPEGstatus (*SMPEG_status)( SMPEG* mpeg );
    39 	void (*SMPEG_stop)( SMPEG* mpeg );
    40 } smpeg_loader;
    41 
    42 extern smpeg_loader smpeg;
    43 
    44 #endif /* MUSIC_MP3 */
    45 
    46 extern int Mix_InitMP3();
    47 extern void Mix_QuitMP3();