Mercurial > SDL_sound_CoreAudio
view playsound/physfsrwops.h @ 562:7e08477b0fc1
MP3 decoder upgrade work.
Ripped out SMPEG and mpglib support, replaced it with "mpg123.c" and libmpg123.
libmpg123 is a much better version of mpglib, so it should solve all the
problems about MP3's not seeking, or most modern MP3's not playing at all,
etc. Since you no longer have to make a tradeoff with SMPEG for features, and
SMPEG is basically rotting, I removed it from the project.
There is still work to be done with libmpg123...there are MMX, 3DNow, SSE,
Altivec, etc decoders which we don't have enabled at the moment, and the
build system could use some work to make this compile more cleanly, etc.
Still: huge win.
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Fri, 30 Jan 2009 02:44:47 -0500 |
parents | 2df1f5c62d38 |
children |
line wrap: on
line source
/* * This code provides a glue layer between PhysicsFS and Simple Directmedia * Layer's (SDL) RWops i/o abstraction. * * License: this code is public domain. I make no warranty that it is useful, * correct, harmless, or environmentally safe. * * This particular file may be used however you like, including copying it * verbatim into a closed-source project, exploiting it commercially, and * removing any trace of my name from the source (although I hope you won't * do that). I welcome enhancements and corrections to this file, but I do * not require you to send me patches if you make changes. * * Unless otherwise stated, the rest of PhysicsFS falls under the GNU Lesser * General Public License: http://www.gnu.org/licenses/lgpl.txt * * SDL falls under the LGPL, too. You can get SDL at http://www.libsdl.org/ * * This file was written by Ryan C. Gordon. (icculus@icculus.org). */ #ifndef _INCLUDE_PHYSFSRWOPS_H_ #define _INCLUDE_PHYSFSRWOPS_H_ #include "physfs.h" #include "SDL.h" #ifdef __cplusplus extern "C" { #endif /** * Open a platform-independent filename for reading, and make it accessible * via an SDL_RWops structure. The file will be closed in PhysicsFS when the * RWops is closed. PhysicsFS should be configured to your liking before * opening files through this method. * * @param filename File to open in platform-independent notation. * @return A valid SDL_RWops structure on success, NULL on error. Specifics * of the error can be gleaned from PHYSFS_getLastError(). */ __EXPORT__ SDL_RWops *PHYSFSRWOPS_openRead(const char *fname); /** * Open a platform-independent filename for writing, and make it accessible * via an SDL_RWops structure. The file will be closed in PhysicsFS when the * RWops is closed. PhysicsFS should be configured to your liking before * opening files through this method. * * @param filename File to open in platform-independent notation. * @return A valid SDL_RWops structure on success, NULL on error. Specifics * of the error can be gleaned from PHYSFS_getLastError(). */ __EXPORT__ SDL_RWops *PHYSFSRWOPS_openWrite(const char *fname); /** * Open a platform-independent filename for appending, and make it accessible * via an SDL_RWops structure. The file will be closed in PhysicsFS when the * RWops is closed. PhysicsFS should be configured to your liking before * opening files through this method. * * @param filename File to open in platform-independent notation. * @return A valid SDL_RWops structure on success, NULL on error. Specifics * of the error can be gleaned from PHYSFS_getLastError(). */ __EXPORT__ SDL_RWops *PHYSFSRWOPS_openAppend(const char *fname); /** * Make a SDL_RWops from an existing PhysicsFS file handle. You should * dispose of any references to the handle after successful creation of * the RWops. The actual PhysicsFS handle will be destroyed when the * RWops is closed. * * @param handle a valid PhysicsFS file handle. * @return A valid SDL_RWops structure on success, NULL on error. Specifics * of the error can be gleaned from PHYSFS_getLastError(). */ __EXPORT__ SDL_RWops *PHYSFSRWOPS_makeRWops(PHYSFS_file *handle); #ifdef __cplusplus } #endif #endif /* include-once blocker */ /* end of physfsrwops.h ... */