Browse Source

Cloned mad/ to modplug/

git-svn-id: trunk@4693 -
chrivers 19 years ago
parent
commit
fba9ac6698

+ 0 - 1
.gitattributes

@@ -2953,7 +2953,6 @@ packages/extra/md4/Makefile.fpc svneol=native#text/plain
 packages/extra/md4/md4.pas svneol=native#text/plain
 packages/extra/md4/md4.pas svneol=native#text/plain
 packages/extra/modplug/Makefile svneol=native#text/plain
 packages/extra/modplug/Makefile svneol=native#text/plain
 packages/extra/modplug/Makefile.fpc svneol=native#text/plain
 packages/extra/modplug/Makefile.fpc svneol=native#text/plain
-packages/extra/modplug/modplug.pas svneol=native#text/plain
 packages/extra/ncurses/Makefile svneol=native#text/plain
 packages/extra/ncurses/Makefile svneol=native#text/plain
 packages/extra/ncurses/Makefile.fpc svneol=native#text/plain
 packages/extra/ncurses/Makefile.fpc svneol=native#text/plain
 packages/extra/ncurses/db_demo.pp svneol=native#text/plain
 packages/extra/ncurses/db_demo.pp svneol=native#text/plain

+ 43 - 43
packages/extra/modplug/Makefile

@@ -1,5 +1,5 @@
 #
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2006/09/22]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2006/09/21]
 #
 #
 default: all
 default: all
 MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos sparc-linux sparc-netbsd sparc-solaris x86_64-linux x86_64-freebsd x86_64-win64 arm-linux arm-palmos arm-wince arm-gba powerpc64-linux
 MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos sparc-linux sparc-netbsd sparc-solaris x86_64-linux x86_64-freebsd x86_64-win64 arm-linux arm-palmos arm-wince arm-gba powerpc64-linux
@@ -230,130 +230,130 @@ ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
 endif
 PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
 PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
-override PACKAGE_NAME=modplug
+override PACKAGE_NAME=mad
 override PACKAGE_VERSION=2.0.0
 override PACKAGE_VERSION=2.0.0
 ifeq ($(FULL_TARGET),i386-linux)
 ifeq ($(FULL_TARGET),i386-linux)
-override TARGET_UNITS+=modplug
+override TARGET_UNITS+=mad
 endif
 endif
 ifeq ($(FULL_TARGET),i386-go32v2)
 ifeq ($(FULL_TARGET),i386-go32v2)
-override TARGET_UNITS+=modplug
+override TARGET_UNITS+=mad
 endif
 endif
 ifeq ($(FULL_TARGET),i386-win32)
 ifeq ($(FULL_TARGET),i386-win32)
-override TARGET_UNITS+=modplug
+override TARGET_UNITS+=mad
 endif
 endif
 ifeq ($(FULL_TARGET),i386-os2)
 ifeq ($(FULL_TARGET),i386-os2)
-override TARGET_UNITS+=modplug
+override TARGET_UNITS+=mad
 endif
 endif
 ifeq ($(FULL_TARGET),i386-freebsd)
 ifeq ($(FULL_TARGET),i386-freebsd)
-override TARGET_UNITS+=modplug
+override TARGET_UNITS+=mad
 endif
 endif
 ifeq ($(FULL_TARGET),i386-beos)
 ifeq ($(FULL_TARGET),i386-beos)
-override TARGET_UNITS+=modplug
+override TARGET_UNITS+=mad
 endif
 endif
 ifeq ($(FULL_TARGET),i386-netbsd)
 ifeq ($(FULL_TARGET),i386-netbsd)
-override TARGET_UNITS+=modplug
+override TARGET_UNITS+=mad
 endif
 endif
 ifeq ($(FULL_TARGET),i386-solaris)
 ifeq ($(FULL_TARGET),i386-solaris)
-override TARGET_UNITS+=modplug
+override TARGET_UNITS+=mad
 endif
 endif
 ifeq ($(FULL_TARGET),i386-qnx)
 ifeq ($(FULL_TARGET),i386-qnx)
-override TARGET_UNITS+=modplug
+override TARGET_UNITS+=mad
 endif
 endif
 ifeq ($(FULL_TARGET),i386-netware)
 ifeq ($(FULL_TARGET),i386-netware)
-override TARGET_UNITS+=modplug
+override TARGET_UNITS+=mad
 endif
 endif
 ifeq ($(FULL_TARGET),i386-openbsd)
 ifeq ($(FULL_TARGET),i386-openbsd)
-override TARGET_UNITS+=modplug
+override TARGET_UNITS+=mad
 endif
 endif
 ifeq ($(FULL_TARGET),i386-wdosx)
 ifeq ($(FULL_TARGET),i386-wdosx)
-override TARGET_UNITS+=modplug
+override TARGET_UNITS+=mad
 endif
 endif
 ifeq ($(FULL_TARGET),i386-darwin)
 ifeq ($(FULL_TARGET),i386-darwin)
-override TARGET_UNITS+=modplug
+override TARGET_UNITS+=mad
 endif
 endif
 ifeq ($(FULL_TARGET),i386-emx)
 ifeq ($(FULL_TARGET),i386-emx)
-override TARGET_UNITS+=modplug
+override TARGET_UNITS+=mad
 endif
 endif
 ifeq ($(FULL_TARGET),i386-watcom)
 ifeq ($(FULL_TARGET),i386-watcom)
-override TARGET_UNITS+=modplug
+override TARGET_UNITS+=mad
 endif
 endif
 ifeq ($(FULL_TARGET),i386-netwlibc)
 ifeq ($(FULL_TARGET),i386-netwlibc)
-override TARGET_UNITS+=modplug
+override TARGET_UNITS+=mad
 endif
 endif
 ifeq ($(FULL_TARGET),i386-wince)
 ifeq ($(FULL_TARGET),i386-wince)
-override TARGET_UNITS+=modplug
+override TARGET_UNITS+=mad
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-linux)
 ifeq ($(FULL_TARGET),m68k-linux)
-override TARGET_UNITS+=modplug
+override TARGET_UNITS+=mad
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-freebsd)
 ifeq ($(FULL_TARGET),m68k-freebsd)
-override TARGET_UNITS+=modplug
+override TARGET_UNITS+=mad
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-netbsd)
 ifeq ($(FULL_TARGET),m68k-netbsd)
-override TARGET_UNITS+=modplug
+override TARGET_UNITS+=mad
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-amiga)
 ifeq ($(FULL_TARGET),m68k-amiga)
-override TARGET_UNITS+=modplug
+override TARGET_UNITS+=mad
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-atari)
 ifeq ($(FULL_TARGET),m68k-atari)
-override TARGET_UNITS+=modplug
+override TARGET_UNITS+=mad
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-openbsd)
 ifeq ($(FULL_TARGET),m68k-openbsd)
-override TARGET_UNITS+=modplug
+override TARGET_UNITS+=mad
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-palmos)
 ifeq ($(FULL_TARGET),m68k-palmos)
-override TARGET_UNITS+=modplug
+override TARGET_UNITS+=mad
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc-linux)
 ifeq ($(FULL_TARGET),powerpc-linux)
-override TARGET_UNITS+=modplug
+override TARGET_UNITS+=mad
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc-netbsd)
 ifeq ($(FULL_TARGET),powerpc-netbsd)
-override TARGET_UNITS+=modplug
+override TARGET_UNITS+=mad
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc-amiga)
 ifeq ($(FULL_TARGET),powerpc-amiga)
-override TARGET_UNITS+=modplug
+override TARGET_UNITS+=mad
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc-macos)
 ifeq ($(FULL_TARGET),powerpc-macos)
-override TARGET_UNITS+=modplug
+override TARGET_UNITS+=mad
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc-darwin)
 ifeq ($(FULL_TARGET),powerpc-darwin)
-override TARGET_UNITS+=modplug
+override TARGET_UNITS+=mad
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc-morphos)
 ifeq ($(FULL_TARGET),powerpc-morphos)
-override TARGET_UNITS+=modplug
+override TARGET_UNITS+=mad
 endif
 endif
 ifeq ($(FULL_TARGET),sparc-linux)
 ifeq ($(FULL_TARGET),sparc-linux)
-override TARGET_UNITS+=modplug
+override TARGET_UNITS+=mad
 endif
 endif
 ifeq ($(FULL_TARGET),sparc-netbsd)
 ifeq ($(FULL_TARGET),sparc-netbsd)
-override TARGET_UNITS+=modplug
+override TARGET_UNITS+=mad
 endif
 endif
 ifeq ($(FULL_TARGET),sparc-solaris)
 ifeq ($(FULL_TARGET),sparc-solaris)
-override TARGET_UNITS+=modplug
+override TARGET_UNITS+=mad
 endif
 endif
 ifeq ($(FULL_TARGET),x86_64-linux)
 ifeq ($(FULL_TARGET),x86_64-linux)
-override TARGET_UNITS+=modplug
+override TARGET_UNITS+=mad
 endif
 endif
 ifeq ($(FULL_TARGET),x86_64-freebsd)
 ifeq ($(FULL_TARGET),x86_64-freebsd)
-override TARGET_UNITS+=modplug
+override TARGET_UNITS+=mad
 endif
 endif
 ifeq ($(FULL_TARGET),x86_64-win64)
 ifeq ($(FULL_TARGET),x86_64-win64)
-override TARGET_UNITS+=modplug
+override TARGET_UNITS+=mad
 endif
 endif
 ifeq ($(FULL_TARGET),arm-linux)
 ifeq ($(FULL_TARGET),arm-linux)
-override TARGET_UNITS+=modplug
+override TARGET_UNITS+=mad
 endif
 endif
 ifeq ($(FULL_TARGET),arm-palmos)
 ifeq ($(FULL_TARGET),arm-palmos)
-override TARGET_UNITS+=modplug
+override TARGET_UNITS+=mad
 endif
 endif
 ifeq ($(FULL_TARGET),arm-wince)
 ifeq ($(FULL_TARGET),arm-wince)
-override TARGET_UNITS+=modplug
+override TARGET_UNITS+=mad
 endif
 endif
 ifeq ($(FULL_TARGET),arm-gba)
 ifeq ($(FULL_TARGET),arm-gba)
-override TARGET_UNITS+=modplug
+override TARGET_UNITS+=mad
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
-override TARGET_UNITS+=modplug
+override TARGET_UNITS+=mad
 endif
 endif
 override INSTALL_FPCPACKAGE=y
 override INSTALL_FPCPACKAGE=y
 ifdef REQUIRE_UNITSDIR
 ifdef REQUIRE_UNITSDIR

+ 1 - 1
packages/extra/modplug/Makefile.fpc

@@ -7,7 +7,7 @@ name=modplug
 version=2.0.0
 version=2.0.0
 
 
 [target]
 [target]
-units=modplug
+units=mad
 
 
 [require]
 [require]
 
 

+ 0 - 116
packages/extra/modplug/modplug.pas

@@ -1,116 +0,0 @@
-{
-  Translation of the libmodplug headers for FreePascal
-  Copyright (C) 2006 by Ivo Steinmann
-}
-
-unit modplug;
-
-{$mode objfpc}
-{$MINENUMSIZE 4}
-
-interface
-
-uses
-  ctypes;
-
-{$IFDEF WINDOWS}
-  {$DEFINE DYNLINK}
-{$ENDIF}
-
-{$IFDEF DYNLINK}
-const
-{$IF Defined(WINDOWS)}
-  modpluglib = 'libmodplug.dll';
-{$ELSEIF Defined(UNIX)}
-  modpluglib = 'libmodplug.so';
-{$ELSE}
-  {$MESSAGE ERROR 'DYNLINK not supported'}
-{$IFEND}
-{$ELSE}
-  {$LINKLIB modplug}
-{$ENDIF}
-
-(*
- * This source code is public domain.
- *
- * Authors: Kenton Varda <[email protected]> (C interface wrapper)
- *)
-
-
-struct _ModPlugFile;
-typedef struct _ModPlugFile ModPlugFile;
-
-(* Load a mod file.  [data] should point to a block of memory containing the complete
- * file, and [size] should be the size of that block.
- * Return the loaded mod file on success, or NULL on failure. *)
-ModPlugFile* ModPlug_Load(const void* data, int size);
-(* Unload a mod file. *)
-void ModPlug_Unload(ModPlugFile* file);
-
-(* Read sample data into the buffer.  Returns the number of bytes read.  If the end
- * of the mod has been reached, zero is returned. *)
-int  ModPlug_Read(ModPlugFile* file, void* buffer, int size);
-
-(* Get the name of the mod.  The returned buffer is stored within the ModPlugFile
- * structure and will remain valid until you unload the file. *)
-const char* ModPlug_GetName(ModPlugFile* file);
-
-(* Get the length of the mod, in milliseconds.  Note that this result is not always
- * accurate, especially in the case of mods with loops. *)
-int ModPlug_GetLength(ModPlugFile* file);
-
-(* Seek to a particular position in the song.  Note that seeking and MODs don't mix very
- * well.  Some mods will be missing instruments for a short time after a seek, as ModPlug
- * does not scan the sequence backwards to find out which instruments were supposed to be
- * playing at that time.  (Doing so would be difficult and not very reliable.)  Also,
- * note that seeking is not very exact in some mods -- especially those for which
- * ModPlug_GetLength() does not report the full length. *)
-void ModPlug_Seek(ModPlugFile* file, int millisecond);
-
-enum _ModPlug_Flags
-{
-    MODPLUG_ENABLE_OVERSAMPLING     = 1 << 0,  (* Enable oversampling (*highly* recommended) *)
-    MODPLUG_ENABLE_NOISE_REDUCTION  = 1 << 1,  (* Enable noise reduction *)
-    MODPLUG_ENABLE_REVERB           = 1 << 2,  (* Enable reverb *)
-    MODPLUG_ENABLE_MEGABASS         = 1 << 3,  (* Enable megabass *)
-    MODPLUG_ENABLE_SURROUND         = 1 << 4   (* Enable surround sound. *)
-};
-
-enum _ModPlug_ResamplingMode
-{
-    MODPLUG_RESAMPLE_NEAREST = 0,  (* No interpolation (very fast, extremely bad sound quality) *)
-    MODPLUG_RESAMPLE_LINEAR  = 1,  (* Linear interpolation (fast, good quality) *)
-    MODPLUG_RESAMPLE_SPLINE  = 2,  (* Cubic spline interpolation (high quality) *)
-    MODPLUG_RESAMPLE_FIR     = 3   (* 8-tap fir filter (extremely high quality) *)
-};
-
-typedef struct _ModPlug_Settings
-{
-    int mFlags;  (* One or more of the MODPLUG_ENABLE_* flags above, bitwise-OR'ed *)
-    
-    (* Note that ModPlug always decodes sound at 44100kHz, 32 bit, stereo and then
-     * down-mixes to the settings you choose. *)
-    int mChannels;       (* Number of channels - 1 for mono or 2 for stereo *)
-    int mBits;           (* Bits per sample - 8, 16, or 32 *)
-    int mFrequency;      (* Sampling rate - 11025, 22050, or 44100 *)
-    int mResamplingMode; (* One of MODPLUG_RESAMPLE_*, above *)
-    
-    int mReverbDepth;    (* Reverb level 0(quiet)-100(loud)      *)
-    int mReverbDelay;    (* Reverb delay in ms, usually 40-200ms *)
-    int mBassAmount;     (* XBass level 0(quiet)-100(loud)       *)
-    int mBassRange;      (* XBass cutoff in Hz 10-100            *)
-    int mSurroundDepth;  (* Surround level 0(quiet)-100(heavy)   *)
-    int mSurroundDelay;  (* Surround delay in ms, usually 5-40ms *)
-    int mLoopCount;      (* Number of times to loop.  Zero prevents looping.
-                            -1 loops forever. *)
-} ModPlug_Settings;
-
-(* Get and set the mod decoder settings.  All options, except for channels, bits-per-sample,
- * sampling rate, and loop count, will take effect immediately.  Those options which don't
- * take effect immediately will take effect the next time you load a mod. *)
-void ModPlug_GetSettings(ModPlug_Settings* settings);
-void ModPlug_SetSettings(const ModPlug_Settings* settings);}
-
-implementation
-
-end.