enable high quality audio, finalize 2.0.5

This commit is contained in:
dborth 2008-10-19 17:26:40 +00:00
parent 6ae2648d39
commit a4bbd222cc
6 changed files with 66 additions and 55 deletions

View File

@ -1,7 +1,7 @@
¸,ø¤°`°¤ø,¸¸,ø¤°`°¤ø,¸,ø¤°`°¤ø,¸¸,ø¤°`°¤ø,¸,ø¤°`°¤ø,¸¸,ø¤°`°¤ø,¸,ø¤°`°¤ø,¸¸,ø¤ ¸,ø¤°`°¤ø,¸¸,ø¤°`°¤ø,¸,ø¤°`°¤ø,¸¸,ø¤°`°¤ø,¸,ø¤°`°¤ø,¸¸,ø¤°`°¤ø,¸,ø¤°`°¤ø,¸¸,ø¤
- FCE Ultra GX - - FCE Ultra GX -
Version 2.0.4 Version 2.0.5
http://code.google.com/p/fceugc http://code.google.com/p/fceugc
(Under GPL License) (Under GPL License)
@ -29,6 +29,12 @@ SNES9x GX project.
|0O×øo· UPDATE HISTORY ·oø×O0| |0O×øo· UPDATE HISTORY ·oø×O0|
`¨•¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨' `¨•¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨'
[What's New 2.0.5 - October 19, 2008]
* Sound bug fixed - thanks eke-eke!
* High quality sound enabled, lowpass filter enabled
* Video threading enabled
* Fixed timing error (incorrect opcode)
[What's New 2.0.4 - October 15, 2008] [What's New 2.0.4 - October 15, 2008]
* Wii DVD fixed * Wii DVD fixed
* FDS BIOS loading works now * FDS BIOS loading works now

View File

@ -15,8 +15,8 @@
void DefaultSettings (); void DefaultSettings ();
#define VERSIONNUM "2.0.4" #define VERSIONNUM "2.0.5"
#define VERSIONSTR "FCE Ultra GX 2.0.4" #define VERSIONSTR "FCE Ultra GX 2.0.5"
#define NOTSILENT 0 #define NOTSILENT 0
#define SILENT 1 #define SILENT 1

View File

@ -94,7 +94,7 @@ int GCMemROM(int method, int size)
/*** Set internal sound information ***/ /*** Set internal sound information ***/
FCEUI_Sound(SAMPLERATE); FCEUI_Sound(SAMPLERATE);
FCEUI_SetSoundVolume(100); // 0-100 FCEUI_SetSoundVolume(100); // 0-100
FCEUI_SetSoundQuality(0); // 0 - low, 1 - high FCEUI_SetSoundQuality(1); // 0 - low, 1 - high
FCEUI_SetLowPass(1); FCEUI_SetLowPass(1);
InitialisePads(); InitialisePads();

View File

@ -3,8 +3,9 @@
* Nintendo Wii/Gamecube Port * Nintendo Wii/Gamecube Port
* *
* Tantric September 2008 * Tantric September 2008
* eke-eke October 2008
* *
* audio.c * gcaudio.c
* *
* Audio driver * Audio driver
****************************************************************************/ ****************************************************************************/
@ -24,26 +25,29 @@ int IsPlaying = 0;
static int mixercollect( u8 *outbuffer, int len ) static int mixercollect( u8 *outbuffer, int len )
{ {
u32 *dst = (u32 *)outbuffer; u32 *dst = (u32 *)outbuffer;
u32 *src = (u32 *)mixbuffer; u32 *src = (u32 *)mixbuffer;
int done = 0; int done = 0;
/*** Always clear output buffer ***/ // Always clear output buffer
memset(outbuffer, 0, len); memset(outbuffer, 0, len);
while ( ( mixtail != mixhead ) && ( done < len ) ) while ( ( mixtail != mixhead ) && ( done < len ) )
{ {
*dst++ = src[mixtail++]; *dst++ = src[mixtail++];
if (mixtail == 4000) mixtail = 0; if (mixtail == 4000) mixtail = 0;
done += 4; done += 4;
} }
/*** Realign to 32 bytes for DMA ***/ // Realign to 32 bytes for DMA
mixtail -= ((done&0x1f) >> 2); mixtail -= ((done&0x1f) >> 2);
if (mixtail < 0) mixtail += 4000; if (mixtail < 0)
done &= ~0x1f; mixtail += 4000;
if (!done) return len >> 1; done &= ~0x1f;
return done; if (!done)
return len >> 1;
return done;
} }
/**************************************************************************** /****************************************************************************
@ -53,32 +57,32 @@ static int mixercollect( u8 *outbuffer, int len )
****************************************************************************/ ****************************************************************************/
void AudioSwitchBuffers() void AudioSwitchBuffers()
{ {
if ( !ConfigRequested ) if ( !ConfigRequested )
{ {
int len = mixercollect( soundbuffer[whichab], 3840 ); int len = mixercollect( soundbuffer[whichab], 3840 );
DCFlushRange(soundbuffer[whichab], len); DCFlushRange(soundbuffer[whichab], len);
AUDIO_InitDMA((u32)soundbuffer[whichab], len); AUDIO_InitDMA((u32)soundbuffer[whichab], len);
AUDIO_StartDMA(); AUDIO_StartDMA();
whichab ^= 1; whichab ^= 1;
IsPlaying = 1; IsPlaying = 1;
} }
else IsPlaying = 0; else IsPlaying = 0;
} }
void InitialiseSound() void InitialiseSound()
{ {
AUDIO_Init(NULL); /*** Start audio subsystem ***/ AUDIO_Init(NULL); // Start audio subsystem
AUDIO_SetDSPSampleRate(AI_SAMPLERATE_48KHZ); AUDIO_SetDSPSampleRate(AI_SAMPLERATE_48KHZ);
AUDIO_RegisterDMACallback( AudioSwitchBuffers ); AUDIO_RegisterDMACallback( AudioSwitchBuffers );
memset(soundbuffer, 0, 3840*2); memset(soundbuffer, 0, 3840*2);
memset(mixbuffer, 0, 16000); memset(mixbuffer, 0, 16000);
} }
void StopAudio() void StopAudio()
{ {
AUDIO_StopDMA(); AUDIO_StopDMA();
ConfigRequested = 1; ConfigRequested = 1;
IsPlaying = 0; IsPlaying = 0;
} }
/**************************************************************************** /****************************************************************************
@ -89,21 +93,21 @@ void StopAudio()
void PlaySound( int *Buffer, int count ) void PlaySound( int *Buffer, int count )
{ {
int i; int i;
s16 sample; s16 sample;
u32 *dst = (u32 *)mixbuffer; u32 *dst = (u32 *)mixbuffer;
for( i = 0; i < count; i++ ) for( i = 0; i < count; i++ )
{ {
sample = Buffer[i] & 0xffff; sample = Buffer[i] & 0xffff;
dst[mixhead++] = sample | ( sample << 16); dst[mixhead++] = sample | ( sample << 16);
if (mixhead == 4000) mixhead = 0; if (mixhead == 4000)
} mixhead = 0;
}
/* Restart Sound Processing if stopped */ // Restart Sound Processing if stopped
//return; if (IsPlaying == 0)
if (IsPlaying == 0) {
{ ConfigRequested = 0;
ConfigRequested = 0; AudioSwitchBuffers ();
AudioSwitchBuffers (); }
}
} }

View File

@ -3,8 +3,9 @@
* Nintendo Wii/Gamecube Port * Nintendo Wii/Gamecube Port
* *
* Tantric September 2008 * Tantric September 2008
* eke-eke October 2008
* *
* audio.h * gcaudio.h
* *
* Audio driver * Audio driver
****************************************************************************/ ****************************************************************************/

View File

@ -256,7 +256,7 @@ decodePrefsData (int method)
if(verMajor == '2' && verPoint < '3') // less than version 2.0.3 if(verMajor == '2' && verPoint < '3') // less than version 2.0.3
return false; // reset settings return false; // reset settings
else if(verMajor > '2' || verMinor > '0' || verPoint > '4') // some future version else if(verMajor > '2' || verMinor > '0' || verPoint > '5') // some future version
return false; // reset settings return false; // reset settings
// File Settings // File Settings