Put AFCdecodebuffer inside the CUCode_Zelda class.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3690 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
luigi2us committed 2009-07-06 12:12:05 +00:00
1 parent a41c1b2d0a
commit ca51636f5c
4 files changed
+201 -221

No files matched your search

@@ -213,6 +213,9 @@ private:
void ExecuteList();
// AFC decoder
void AFCdecodebuffer(const s16 *coef, const char *input, signed short *out, short *histp, short *hist2p, int type);
void ReadVoicePB(u32 _Addr, ZeldaVoicePB& PB);
void WritebackVoicePB(u32 _Addr, ZeldaVoicePB& PB);
@@ -16,9 +16,9 @@
// http://code.google.com/p/dolphin-emu/
#include "Common.h"
#include "UCode_Zelda_ADPCM.h"
#include "UCode_Zelda.h"
void AFCdecodebuffer(const s16 *coef, const char *input, signed short *out, short *histp, short *hist2p, int type)
void CUCode_Zelda::AFCdecodebuffer(const s16 *coef, const char *input, signed short *out, short *histp, short *hist2p, int type)
{
short nibbles[16];
short hist = *histp;
@@ -79,6 +79,7 @@ void AFCdecodebuffer(const s16 *coef, const char *input, signed short *out, shor
int sample = (delta * nibbles[i]) << 11;
sample += ((long)hist * coef[idx * 2]) + ((long)hist2 * coef[idx * 2 + 1]);
sample = sample >> 11;
if (sample > 32767) {
sample = 32767;
}
@@ -1,20 +0,0 @@
// Copyright (C) 2003-2008 Dolphin Project.
// 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, version 2.0.
// 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 2.0 for more details.
// A copy of the GPL 2.0 should have been included with the program.
// If not, see http://www.gnu.org/licenses/
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
#include "Common.h"
void AFCdecodebuffer(const s16 *coef, const char *input, signed short *out, short *histp, short *hist2p, int type);