Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #777 from jmarshallnz/audio_l16_mimetype

Merged support for audio/L16 mimetype from andrewfg PR 251
  • Loading branch information...
commit 7fad8083195ed77568c9a800084d698978c1b28e 2 parents 48c0556 + 163fbda
@jmarshallnz jmarshallnz authored
View
6 XBMC-ATV2.xcodeproj/project.pbxproj
@@ -25,6 +25,7 @@
7C89627013B702F3003631FE /* GUIWindowScreensaverDim.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C89626E13B702F3003631FE /* GUIWindowScreensaverDim.cpp */; };
7C99B73F133D372300FC2B16 /* CacheCircular.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C99B73D133D372300FC2B16 /* CacheCircular.cpp */; };
7C99B7AA134072CD00FC2B16 /* GUIDialogPlayEject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C99B7A8134072CD00FC2B16 /* GUIDialogPlayEject.cpp */; };
+ 7CCFD9AA1514952700211D82 /* PCMCodec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7CCFD9A81514952700211D82 /* PCMCodec.cpp */; };
7CEE2E6D13D6B7A8000ABF2A /* TimeSmoother.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7CEE2E6B13D6B7A8000ABF2A /* TimeSmoother.cpp */; };
C807119F135DB842002F601B /* InputOperations.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C807119D135DB842002F601B /* InputOperations.cpp */; };
C8EC5D51136954E400CCC10D /* XBMC_keytable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C8EC5D4F136954E400CCC10D /* XBMC_keytable.cpp */; };
@@ -981,6 +982,8 @@
7C99B73E133D372300FC2B16 /* CacheCircular.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CacheCircular.h; sourceTree = "<group>"; };
7C99B7A8134072CD00FC2B16 /* GUIDialogPlayEject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GUIDialogPlayEject.cpp; sourceTree = "<group>"; };
7C99B7A9134072CD00FC2B16 /* GUIDialogPlayEject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GUIDialogPlayEject.h; sourceTree = "<group>"; };
+ 7CCFD9A81514952700211D82 /* PCMCodec.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PCMCodec.cpp; sourceTree = "<group>"; };
+ 7CCFD9A91514952700211D82 /* PCMCodec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PCMCodec.h; sourceTree = "<group>"; };
7CEE2E6B13D6B7A8000ABF2A /* TimeSmoother.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TimeSmoother.cpp; sourceTree = "<group>"; };
7CEE2E6C13D6B7A8000ABF2A /* TimeSmoother.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TimeSmoother.h; sourceTree = "<group>"; };
8316267613B670FF004AED87 /* README.ios */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.ios; sourceTree = "<group>"; };
@@ -3875,6 +3878,8 @@
F56C7322131EC151000AD0F6 /* OGGcodec.h */,
F56C7323131EC151000AD0F6 /* PAPlayer.cpp */,
F56C7324131EC151000AD0F6 /* PAPlayer.h */,
+ 7CCFD9A81514952700211D82 /* PCMCodec.cpp */,
+ 7CCFD9A91514952700211D82 /* PCMCodec.h */,
F56C7325131EC151000AD0F6 /* ReplayGain.cpp */,
F56C7326131EC151000AD0F6 /* ReplayGain.h */,
F56C7328131EC151000AD0F6 /* SIDCodec.cpp */,
@@ -6934,6 +6939,7 @@
F5E113AD1435882400175026 /* pyrendercapture.cpp in Sources */,
DF673A251443769300A5A509 /* FileUPnP.cpp in Sources */,
F5BD033A148D4923001B5583 /* CryptThreading.cpp in Sources */,
+ 7CCFD9AA1514952700211D82 /* PCMCodec.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
View
6 XBMC-IOS.xcodeproj/project.pbxproj
@@ -26,6 +26,7 @@
7C89628013B7031E003631FE /* GUIWindowScreensaverDim.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C89627E13B7031E003631FE /* GUIWindowScreensaverDim.cpp */; };
7C99B6E9133D36E200FC2B16 /* CacheCircular.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C99B6E7133D36E200FC2B16 /* CacheCircular.cpp */; };
7C99B7BE1340730000FC2B16 /* GUIDialogPlayEject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C99B7BC1340730000FC2B16 /* GUIDialogPlayEject.cpp */; };
+ 7CCFD9991514950700211D82 /* PCMCodec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7CCFD9971514950700211D82 /* PCMCodec.cpp */; };
7CEE2E7F13D6B7D4000ABF2A /* TimeSmoother.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7CEE2E7D13D6B7D4000ABF2A /* TimeSmoother.cpp */; };
C80711AD135DB85F002F601B /* InputOperations.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C80711AB135DB85F002F601B /* InputOperations.cpp */; };
C8EC5D26136953E100CCC10D /* XBMC_keytable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C8EC5D24136953E100CCC10D /* XBMC_keytable.cpp */; };
@@ -982,6 +983,8 @@
7C99B6E8133D36E200FC2B16 /* CacheCircular.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CacheCircular.h; sourceTree = "<group>"; };
7C99B7BC1340730000FC2B16 /* GUIDialogPlayEject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GUIDialogPlayEject.cpp; sourceTree = "<group>"; };
7C99B7BD1340730000FC2B16 /* GUIDialogPlayEject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GUIDialogPlayEject.h; sourceTree = "<group>"; };
+ 7CCFD9971514950700211D82 /* PCMCodec.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PCMCodec.cpp; sourceTree = "<group>"; };
+ 7CCFD9981514950700211D82 /* PCMCodec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PCMCodec.h; sourceTree = "<group>"; };
7CEE2E7D13D6B7D4000ABF2A /* TimeSmoother.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TimeSmoother.cpp; sourceTree = "<group>"; };
7CEE2E7E13D6B7D4000ABF2A /* TimeSmoother.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TimeSmoother.h; sourceTree = "<group>"; };
83D619BB13C0D25300418A0F /* README.ios */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.ios; sourceTree = "<group>"; };
@@ -4275,6 +4278,8 @@
F56C8323131F42E7000AD0F6 /* OGGcodec.h */,
F56C8324131F42E7000AD0F6 /* PAPlayer.cpp */,
F56C8325131F42E7000AD0F6 /* PAPlayer.h */,
+ 7CCFD9971514950700211D82 /* PCMCodec.cpp */,
+ 7CCFD9981514950700211D82 /* PCMCodec.h */,
F56C8326131F42E7000AD0F6 /* ReplayGain.cpp */,
F56C8327131F42E7000AD0F6 /* ReplayGain.h */,
F56C8328131F42E7000AD0F6 /* SIDCodec.cpp */,
@@ -6949,6 +6954,7 @@
F5E112EC143577A000175026 /* Peripherals.cpp in Sources */,
DF6739E21443765F00A5A509 /* FileUPnP.cpp in Sources */,
F5BD034F148D496A001B5583 /* CryptThreading.cpp in Sources */,
+ 7CCFD9991514950700211D82 /* PCMCodec.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
View
8 XBMC.xcodeproj/project.pbxproj
@@ -565,6 +565,8 @@
7CCF7F1E1069F3AE00992676 /* Builtins.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7CCF7F1B1069F3AE00992676 /* Builtins.cpp */; };
7CCF7FC9106A0DF500992676 /* TimeUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7CCF7FC7106A0DF500992676 /* TimeUtils.cpp */; };
7CCF7FCA106A0DF500992676 /* TimeUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7CCF7FC7106A0DF500992676 /* TimeUtils.cpp */; };
+ 7CCFD98C151494E100211D82 /* PCMCodec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7CCFD98A151494E100211D82 /* PCMCodec.cpp */; };
+ 7CCFD98D151494E100211D82 /* PCMCodec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7CCFD98A151494E100211D82 /* PCMCodec.cpp */; };
7CD2C3AA11940B270009EFC1 /* DirectoryNodeCountry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7CD2C3A811940B270009EFC1 /* DirectoryNodeCountry.cpp */; };
7CD2C3AB11940B270009EFC1 /* DirectoryNodeCountry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7CD2C3A811940B270009EFC1 /* DirectoryNodeCountry.cpp */; };
7CD2CD0111B38B000009EFC1 /* PythonAddon.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7CD2CCFE11B38B000009EFC1 /* PythonAddon.cpp */; };
@@ -2511,6 +2513,8 @@
7CCF7F1C1069F3AE00992676 /* Builtins.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Builtins.h; sourceTree = "<group>"; };
7CCF7FC7106A0DF500992676 /* TimeUtils.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TimeUtils.cpp; sourceTree = "<group>"; };
7CCF7FC8106A0DF500992676 /* TimeUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TimeUtils.h; sourceTree = "<group>"; };
+ 7CCFD98A151494E100211D82 /* PCMCodec.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PCMCodec.cpp; sourceTree = "<group>"; };
+ 7CCFD98B151494E100211D82 /* PCMCodec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PCMCodec.h; sourceTree = "<group>"; };
7CD2C3A811940B270009EFC1 /* DirectoryNodeCountry.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DirectoryNodeCountry.cpp; sourceTree = "<group>"; };
7CD2C3A911940B270009EFC1 /* DirectoryNodeCountry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DirectoryNodeCountry.h; sourceTree = "<group>"; };
7CD2CCFE11B38B000009EFC1 /* PythonAddon.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PythonAddon.cpp; sourceTree = "<group>"; };
@@ -5582,6 +5586,8 @@
E38E16240D25F9FA00618676 /* OGGcodec.h */,
F5987FDA0FBE2DFD008EF4FB /* PAPlayer.cpp */,
F5987FD90FBE2DFD008EF4FB /* PAPlayer.h */,
+ 7CCFD98A151494E100211D82 /* PCMCodec.cpp */,
+ 7CCFD98B151494E100211D82 /* PCMCodec.h */,
E38E162A0D25F9FA00618676 /* ReplayGain.cpp */,
E38E162B0D25F9FA00618676 /* ReplayGain.h */,
E38E16310D25F9FA00618676 /* SIDCodec.cpp */,
@@ -8043,6 +8049,7 @@
DF85BAB51443669A000686BE /* FileUPnP.cpp in Sources */,
DF673AA51443819600A5A509 /* AddonManager.cpp in Sources */,
F5BD02F6148D3A7E001B5583 /* CryptThreading.cpp in Sources */,
+ 7CCFD98D151494E100211D82 /* PCMCodec.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -8963,6 +8970,7 @@
F54BCC601439345300F86B0F /* HotKeyController.m in Sources */,
DF85BAB61443669A000686BE /* FileUPnP.cpp in Sources */,
F5BD02F7148D3A7E001B5583 /* CryptThreading.cpp in Sources */,
+ 7CCFD98C151494E100211D82 /* PCMCodec.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
View
2  project/VS2010Express/XBMC.vcxproj
@@ -304,6 +304,7 @@
<ClCompile Include="..\..\xbmc\cores\dvdplayer\DVDCodecs\Video\CrystalHD.cpp" />
<ClCompile Include="..\..\xbmc\cores\dvdplayer\DVDInputStreams\DVDInputStreamBluray.cpp" />
<ClCompile Include="..\..\xbmc\cores\paplayer\BXAcodec.cpp" />
+ <ClCompile Include="..\..\xbmc\cores\paplayer\PCMCodec.cpp" />
<ClCompile Include="..\..\xbmc\cores\VideoRenderers\RenderCapture.cpp" />
<ClCompile Include="..\..\xbmc\cores\VideoRenderers\VideoShaders\WinVideoFilter.cpp" />
<ClCompile Include="..\..\xbmc\CueDocument.cpp" />
@@ -755,6 +756,7 @@
<ClCompile Include="..\..\xbmc\threads\LockFree.cpp" />
<ClCompile Include="..\..\xbmc\threads\platform\Implementation.cpp" />
<ClInclude Include="..\..\xbmc\cores\AudioRenderers\IAudioRenderer.h" />
+ <ClInclude Include="..\..\xbmc\cores\paplayer\PCMCodec.h" />
<ClInclude Include="..\..\xbmc\filesystem\FileUPnP.h" />
<ClInclude Include="..\..\xbmc\interfaces\python\xbmcmodule\pythreadstate.h" />
<ClInclude Include="..\..\xbmc\threads\platform\win\Implementation.cpp" />
View
6 project/VS2010Express/XBMC.vcxproj.filters
@@ -2565,6 +2565,9 @@
<ClCompile Include="..\..\xbmc\filesystem\FileUPnP.cpp">
<Filter>filesystem</Filter>
</ClCompile>
+ <ClCompile Include="..\..\xbmc\cores\paplayer\PCMCodec.cpp">
+ <Filter>cores\paplayer</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\xbmc\win32\pch.h">
@@ -5154,6 +5157,9 @@
<ClInclude Include="..\..\xbmc\interfaces\python\xbmcmodule\pythreadstate.h">
<Filter>interfaces\python\xbmcmodule</Filter>
</ClInclude>
+ <ClInclude Include="..\..\xbmc\cores\paplayer\PCMCodec.h">
+ <Filter>cores\paplayer</Filter>
+ </ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\..\xbmc\win32\XBMC_PC.rc">
View
9 xbmc/cores/paplayer/CodecFactory.cpp
@@ -42,11 +42,14 @@
#include "URL.h"
#include "DVDPlayerCodec.h"
#include "BXAcodec.h"
+#include "PCMCodec.h"
ICodec* CodecFactory::CreateCodec(const CStdString& strFileType)
{
if (strFileType.Equals("mp3") || strFileType.Equals("mp2"))
return new MP3Codec();
+ else if (strFileType.Equals("pcm") || strFileType.Equals("l16"))
+ return new PCMCodec();
else if (strFileType.Equals("ape") || strFileType.Equals("mac"))
return new DVDPlayerCodec();
else if (strFileType.Equals("cdda"))
@@ -117,6 +120,12 @@ ICodec* CodecFactory::CreateCodecDemux(const CStdString& strFile, const CStdStri
if( strContent.Equals("audio/mpeg")
|| strContent.Equals("audio/mp3") )
return new MP3Codec();
+ else if (strContent.Left(9).Equals("audio/l16") == 0)
+ {
+ PCMCodec * pcm_codec = new PCMCodec();
+ pcm_codec->SetMimeParams(strContent);
+ return pcm_codec;
+ }
else if( strContent.Equals("audio/aac")
|| strContent.Equals("audio/aacp") )
{
View
1  xbmc/cores/paplayer/Makefile.in
@@ -17,6 +17,7 @@ SRCS=ADPCMCodec.cpp \
OggCallback.cpp \
OGGcodec.cpp \
PAPlayer.cpp \
+ PCMCodec.cpp \
ReplayGain.cpp \
SIDCodec.cpp \
TimidityCodec.cpp \
View
125 xbmc/cores/paplayer/PCMCodec.cpp
@@ -0,0 +1,125 @@
+/*
+ * Copyright (C) 2011-2012 Team XBMC
+ * http://www.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, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ */
+
+#include "PCMCodec.h"
+#include "utils/log.h"
+#include "utils/EndianSwap.h"
+#include "utils/StringUtils.h"
+
+PCMCodec::PCMCodec()
+{
+ m_CodecName = "PCM";
+ m_TotalTime = 0;
+ m_SampleRate = 44100;
+ m_Channels = 2;
+ m_BitsPerSample = 16;
+ m_Bitrate = m_SampleRate * m_Channels * m_BitsPerSample;
+}
+
+PCMCodec::~PCMCodec()
+{
+ DeInit();
+}
+
+bool PCMCodec::Init(const CStdString &strFile, unsigned int filecache)
+{
+ m_file.Close();
+ if (!m_file.Open(strFile, READ_CACHED))
+ {
+ CLog::Log(LOGERROR, "PCMCodec::Init - Failed to open file");
+ return false;
+ }
+
+ int64_t length = m_file.GetLength();
+
+ if (m_Bitrate)
+ m_TotalTime = 1000 * 8 * length / m_Bitrate;
+
+ m_file.Seek(0, SEEK_SET);
+
+ return true;
+}
+
+void PCMCodec::DeInit()
+{
+ m_file.Close();
+}
+
+__int64 PCMCodec::Seek(__int64 iSeekTime)
+{
+ m_file.Seek((iSeekTime / 1000) * (m_Bitrate / 8));
+ return iSeekTime;
+}
+
+int PCMCodec::ReadPCM(BYTE *pBuffer, int size, int *actualsize)
+{
+ *actualsize = 0;
+
+ int iAmountRead = m_file.Read(pBuffer, 2 * (size / 2));
+ if (iAmountRead > 0)
+ {
+ uint16_t *buffer = (uint16_t*) pBuffer;
+
+ iAmountRead = 2 * (iAmountRead / 2);
+
+ for (int i = 0; i < (iAmountRead / 2); i++)
+ buffer[i] = Endian_SwapBE16(buffer[i]); // L16 PCM is in network byte order (Big Endian)
+
+ *actualsize = iAmountRead;
+
+ return READ_SUCCESS;
+ }
+ return READ_ERROR;
+}
+
+bool PCMCodec::CanInit()
+{
+ return true;
+}
+
+void PCMCodec::SetMimeParams(const CStdString& strMimeParams)
+{
+ CStdStringArray mimeParams;
+
+ // if there are no parameters, the default is 2 channels, 44100 samples/sec
+ m_Channels = 2;
+ m_SampleRate = 44100;
+
+ StringUtils::SplitString(strMimeParams, ";", mimeParams);
+ for (size_t i = 0; i < mimeParams.size(); i++)
+ {
+ CStdStringArray thisParam;
+ StringUtils::SplitString(mimeParams[i], "=", thisParam, 2);
+ if (thisParam.size() > 1)
+ {
+ if (thisParam[0] == "rate")
+ {
+ m_SampleRate = atoi(thisParam[1].Trim());
+ }
+ else if (thisParam[0] == "channels")
+ {
+ m_Channels = atoi(thisParam[1].Trim());
+ }
+ }
+ }
+
+ m_Bitrate = m_SampleRate * m_Channels * m_BitsPerSample;
+}
View
40 xbmc/cores/paplayer/PCMCodec.h
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2011-2012 Team XBMC
+ * http://www.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, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ */
+
+#pragma once
+#include "CachingCodec.h"
+
+class PCMCodec : public CachingCodec
+{
+public:
+ PCMCodec(void);
+ virtual ~PCMCodec(void);
+ virtual bool Init(const CStdString &strFile, unsigned int filecache);
+ virtual void DeInit();
+ virtual __int64 Seek(__int64 iSeekTime);
+ virtual int ReadPCM(BYTE *pBuffer, int size, int *actualsize);
+ virtual bool CanInit();
+ virtual void SetMimeParams(const CStdString& strMimeParams);
+private:
+ int iBytesPerSecond;
+};
+
+
View
6 xbmc/utils/EndianSwap.h
@@ -87,10 +87,16 @@ static __inline__ uint64_t Endian_Swap64(uint64_t x) {
#define Endian_SwapLE16(X) (X)
#define Endian_SwapLE32(X) (X)
#define Endian_SwapLE64(X) (X)
+#define Endian_SwapBE16(X) Endian_Swap16(X)
+#define Endian_SwapBE32(X) Endian_Swap32(X)
+#define Endian_SwapBE64(X) Endian_Swap64(X)
#else
#define Endian_SwapLE16(X) Endian_Swap16(X)
#define Endian_SwapLE32(X) Endian_Swap32(X)
#define Endian_SwapLE64(X) Endian_Swap64(X)
+#define Endian_SwapBE16(X) (X)
+#define Endian_SwapBE32(X) (X)
+#define Endian_SwapBE64(X) (X)
#endif
/* Ends C function definitions when using C++ */
Please sign in to comment.
Something went wrong with that request. Please try again.