Merge branch 'master' into plugindownload

This commit is contained in:
Henrik Rydgard 2013-06-02 10:45:45 +02:00
commit 4e7c933b83
3 changed files with 18 additions and 5 deletions

View File

@ -850,11 +850,14 @@ add_library(${CoreLibName} ${CoreLinkType}
Core/HW/atrac3plus.h
Core/HW/MediaEngine.cpp
Core/HW/MediaEngine.h
Core/HW/MpegDemux.cpp
Core/HW/MpegDemux.h
Core/HW/MemoryStick.cpp
Core/HW/MemoryStick.h
Core/HW/OMAConvert.cpp
Core/HW/OMAConvert.h
Core/HW/SasAudio.cpp
Core/HW/SasAudio.h
Core/HW/atrac3plus.cpp
Core/Host.cpp
Core/Host.h
Core/Loaders.cpp

View File

@ -21,6 +21,14 @@
#include "Core/HW/atrac3plus.h"
#ifdef USE_FFMPEG
// Urgh! Why is this needed?
#ifdef ANDROID
#ifndef UINT64_C
#define UINT64_C(c) (c ## ULL)
#endif
#endif
extern "C" {
#include "libavcodec/avcodec.h"
@ -119,7 +127,7 @@ void MediaEngine::closeMedia() {
m_videoStream = -1;
m_pdata = 0;
m_demux = 0;
Atrac3plus_Decoder::closeContext(&m_audioContext);
Atrac3plus_Decoder::CloseContext(&m_audioContext);
}
int _MpegReadbuffer(void *opaque, uint8_t *buf, int buf_size)
@ -199,8 +207,8 @@ bool MediaEngine::openContext() {
m_demux->setReadSize(m_readSize);
m_demux->demux();
m_audioPos = 0;
m_audioContext = Atrac3plus_Decoder::openContext();
#endif USE_FFMPEG
m_audioContext = Atrac3plus_Decoder::OpenContext();
#endif // USE_FFMPEG
return true;
}
@ -489,7 +497,7 @@ int MediaEngine::getAudioSamples(u8* buffer) {
int nextHeader = getNextHeaderPosition(audioStream, m_audioPos, audioSize, frameSize);
u8* frame = audioStream + m_audioPos;
int outbytes = 0;
Atrac3plus_Decoder::atrac3plus_decode(m_audioContext, frame, frameSize - 8, &outbytes, buffer);
Atrac3plus_Decoder::Decode(m_audioContext, frame, frameSize - 8, &outbytes, buffer);
if (nextHeader >= 0) {
m_audioPos = nextHeader;
} else

View File

@ -181,6 +181,8 @@ LOCAL_SRC_FILES := \
$(SRC)/Core/ELF/ParamSFO.cpp \
$(SRC)/Core/HW/atrac3plus.cpp \
$(SRC)/Core/HW/MemoryStick.cpp \
$(SRC)/Core/HW/MpegDemux.cpp.arm \
$(SRC)/Core/HW/OMAConvert.cpp.arm \
$(SRC)/Core/HW/MediaEngine.cpp.arm \
$(SRC)/Core/HW/SasAudio.cpp.arm \
$(SRC)/Core/Core.cpp \