aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.in2
-rw-r--r--XBMC.xcodeproj/project.pbxproj34
-rw-r--r--configure.in1
-rw-r--r--lib/DllAdpcm.h60
-rw-r--r--lib/DllLibFlac.h147
-rw-r--r--lib/xbadpcm/ADPCMDll.cpp169
-rw-r--r--lib/xbadpcm/Makefile.in20
-rw-r--r--lib/xbadpcm/adpcm.sln21
-rw-r--r--lib/xbadpcm/adpcm.vcxproj149
-rw-r--r--lib/xbadpcm/adpcm.vcxproj.filters29
-rw-r--r--lib/xbadpcm/in_xbadpcm.txt47
-rw-r--r--lib/xbadpcm/mywav.h249
-rw-r--r--lib/xbadpcm/uXboxAdpcmDecoder.c164
-rw-r--r--lib/xbadpcm/uXboxAdpcmDecoder.h63
-rw-r--r--project/VS2010Express/XBMC for Windows.sln12
-rw-r--r--project/VS2010Express/XBMC.vcxproj7
-rw-r--r--project/VS2010Express/XBMC.vcxproj.filters21
-rw-r--r--xbmc/DllPaths_generated.h.in1
-rw-r--r--xbmc/cores/paplayer/ADPCMCodec.cpp104
-rw-r--r--xbmc/cores/paplayer/ADPCMCodec.h47
-rw-r--r--xbmc/cores/paplayer/CodecFactory.cpp31
-rw-r--r--xbmc/cores/paplayer/DVDPlayerCodec.cpp4
-rw-r--r--xbmc/cores/paplayer/FLACcodec.cpp352
-rw-r--r--xbmc/cores/paplayer/FLACcodec.h58
-rw-r--r--xbmc/cores/paplayer/Makefile.in5
-rw-r--r--xbmc/cores/paplayer/PAPlayer.cpp5
26 files changed, 20 insertions, 1782 deletions
diff --git a/Makefile.in b/Makefile.in
index 8eda3c4a70..6f689cfbd1 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -192,7 +192,6 @@ DIRECTORY_ARCHIVES += lib/xbmc-libav-hacks/dll-libavhacks.a
endif
PAPCODECS_DIRS= \
- lib/xbadpcm \
lib/nosefart \
lib/timidity \
lib/libsidplay2 \
@@ -420,7 +419,6 @@ libhdhomerun: dllloader
$(MAKE) -C lib/libhdhomerun
papcodecs: dllloader dvdpcodecs
test -d system/players/paplayer || mkdir system/players/paplayer
- $(MAKE) -C lib/xbadpcm
$(MAKE) -C lib/vgmstream
$(MAKE) -C lib/timidity
$(MAKE) -C lib/nosefart
diff --git a/XBMC.xcodeproj/project.pbxproj b/XBMC.xcodeproj/project.pbxproj
index 8e5fe7eced..b5b96f9b7c 100644
--- a/XBMC.xcodeproj/project.pbxproj
+++ b/XBMC.xcodeproj/project.pbxproj
@@ -893,12 +893,10 @@
DFF0F19D17528350002DA3A4 /* DVDTSCorrection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7CDAE9030FFCA3520040B25F /* DVDTSCorrection.cpp */; };
DFF0F19E17528350002DA3A4 /* Edl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43348AA1107747CD00F859CF /* Edl.cpp */; };
DFF0F19F17528350002DA3A4 /* ExternalPlayer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C5608C40F1754930056433A /* ExternalPlayer.cpp */; };
- DFF0F1A017528350002DA3A4 /* ADPCMCodec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E15DB0D25F9FA00618676 /* ADPCMCodec.cpp */; };
DFF0F1A117528350002DA3A4 /* ASAPCodec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 88ACB01C0DCF409E0083CFDF /* ASAPCodec.cpp */; };
DFF0F1A217528350002DA3A4 /* AudioDecoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E15E30D25F9FA00618676 /* AudioDecoder.cpp */; };
DFF0F1A317528350002DA3A4 /* CodecFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E15E80D25F9FA00618676 /* CodecFactory.cpp */; };
DFF0F1A417528350002DA3A4 /* DVDPlayerCodec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E36578860D3AA7B40033CC1C /* DVDPlayerCodec.cpp */; };
- DFF0F1A517528350002DA3A4 /* FLACcodec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E160A0D25F9FA00618676 /* FLACcodec.cpp */; };
DFF0F1A617528350002DA3A4 /* ModplugCodec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5DC8800110A46C700EE1B15 /* ModplugCodec.cpp */; };
DFF0F1A717528350002DA3A4 /* MP3codec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E16130D25F9FA00618676 /* MP3codec.cpp */; };
DFF0F1A817528350002DA3A4 /* NSFCodec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E161B0D25F9FA00618676 /* NSFCodec.cpp */; };
@@ -910,7 +908,6 @@
DFF0F1AE17528350002DA3A4 /* SPCCodec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E16350D25F9FA00618676 /* SPCCodec.cpp */; };
DFF0F1AF17528350002DA3A4 /* TimidityCodec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E16370D25F9FA00618676 /* TimidityCodec.cpp */; };
DFF0F1B017528350002DA3A4 /* VGMCodec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5F8E1D90E427E8000A8E96F /* VGMCodec.cpp */; };
- DFF0F1B117528350002DA3A4 /* WAVcodec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E16390D25F9FA00618676 /* WAVcodec.cpp */; };
DFF0F1B217528350002DA3A4 /* YMCodec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E16410D25F9FA00618676 /* YMCodec.cpp */; };
DFF0F1B317528350002DA3A4 /* PlayerCoreFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43348AA81077486D00F859CF /* PlayerCoreFactory.cpp */; };
DFF0F1B417528350002DA3A4 /* PlayerSelectionRule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43348AAA1077486D00F859CF /* PlayerSelectionRule.cpp */; };
@@ -1712,17 +1709,14 @@
E38E1FAD0D25F9FD00618676 /* DVDSubtitleLineCollection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E15910D25F9FA00618676 /* DVDSubtitleLineCollection.cpp */; };
E38E1FAE0D25F9FD00618676 /* DVDSubtitleParserSubrip.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E15940D25F9FA00618676 /* DVDSubtitleParserSubrip.cpp */; };
E38E1FAF0D25F9FD00618676 /* DVDSubtitleStream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E15960D25F9FA00618676 /* DVDSubtitleStream.cpp */; };
- E38E1FC10D25F9FD00618676 /* ADPCMCodec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E15DB0D25F9FA00618676 /* ADPCMCodec.cpp */; };
E38E1FC50D25F9FD00618676 /* AudioDecoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E15E30D25F9FA00618676 /* AudioDecoder.cpp */; };
E38E1FC70D25F9FD00618676 /* CodecFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E15E80D25F9FA00618676 /* CodecFactory.cpp */; };
- E38E1FCB0D25F9FD00618676 /* FLACcodec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E160A0D25F9FA00618676 /* FLACcodec.cpp */; };
E38E1FCF0D25F9FD00618676 /* MP3codec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E16130D25F9FA00618676 /* MP3codec.cpp */; };
E38E1FD10D25F9FD00618676 /* NSFCodec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E161B0D25F9FA00618676 /* NSFCodec.cpp */; };
E38E1FD20D25F9FD00618676 /* OGGcodec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E16230D25F9FA00618676 /* OGGcodec.cpp */; };
E38E1FD90D25F9FD00618676 /* SIDCodec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E16310D25F9FA00618676 /* SIDCodec.cpp */; };
E38E1FDA0D25F9FD00618676 /* SPCCodec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E16350D25F9FA00618676 /* SPCCodec.cpp */; };
E38E1FDB0D25F9FD00618676 /* TimidityCodec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E16370D25F9FA00618676 /* TimidityCodec.cpp */; };
- E38E1FDC0D25F9FD00618676 /* WAVcodec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E16390D25F9FA00618676 /* WAVcodec.cpp */; };
E38E1FDF0D25F9FD00618676 /* YMCodec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E16410D25F9FA00618676 /* YMCodec.cpp */; };
E38E1FE90D25F9FD00618676 /* LinuxRendererGL.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E165F0D25F9FA00618676 /* LinuxRendererGL.cpp */; };
E38E1FEC0D25F9FD00618676 /* RenderManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E16650D25F9FA00618676 /* RenderManager.cpp */; };
@@ -2301,12 +2295,10 @@
E4991205174E5D4500741B6D /* DVDTSCorrection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7CDAE9030FFCA3520040B25F /* DVDTSCorrection.cpp */; };
E4991206174E5D4500741B6D /* Edl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43348AA1107747CD00F859CF /* Edl.cpp */; };
E4991207174E5D4A00741B6D /* ExternalPlayer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C5608C40F1754930056433A /* ExternalPlayer.cpp */; };
- E4991208174E5D5A00741B6D /* ADPCMCodec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E15DB0D25F9FA00618676 /* ADPCMCodec.cpp */; };
E4991209174E5D5A00741B6D /* ASAPCodec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 88ACB01C0DCF409E0083CFDF /* ASAPCodec.cpp */; };
E499120A174E5D5A00741B6D /* AudioDecoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E15E30D25F9FA00618676 /* AudioDecoder.cpp */; };
E499120B174E5D5A00741B6D /* CodecFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E15E80D25F9FA00618676 /* CodecFactory.cpp */; };
E499120C174E5D5A00741B6D /* DVDPlayerCodec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E36578860D3AA7B40033CC1C /* DVDPlayerCodec.cpp */; };
- E499120D174E5D5A00741B6D /* FLACcodec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E160A0D25F9FA00618676 /* FLACcodec.cpp */; };
E499120E174E5D5A00741B6D /* ModplugCodec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5DC8800110A46C700EE1B15 /* ModplugCodec.cpp */; };
E499120F174E5D5A00741B6D /* MP3codec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E16130D25F9FA00618676 /* MP3codec.cpp */; };
E4991210174E5D5A00741B6D /* NSFCodec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E161B0D25F9FA00618676 /* NSFCodec.cpp */; };
@@ -2318,7 +2310,6 @@
E4991216174E5D5A00741B6D /* SPCCodec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E16350D25F9FA00618676 /* SPCCodec.cpp */; };
E4991217174E5D5A00741B6D /* TimidityCodec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E16370D25F9FA00618676 /* TimidityCodec.cpp */; };
E4991218174E5D5A00741B6D /* VGMCodec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5F8E1D90E427E8000A8E96F /* VGMCodec.cpp */; };
- E4991219174E5D5A00741B6D /* WAVcodec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E16390D25F9FA00618676 /* WAVcodec.cpp */; };
E499121A174E5D5A00741B6D /* YMCodec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E16410D25F9FA00618676 /* YMCodec.cpp */; };
E499121B174E5D5A00741B6D /* PlayerCoreFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43348AA81077486D00F859CF /* PlayerCoreFactory.cpp */; };
E499121C174E5D5A00741B6D /* PlayerSelectionRule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43348AAA1077486D00F859CF /* PlayerSelectionRule.cpp */; };
@@ -4577,22 +4568,16 @@
E38E159A0D25F9FA00618676 /* IDVDPlayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDVDPlayer.h; sourceTree = "<group>"; };
E38E15B50D25F9FA00618676 /* IAudioCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IAudioCallback.h; sourceTree = "<group>"; };
E38E15B60D25F9FA00618676 /* IPlayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IPlayer.h; sourceTree = "<group>"; };
- E38E15DB0D25F9FA00618676 /* ADPCMCodec.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ADPCMCodec.cpp; sourceTree = "<group>"; };
- E38E15DC0D25F9FA00618676 /* ADPCMCodec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ADPCMCodec.h; sourceTree = "<group>"; };
E38E15E30D25F9FA00618676 /* AudioDecoder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AudioDecoder.cpp; sourceTree = "<group>"; };
E38E15E40D25F9FA00618676 /* AudioDecoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AudioDecoder.h; sourceTree = "<group>"; };
E38E15E50D25F9FA00618676 /* CachingCodec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CachingCodec.h; sourceTree = "<group>"; };
E38E15E80D25F9FA00618676 /* CodecFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CodecFactory.cpp; sourceTree = "<group>"; };
E38E15E90D25F9FA00618676 /* CodecFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CodecFactory.h; sourceTree = "<group>"; };
- E38E15EF0D25F9FA00618676 /* DllAdpcm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DllAdpcm.h; sourceTree = "<group>"; };
- E38E15F50D25F9FA00618676 /* DllLibFlac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DllLibFlac.h; sourceTree = "<group>"; };
E38E15FA0D25F9FA00618676 /* DllNosefart.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DllNosefart.h; sourceTree = "<group>"; };
E38E15FB0D25F9FA00618676 /* DllSidplay2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DllSidplay2.h; sourceTree = "<group>"; };
E38E15FC0D25F9FA00618676 /* DllStSound.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DllStSound.h; sourceTree = "<group>"; };
E38E15FD0D25F9FA00618676 /* DllTimidity.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DllTimidity.h; sourceTree = "<group>"; };
E38E15FE0D25F9FA00618676 /* DllVorbisfile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DllVorbisfile.h; sourceTree = "<group>"; };
- E38E160A0D25F9FA00618676 /* FLACcodec.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FLACcodec.cpp; sourceTree = "<group>"; };
- E38E160B0D25F9FA00618676 /* FLACcodec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FLACcodec.h; sourceTree = "<group>"; };
E38E160E0D25F9FA00618676 /* ICodec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ICodec.h; sourceTree = "<group>"; };
E38E16130D25F9FA00618676 /* MP3codec.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MP3codec.cpp; sourceTree = "<group>"; };
E38E16140D25F9FA00618676 /* MP3codec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MP3codec.h; sourceTree = "<group>"; };
@@ -4606,8 +4591,6 @@
E38E16360D25F9FA00618676 /* SPCCodec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPCCodec.h; sourceTree = "<group>"; };
E38E16370D25F9FA00618676 /* TimidityCodec.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TimidityCodec.cpp; sourceTree = "<group>"; };
E38E16380D25F9FA00618676 /* TimidityCodec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TimidityCodec.h; sourceTree = "<group>"; };
- E38E16390D25F9FA00618676 /* WAVcodec.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WAVcodec.cpp; sourceTree = "<group>"; };
- E38E163A0D25F9FA00618676 /* WAVcodec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WAVcodec.h; sourceTree = "<group>"; };
E38E16410D25F9FA00618676 /* YMCodec.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = YMCodec.cpp; sourceTree = "<group>"; };
E38E16420D25F9FA00618676 /* YMCodec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YMCodec.h; sourceTree = "<group>"; };
E38E165F0D25F9FA00618676 /* LinuxRendererGL.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LinuxRendererGL.cpp; sourceTree = "<group>"; };
@@ -7817,8 +7800,6 @@
E38E15D20D25F9FA00618676 /* paplayer */ = {
isa = PBXGroup;
children = (
- E38E15DB0D25F9FA00618676 /* ADPCMCodec.cpp */,
- E38E15DC0D25F9FA00618676 /* ADPCMCodec.h */,
88ACB01C0DCF409E0083CFDF /* ASAPCodec.cpp */,
88ACB01D0DCF409E0083CFDF /* ASAPCodec.h */,
E38E15E30D25F9FA00618676 /* AudioDecoder.cpp */,
@@ -7828,8 +7809,6 @@
E38E15E90D25F9FA00618676 /* CodecFactory.h */,
E36578860D3AA7B40033CC1C /* DVDPlayerCodec.cpp */,
E36578870D3AA7B40033CC1C /* DVDPlayerCodec.h */,
- E38E160A0D25F9FA00618676 /* FLACcodec.cpp */,
- E38E160B0D25F9FA00618676 /* FLACcodec.h */,
E38E160E0D25F9FA00618676 /* ICodec.h */,
F5DC8800110A46C700EE1B15 /* ModplugCodec.cpp */,
F5DC87FF110A46C700EE1B15 /* ModplugCodec.h */,
@@ -7853,8 +7832,6 @@
E38E16380D25F9FA00618676 /* TimidityCodec.h */,
F5F8E1D90E427E8000A8E96F /* VGMCodec.cpp */,
F5F8E1D80E427E8000A8E96F /* VGMCodec.h */,
- E38E16390D25F9FA00618676 /* WAVcodec.cpp */,
- E38E163A0D25F9FA00618676 /* WAVcodec.h */,
E38E16410D25F9FA00618676 /* YMCodec.cpp */,
E38E16420D25F9FA00618676 /* YMCodec.h */,
);
@@ -8218,9 +8195,7 @@
E38E1A550D25F9FB00618676 /* libUPnP */,
E38E1C840D25F9FC00618676 /* libXDAAP */,
E38E1CE40D25F9FC00618676 /* UnrarXLib */,
- E38E15EF0D25F9FA00618676 /* DllAdpcm.h */,
88ACB01E0DCF409E0083CFDF /* DllASAP.h */,
- E38E15F50D25F9FA00618676 /* DllLibFlac.h */,
E38E15FA0D25F9FA00618676 /* DllNosefart.h */,
E38E15FB0D25F9FA00618676 /* DllSidplay2.h */,
E38E15FC0D25F9FA00618676 /* DllStSound.h */,
@@ -9824,17 +9799,14 @@
E38E1FAD0D25F9FD00618676 /* DVDSubtitleLineCollection.cpp in Sources */,
E38E1FAE0D25F9FD00618676 /* DVDSubtitleParserSubrip.cpp in Sources */,
E38E1FAF0D25F9FD00618676 /* DVDSubtitleStream.cpp in Sources */,
- E38E1FC10D25F9FD00618676 /* ADPCMCodec.cpp in Sources */,
E38E1FC50D25F9FD00618676 /* AudioDecoder.cpp in Sources */,
E38E1FC70D25F9FD00618676 /* CodecFactory.cpp in Sources */,
- E38E1FCB0D25F9FD00618676 /* FLACcodec.cpp in Sources */,
E38E1FCF0D25F9FD00618676 /* MP3codec.cpp in Sources */,
E38E1FD10D25F9FD00618676 /* NSFCodec.cpp in Sources */,
E38E1FD20D25F9FD00618676 /* OGGcodec.cpp in Sources */,
E38E1FD90D25F9FD00618676 /* SIDCodec.cpp in Sources */,
E38E1FDA0D25F9FD00618676 /* SPCCodec.cpp in Sources */,
E38E1FDB0D25F9FD00618676 /* TimidityCodec.cpp in Sources */,
- E38E1FDC0D25F9FD00618676 /* WAVcodec.cpp in Sources */,
E38E1FDF0D25F9FD00618676 /* YMCodec.cpp in Sources */,
E38E1FE90D25F9FD00618676 /* LinuxRendererGL.cpp in Sources */,
E38E1FEC0D25F9FD00618676 /* RenderManager.cpp in Sources */,
@@ -11063,12 +11035,10 @@
DFF0F19D17528350002DA3A4 /* DVDTSCorrection.cpp in Sources */,
DFF0F19E17528350002DA3A4 /* Edl.cpp in Sources */,
DFF0F19F17528350002DA3A4 /* ExternalPlayer.cpp in Sources */,
- DFF0F1A017528350002DA3A4 /* ADPCMCodec.cpp in Sources */,
DFF0F1A117528350002DA3A4 /* ASAPCodec.cpp in Sources */,
DFF0F1A217528350002DA3A4 /* AudioDecoder.cpp in Sources */,
DFF0F1A317528350002DA3A4 /* CodecFactory.cpp in Sources */,
DFF0F1A417528350002DA3A4 /* DVDPlayerCodec.cpp in Sources */,
- DFF0F1A517528350002DA3A4 /* FLACcodec.cpp in Sources */,
DFF0F1A617528350002DA3A4 /* ModplugCodec.cpp in Sources */,
DFF0F1A717528350002DA3A4 /* MP3codec.cpp in Sources */,
DFF0F1A817528350002DA3A4 /* NSFCodec.cpp in Sources */,
@@ -11080,7 +11050,6 @@
DFF0F1AE17528350002DA3A4 /* SPCCodec.cpp in Sources */,
DFF0F1AF17528350002DA3A4 /* TimidityCodec.cpp in Sources */,
DFF0F1B017528350002DA3A4 /* VGMCodec.cpp in Sources */,
- DFF0F1B117528350002DA3A4 /* WAVcodec.cpp in Sources */,
DFF0F1B217528350002DA3A4 /* YMCodec.cpp in Sources */,
DFF0F1B317528350002DA3A4 /* PlayerCoreFactory.cpp in Sources */,
DFF0F1B417528350002DA3A4 /* PlayerSelectionRule.cpp in Sources */,
@@ -12122,12 +12091,10 @@
E4991205174E5D4500741B6D /* DVDTSCorrection.cpp in Sources */,
E4991206174E5D4500741B6D /* Edl.cpp in Sources */,
E4991207174E5D4A00741B6D /* ExternalPlayer.cpp in Sources */,
- E4991208174E5D5A00741B6D /* ADPCMCodec.cpp in Sources */,
E4991209174E5D5A00741B6D /* ASAPCodec.cpp in Sources */,
E499120A174E5D5A00741B6D /* AudioDecoder.cpp in Sources */,
E499120B174E5D5A00741B6D /* CodecFactory.cpp in Sources */,
E499120C174E5D5A00741B6D /* DVDPlayerCodec.cpp in Sources */,
- E499120D174E5D5A00741B6D /* FLACcodec.cpp in Sources */,
E499120E174E5D5A00741B6D /* ModplugCodec.cpp in Sources */,
E499120F174E5D5A00741B6D /* MP3codec.cpp in Sources */,
E4991210174E5D5A00741B6D /* NSFCodec.cpp in Sources */,
@@ -12139,7 +12106,6 @@
E4991216174E5D5A00741B6D /* SPCCodec.cpp in Sources */,
E4991217174E5D5A00741B6D /* TimidityCodec.cpp in Sources */,
E4991218174E5D5A00741B6D /* VGMCodec.cpp in Sources */,
- E4991219174E5D5A00741B6D /* WAVcodec.cpp in Sources */,
E499121A174E5D5A00741B6D /* YMCodec.cpp in Sources */,
E499121B174E5D5A00741B6D /* PlayerCoreFactory.cpp in Sources */,
E499121C174E5D5A00741B6D /* PlayerSelectionRule.cpp in Sources */,
diff --git a/configure.in b/configure.in
index 815e2db3dc..115102b504 100644
--- a/configure.in
+++ b/configure.in
@@ -2525,7 +2525,6 @@ OUTPUT_FILES="Makefile \
xbmc/cores/paplayer/Makefile \
xbmc/cores/omxplayer/Makefile \
lib/timidity/Makefile \
- lib/xbadpcm/Makefile \
lib/asap/Makefile \
lib/nosefart/Makefile \
lib/libsidplay2/Makefile \
diff --git a/lib/DllAdpcm.h b/lib/DllAdpcm.h
deleted file mode 100644
index 8988bdb122..0000000000
--- a/lib/DllAdpcm.h
+++ /dev/null
@@ -1,60 +0,0 @@
-#pragma once
-/*
- * Copyright (C) 2005-2013 Team XBMC
- * http://xbmc.org
- *
- * This Program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This Program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with XBMC; see the file COPYING. If not, see
- * <http://www.gnu.org/licenses/>.
- *
- */
-
-#include "DynamicDll.h"
-
-class DllADPCMInterface
-{
-public:
- virtual ~DllADPCMInterface() {}
- virtual void* LoadXWAV(const char* szFileName)=0;
- virtual void FreeXWAV(void*)=0;
- virtual long FillBuffer(void* nsf, char* buffer, int size)=0;
- virtual int GetPlaybackRate(void* nsf)=0;
- virtual int GetNumberOfChannels(void* info)=0;
- virtual int GetSampleSize(void* info)=0;
- virtual int GetLength(void* info)=0;
- virtual int Seek(void* info, int pos)=0;
-};
-
-class DllADPCM : public DllDynamic, DllADPCMInterface
-{
- DECLARE_DLL_WRAPPER(DllADPCM, DLL_PATH_ADPCM_CODEC)
- DEFINE_METHOD1(void*, LoadXWAV, (const char* p1))
- DEFINE_METHOD1(void, FreeXWAV, (void* p1))
- DEFINE_METHOD3(long, FillBuffer, (void* p1, char* p2, int p3))
- DEFINE_METHOD1(int, GetPlaybackRate, (void* p1))
- DEFINE_METHOD1(int, GetNumberOfChannels, (void* p1))
- DEFINE_METHOD1(int, GetSampleSize, (void* p1))
- DEFINE_METHOD1(int, GetLength, (void* p1))
- DEFINE_METHOD2(int, Seek, (void* p1, int p2))
-
- BEGIN_METHOD_RESOLVE()
- RESOLVE_METHOD_RENAME(DLL_LoadXWAV, LoadXWAV)
- RESOLVE_METHOD_RENAME(DLL_FreeXWAV, FreeXWAV)
- RESOLVE_METHOD_RENAME(DLL_FillBuffer, FillBuffer)
- RESOLVE_METHOD_RENAME(DLL_GetPlaybackRate, GetPlaybackRate)
- RESOLVE_METHOD_RENAME(DLL_Seek, Seek)
- RESOLVE_METHOD_RENAME(DLL_GetNumberOfChannels, GetNumberOfChannels)
- RESOLVE_METHOD_RENAME(DLL_GetSampleSize, GetSampleSize)
- RESOLVE_METHOD_RENAME(DLL_GetLength, GetLength)
- END_METHOD_RESOLVE()
-};
diff --git a/lib/DllLibFlac.h b/lib/DllLibFlac.h
deleted file mode 100644
index 4c271a8655..0000000000
--- a/lib/DllLibFlac.h
+++ /dev/null
@@ -1,147 +0,0 @@
-#pragma once
-/*
- * Copyright (C) 2005-2013 Team XBMC
- * http://xbmc.org
- *
- * This Program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This Program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with XBMC; see the file COPYING. If not, see
- * <http://www.gnu.org/licenses/>.
- *
- */
-
-#if (defined HAVE_CONFIG_H) && (!defined WIN32)
- #include "config.h"
-#endif
-#include <FLAC/stream_decoder.h>
-#include "DynamicDll.h"
-#include "utils/log.h"
-
-class DllLibFlacInterface
-{
-public:
- virtual ~DllLibFlacInterface() {}
- virtual FLAC__StreamDecoder *FLAC__stream_decoder_new()=0;
- virtual void FLAC__stream_decoder_delete(FLAC__StreamDecoder *decoder)=0;
- virtual FLAC__StreamDecoderInitStatus FLAC__stream_decoder_init_stream(
- FLAC__StreamDecoder *decoder,
- FLAC__StreamDecoderReadCallback read_callback,
- FLAC__StreamDecoderSeekCallback seek_callback,
- FLAC__StreamDecoderTellCallback tell_callback,
- FLAC__StreamDecoderLengthCallback length_callback,
- FLAC__StreamDecoderEofCallback eof_callback,
- FLAC__StreamDecoderWriteCallback write_callback,
- FLAC__StreamDecoderMetadataCallback metadata_callback,
- FLAC__StreamDecoderErrorCallback error_callback,
- void *client_data
- )=0;
- virtual FLAC__bool FLAC__stream_decoder_set_md5_checking(FLAC__StreamDecoder *decoder, FLAC__bool value)=0;
- virtual FLAC__bool FLAC__stream_decoder_set_metadata_respond(FLAC__StreamDecoder *decoder, FLAC__MetadataType type)=0;
- virtual FLAC__bool FLAC__stream_decoder_set_metadata_respond_application(FLAC__StreamDecoder *decoder, const FLAC__byte id[4])=0;
- virtual FLAC__bool FLAC__stream_decoder_set_metadata_respond_all(FLAC__StreamDecoder *decoder)=0;
- virtual FLAC__bool FLAC__stream_decoder_set_metadata_ignore(FLAC__StreamDecoder *decoder, FLAC__MetadataType type)=0;
- virtual FLAC__bool FLAC__stream_decoder_set_metadata_ignore_application(FLAC__StreamDecoder *decoder, const FLAC__byte id[4])=0;
- virtual FLAC__bool FLAC__stream_decoder_set_metadata_ignore_all(FLAC__StreamDecoder *decoder)=0;
- virtual FLAC__StreamDecoderState FLAC__stream_decoder_get_state(const FLAC__StreamDecoder *decoder)=0;
- virtual const char *FLAC__stream_decoder_get_resolved_state_string(const FLAC__StreamDecoder *decoder)=0;
- virtual FLAC__bool FLAC__stream_decoder_get_md5_checking(const FLAC__StreamDecoder *decoder)=0;
- virtual FLAC__uint64 FLAC__stream_decoder_get_total_samples(const FLAC__StreamDecoder *decoder)=0;
- virtual unsigned FLAC__stream_decoder_get_channels(const FLAC__StreamDecoder *decoder)=0;
- virtual FLAC__ChannelAssignment FLAC__stream_decoder_get_channel_assignment(const FLAC__StreamDecoder *decoder)=0;
- virtual unsigned FLAC__stream_decoder_get_bits_per_sample(const FLAC__StreamDecoder *decoder)=0;
- virtual unsigned FLAC__stream_decoder_get_sample_rate(const FLAC__StreamDecoder *decoder)=0;
- virtual unsigned FLAC__stream_decoder_get_blocksize(const FLAC__StreamDecoder *decoder)=0;
- virtual FLAC__bool FLAC__stream_decoder_get_decode_position(const FLAC__StreamDecoder *decoder, FLAC__uint64 *position)=0;
- virtual FLAC__bool FLAC__stream_decoder_finish(FLAC__StreamDecoder *decoder)=0;
- virtual FLAC__bool FLAC__stream_decoder_flush(FLAC__StreamDecoder *decoder)=0;
- virtual FLAC__bool FLAC__stream_decoder_reset(FLAC__StreamDecoder *decoder)=0;
- virtual FLAC_API FLAC__bool FLAC__stream_decoder_process_single(FLAC__StreamDecoder *decoder)=0;
- virtual FLAC__bool FLAC__stream_decoder_process_until_end_of_metadata(FLAC__StreamDecoder *decoder)=0;
- virtual FLAC__bool FLAC__stream_decoder_process_until_end_of_stream(FLAC__StreamDecoder *decoder)=0;
- virtual FLAC__bool FLAC__stream_decoder_skip_single_frame(FLAC__StreamDecoder *decoder)=0;
- virtual FLAC__bool FLAC__stream_decoder_seek_absolute(FLAC__StreamDecoder *decoder, FLAC__uint64 sample)=0;
-};
-
-class DllLibFlac : public DllDynamic, DllLibFlacInterface
-{
- DECLARE_DLL_WRAPPER(DllLibFlac, DLL_PATH_FLAC_CODEC)
- DEFINE_METHOD0(FLAC__StreamDecoder*, FLAC__stream_decoder_new)
- DEFINE_METHOD1(void, FLAC__stream_decoder_delete, (FLAC__StreamDecoder *p1))
- DEFINE_METHOD10(FLAC__StreamDecoderInitStatus, FLAC__stream_decoder_init_stream,
- (FLAC__StreamDecoder *p1,
- FLAC__StreamDecoderReadCallback p2,
- FLAC__StreamDecoderSeekCallback p3,
- FLAC__StreamDecoderTellCallback p4,
- FLAC__StreamDecoderLengthCallback p5,
- FLAC__StreamDecoderEofCallback p6,
- FLAC__StreamDecoderWriteCallback p7,
- FLAC__StreamDecoderMetadataCallback p8,
- FLAC__StreamDecoderErrorCallback p9,
- void *p10))
- DEFINE_METHOD2(FLAC__bool, FLAC__stream_decoder_set_md5_checking, (FLAC__StreamDecoder *p1, FLAC__bool p2))
- DEFINE_METHOD2(FLAC__bool, FLAC__stream_decoder_set_metadata_respond, (FLAC__StreamDecoder *p1, FLAC__MetadataType p2))
- DEFINE_METHOD2(FLAC__bool, FLAC__stream_decoder_set_metadata_respond_application, (FLAC__StreamDecoder *p1, const FLAC__byte p2[4]))
- DEFINE_METHOD1(FLAC__bool, FLAC__stream_decoder_set_metadata_respond_all, (FLAC__StreamDecoder *p1))
- DEFINE_METHOD2(FLAC__bool, FLAC__stream_decoder_set_metadata_ignore, (FLAC__StreamDecoder *p1, FLAC__MetadataType p2))
- DEFINE_METHOD2(FLAC__bool, FLAC__stream_decoder_set_metadata_ignore_application, (FLAC__StreamDecoder *p1, const FLAC__byte p2[4]))
- DEFINE_METHOD1(FLAC__bool, FLAC__stream_decoder_set_metadata_ignore_all, (FLAC__StreamDecoder *p1))
- DEFINE_METHOD1(FLAC__StreamDecoderState, FLAC__stream_decoder_get_state, (const FLAC__StreamDecoder *p1))
- DEFINE_METHOD1(const char *, FLAC__stream_decoder_get_resolved_state_string, (const FLAC__StreamDecoder *p1))
- DEFINE_METHOD1(FLAC__bool, FLAC__stream_decoder_get_md5_checking, (const FLAC__StreamDecoder *p1))
- DEFINE_METHOD1(FLAC__uint64, FLAC__stream_decoder_get_total_samples, (const FLAC__StreamDecoder *p1))
- DEFINE_METHOD1(unsigned, FLAC__stream_decoder_get_channels, (const FLAC__StreamDecoder *p1))
- DEFINE_METHOD1(FLAC__ChannelAssignment, FLAC__stream_decoder_get_channel_assignment, (const FLAC__StreamDecoder *p1))
- DEFINE_METHOD1(unsigned, FLAC__stream_decoder_get_bits_per_sample, (const FLAC__StreamDecoder *p1))
- DEFINE_METHOD1(unsigned, FLAC__stream_decoder_get_sample_rate, (const FLAC__StreamDecoder *p1))
- DEFINE_METHOD1(unsigned, FLAC__stream_decoder_get_blocksize, (const FLAC__StreamDecoder *p1))
- DEFINE_METHOD2(FLAC__bool, FLAC__stream_decoder_get_decode_position, (const FLAC__StreamDecoder *p1, FLAC__uint64 *p2))
- DEFINE_METHOD1(FLAC__bool, FLAC__stream_decoder_finish, (FLAC__StreamDecoder *p1))
- DEFINE_METHOD1(FLAC__bool, FLAC__stream_decoder_flush, (FLAC__StreamDecoder *p1))
- DEFINE_METHOD1(FLAC__bool, FLAC__stream_decoder_reset, (FLAC__StreamDecoder *p1))
- DEFINE_METHOD1(FLAC__bool, FLAC__stream_decoder_process_single, (FLAC__StreamDecoder *p1))
- DEFINE_METHOD1(FLAC__bool, FLAC__stream_decoder_process_until_end_of_metadata, (FLAC__StreamDecoder *p1))
- DEFINE_METHOD1(FLAC__bool, FLAC__stream_decoder_process_until_end_of_stream, (FLAC__StreamDecoder *p1))
- DEFINE_METHOD1(FLAC__bool, FLAC__stream_decoder_skip_single_frame, (FLAC__StreamDecoder *p1))
- DEFINE_METHOD2(FLAC__bool, FLAC__stream_decoder_seek_absolute, (FLAC__StreamDecoder *p1, FLAC__uint64 p2))
-
- BEGIN_METHOD_RESOLVE()
- RESOLVE_METHOD(FLAC__stream_decoder_new)
- RESOLVE_METHOD(FLAC__stream_decoder_delete)
- RESOLVE_METHOD(FLAC__stream_decoder_init_stream)
- RESOLVE_METHOD(FLAC__stream_decoder_set_md5_checking)
- RESOLVE_METHOD(FLAC__stream_decoder_set_metadata_respond)
- RESOLVE_METHOD(FLAC__stream_decoder_set_metadata_respond_application)
- RESOLVE_METHOD(FLAC__stream_decoder_set_metadata_respond_all)
- RESOLVE_METHOD(FLAC__stream_decoder_set_metadata_ignore)
- RESOLVE_METHOD(FLAC__stream_decoder_set_metadata_ignore_application)
- RESOLVE_METHOD(FLAC__stream_decoder_set_metadata_ignore_all)
- RESOLVE_METHOD(FLAC__stream_decoder_get_state)
- RESOLVE_METHOD(FLAC__stream_decoder_get_resolved_state_string)
- RESOLVE_METHOD(FLAC__stream_decoder_get_md5_checking)
- RESOLVE_METHOD(FLAC__stream_decoder_get_total_samples)
- RESOLVE_METHOD(FLAC__stream_decoder_get_channels)
- RESOLVE_METHOD(FLAC__stream_decoder_get_channel_assignment)
- RESOLVE_METHOD(FLAC__stream_decoder_get_bits_per_sample)
- RESOLVE_METHOD(FLAC__stream_decoder_get_sample_rate)
- RESOLVE_METHOD(FLAC__stream_decoder_get_blocksize)
- RESOLVE_METHOD(FLAC__stream_decoder_get_decode_position)
- RESOLVE_METHOD(FLAC__stream_decoder_finish)
- RESOLVE_METHOD(FLAC__stream_decoder_flush)
- RESOLVE_METHOD(FLAC__stream_decoder_reset)
- RESOLVE_METHOD(FLAC__stream_decoder_process_single)
- RESOLVE_METHOD(FLAC__stream_decoder_process_until_end_of_metadata)
- RESOLVE_METHOD(FLAC__stream_decoder_process_until_end_of_stream)
- RESOLVE_METHOD(FLAC__stream_decoder_skip_single_frame)
- RESOLVE_METHOD(FLAC__stream_decoder_seek_absolute)
- END_METHOD_RESOLVE()
-};
-
diff --git a/lib/xbadpcm/ADPCMDll.cpp b/lib/xbadpcm/ADPCMDll.cpp
deleted file mode 100644
index b0dab8987c..0000000000
--- a/lib/xbadpcm/ADPCMDll.cpp
+++ /dev/null
@@ -1,169 +0,0 @@
-/*
- * Copyright (C) 2008-2013 Team XBMC
- * http://xbmc.org
- *
- * This Program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This Program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with XBMC; see the file COPYING. If not, see
- * <http://www.gnu.org/licenses/>.
- *
- */
-
-#ifdef _LINUX
-#define __declspec(x)
-#define __cdecl
-#endif
-
-extern "C"
-{
-#include "mywav.h"
-#include "uXboxAdpcmDecoder.h"
-#include <stdlib.h>
-
-#define GETLENGTH(x,SAMPLERATE,NCH) (((x * 10) / ((SAMPLERATE / 100) * NCH * (16 >> 3)) / XBOX_ADPCM_SRCSIZE) * XBOX_ADPCM_DSTSIZE)
-
- struct ADPCMInfo
- {
- FILE* f;
- mywav_fmtchunk fmt;
- unsigned int length;
- int data_offset;
- char* szInputBuffer;
- char* szBuf;
- char* szStartOfBuf;
- int bufLen;
- };
-
- int getwavinfo(ADPCMInfo* info) {
- int wavsize;
-
- wavsize = mywav_data(info->f, &info->fmt);
-
- if (info->fmt.dwSamplesPerSec == 0 || info->fmt.wChannels == 0)
- return -1;
-
- if(wavsize >= 0) {
- if(info->fmt.wFormatTag != 0x0069) {
- fseek(info->f,0,SEEK_SET);
- return(-1);
- }
- info->data_offset = ftell(info->f);
- } else {
- fseek(info->f,0,SEEK_END);
- wavsize = ftell(info->f);
- fseek(info->f,0,SEEK_SET);
- }
-
- info->length = GETLENGTH(wavsize,info->fmt.dwSamplesPerSec,info->fmt.wChannels);
- return(wavsize);
-}
-
-
- __declspec(dllexport) void* __cdecl DLL_LoadXWAV(const char* szFileName)
- {
- ADPCMInfo* info = (ADPCMInfo*)malloc(sizeof(ADPCMInfo));
- info->f = fopen(szFileName,"rb");
- if (!info->f)
- {
- free(info);
- return NULL;
- }
-
- int iResult = getwavinfo(info);
- if (iResult == -1)
- {
- fclose(info->f);
- free(info);
- return NULL;
- }
-
- info->szBuf = (char*)malloc(XBOX_ADPCM_DSTSIZE*info->fmt.wChannels*4);
- info->szInputBuffer = (char*)malloc(XBOX_ADPCM_SRCSIZE*info->fmt.wChannels*4);
- info->szStartOfBuf = info->szBuf+XBOX_ADPCM_DSTSIZE*info->fmt.wChannels*4;
- info->bufLen = XBOX_ADPCM_DSTSIZE*info->fmt.wChannels*4;
- return (void*)info;
- }
-
- void __declspec(dllexport) DLL_FreeXWAV(void* info)
- {
- ADPCMInfo* pInfo = (ADPCMInfo*)info;
- fclose(pInfo->f);
- free(pInfo);
- }
-
- int __declspec(dllexport) DLL_Seek(void* info, int pos)
- {
- ADPCMInfo* pInfo = (ADPCMInfo*)info;
- int offs = pInfo->data_offset + ((((pos/ 1000) * pInfo->fmt.dwSamplesPerSec) / XBOX_ADPCM_DSTSIZE) * XBOX_ADPCM_SRCSIZE * pInfo->fmt.wChannels * (16 >> 3));
-
- fseek(pInfo->f,offs,SEEK_SET);
- // invalidate buffer
- pInfo->szStartOfBuf = pInfo->szBuf+XBOX_ADPCM_DSTSIZE*pInfo->fmt.wChannels*4;
- return pos;
- }
-
- long __declspec(dllexport) DLL_FillBuffer(void* info, char* buffer, int size)
- {
- ADPCMInfo* pInfo = (ADPCMInfo*)info;
- int iCurrSize = size;
- while (iCurrSize > 0)
- {
- if (pInfo->szStartOfBuf >= pInfo->szBuf+pInfo->bufLen)
- {
- // Read data into input buffer
- int read = fread(pInfo->szInputBuffer,XBOX_ADPCM_SRCSIZE*pInfo->fmt.wChannels,4,pInfo->f);
- if (!read)
- break;
-
- TXboxAdpcmDecoder_Decode_Memory((uint8_t*)pInfo->szInputBuffer, read*XBOX_ADPCM_SRCSIZE*pInfo->fmt.wChannels, (uint8_t*)pInfo->szBuf, pInfo->fmt.wChannels);
- pInfo->szStartOfBuf = pInfo->szBuf;
- }
- int iCopy=0;
- if (iCurrSize > pInfo->szBuf+pInfo->bufLen-pInfo->szStartOfBuf)
- iCopy = pInfo->szBuf+pInfo->bufLen-pInfo->szStartOfBuf;
- else
- iCopy = iCurrSize;
-
- memcpy(buffer,pInfo->szStartOfBuf,iCopy);
- buffer += iCopy;
- iCurrSize -= iCopy;
- pInfo->szStartOfBuf += iCopy;
- }
-
- return size-iCurrSize;
- }
-
- int __declspec(dllexport) DLL_GetPlaybackRate(void* info)
- {
- ADPCMInfo* pInfo = (ADPCMInfo*)info;
- return pInfo->fmt.dwSamplesPerSec;
- }
-
- int __declspec(dllexport) DLL_GetNumberOfChannels(void* info)
- {
- ADPCMInfo* pInfo = (ADPCMInfo*)info;
- return pInfo->fmt.wChannels;
- }
-
- int __declspec(dllexport) DLL_GetSampleSize(void* info)
- {
- ADPCMInfo* pInfo = (ADPCMInfo*)info;
- return pInfo->fmt.wBitsPerSample;
- }
-
- int __declspec(dllexport) DLL_GetLength(void* info)
- {
- ADPCMInfo* pInfo = (ADPCMInfo*)info;
- return pInfo->length;
- }
-}
-
diff --git a/lib/xbadpcm/Makefile.in b/lib/xbadpcm/Makefile.in
deleted file mode 100644
index 0a2bc43e44..0000000000
--- a/lib/xbadpcm/Makefile.in
+++ /dev/null
@@ -1,20 +0,0 @@
-ARCH=@ARCH@
-OBJS=uXboxAdpcmDecoder.o ADPCMDll.o
-CFLAGS +=-D_LINUX -fPIC
-CXXFLAGS += -D_LINUX -fPIC
-
-SLIB=@abs_top_srcdir@/system/players/paplayer/adpcm-@ARCH@.so
-
-$(SLIB): $(OBJS)
-ifeq ($(findstring osx,$(ARCH)), osx)
- $(CC) $(LDFLAGS) -Wl,-alias_list,@abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper_mach_alias \
- -bundle -undefined dynamic_lookup -read_only_relocs suppress -o $@ \
- @abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper.o *.o $(BUNDLE1_O)
- chmod +x $@
-else
- $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ *.o -Wl,--unresolved-symbols=ignore-all -lm \
- `cat @abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper.def` @abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper.o
-endif
-
-include @abs_top_srcdir@/Makefile.include
-
diff --git a/lib/xbadpcm/adpcm.sln b/lib/xbadpcm/adpcm.sln
deleted file mode 100644
index 448fcad143..0000000000
--- a/lib/xbadpcm/adpcm.sln
+++ /dev/null
@@ -1,21 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 8.00
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "adpcm", "adpcm.vcproj", "{2A8CBFB5-C226-4BB3-8C03-7C75D511A4A2}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Global
- GlobalSection(SolutionConfiguration) = preSolution
- Debug = Debug
- Release = Release
- EndGlobalSection
- GlobalSection(ProjectConfiguration) = postSolution
- {2A8CBFB5-C226-4BB3-8C03-7C75D511A4A2}.Debug.ActiveCfg = Debug|Win32
- {2A8CBFB5-C226-4BB3-8C03-7C75D511A4A2}.Debug.Build.0 = Debug|Win32
- {2A8CBFB5-C226-4BB3-8C03-7C75D511A4A2}.Release.ActiveCfg = Release|Win32
- {2A8CBFB5-C226-4BB3-8C03-7C75D511A4A2}.Release.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- EndGlobalSection
- GlobalSection(ExtensibilityAddIns) = postSolution
- EndGlobalSection
-EndGlobal
diff --git a/lib/xbadpcm/adpcm.vcxproj b/lib/xbadpcm/adpcm.vcxproj
deleted file mode 100644
index 2ebf6f5ca7..0000000000
--- a/lib/xbadpcm/adpcm.vcxproj
+++ /dev/null
@@ -1,149 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>libadpcm_dll</ProjectName>
- <ProjectGuid>{2A8CBFB5-C226-4BB3-8C03-7C75D511A4A2}</ProjectGuid>
- <RootNamespace>libadpcm_dll</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(SolutionDir)\XBMC.core-defaults.props" />
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="$(SolutionDir)\XBMC.defaults.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="$(SolutionDir)\XBMC.defaults.props" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)libs\$(TargetName)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)objs\$(TargetName)\$(Configuration)\</IntDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)libs\$(TargetName)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)objs\$(TargetName)\$(Configuration)\</IntDir>
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">adpcm</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">adpcm</TargetName>
- <CustomBuildAfterTargets Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Build</CustomBuildAfterTargets>
- <CustomBuildAfterTargets Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Build</CustomBuildAfterTargets>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <DisableSpecificWarnings>4244;4267;4311;4312;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- </ClCompile>
- <ResourceCompile>
- <ResourceOutputFileName>
- </ResourceOutputFileName>
- </ResourceCompile>
- <Link>
- <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
- <ProgramDatabaseFile>adpcm.pdb</ProgramDatabaseFile>
- <ProfileGuidedDatabase>
- </ProfileGuidedDatabase>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <ImportLibrary>$(TargetName).lib</ImportLibrary>
- <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
- </Link>
- <PostBuildEvent>
- <Command>
- </Command>
- </PostBuildEvent>
- <CustomBuildStep>
- <Command>copy /B /Y "$(TargetPath)" "$(SolutionDir)..\..\system\players\paplayer\$(TargetFileName)"</Command>
- </CustomBuildStep>
- <CustomBuildStep>
- <Message>Copy output</Message>
- </CustomBuildStep>
- <CustomBuildStep>
- <Outputs>$(SolutionDir)..\..\system\players\paplayer\$(TargetFileName)</Outputs>
- <Inputs>$(TargetPath)</Inputs>
- </CustomBuildStep>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <DisableSpecificWarnings>4244;4267;4311;4312;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </ClCompile>
- <ResourceCompile>
- <ResourceOutputFileName>
- </ResourceOutputFileName>
- </ResourceCompile>
- <Link>
- <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
- <ProgramDatabaseFile>$(TargetName).pdb</ProgramDatabaseFile>
- <ProfileGuidedDatabase>
- </ProfileGuidedDatabase>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <ImportLibrary>$(TargetName).lib</ImportLibrary>
- <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
- </Link>
- <PostBuildEvent>
- <Command>
- </Command>
- </PostBuildEvent>
- <CustomBuildStep>
- <Command>copy /B /Y "$(TargetPath)" "$(SolutionDir)..\..\system\players\paplayer\$(TargetFileName)"</Command>
- </CustomBuildStep>
- <CustomBuildStep>
- <Message>Copy output</Message>
- </CustomBuildStep>
- <CustomBuildStep>
- <Outputs>$(SolutionDir)..\..\system\players\paplayer\$(TargetFileName)</Outputs>
- <Inputs>$(TargetPath)</Inputs>
- </CustomBuildStep>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="ADPCMDll.cpp" />
- <ClCompile Include="uXboxAdpcmDecoder.c" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="uXboxAdpcmDecoder.h" />
- <ClInclude Include="mywav.h" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/lib/xbadpcm/adpcm.vcxproj.filters b/lib/xbadpcm/adpcm.vcxproj.filters
deleted file mode 100644
index ac523b1030..0000000000
--- a/lib/xbadpcm/adpcm.vcxproj.filters
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="ADPCMDll.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="uXboxAdpcmDecoder.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="uXboxAdpcmDecoder.h">
- <Filter>Source Files</Filter>
- </ClInclude>
- <ClInclude Include="mywav.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/lib/xbadpcm/in_xbadpcm.txt b/lib/xbadpcm/in_xbadpcm.txt
deleted file mode 100644
index 05903cd25a..0000000000
--- a/lib/xbadpcm/in_xbadpcm.txt
+++ /dev/null
@@ -1,47 +0,0 @@
-######################################################################
-
-Xbox ADPCM plugin for Winamp
-by Luigi Auriemma
-e-mail: aluigi@autistici.org
-web: aluigi.org
-plugin: http://aluigi.org/papers.htm#xbox
-
-######################################################################
-
-
-This is a plugin for Winamp which allows to play the audio compressed
-with the Xbox ADPCM codec.
-
-For using it simply move in_xbadpcm.dll into your Plugin folder or in
-the folder where is located your preferred player (Winamp, Xmplay and
-many others),
-
-Supports wave file (tag 0x0069), raw files (like those extracted with
-the old versions of my Unxwb tool), XWB/ZWB/WBA archives (the plugin
-will skip the WMA and PCM audio files and the XWB file will be read as
-an unique audio file, in future I hope to add subsongs handling) and
-XSD/XSH archives.
-
-It's open source and released under the GPL license.
-
-More info and tools are available here:
-
- http://aluigi.org/papers.htm#xbox
-
-Note that raw audio files have no info in them (XWB archives store
-these info) so the sample rate is automatically set to 44100 and the
-channels to 2.
-I highly suggest you to use my xbadpdec tool for adding the wave
-header to your files:
-
- xbadpdec -a 00000000.dat 00000000.wav
-
-or if your game uses the 32000 or 33000 sample rate (like Unreal
-Championship) use:
-
- xbadpdec -f 32000 -a 00000000.dat 00000000.wav
-
-channels number can be set with the -c option.
-
-
-######################################################################
diff --git a/lib/xbadpcm/mywav.h b/lib/xbadpcm/mywav.h
deleted file mode 100644
index f29498dba4..0000000000
--- a/lib/xbadpcm/mywav.h
+++ /dev/null
@@ -1,249 +0,0 @@
-/*
- MyWAV 0.1.1
- by Luigi Auriemma
- e-mail: aluigi@autistici.org
- web: aluigi.org
-
- Copyright 2005,2006 Luigi Auriemma
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
- http://www.gnu.org/licenses/gpl.txt
-*/
-
-#include <string.h>
-
-//#include <stdint.h>
-typedef unsigned char uint8_t;
-typedef unsigned int uint32_t;
-typedef signed short int16_t;
-typedef unsigned short uint16_t;
-
-#include <stdio.h>
-
-/*
-the functions return ever 0 if success, other values (-1) if error
-note that these functions have been written with compatibility in mind
-so don't worry if you see useless instructions
-*/
-
-
-
-typedef struct {
- uint8_t id[4];
- uint32_t size;
-} mywav_chunk;
-
-typedef struct {
- int16_t wFormatTag;
- uint16_t wChannels;
- uint32_t dwSamplesPerSec;
- uint32_t dwAvgBytesPerSec;
- uint16_t wBlockAlign;
- uint16_t wBitsPerSample;
-} mywav_fmtchunk;
-
-
-
- /* FILE WRITING */
-
- // 8 bit
-int mywav_fwi08(FILE *fd, int num) {
- if(fputc((num ) & 0xff, fd) < 0) return(-1);
- return(0);
-}
-
-
-
- // 16 bit
-int mywav_fwi16(FILE *fd, int num) {
- if(fputc((num ) & 0xff, fd) < 0) return(-1);
- if(fputc((num >> 8) & 0xff, fd) < 0) return(-1);
- return(0);
-}
-
-
-
- // 32 bit
-int mywav_fwi32(FILE *fd, int num) {
- if(fputc((num ) & 0xff, fd) < 0) return(-1);
- if(fputc((num >> 8) & 0xff, fd) < 0) return(-1);
- if(fputc((num >> 16) & 0xff, fd) < 0) return(-1);
- if(fputc((num >> 24) & 0xff, fd) < 0) return(-1);
- return(0);
-}
-
-
-
- // data
-int mywav_fwmem(FILE *fd, uint8_t *mem, int size) {
- if(size) {
- if(fwrite(mem, size, 1, fd) != 1) return(-1);
- }
- return(0);
-}
-
-
-
- // chunk
-int mywav_fwchunk(FILE *fd, mywav_chunk *chunk) {
- if(mywav_fwmem(fd, chunk->id, 4)) return(-1);
- if(mywav_fwi32(fd, chunk->size)) return(-1);
- return(0);
-}
-
-
-
- // fmtchunk
-int mywav_fwfmtchunk(FILE *fd, mywav_fmtchunk *fmtchunk) {
- if(mywav_fwi16(fd, fmtchunk->wFormatTag)) return(-1);
- if(mywav_fwi16(fd, fmtchunk->wChannels)) return(-1);
- if(mywav_fwi32(fd, fmtchunk->dwSamplesPerSec)) return(-1);
- if(mywav_fwi32(fd, fmtchunk->dwAvgBytesPerSec)) return(-1);
- if(mywav_fwi16(fd, fmtchunk->wBlockAlign)) return(-1);
- if(mywav_fwi16(fd, fmtchunk->wBitsPerSample)) return(-1);
- return(0);
-}
-
-
-
- /* FILE READING */
-
- // 8 bit
-int mywav_fri08(FILE *fd, uint8_t *num) {
- if(fread(num, 1, 1, fd) != 1) return(-1);
- return(0);
-}
-
-
-
- // 16 bit
-int mywav_fri16(FILE *fd, uint16_t *num) {
- uint16_t ret;
- uint8_t tmp;
-
- if(fread(&tmp, 1, 1, fd) != 1) return(-1); ret = tmp;
- if(fread(&tmp, 1, 1, fd) != 1) return(-1); ret |= (tmp << 8);
- *num = ret;
- return(0);
-}
-
-
-
- // 32 bit
-int mywav_fri32(FILE *fd, uint32_t *num) {
- uint32_t ret;
- uint8_t tmp;
-
- if(fread(&tmp, 1, 1, fd) != 1) return(-1); ret = tmp;
- if(fread(&tmp, 1, 1, fd) != 1) return(-1); ret |= (tmp << 8);
- if(fread(&tmp, 1, 1, fd) != 1) return(-1); ret |= (tmp << 16);
- if(fread(&tmp, 1, 1, fd) != 1) return(-1); ret |= (tmp << 24);
- *num = ret;
- return(0);
-}
-
-
-
- // data
-int mywav_frmem(FILE *fd, uint8_t *mem, int size) {
- if(size) {
- if(fread(mem, size, 1, fd) != 1) return(-1);
- }
- return(0);
-}
-
-
-
- // chunk
-int mywav_frchunk(FILE *fd, mywav_chunk *chunk) {
- if(mywav_frmem(fd, (uint8_t *)&chunk->id, 4)) return(-1);
- if(mywav_fri32(fd, (uint32_t *)&chunk->size)) return(-1);
- return(0);
-}
-
-
-
- // fmtchunk
-int mywav_frfmtchunk(FILE *fd, mywav_fmtchunk *fmtchunk) {
- if(mywav_fri16(fd, (uint16_t *)&fmtchunk->wFormatTag)) return(-1);
- if(mywav_fri16(fd, (uint16_t *)&fmtchunk->wChannels)) return(-1);
- if(mywav_fri32(fd, (uint32_t *)&fmtchunk->dwSamplesPerSec)) return(-1);
- if(mywav_fri32(fd, (uint32_t *)&fmtchunk->dwAvgBytesPerSec)) return(-1);
- if(mywav_fri16(fd, (uint16_t *)&fmtchunk->wBlockAlign)) return(-1);
- if(mywav_fri16(fd, (uint16_t *)&fmtchunk->wBitsPerSample)) return(-1);
- return(0);
-}
-
-
- /* MYWAV MAIN FUNCTIONS */
-
-int mywav_seekchunk(FILE *fd, uint8_t *find) {
- mywav_chunk chunk;
-
- if(fseek(fd, sizeof(mywav_chunk) + 4, SEEK_SET) < 0) return(-1);
-
- while(!mywav_frchunk(fd, &chunk)) {
- if(!memcmp(chunk.id, find, 4)) return(chunk.size);
- if(fseek(fd, chunk.size, SEEK_CUR) < 0) break;
- }
- return(-1);
-}
-
-
-
-int mywav_data(FILE *fd, mywav_fmtchunk *fmt) {
- mywav_chunk chunk;
- uint8_t type[4];
-
- if(mywav_frchunk(fd, &chunk) < 0) return(-1);
- if(mywav_frmem(fd, type, 4) < 0) return(-1);
- if(memcmp(type, "WAVE", 4)) return(-1);
-
- if(mywav_seekchunk(fd, (uint8_t*)"fmt ") < 0) return(-1);
- if(mywav_frfmtchunk(fd, fmt) < 0) return(-1);
-
- return(mywav_seekchunk(fd, (uint8_t*)"data"));
-}
-
-
-
-int mywav_writehead(FILE *fd, mywav_fmtchunk *fmt, uint32_t data_size, uint8_t *more, int morelen) {
- mywav_chunk chunk;
-
- memcpy(chunk.id, "RIFF", 4);
- chunk.size =
- 4 +
- sizeof(mywav_chunk) +
- sizeof(mywav_fmtchunk) +
- morelen +
- sizeof(mywav_chunk) +
- data_size;
-
- if(mywav_fwchunk(fd, &chunk) < 0) return(-1);
- if(mywav_fwmem(fd, (uint8_t*)"WAVE", 4) < 0) return(-1);
-
- memcpy(chunk.id, "fmt ", 4);
- chunk.size = sizeof(mywav_fmtchunk) + morelen;
- if(mywav_fwchunk(fd, &chunk) < 0) return(-1);
- if(mywav_fwfmtchunk(fd, fmt) < 0) return(-1);
- if(mywav_fwmem(fd, more, morelen) < 0) return(-1);
-
- memcpy(chunk.id, "data", 4);
- chunk.size = data_size;
- if(mywav_fwchunk(fd, &chunk) < 0) return(-1);
- return(0);
-}
-
diff --git a/lib/xbadpcm/uXboxAdpcmDecoder.c b/lib/xbadpcm/uXboxAdpcmDecoder.c
deleted file mode 100644
index f405c42212..0000000000
--- a/lib/xbadpcm/uXboxAdpcmDecoder.c
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
- TXboxAdpcmDecoder class
- (c) 2005 Benjamin Haisch
-
- Revision 2 with stereo support
-
-###
- C conversion 0.1.3
- by Luigi Auriemma
- e-mail: aluigi@autistici.org
- web: aluigi.org
-
- Copyright 2005,2006 Luigi Auriemma
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
- http://www.gnu.org/licenses/gpl.txt
-*/
-
-#include "uXboxAdpcmDecoder.h"
-
-#define TXboxAdpcmDecoder_delimit(x,h,l) \
- if(x > h) { \
- x = h; \
- } else if(x < l) { \
- x = l; \
- }
-
-
-
-typedef struct {
- int8_t Index;
- int16_t StepSize;
- int16_t Predictor;
-} TAdpcmState;
-
-
-
-const static int16_t StepTable[89] = {
- 7, 8, 9, 10, 11, 12, 13, 14, 16, 17,
- 19, 21, 23, 25, 28, 31, 34, 37, 41, 45,
- 50, 55, 60, 66, 73, 80, 88, 97, 107, 118,
- 130, 143, 157, 173, 190, 209, 230, 253, 279, 307,
- 337, 371, 408, 449, 494, 544, 598, 658, 724, 796,
- 876, 963, 1060, 1166, 1282, 1411, 1552, 1707, 1878, 2066,
- 2272, 2499, 2749, 3024, 3327, 3660, 4026, 4428, 4871, 5358,
- 5894, 6484, 7132, 7845, 8630, 9493, 10442, 11487, 12635, 13899,
- 15289, 16818, 18500, 20350, 22385, 24623, 27086, 29794, 32767
-};
-
-
-
-const static int8_t IndexTable[16] = {
- -1, -1, -1, -1, 2, 4, 6, 8,
- -1, -1, -1, -1, 2, 4, 6, 8
-};
-
-
-
-int TXboxAdpcmDecoder_DecodeSample(int Code, TAdpcmState *State) {
- int Delta,
- Result;
-
- Delta = State->StepSize >> 3;
- if(Code & 4) Delta += State->StepSize;
- if(Code & 2) Delta += State->StepSize >> 1;
- if(Code & 1) Delta += State->StepSize >> 2;
- if(Code & 8) Delta = -Delta;
- Result = State->Predictor + Delta;
- TXboxAdpcmDecoder_delimit(Result, 32767, -32768);
- State->Index += IndexTable[Code];
- TXboxAdpcmDecoder_delimit(State->Index, 88, 0);
- State->StepSize = StepTable[State->Index];
- State->Predictor = Result;
- return(Result);
-}
-
-
-
-int TXboxAdpcmDecoder_Decode_Memory(uint8_t *in, int inlen, uint8_t *out, int FChannels) {
- TAdpcmState FAdpcmState[6];
- int16_t Buffers[6][8];
- uint32_t CodeBuf;
- int i,
- j,
- c,
- outlen;
-
- inlen = (inlen / XBOX_ADPCM_SRCSIZE) / FChannels;
-
- for(outlen = 0; inlen--; outlen++) {
- for(c = 0; c < FChannels; c++) {
- *out++ = in[0];
- *out++ = in[1];
- FAdpcmState[c].Predictor = in[0] | (in[1] << 8); in += 2;
- FAdpcmState[c].Index = in[0] | (in[1] << 8); in += 2;
- TXboxAdpcmDecoder_delimit(FAdpcmState[c].Index, 88, 0);
- FAdpcmState[c].StepSize = StepTable[FAdpcmState[c].Index];
- }
- for(i = 0; i < 8; i++) {
- for(c = 0; c < FChannels; c++) {
- CodeBuf = in[0] | (in[1] << 8) | (in[2] << 16) | (in[3] << 24);
- in += 4;
- for(j = 0; j < 8; j++) {
- Buffers[c][j] = TXboxAdpcmDecoder_DecodeSample(CodeBuf & 15, &FAdpcmState[c]);
- CodeBuf >>= 4;
- }
- }
- for(j = 0; j < 8; j++) {
- for(c = 0; c < FChannels; c++) {
- *out++ = (Buffers[c][j] ) & 0xff;
- *out++ = (Buffers[c][j] >> 8) & 0xff;
- }
- }
- }
- }
-
- return(outlen * XBOX_ADPCM_DSTSIZE * FChannels);
-}
-
-
-
-int TXboxAdpcmDecoder_Decode(FILE *ASource, FILE *ADest, int SourcePos, int SourceSize, int FChannels) {
- int DestSize;
- uint8_t in[XBOX_ADPCM_SRCSIZE * 6],
- out[XBOX_ADPCM_DSTSIZE * 6];
-
- if(FChannels <= 0) return(0);
-
- if(SourcePos >= 0) {
- if(fseek(ASource, SourcePos, SEEK_SET) < 0) return(0);
- }
- if(SourceSize > 0) {
- SourceSize -= (SourceSize % XBOX_ADPCM_SRCSIZE);
- SourceSize = (SourceSize / XBOX_ADPCM_SRCSIZE) / FChannels;
- }
-
- for(DestSize = 0; SourceSize; SourceSize--) {
- if(!fread(in, sizeof(in), 1, ASource)) break;
- DestSize += TXboxAdpcmDecoder_Decode_Memory(in, sizeof(in), out, FChannels);
- if(!fwrite(out, sizeof(out), 1, ADest)) break;
- }
-
- return(DestSize);
-}
-
-
-
-int TXboxAdpcmDecoder_guess_output_size(int SourceSize) {
- return((SourceSize / XBOX_ADPCM_SRCSIZE) * XBOX_ADPCM_DSTSIZE);
-}
-
diff --git a/lib/xbadpcm/uXboxAdpcmDecoder.h b/lib/xbadpcm/uXboxAdpcmDecoder.h
deleted file mode 100644
index 69356d4e76..0000000000
--- a/lib/xbadpcm/uXboxAdpcmDecoder.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- TXboxAdpcmDecoder class
- (c) 2005 Benjamin Haisch
-
- Revision 2 with stereo support
-
-###
- C conversion 0.1.3
- by Luigi Auriemma
- e-mail: aluigi@autistici.org
- web: aluigi.org
-
- Copyright 2005,2006 Luigi Auriemma
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
- http://www.gnu.org/licenses/gpl.txt
-*/
-
-#include <stdio.h>
-
-typedef unsigned char uint8_t;
-typedef unsigned int uint32_t;
-typedef signed short int16_t;
-typedef unsigned short uint16_t;
-typedef signed char int8_t;
-
-#define XBOX_ADPCM_SRCSIZE 36
-#define XBOX_ADPCM_DSTSIZE 130
-
-int TXboxAdpcmDecoder_Decode_Memory(
- uint8_t *in, // input buffer
- int inlen, // input size MUST BE a multiplier of XBOX_ADPCM_SRCSIZE
- uint8_t *out, // output buffer
- int FChannels // channels
-);
-
-int TXboxAdpcmDecoder_Decode(
- FILE *ASource, // input file
- FILE *ADest, // output file
- int SourcePos, // fseek offset, use -1 for none
- int SourceSize, // size of the input audio block, use -1 for all
- int AChannels // number of channels, usually 2
-);
-
-
-int TXboxAdpcmDecoder_guess_output_size(
- int SourceSize // size of the input audio block
-);
-
-
diff --git a/project/VS2010Express/XBMC for Windows.sln b/project/VS2010Express/XBMC for Windows.sln
index 798e0b7bf4..b2d060849b 100644
--- a/project/VS2010Express/XBMC for Windows.sln
+++ b/project/VS2010Express/XBMC for Windows.sln
@@ -55,8 +55,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libmad_dll", "..\..\lib\lib
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libvgmstream_dll", "..\..\lib\vgmstream\win32\win32.vcxproj", "{3600E1C5-FECA-468C-83F3-FE467DBE2A66}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libadpcm_dll", "..\..\lib\xbadpcm\adpcm.vcxproj", "{2A8CBFB5-C226-4BB3-8C03-7C75D511A4A2}"
-EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libNoseFartXBMC_dll", "..\..\lib\nosefart\NoseFartXBMC.vcxproj", "{17238C64-04D6-4B51-B205-4A5A84ADB9FA}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libsidplay_dll", "..\..\lib\libsidplay2\libsidplay\win\VC\libsidplay.vcxproj", "{FB3AB83A-C37A-4636-87FD-827F8506A8FC}"
@@ -352,16 +350,6 @@ Global
{3600E1C5-FECA-468C-83F3-FE467DBE2A66}.Release (DirectX)|Win32.Build.0 = Release|Win32
{3600E1C5-FECA-468C-83F3-FE467DBE2A66}.Release (OpenGL)|Win32.ActiveCfg = Release|Win32
{3600E1C5-FECA-468C-83F3-FE467DBE2A66}.Release (OpenGL)|Win32.Build.0 = Release|Win32
- {2A8CBFB5-C226-4BB3-8C03-7C75D511A4A2}.Debug (DirectX)|Win32.ActiveCfg = Debug|Win32
- {2A8CBFB5-C226-4BB3-8C03-7C75D511A4A2}.Debug (DirectX)|Win32.Build.0 = Debug|Win32
- {2A8CBFB5-C226-4BB3-8C03-7C75D511A4A2}.Debug (OpenGL)|Win32.ActiveCfg = Debug|Win32
- {2A8CBFB5-C226-4BB3-8C03-7C75D511A4A2}.Debug (OpenGL)|Win32.Build.0 = Debug|Win32
- {2A8CBFB5-C226-4BB3-8C03-7C75D511A4A2}.Debug Testsuite|Win32.ActiveCfg = Debug|Win32
- {2A8CBFB5-C226-4BB3-8C03-7C75D511A4A2}.Debug Testsuite|Win32.Build.0 = Debug|Win32
- {2A8CBFB5-C226-4BB3-8C03-7C75D511A4A2}.Release (DirectX)|Win32.ActiveCfg = Release|Win32
- {2A8CBFB5-C226-4BB3-8C03-7C75D511A4A2}.Release (DirectX)|Win32.Build.0 = Release|Win32
- {2A8CBFB5-C226-4BB3-8C03-7C75D511A4A2}.Release (OpenGL)|Win32.ActiveCfg = Release|Win32
- {2A8CBFB5-C226-4BB3-8C03-7C75D511A4A2}.Release (OpenGL)|Win32.Build.0 = Release|Win32
{17238C64-04D6-4B51-B205-4A5A84ADB9FA}.Debug (DirectX)|Win32.ActiveCfg = Debug|Win32
{17238C64-04D6-4B51-B205-4A5A84ADB9FA}.Debug (DirectX)|Win32.Build.0 = Debug|Win32
{17238C64-04D6-4B51-B205-4A5A84ADB9FA}.Debug (OpenGL)|Win32.ActiveCfg = Debug|Win32
diff --git a/project/VS2010Express/XBMC.vcxproj b/project/VS2010Express/XBMC.vcxproj
index 0b1c0c62ad..c640130b51 100644
--- a/project/VS2010Express/XBMC.vcxproj
+++ b/project/VS2010Express/XBMC.vcxproj
@@ -1785,12 +1785,10 @@
<ClCompile Include="..\..\xbmc\cores\dvdplayer\DVDSubtitles\DVDSubtitleStream.cpp" />
<ClCompile Include="..\..\xbmc\cores\dvdplayer\DVDSubtitles\DVDSubtitleTagMicroDVD.cpp" />
<ClCompile Include="..\..\xbmc\cores\dvdplayer\DVDSubtitles\DVDSubtitleTagSami.cpp" />
- <ClCompile Include="..\..\xbmc\cores\paplayer\ADPCMCodec.cpp" />
<ClCompile Include="..\..\xbmc\cores\paplayer\ASAPCodec.cpp" />
<ClCompile Include="..\..\xbmc\cores\paplayer\AudioDecoder.cpp" />
<ClCompile Include="..\..\xbmc\cores\paplayer\CodecFactory.cpp" />
<ClCompile Include="..\..\xbmc\cores\paplayer\DVDPlayerCodec.cpp" />
- <ClCompile Include="..\..\xbmc\cores\paplayer\FLACcodec.cpp" />
<ClCompile Include="..\..\xbmc\cores\paplayer\ModplugCodec.cpp" />
<ClCompile Include="..\..\xbmc\cores\paplayer\MP3codec.cpp" />
<ClCompile Include="..\..\xbmc\cores\paplayer\NSFCodec.cpp" />
@@ -1801,7 +1799,6 @@
<ClCompile Include="..\..\xbmc\cores\paplayer\SPCCodec.cpp" />
<ClCompile Include="..\..\xbmc\cores\paplayer\TimidityCodec.cpp" />
<ClCompile Include="..\..\xbmc\cores\paplayer\VGMCodec.cpp" />
- <ClCompile Include="..\..\xbmc\cores\paplayer\WAVcodec.cpp" />
<ClCompile Include="..\..\xbmc\cores\paplayer\YMCodec.cpp" />
<ClCompile Include="..\..\xbmc\cores\DllLoader\coff.cpp" />
<ClCompile Include="..\..\xbmc\cores\DllLoader\dll.cpp" />
@@ -2596,20 +2593,17 @@
<ClInclude Include="..\..\xbmc\cores\dvdplayer\DVDSubtitles\DVDSubtitleStream.h" />
<ClInclude Include="..\..\xbmc\cores\dvdplayer\DVDSubtitles\DVDSubtitleTagMicroDVD.h" />
<ClInclude Include="..\..\xbmc\cores\dvdplayer\DVDSubtitles\DVDSubtitleTagSami.h" />
- <ClInclude Include="..\..\xbmc\cores\paplayer\ADPCMCodec.h" />
<ClInclude Include="..\..\xbmc\cores\paplayer\ASAPCodec.h" />
<ClInclude Include="..\..\xbmc\cores\paplayer\AudioDecoder.h" />
<ClInclude Include="..\..\xbmc\cores\paplayer\CodecFactory.h" />
<ClInclude Include="..\..\lib\DllAdpcm.h" />
<ClInclude Include="..\..\lib\DllASAP.h" />
- <ClInclude Include="..\..\lib\DllLibFlac.h" />
<ClInclude Include="..\..\lib\DllNosefart.h" />
<ClInclude Include="..\..\lib\DllSidplay2.h" />
<ClInclude Include="..\..\lib\DllStSound.h" />
<ClInclude Include="..\..\lib\DllTimidity.h" />
<ClInclude Include="..\..\lib\DllVorbisfile.h" />
<ClInclude Include="..\..\xbmc\cores\paplayer\DVDPlayerCodec.h" />
- <ClInclude Include="..\..\xbmc\cores\paplayer\FLACcodec.h" />
<ClInclude Include="..\..\xbmc\cores\paplayer\ICodec.h" />
<ClInclude Include="..\..\xbmc\cores\paplayer\ModplugCodec.h" />
<ClInclude Include="..\..\xbmc\cores\paplayer\MP3codec.h" />
@@ -2621,7 +2615,6 @@
<ClInclude Include="..\..\xbmc\cores\paplayer\SPCCodec.h" />
<ClInclude Include="..\..\xbmc\cores\paplayer\TimidityCodec.h" />
<ClInclude Include="..\..\xbmc\cores\paplayer\VGMCodec.h" />
- <ClInclude Include="..\..\xbmc\cores\paplayer\WAVcodec.h" />
<ClInclude Include="..\..\xbmc\cores\paplayer\YMCodec.h" />
<ClInclude Include="..\..\xbmc\cores\DllLoader\coff.h" />
<ClInclude Include="..\..\xbmc\cores\DllLoader\coffldr.h" />
diff --git a/project/VS2010Express/XBMC.vcxproj.filters b/project/VS2010Express/XBMC.vcxproj.filters
index 829f0531d7..b536eb3bb1 100644
--- a/project/VS2010Express/XBMC.vcxproj.filters
+++ b/project/VS2010Express/XBMC.vcxproj.filters
@@ -525,9 +525,6 @@
<ClCompile Include="..\..\xbmc\cores\dvdplayer\DVDSubtitles\DVDSubtitleStream.cpp">
<Filter>cores\dvdplayer\DVDSubtitles</Filter>
</ClCompile>
- <ClCompile Include="..\..\xbmc\cores\paplayer\ADPCMCodec.cpp">
- <Filter>cores\paplayer</Filter>
- </ClCompile>
<ClCompile Include="..\..\xbmc\cores\paplayer\ASAPCodec.cpp">
<Filter>cores\paplayer</Filter>
</ClCompile>
@@ -540,9 +537,6 @@
<ClCompile Include="..\..\xbmc\cores\paplayer\DVDPlayerCodec.cpp">
<Filter>cores\paplayer</Filter>
</ClCompile>
- <ClCompile Include="..\..\xbmc\cores\paplayer\FLACcodec.cpp">
- <Filter>cores\paplayer</Filter>
- </ClCompile>
<ClCompile Include="..\..\xbmc\cores\paplayer\ModplugCodec.cpp">
<Filter>cores\paplayer</Filter>
</ClCompile>
@@ -573,9 +567,6 @@
<ClCompile Include="..\..\xbmc\cores\paplayer\VGMCodec.cpp">
<Filter>cores\paplayer</Filter>
</ClCompile>
- <ClCompile Include="..\..\xbmc\cores\paplayer\WAVcodec.cpp">
- <Filter>cores\paplayer</Filter>
- </ClCompile>
<ClCompile Include="..\..\xbmc\cores\paplayer\YMCodec.cpp">
<Filter>cores\paplayer</Filter>
</ClCompile>
@@ -3418,9 +3409,6 @@
<ClInclude Include="..\..\xbmc\cores\dvdplayer\DVDSubtitles\DVDSubtitleStream.h">
<Filter>cores\dvdplayer\DVDSubtitles</Filter>
</ClInclude>
- <ClInclude Include="..\..\xbmc\cores\paplayer\ADPCMCodec.h">
- <Filter>cores\paplayer</Filter>
- </ClInclude>
<ClInclude Include="..\..\xbmc\cores\paplayer\ASAPCodec.h">
<Filter>cores\paplayer</Filter>
</ClInclude>
@@ -3436,9 +3424,6 @@
<ClInclude Include="..\..\lib\DllASAP.h">
<Filter>cores\paplayer</Filter>
</ClInclude>
- <ClInclude Include="..\..\lib\DllLibFlac.h">
- <Filter>cores\paplayer</Filter>
- </ClInclude>
<ClInclude Include="..\..\lib\DllNosefart.h">
<Filter>cores\paplayer</Filter>
</ClInclude>
@@ -3457,9 +3442,6 @@
<ClInclude Include="..\..\xbmc\cores\paplayer\DVDPlayerCodec.h">
<Filter>cores\paplayer</Filter>
</ClInclude>
- <ClInclude Include="..\..\xbmc\cores\paplayer\FLACcodec.h">
- <Filter>cores\paplayer</Filter>
- </ClInclude>
<ClInclude Include="..\..\xbmc\cores\paplayer\ICodec.h">
<Filter>cores\paplayer</Filter>
</ClInclude>
@@ -3493,9 +3475,6 @@
<ClInclude Include="..\..\xbmc\cores\paplayer\VGMCodec.h">
<Filter>cores\paplayer</Filter>
</ClInclude>
- <ClInclude Include="..\..\xbmc\cores\paplayer\WAVcodec.h">
- <Filter>cores\paplayer</Filter>
- </ClInclude>
<ClInclude Include="..\..\xbmc\cores\paplayer\YMCodec.h">
<Filter>cores\paplayer</Filter>
</ClInclude>
diff --git a/xbmc/DllPaths_generated.h.in b/xbmc/DllPaths_generated.h.in
index d35ea97d68..4953236c31 100644
--- a/xbmc/DllPaths_generated.h.in
+++ b/xbmc/DllPaths_generated.h.in
@@ -46,7 +46,6 @@
/* paplayer */
#define DLL_PATH_AAC_CODEC "special://xbmcbin/system/players/paplayer/AACCodec-@ARCH@.so"
-#define DLL_PATH_ADPCM_CODEC "special://xbmcbin/system/players/paplayer/adpcm-@ARCH@.so"
#define DLL_PATH_ADPLUG_CODEC "special://xbmcbin/system/players/paplayer/adplug-@ARCH@.so"
#define DLL_PATH_APE_CODEC "special://xbmcbin/system/players/paplayer/MACDll-@ARCH@.so"
#define DLL_PATH_ASAP_CODEC "special://xbmcbin/system/players/paplayer/xbmc_asap-@ARCH@.so"
diff --git a/xbmc/cores/paplayer/ADPCMCodec.cpp b/xbmc/cores/paplayer/ADPCMCodec.cpp
deleted file mode 100644
index 9b0a25e7e6..0000000000
--- a/xbmc/cores/paplayer/ADPCMCodec.cpp
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Copyright (C) 2005-2013 Team XBMC
- * http://xbmc.org
- *
- * This Program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This Program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with XBMC; see the file COPYING. If not, see
- * <http://www.gnu.org/licenses/>.
- *
- */
-
-#include "ADPCMCodec.h"
-#include "utils/log.h"
-#include "cores/AudioEngine/Utils/AEUtil.h"
-
-ADPCMCodec::ADPCMCodec()
-{
- m_CodecName = "adpcm";
- m_adpcm = NULL;
- m_bIsPlaying = false;
-}
-
-ADPCMCodec::~ADPCMCodec()
-{
- DeInit();
-}
-
-bool ADPCMCodec::Init(const CStdString &strFile, unsigned int filecache)
-{
- DeInit();
-
- if (!m_dll.Load())
- return false; // error logged previously
-
- m_adpcm = m_dll.LoadXWAV(strFile.c_str());
- if (!m_adpcm)
- {
- CLog::Log(LOGERROR,"ADPCMCodec: error opening file %s!",strFile.c_str());
- return false;
- }
-
- m_Channels = m_dll.GetNumberOfChannels(m_adpcm);
- m_SampleRate = m_dll.GetPlaybackRate(m_adpcm);
- m_BitsPerSample = 16;//m_dll.GetSampleSize(m_adpcm);
- m_DataFormat = AE_FMT_S16NE;
- m_TotalTime = m_dll.GetLength(m_adpcm); // fixme?
-
- return true;
-}
-
-void ADPCMCodec::DeInit()
-{
- if (m_adpcm)
- m_dll.FreeXWAV(m_adpcm);
-
- m_adpcm = NULL;
- m_bIsPlaying = false;
-}
-
-int64_t ADPCMCodec::Seek(int64_t iSeekTime)
-{
- m_dll.Seek(m_adpcm,(int)iSeekTime);
- return iSeekTime;
-}
-
-int ADPCMCodec::ReadPCM(BYTE *pBuffer, int size, int *actualsize)
-{
- if (!m_adpcm)
- return READ_ERROR;
-
- *actualsize = m_dll.FillBuffer(m_adpcm,(char*)pBuffer,size);
-
- if (*actualsize == 0)
- return READ_ERROR;
-
- return READ_SUCCESS;
-}
-
-bool ADPCMCodec::CanInit()
-{
- return m_dll.CanLoad();
-}
-
-CAEChannelInfo ADPCMCodec::GetChannelInfo()
-{
- static enum AEChannel map[2][3] = {
- {AE_CH_FC, AE_CH_NULL},
- {AE_CH_FL, AE_CH_FR , AE_CH_NULL}
- };
-
- if (m_Channels > 2)
- return CAEUtil::GuessChLayout(m_Channels);
-
- return CAEChannelInfo(map[m_Channels - 1]);
-}
diff --git a/xbmc/cores/paplayer/ADPCMCodec.h b/xbmc/cores/paplayer/ADPCMCodec.h
deleted file mode 100644
index aa09376a68..0000000000
--- a/xbmc/cores/paplayer/ADPCMCodec.h
+++ /dev/null
@@ -1,47 +0,0 @@
-#ifndef ADPCM_CODEC_H_
-#define ADPCM_CODEC_H_
-/*
- * Copyright (C) 2005-2013 Team XBMC
- * http://xbmc.org
- *
- * This Program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This Program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with XBMC; see the file COPYING. If not, see
- * <http://www.gnu.org/licenses/>.
- *
- */
-
-#include "ICodec.h"
-#include "DllAdpcm.h"
-
-class ADPCMCodec : public ICodec
-{
-public:
- ADPCMCodec();
- virtual ~ADPCMCodec();
-
- virtual bool Init(const CStdString &strFile, unsigned int filecache);
- virtual void DeInit();
- virtual int64_t Seek(int64_t iSeekTime);
- virtual int ReadPCM(BYTE *pBuffer, int size, int *actualsize);
- virtual bool CanInit();
- virtual CAEChannelInfo GetChannelInfo();
-
-private:
- void* m_adpcm;
- bool m_bIsPlaying;
-
- DllADPCM m_dll;
-};
-
-#endif
-
diff --git a/xbmc/cores/paplayer/CodecFactory.cpp b/xbmc/cores/paplayer/CodecFactory.cpp
index 995c4be257..e60644c105 100644
--- a/xbmc/cores/paplayer/CodecFactory.cpp
+++ b/xbmc/cores/paplayer/CodecFactory.cpp
@@ -22,8 +22,6 @@
#include "CodecFactory.h"
#include "MP3codec.h"
#include "OGGcodec.h"
-#include "FLACcodec.h"
-#include "WAVcodec.h"
#include "ModplugCodec.h"
#include "NSFCodec.h"
#ifdef HAS_SPC_CODEC
@@ -32,7 +30,6 @@
#include "SIDCodec.h"
#include "VGMCodec.h"
#include "YMCodec.h"
-#include "ADPCMCodec.h"
#include "TimidityCodec.h"
#ifdef HAS_ASAP_CODEC
#include "ASAPCodec.h"
@@ -59,7 +56,7 @@ ICodec* CodecFactory::CreateCodec(const CStdString& strFileType)
else if (strFileType.Equals("mka"))
return new DVDPlayerCodec();
else if (strFileType.Equals("flac"))
- return new FLACCodec();
+ return new DVDPlayerCodec();
else if (strFileType.Equals("wav"))
return new DVDPlayerCodec();
else if (strFileType.Equals("dts") || strFileType.Equals("ac3") ||
@@ -100,7 +97,7 @@ ICodec* CodecFactory::CreateCodec(const CStdString& strFileType)
else if (strFileType.Equals("aiff") || strFileType.Equals("aif"))
return new DVDPlayerCodec();
else if (strFileType.Equals("xwav"))
- return new ADPCMCodec();
+ return new DVDPlayerCodec();
else if (TimidityCodec::IsSupportedFormat(strFileType))
return new TimidityCodec();
#ifdef HAS_ASAP_CODEC
@@ -147,7 +144,11 @@ ICodec* CodecFactory::CreateCodecDemux(const CStdString& strFile, const CStdStri
return dvdcodec;
}
else if (strContent.Equals("audio/flac") || strContent.Equals("audio/x-flac") || strContent.Equals("application/x-flac"))
- return new FLACCodec();
+ {
+ DVDPlayerCodec *dvdcodec = new DVDPlayerCodec();
+ dvdcodec->SetContentType(strContent);
+ return dvdcodec;
+ }
if (urlFile.GetProtocol() == "shout")
{
@@ -156,7 +157,6 @@ ICodec* CodecFactory::CreateCodecDemux(const CStdString& strFile, const CStdStri
if (urlFile.GetFileType().Equals("wav") || strContent.Equals("audio/wav") || strContent.Equals("audio/x-wav"))
{
- ICodec* codec;
//lets see what it contains...
//this kinda sucks 'cause if it's a plain wav file the file
//will be opened, sniffed and closed 2 times before it is opened *again* for wav
@@ -167,20 +167,11 @@ ICodec* CodecFactory::CreateCodecDemux(const CStdString& strFile, const CStdStri
{
return dvdcodec;
}
- delete dvdcodec;
- codec = new ADPCMCodec();
- if (codec->Init(strFile, filecache))
- {
- return codec;
- }
- delete codec;
- codec = new WAVCodec();
- if (codec->Init(strFile, filecache))
- {
- return codec;
- }
- delete codec;
+ dvdcodec = new DVDPlayerCodec();
+ dvdcodec->SetContentType(strContent);
+ return dvdcodec;
+
}
else if (urlFile.GetFileType().Equals("ogg") || urlFile.GetFileType().Equals("oggstream") || urlFile.GetFileType().Equals("oga"))
return CreateOGGCodec(strFile,filecache);
diff --git a/xbmc/cores/paplayer/DVDPlayerCodec.cpp b/xbmc/cores/paplayer/DVDPlayerCodec.cpp
index 4fa3bc0db6..a1f76c34cd 100644
--- a/xbmc/cores/paplayer/DVDPlayerCodec.cpp
+++ b/xbmc/cores/paplayer/DVDPlayerCodec.cpp
@@ -203,6 +203,10 @@ bool DVDPlayerCodec::Init(const CStdString &strFile, unsigned int filecache)
m_TotalTime = m_pDemuxer->GetStreamLength();
m_Bitrate = m_pAudioCodec->GetBitRate();
+ if (!m_Bitrate && m_TotalTime)
+ {
+ m_Bitrate = ((m_pInputStream->GetLength()*1000) / m_TotalTime) * 8;
+ }
m_pDemuxer->GetStreamCodecName(m_nAudioStream,m_CodecName);
m_strFileName = strFile;
diff --git a/xbmc/cores/paplayer/FLACcodec.cpp b/xbmc/cores/paplayer/FLACcodec.cpp
deleted file mode 100644
index 2c4d93f103..0000000000
--- a/xbmc/cores/paplayer/FLACcodec.cpp
+++ /dev/null
@@ -1,352 +0,0 @@
-/*
- * Copyright (C) 2005-2013 Team XBMC
- * http://xbmc.org
- *
- * This Program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This Program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with XBMC; see the file COPYING. If not, see
- * <http://www.gnu.org/licenses/>.
- *
- */
-
-#include "FLACcodec.h"
-#include "utils/log.h"
-#include "cores/AudioEngine/Utils/AEUtil.h"
-#include "music/tags/TagLoaderTagLib.h"
-
-FLACCodec::FLACCodec()
-{
- m_SampleRate = 0;
- m_Channels = 0;
- m_BitsPerSample = 0;
- m_DataFormat = AE_FMT_INVALID;
- m_TotalTime=0;
- m_Bitrate = 0;
- m_CodecName = "flac";
-
- m_pFlacDecoder=NULL;
-
- m_pBuffer=NULL;
- m_BufferSize=0;
- m_MaxFrameSize=0;
-
-}
-
-FLACCodec::~FLACCodec()
-{
- DeInit();
-}
-
-bool FLACCodec::Init(const CStdString &strFile, unsigned int filecache)
-{
- if (!m_dll.Load())
- return false;
-
- if (!m_file.Open(strFile, READ_CACHED))
- return false;
-
- // Extract ReplayGain info
- CTagLoaderTagLib tagLoaderTagLib;
- tagLoaderTagLib.Load(strFile, m_tag, "flac");
-
- m_pFlacDecoder=m_dll.FLAC__stream_decoder_new();
-
- if (!m_pFlacDecoder)
- {
- CLog::Log(LOGERROR, "FLACCodec: Error creating decoder");
- return false;
- }
-
- if (m_dll.FLAC__stream_decoder_init_stream(m_pFlacDecoder, DecoderReadCallback,
- DecoderSeekCallback,
- DecoderTellCallback,
- DecoderLengthCallback,
- DecoderEofCallback,
- DecoderWriteCallback,
- DecoderMetadataCallback,
- DecoderErrorCallback,
- this) != FLAC__STREAM_DECODER_INIT_STATUS_OK)
- {
- CLog::Log(LOGERROR, "FLACCodec: Error initializing decoder");
- FreeDecoder();
- return false;
- }
-
- // Process metadata like number of channels...
- if (!m_dll.FLAC__stream_decoder_process_until_end_of_metadata(m_pFlacDecoder))
- {
- CLog::Log(LOGERROR, "FLACCodec: Error while processing metadata");
- FreeDecoder();
- return false;
- }
-
- // These are filled by the metadata callback
- if (m_SampleRate==0 || m_Channels==0 || m_BitsPerSample==0 || m_TotalTime==0 || m_MaxFrameSize==0 || m_DataFormat == AE_FMT_INVALID)
- {
- CLog::Log(LOGERROR, "FLACCodec: Can't get stream info, SampleRate=%i, Channels=%i, BitsPerSample=%i, TotalTime=%"PRIu64", MaxFrameSize=%i", m_SampleRate, m_Channels, m_BitsPerSample, m_TotalTime, m_MaxFrameSize);
- FreeDecoder();
- return false;
- }
-
- m_Bitrate = (int)(((float)m_file.GetLength() * 8) / ((float)m_TotalTime / 1000));
-
- if (m_pBuffer)
- {
- delete[] m_pBuffer;
- m_pBuffer=NULL;
- }
- // allocate the buffer to hold the audio data,
- // it is 5 times bigger then a single decoded frame
- m_pBuffer=new BYTE[m_MaxFrameSize*5];
-
- return true;
-}
-
-void FLACCodec::DeInit()
-{
- FreeDecoder();
- m_file.Close();
-
- if (m_pBuffer)
- {
- delete[] m_pBuffer;
- m_pBuffer=NULL;
- }
-}
-
-int64_t FLACCodec::Seek(int64_t iSeekTime)
-{
- // Seek to the nearest sample
- // set the buffer size to 0 first, as this invokes a WriteCallback which
- // may be called when the buffer is almost full (resulting in a buffer
- // overrun unless we reset m_BufferSize first).
- m_BufferSize=0;
- if(!m_dll.FLAC__stream_decoder_seek_absolute(m_pFlacDecoder, (int64_t)(iSeekTime*m_SampleRate)/1000))
- CLog::Log(LOGERROR, "FLACCodec::Seek - failed to seek");
-
- if(m_dll.FLAC__stream_decoder_get_state(m_pFlacDecoder)==FLAC__STREAM_DECODER_SEEK_ERROR)
- {
- CLog::Log(LOGINFO, "FLACCodec::Seek - must reset decoder after seek");
- if(!m_dll.FLAC__stream_decoder_flush(m_pFlacDecoder))
- CLog::Log(LOGERROR, "FLACCodec::Seek - flush failed");
- }
-
- return iSeekTime;
-}
-
-int FLACCodec::ReadPCM(BYTE *pBuffer, int size, int *actualsize)
-{
- *actualsize=0;
-
- bool eof=false;
- if (m_dll.FLAC__stream_decoder_get_state(m_pFlacDecoder)==FLAC__STREAM_DECODER_END_OF_STREAM)
- eof=true;
-
- if (!eof)
- {
- // fill our buffer 4 decoded frame (the buffer could hold 5)
- while(m_BufferSize < m_MaxFrameSize*4 &&
- m_dll.FLAC__stream_decoder_get_state(m_pFlacDecoder)!=FLAC__STREAM_DECODER_END_OF_STREAM)
- {
- if (!m_dll.FLAC__stream_decoder_process_single(m_pFlacDecoder))
- {
- CLog::Log(LOGERROR, "FLACCodec: Error decoding single block");
- return READ_ERROR;
- }
- }
- }
-
- if (size<m_BufferSize)
- { // do we need less audio data then in our buffer
- memcpy(pBuffer, m_pBuffer, size);
- memmove(m_pBuffer, m_pBuffer+size, m_BufferSize-size);
- m_BufferSize-=size;
- *actualsize=size;
- }
- else
- {
- memcpy(pBuffer, m_pBuffer, m_BufferSize);
- *actualsize=m_BufferSize;
- m_BufferSize=0;
- }
-
- if (eof && m_BufferSize==0)
- return READ_EOF;
-
- return READ_SUCCESS;
-}
-
-bool FLACCodec::CanInit()
-{
- return m_dll.CanLoad();
-}
-
-void FLACCodec::FreeDecoder()
-{
- if (m_pFlacDecoder)
- {
- m_dll.FLAC__stream_decoder_finish(m_pFlacDecoder);
- m_dll.FLAC__stream_decoder_delete(m_pFlacDecoder);
- m_pFlacDecoder=NULL;
- }
-}
-
-FLAC__StreamDecoderReadStatus FLACCodec::DecoderReadCallback(const FLAC__StreamDecoder *decoder, FLAC__byte buffer[], size_t *bytes, void *client_data)
-{
- FLACCodec* pThis=(FLACCodec*)client_data;
- if (!pThis)
- return FLAC__STREAM_DECODER_READ_STATUS_ABORT;
-
- *bytes=pThis->m_file.Read(buffer, *bytes);
-
- if (*bytes==0)
- return FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM;
- else
- return FLAC__STREAM_DECODER_READ_STATUS_CONTINUE;
-}
-
-FLAC__StreamDecoderSeekStatus FLACCodec::DecoderSeekCallback(const FLAC__StreamDecoder *decoder, FLAC__uint64 absolute_byte_offset, void *client_data)
-{
- FLACCodec* pThis=(FLACCodec*)client_data;
- if (!pThis)
- return FLAC__STREAM_DECODER_SEEK_STATUS_ERROR;
-
- if (pThis->m_file.Seek(absolute_byte_offset, SEEK_SET)<0)
- return FLAC__STREAM_DECODER_SEEK_STATUS_ERROR;
-
-
- return FLAC__STREAM_DECODER_SEEK_STATUS_OK;
-}
-
-FLAC__StreamDecoderTellStatus FLACCodec::DecoderTellCallback(const FLAC__StreamDecoder *decoder, FLAC__uint64 *absolute_byte_offset, void *client_data)
-{
- FLACCodec* pThis=(FLACCodec*)client_data;
- if (!pThis)
- return FLAC__STREAM_DECODER_TELL_STATUS_ERROR;
-
- *absolute_byte_offset=pThis->m_file.GetPosition();
-
- return FLAC__STREAM_DECODER_TELL_STATUS_OK;
-}
-
-FLAC__StreamDecoderLengthStatus FLACCodec::DecoderLengthCallback(const FLAC__StreamDecoder *decoder, FLAC__uint64 *stream_length, void *client_data)
-{
- FLACCodec* pThis=(FLACCodec*)client_data;
- if (!pThis)
- return FLAC__STREAM_DECODER_LENGTH_STATUS_ERROR;
-
- *stream_length=pThis->m_file.GetLength();
-
- return FLAC__STREAM_DECODER_LENGTH_STATUS_OK;
-}
-
-FLAC__bool FLACCodec::DecoderEofCallback(const FLAC__StreamDecoder *decoder, void *client_data)
-{
- FLACCodec* pThis=(FLACCodec*)client_data;
- if (!pThis)
- return true;
-
- return (pThis->m_file.GetLength()==pThis->m_file.GetPosition());
-}
-
-FLAC__StreamDecoderWriteStatus FLACCodec::DecoderWriteCallback(const FLAC__StreamDecoder *decoder, const FLAC__Frame *frame, const FLAC__int32 * const buffer[], void *client_data)
-{
- FLACCodec* pThis=(FLACCodec*)client_data;
- if (!pThis)
- return FLAC__STREAM_DECODER_WRITE_STATUS_ABORT;
-
- const int bytes_per_sample = frame->header.bits_per_sample/8;
- BYTE* outptr = pThis->m_pBuffer+pThis->m_BufferSize;
- FLAC__int16* outptr16 = (FLAC__int16 *) outptr;
- FLAC__int32* outptr32 = (FLAC__int32 *) outptr;
-
- unsigned int current_sample = 0;
- for(current_sample = 0; current_sample < frame->header.blocksize; current_sample++)
- {
- for(unsigned int channel = 0; channel < frame->header.channels; channel++)
- {
- switch(bytes_per_sample)
- {
- case 2:
- outptr16[current_sample*frame->header.channels + channel] = (FLAC__int16) buffer[channel][current_sample];
- break;
- case 3:
- outptr[2] = (buffer[channel][current_sample] >> 16) & 0xff;
- outptr[1] = (buffer[channel][current_sample] >> 8 ) & 0xff;
- outptr[0] = (buffer[channel][current_sample] >> 0 ) & 0xff;
- outptr += bytes_per_sample;
- break;
- default:
- outptr32[current_sample*frame->header.channels + channel] = buffer[channel][current_sample];
- break;
- }
- }
- }
-
- if (bytes_per_sample == 1)
- {
- for(unsigned int i=0;i<current_sample;i++)
- {
- BYTE* outptr=pThis->m_pBuffer+pThis->m_BufferSize;
- outptr[i]^=0x80;
- }
- }
-
- pThis->m_BufferSize += current_sample*bytes_per_sample*frame->header.channels;
-
- return FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE;
-}
-
-void FLACCodec::DecoderMetadataCallback(const FLAC__StreamDecoder *decoder, const FLAC__StreamMetadata *metadata, void *client_data)
-{
- FLACCodec* pThis=(FLACCodec*)client_data;
- if (!pThis)
- return;
-
- if (metadata->type==FLAC__METADATA_TYPE_STREAMINFO)
- {
- static enum AEChannel map[8][9] = {
- {AE_CH_FC, AE_CH_NULL},
- {AE_CH_FL, AE_CH_FR, AE_CH_NULL},
- {AE_CH_FL, AE_CH_FR, AE_CH_FC, AE_CH_NULL},
- {AE_CH_FL, AE_CH_FR, AE_CH_BL, AE_CH_BR, AE_CH_NULL},
- {AE_CH_FL, AE_CH_FR, AE_CH_FC, AE_CH_BL, AE_CH_BR, AE_CH_NULL},
- {AE_CH_FL, AE_CH_FR, AE_CH_FC, AE_CH_LFE, AE_CH_BL, AE_CH_BR, AE_CH_NULL}, // 6 channels
- {AE_CH_FL, AE_CH_FR, AE_CH_FC, AE_CH_LFE, AE_CH_BC, AE_CH_BL, AE_CH_BR, AE_CH_NULL}, // 7 channels
- {AE_CH_FL, AE_CH_FR, AE_CH_FC, AE_CH_LFE, AE_CH_BL, AE_CH_BR, AE_CH_SL, AE_CH_SR, AE_CH_NULL} // 8 channels
- };
-
- /* channel counts greater then 6 are undefined */
- if (metadata->data.stream_info.channels > 8)
- pThis->m_ChannelInfo = CAEUtil::GuessChLayout(metadata->data.stream_info.channels);
- else
- pThis->m_ChannelInfo = CAEChannelInfo(map[metadata->data.stream_info.channels - 1]);
-
- pThis->m_SampleRate = metadata->data.stream_info.sample_rate;
- pThis->m_Channels = metadata->data.stream_info.channels;
- pThis->m_BitsPerSample = metadata->data.stream_info.bits_per_sample;
- switch(pThis->m_BitsPerSample)
- {
- case 8: pThis->m_DataFormat = AE_FMT_U8; break;
- case 16: pThis->m_DataFormat = AE_FMT_S16NE; break;
- case 24: pThis->m_DataFormat = AE_FMT_S24NE3; break;
- case 32: pThis->m_DataFormat = AE_FMT_FLOAT; break;
- }
- pThis->m_TotalTime = (int64_t)metadata->data.stream_info.total_samples * 1000 / metadata->data.stream_info.sample_rate;
- pThis->m_MaxFrameSize = metadata->data.stream_info.max_blocksize*(pThis->m_BitsPerSample/8)*pThis->m_Channels;
- }
-}
-
-void FLACCodec::DecoderErrorCallback(const FLAC__StreamDecoder *decoder, FLAC__StreamDecoderErrorStatus status, void *client_data)
-{
- CLog::Log(LOGERROR, "FLACCodec: Read error %i", status);
-}
diff --git a/xbmc/cores/paplayer/FLACcodec.h b/xbmc/cores/paplayer/FLACcodec.h
deleted file mode 100644
index a89ca27606..0000000000
--- a/xbmc/cores/paplayer/FLACcodec.h
+++ /dev/null
@@ -1,58 +0,0 @@
-#pragma once
-
-/*
- * Copyright (C) 2005-2013 Team XBMC
- * http://xbmc.org
- *
- * This Program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This Program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with XBMC; see the file COPYING. If not, see
- * <http://www.gnu.org/licenses/>.
- *
- */
-
-#include "CachingCodec.h"
-#include "DllLibFlac.h"
-
-class FLACCodec : public CachingCodec
-{
-public:
- FLACCodec();
- virtual ~FLACCodec();
-
- virtual bool Init(const CStdString &strFile, unsigned int filecache);
- virtual void DeInit();
- virtual int64_t Seek(int64_t iSeekTime);
- virtual int ReadPCM(BYTE *pBuffer, int size, int *actualsize);
- virtual bool CanInit();
- virtual CAEChannelInfo GetChannelInfo() {return m_ChannelInfo;}
-
-private:
- // I/O callbacks for the flac decoder
- static FLAC__StreamDecoderReadStatus DecoderReadCallback(const FLAC__StreamDecoder *decoder, FLAC__byte buffer[], size_t *bytes, void *client_data);
- static FLAC__StreamDecoderSeekStatus DecoderSeekCallback(const FLAC__StreamDecoder *decoder, FLAC__uint64 absolute_byte_offset, void *client_data);
- static FLAC__StreamDecoderTellStatus DecoderTellCallback(const FLAC__StreamDecoder *decoder, FLAC__uint64 *absolute_byte_offset, void *client_data);
- static FLAC__StreamDecoderLengthStatus DecoderLengthCallback(const FLAC__StreamDecoder *decoder, FLAC__uint64 *stream_length, void *client_data);
- static FLAC__bool DecoderEofCallback(const FLAC__StreamDecoder *decoder, void *client_data);
- static FLAC__StreamDecoderWriteStatus DecoderWriteCallback(const FLAC__StreamDecoder *decoder, const FLAC__Frame *frame, const FLAC__int32 * const buffer[], void *client_data);
- static void DecoderMetadataCallback(const FLAC__StreamDecoder *decoder, const FLAC__StreamMetadata *metadata, void *client_data);
- static void DecoderErrorCallback(const FLAC__StreamDecoder *decoder, FLAC__StreamDecoderErrorStatus status, void *client_data);
-
- void FreeDecoder();
-
- DllLibFlac m_dll;
- BYTE* m_pBuffer; // buffer to hold the decoded audio data
- int m_BufferSize; // size of buffer is filled with decoded audio data
- int m_MaxFrameSize; // size of a single decoded frame
- FLAC__StreamDecoder* m_pFlacDecoder;
- CAEChannelInfo m_ChannelInfo;
-};
diff --git a/xbmc/cores/paplayer/Makefile.in b/xbmc/cores/paplayer/Makefile.in
index fa40ee844d..2bd5868bb6 100644
--- a/xbmc/cores/paplayer/Makefile.in
+++ b/xbmc/cores/paplayer/Makefile.in
@@ -7,11 +7,9 @@ CFLAGS += -DHAS_ALSA
CXXFLAGS += -DHAS_ALSA
endif
-SRCS = ADPCMCodec.cpp
-SRCS += AudioDecoder.cpp
+SRCS = AudioDecoder.cpp
SRCS += CodecFactory.cpp
SRCS += DVDPlayerCodec.cpp
-SRCS += FLACcodec.cpp
SRCS += ModplugCodec.cpp
SRCS += MP3codec.cpp
SRCS += NSFCodec.cpp
@@ -22,7 +20,6 @@ SRCS += PCMCodec.cpp
SRCS += SIDCodec.cpp
SRCS += TimidityCodec.cpp
SRCS += VGMCodec.cpp
-SRCS += WAVcodec.cpp
SRCS += YMCodec.cpp
ifeq (@USE_ASAP_CODEC@,1)
diff --git a/xbmc/cores/paplayer/PAPlayer.cpp b/xbmc/cores/paplayer/PAPlayer.cpp
index 1c3388041f..591582d790 100644
--- a/xbmc/cores/paplayer/PAPlayer.cpp
+++ b/xbmc/cores/paplayer/PAPlayer.cpp
@@ -160,13 +160,16 @@ void PAPlayer::SoftStop(bool wait/* = false */, bool close/* = true */)
/* if we are going to wait for them to finish fading */
if(wait)
{
+ // fail safe timer, do not wait longer than 1000ms
+ XbmcThreads::EndTime timer(1000);
+
/* wait for them to fade out */
lock.Leave();
Sleep(FAST_XFADE_TIME);
lock.Enter();
/* be sure they have faded out */
- while(wait && !CAEFactory::IsSuspended())
+ while(wait && !CAEFactory::IsSuspended() && !timer.IsTimePast())
{
wait = false;
for(StreamList::iterator itt = m_streams.begin(); itt != m_streams.end(); ++itt)