mirror of
https://github.com/clangen/musikcube.git
synced 2024-10-02 04:52:32 +00:00
Preserve typos in third-party code.
Should be fixed upstream.
This commit is contained in:
parent
5d2cc8151d
commit
d68b9e38fe
@ -503,7 +503,7 @@ typedef struct _CDROM_AUDIO_CONTROL {
|
|||||||
|
|
||||||
//
|
//
|
||||||
// Volume control - Volume takes a value between 1 and 0xFF.
|
// Volume control - Volume takes a value between 1 and 0xFF.
|
||||||
// SCSI-II CDROM audio supports up to 4 audio ports with
|
// SCSI-II CDROM audio suppports up to 4 audio ports with
|
||||||
// Independent volume control.
|
// Independent volume control.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
@ -154,7 +154,7 @@ typedef struct _STORAGE_HOTPLUG_INFO {
|
|||||||
// output - STORAGE_DEVICE_NUMBER structure
|
// output - STORAGE_DEVICE_NUMBER structure
|
||||||
// The values in the STORAGE_DEVICE_NUMBER structure are guaranteed
|
// The values in the STORAGE_DEVICE_NUMBER structure are guaranteed
|
||||||
// to remain unchanged until the system is rebooted. They are not
|
// to remain unchanged until the system is rebooted. They are not
|
||||||
// guaranteed to be persistent across boots.
|
// guaranteed to be persistant across boots.
|
||||||
//
|
//
|
||||||
|
|
||||||
typedef struct _STORAGE_DEVICE_NUMBER {
|
typedef struct _STORAGE_DEVICE_NUMBER {
|
||||||
@ -548,7 +548,7 @@ typedef struct _STORAGE_DEVICE_DESCRIPTOR {
|
|||||||
BOOLEAN RemovableMedia;
|
BOOLEAN RemovableMedia;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Flag indicating whether the device can support multiple outstanding
|
// Flag indicating whether the device can support mulitple outstanding
|
||||||
// commands. The actual synchronization in this case is the responsibility
|
// commands. The actual synchronization in this case is the responsibility
|
||||||
// of the port driver.
|
// of the port driver.
|
||||||
//
|
//
|
||||||
@ -727,7 +727,7 @@ typedef struct _STORAGE_MEDIA_SERIAL_NUMBER_DATA {
|
|||||||
|
|
||||||
//
|
//
|
||||||
// the following data is binary, and is not guaranteed
|
// the following data is binary, and is not guaranteed
|
||||||
// to be NULL terminated. this is an exercise for the
|
// to be NULL terminated. this is an excercise for the
|
||||||
// caller.
|
// caller.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
@ -107,7 +107,7 @@ we strip it out unless BLARGG_LEGACY is true. */
|
|||||||
|
|
||||||
/* BOOST::int8_t, BOOST::int32_t, etc.
|
/* BOOST::int8_t, BOOST::int32_t, etc.
|
||||||
I used BOOST since I originally was going to allow use of the boost library
|
I used BOOST since I originally was going to allow use of the boost library
|
||||||
for providing the definitions. If I'm defining them, they must be scoped or
|
for prividing the definitions. If I'm defining them, they must be scoped or
|
||||||
else they could conflict with the standard ones at global scope. Even if
|
else they could conflict with the standard ones at global scope. Even if
|
||||||
HAVE_STDINT_H isn't defined, I can't assume the typedefs won't exist at
|
HAVE_STDINT_H isn't defined, I can't assume the typedefs won't exist at
|
||||||
global scope already. */
|
global scope already. */
|
||||||
|
@ -33,10 +33,10 @@
|
|||||||
// Enable platform-specific optimizations.
|
// Enable platform-specific optimizations.
|
||||||
//#define BLARGG_NONPORTABLE 1
|
//#define BLARGG_NONPORTABLE 1
|
||||||
|
|
||||||
// Use faster sample rate converter for SPC music.
|
// Use faster sample rate convertor for SPC music.
|
||||||
//#define GME_SPC_FAST_RESAMPLER 1
|
//#define GME_SPC_FAST_RESAMPLER 1
|
||||||
|
|
||||||
// Use faster sample rate converter for VGM and GYM music.
|
// Use faster sample rate convertor for VGM and GYM music.
|
||||||
//#define GME_VGM_FAST_RESAMPLER 1
|
//#define GME_VGM_FAST_RESAMPLER 1
|
||||||
|
|
||||||
// Use faster, significantly lower quality sound synthesis for classic emulators.
|
// Use faster, significantly lower quality sound synthesis for classic emulators.
|
||||||
|
@ -101,7 +101,7 @@ namespace DBOPL {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
//How much to subtract from the base value for the final attenuation
|
//How much to substract from the base value for the final attenuation
|
||||||
static const Bit8u KslCreateTable[16] = {
|
static const Bit8u KslCreateTable[16] = {
|
||||||
//0 will always be be lower than 7 * 8
|
//0 will always be be lower than 7 * 8
|
||||||
64, 32, 24, 19,
|
64, 32, 24, 19,
|
||||||
@ -211,7 +211,7 @@ static void EnvelopeSelect( Bit8u val, Bit8u& index, Bit8u& shift ) {
|
|||||||
|
|
||||||
#if ( DBOPL_WAVE == WAVE_HANDLER )
|
#if ( DBOPL_WAVE == WAVE_HANDLER )
|
||||||
/*
|
/*
|
||||||
Generate the different waveforms out of the sine/exponential table using handlers
|
Generate the different waveforms out of the sine/exponetial table using handlers
|
||||||
*/
|
*/
|
||||||
static inline Bits MakeVolume( Bitu wave, Bitu volume ) {
|
static inline Bits MakeVolume( Bitu wave, Bitu volume ) {
|
||||||
Bitu total = wave + volume;
|
Bitu total = wave + volume;
|
||||||
@ -901,10 +901,10 @@ Channel* Channel::BlockTemplate( Chip* chip, Bit32u samples, Bit32s* output ) {
|
|||||||
//Early out for percussion handlers
|
//Early out for percussion handlers
|
||||||
if ( mode == sm2Percussion ) {
|
if ( mode == sm2Percussion ) {
|
||||||
GeneratePercussion<false>( chip, output + i );
|
GeneratePercussion<false>( chip, output + i );
|
||||||
continue; //Prevent some uninitialized value bitching
|
continue; //Prevent some unitialized value bitching
|
||||||
} else if ( mode == sm3Percussion ) {
|
} else if ( mode == sm3Percussion ) {
|
||||||
GeneratePercussion<true>( chip, output + i * 2 );
|
GeneratePercussion<true>( chip, output + i * 2 );
|
||||||
continue; //Prevent some uninitialized value bitching
|
continue; //Prevent some unitialized value bitching
|
||||||
}
|
}
|
||||||
|
|
||||||
//Do unsigned shift so we can shift out all bits but still stay in 10 bit range otherwise
|
//Do unsigned shift so we can shift out all bits but still stay in 10 bit range otherwise
|
||||||
@ -1437,7 +1437,7 @@ void InitTables( void ) {
|
|||||||
ChanOffsetTable[i] = 0;
|
ChanOffsetTable[i] = 0;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
//Make sure the four op channels follow each other
|
//Make sure the four op channels follow eachother
|
||||||
if ( index < 6 ) {
|
if ( index < 6 ) {
|
||||||
index = (index % 3) * 2 + ( index / 3 );
|
index = (index % 3) * 2 + ( index / 3 );
|
||||||
}
|
}
|
||||||
|
@ -379,7 +379,7 @@ static const UINT32 lfo_samples_per_step[8] = {108, 77, 71, 67, 62, 44, 8, 5};
|
|||||||
5.9 dB = 0, 1, 2, 3, 4, 5, 6, 7, 8....63, 63, 62, 61, 60, 59,.....2,1,0
|
5.9 dB = 0, 1, 2, 3, 4, 5, 6, 7, 8....63, 63, 62, 61, 60, 59,.....2,1,0
|
||||||
1.4 dB = 0, 0, 0, 0, 1, 1, 1, 1, 2,...15, 15, 15, 15, 14, 14,.....0,0,0
|
1.4 dB = 0, 0, 0, 0, 1, 1, 1, 1, 2,...15, 15, 15, 15, 14, 14,.....0,0,0
|
||||||
|
|
||||||
(1.4 dB is losing precision as you can see)
|
(1.4 dB is loosing precision as you can see)
|
||||||
|
|
||||||
It's implemented as generator from 0..126 with step 2 then a shift
|
It's implemented as generator from 0..126 with step 2 then a shift
|
||||||
right N times, where N is:
|
right N times, where N is:
|
||||||
@ -595,7 +595,7 @@ typedef struct
|
|||||||
|
|
||||||
UINT32 fc; /* fnum,blk:adjusted to sample rate */
|
UINT32 fc; /* fnum,blk:adjusted to sample rate */
|
||||||
UINT8 kcode; /* key code: */
|
UINT8 kcode; /* key code: */
|
||||||
UINT32 block_fnum; /* current blk/fnum value for this slot (can be different between slots of one channel in 3slot mode) */
|
UINT32 block_fnum; /* current blk/fnum value for this slot (can be different betweeen slots of one channel in 3slot mode) */
|
||||||
UINT8 Muted;
|
UINT8 Muted;
|
||||||
} FM_CH;
|
} FM_CH;
|
||||||
|
|
||||||
@ -624,7 +624,7 @@ typedef struct
|
|||||||
INT32 TBC; /* timer b counter */
|
INT32 TBC; /* timer b counter */
|
||||||
/* local time tables */
|
/* local time tables */
|
||||||
INT32 dt_tab[8][32]; /* DeTune table */
|
INT32 dt_tab[8][32]; /* DeTune table */
|
||||||
/* Extension Timer and IRQ handler */
|
/* Extention Timer and IRQ handler */
|
||||||
const ssg_callbacks *SSG;
|
const ssg_callbacks *SSG;
|
||||||
} FM_ST;
|
} FM_ST;
|
||||||
|
|
||||||
@ -640,7 +640,7 @@ typedef struct
|
|||||||
UINT32 fc[3]; /* fnum3,blk3: calculated */
|
UINT32 fc[3]; /* fnum3,blk3: calculated */
|
||||||
UINT8 fn_h; /* freq3 latch */
|
UINT8 fn_h; /* freq3 latch */
|
||||||
UINT8 kcode[3]; /* key code */
|
UINT8 kcode[3]; /* key code */
|
||||||
UINT32 block_fnum[3]; /* current fnum value for this slot (can be different between slots of one channel in 3slot mode) */
|
UINT32 block_fnum[3]; /* current fnum value for this slot (can be different betweeen slots of one channel in 3slot mode) */
|
||||||
} FM_3SLOT;
|
} FM_3SLOT;
|
||||||
|
|
||||||
/* OPN/A/B common state */
|
/* OPN/A/B common state */
|
||||||
@ -1083,7 +1083,7 @@ INLINE void advance_lfo(FM_OPN *OPN)
|
|||||||
|
|
||||||
/* update AM when LFO output changes */
|
/* update AM when LFO output changes */
|
||||||
|
|
||||||
/* actually I can't optimize is this way without rewriting chan_calc()
|
/* actually I can't optimize is this way without rewritting chan_calc()
|
||||||
to use chip->lfo_am instead of global lfo_am */
|
to use chip->lfo_am instead of global lfo_am */
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -1667,7 +1667,7 @@ static void FMCloseTable( void )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* CSM Key Control */
|
/* CSM Key Controll */
|
||||||
INLINE void CSMKeyControll(UINT8 type, FM_CH *CH)
|
INLINE void CSMKeyControll(UINT8 type, FM_CH *CH)
|
||||||
{
|
{
|
||||||
/* all key on then off (only for operators which were OFF!) */
|
/* all key on then off (only for operators which were OFF!) */
|
||||||
@ -1740,15 +1740,15 @@ static void FMsave_state_st(const device_config *device,FM_ST *ST)
|
|||||||
|
|
||||||
|
|
||||||
/* prescaler set (and make time tables) */
|
/* prescaler set (and make time tables) */
|
||||||
static void OPNSetPres(FM_OPN *OPN, int press, int timer_prescaler, int SSGpres)
|
static void OPNSetPres(FM_OPN *OPN, int pres, int timer_prescaler, int SSGpres)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
/* frequency base */
|
/* frequency base */
|
||||||
OPN->ST.freqbase = (OPN->ST.rate) ? ((double)OPN->ST.clock / OPN->ST.rate) / press : 0;
|
OPN->ST.freqbase = (OPN->ST.rate) ? ((double)OPN->ST.clock / OPN->ST.rate) / pres : 0;
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
OPN->ST.rate = (double)OPN->ST.clock / press;
|
OPN->ST.rate = (double)OPN->ST.clock / pres;
|
||||||
OPN->ST.freqbase = 1.0;
|
OPN->ST.freqbase = 1.0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -1942,7 +1942,7 @@ static void OPNWriteReg(FM_OPN *OPN, int r, int v)
|
|||||||
|
|
||||||
Important is that when switch to Attack phase occurs, the phase counter
|
Important is that when switch to Attack phase occurs, the phase counter
|
||||||
of that operator will be zeroed-out (as in normal KEY-ON) but not always.
|
of that operator will be zeroed-out (as in normal KEY-ON) but not always.
|
||||||
(I haven't found the rule for that - perhaps only when the output level is low)
|
(I havent found the rule for that - perhaps only when the output level is low)
|
||||||
|
|
||||||
The difference (when compared to normal Envelope Generator mode) is
|
The difference (when compared to normal Envelope Generator mode) is
|
||||||
that the resolution in Decay and Sustain phases is 4 times lower;
|
that the resolution in Decay and Sustain phases is 4 times lower;
|
||||||
@ -1964,7 +1964,7 @@ static void OPNWriteReg(FM_OPN *OPN, int r, int v)
|
|||||||
0 -6 = -6dB in non-inverted EG output
|
0 -6 = -6dB in non-inverted EG output
|
||||||
96-6 = -90dB in inverted EG output
|
96-6 = -90dB in inverted EG output
|
||||||
Which means that EG compares its level to SL as usual, and that the
|
Which means that EG compares its level to SL as usual, and that the
|
||||||
output is simply inverted after all.
|
output is simply inverted afterall.
|
||||||
|
|
||||||
|
|
||||||
The Yamaha's manuals say that AR should be set to 0x1f (max speed).
|
The Yamaha's manuals say that AR should be set to 0x1f (max speed).
|
||||||
@ -2220,7 +2220,7 @@ void ym2203_reset_chip(void *chip)
|
|||||||
FM_STATUS_RESET(&OPN->ST, 0xff);
|
FM_STATUS_RESET(&OPN->ST, 0xff);
|
||||||
|
|
||||||
reset_channels( &OPN->ST , F2203->CH , 3 );
|
reset_channels( &OPN->ST , F2203->CH , 3 );
|
||||||
/* reset OPerator parameter */
|
/* reset OPerator paramater */
|
||||||
for(i = 0xb2 ; i >= 0x30 ; i-- ) OPNWriteReg(OPN,i,0);
|
for(i = 0xb2 ; i >= 0x30 ; i-- ) OPNWriteReg(OPN,i,0);
|
||||||
for(i = 0x26 ; i >= 0x20 ; i-- ) OPNWriteReg(OPN,i,0);
|
for(i = 0x26 ; i >= 0x20 ; i-- ) OPNWriteReg(OPN,i,0);
|
||||||
}
|
}
|
||||||
@ -3285,7 +3285,7 @@ void ym2608_update_one(void *chip, FMSAMPLE **buffer, int length)
|
|||||||
FM_CH *cch[6];
|
FM_CH *cch[6];
|
||||||
INT32 *out_fm = OPN->out_fm;
|
INT32 *out_fm = OPN->out_fm;
|
||||||
|
|
||||||
/* set buffer */
|
/* set bufer */
|
||||||
bufL = buffer[0];
|
bufL = buffer[0];
|
||||||
bufR = buffer[1];
|
bufR = buffer[1];
|
||||||
|
|
||||||
@ -3486,7 +3486,7 @@ void * ym2608_init(void *param, int clock, int rate, const ssg_callbacks *ssg)
|
|||||||
F2608->deltaT.status_change_which_chip = F2608;
|
F2608->deltaT.status_change_which_chip = F2608;
|
||||||
F2608->deltaT.status_change_EOS_bit = 0x04; /* status flag: set bit2 on End Of Sample */
|
F2608->deltaT.status_change_EOS_bit = 0x04; /* status flag: set bit2 on End Of Sample */
|
||||||
F2608->deltaT.status_change_BRDY_bit = 0x08; /* status flag: set bit3 on BRDY */
|
F2608->deltaT.status_change_BRDY_bit = 0x08; /* status flag: set bit3 on BRDY */
|
||||||
F2608->deltaT.status_change_ZERO_bit = 0x10; /* status flag: set bit4 if silence continues for more than 290 milliseconds while recording the ADPCM */
|
F2608->deltaT.status_change_ZERO_bit = 0x10; /* status flag: set bit4 if silence continues for more than 290 miliseconds while recording the ADPCM */
|
||||||
|
|
||||||
/* ADPCM Rhythm */
|
/* ADPCM Rhythm */
|
||||||
F2608->pcmbuf = (UINT8*)YM2608_ADPCM_ROM;
|
F2608->pcmbuf = (UINT8*)YM2608_ADPCM_ROM;
|
||||||
@ -3543,7 +3543,7 @@ void ym2608_reset_chip(void *chip)
|
|||||||
FM_STATUS_RESET(&OPN->ST, 0xff);
|
FM_STATUS_RESET(&OPN->ST, 0xff);
|
||||||
|
|
||||||
reset_channels( &OPN->ST , F2608->CH , 6 );
|
reset_channels( &OPN->ST , F2608->CH , 6 );
|
||||||
/* reset OPerator parameter */
|
/* reset OPerator paramater */
|
||||||
for(i = 0xb6 ; i >= 0xb4 ; i-- )
|
for(i = 0xb6 ; i >= 0xb4 ; i-- )
|
||||||
{
|
{
|
||||||
OPNWriteReg(OPN,i ,0xc0);
|
OPNWriteReg(OPN,i ,0xc0);
|
||||||
@ -3721,9 +3721,9 @@ UINT8 ym2608_read(void *chip,int a)
|
|||||||
if(addr == 0x0f)
|
if(addr == 0x0f)
|
||||||
{
|
{
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
logerror("YM2608 A/D conversion is accessed but not implemented !\n");
|
logerror("YM2608 A/D convertion is accessed but not implemented !\n");
|
||||||
#endif
|
#endif
|
||||||
ret = 0x80; /* 2's complement PCM data - result from A/D conversion */
|
ret = 0x80; /* 2's complement PCM data - result from A/D convertion */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -3753,7 +3753,7 @@ int ym2608_timer_over(void *chip,int c)
|
|||||||
{ /* Timer A */
|
{ /* Timer A */
|
||||||
/* timer update */
|
/* timer update */
|
||||||
TimerAOver( &(F2608->OPN.ST) );
|
TimerAOver( &(F2608->OPN.ST) );
|
||||||
/* CSM mode key,TL control */
|
/* CSM mode key,TL controll */
|
||||||
if( F2608->OPN.ST.mode & 0x80 )
|
if( F2608->OPN.ST.mode & 0x80 )
|
||||||
{ /* CSM mode total level latch and auto key on */
|
{ /* CSM mode total level latch and auto key on */
|
||||||
CSMKeyControll( F2608->OPN.type, &(F2608->CH[2]) );
|
CSMKeyControll( F2608->OPN.type, &(F2608->CH[2]) );
|
||||||
@ -4250,7 +4250,7 @@ void ym2610_reset_chip(void *chip)
|
|||||||
FM_STATUS_RESET(&OPN->ST, 0xff);
|
FM_STATUS_RESET(&OPN->ST, 0xff);
|
||||||
|
|
||||||
reset_channels( &OPN->ST , F2610->CH , 6 );
|
reset_channels( &OPN->ST , F2610->CH , 6 );
|
||||||
/* reset OPerator parameter */
|
/* reset OPerator paramater */
|
||||||
for(i = 0xb6 ; i >= 0xb4 ; i-- )
|
for(i = 0xb6 ; i >= 0xb4 ; i-- )
|
||||||
{
|
{
|
||||||
OPNWriteReg(OPN,i ,0xc0);
|
OPNWriteReg(OPN,i ,0xc0);
|
||||||
@ -4286,7 +4286,7 @@ void ym2610_reset_chip(void *chip)
|
|||||||
/* DELTA-T unit */
|
/* DELTA-T unit */
|
||||||
DELTAT->freqbase = OPN->ST.freqbase;
|
DELTAT->freqbase = OPN->ST.freqbase;
|
||||||
DELTAT->output_pointer = OPN->out_delta;
|
DELTAT->output_pointer = OPN->out_delta;
|
||||||
DELTAT->portshift = 8; /* always 8bits shift */
|
DELTAT->portshift = 8; /* allways 8bits shift */
|
||||||
DELTAT->output_range = 1<<23;
|
DELTAT->output_range = 1<<23;
|
||||||
YM_DELTAT_ADPCM_Reset(DELTAT,OUTD_CENTER,YM_DELTAT_EMULATION_MODE_YM2610);
|
YM_DELTAT_ADPCM_Reset(DELTAT,OUTD_CENTER,YM_DELTAT_EMULATION_MODE_YM2610);
|
||||||
}
|
}
|
||||||
@ -4436,7 +4436,7 @@ int ym2610_timer_over(void *chip,int c)
|
|||||||
{ /* Timer A */
|
{ /* Timer A */
|
||||||
/* timer update */
|
/* timer update */
|
||||||
TimerAOver( &(F2610->OPN.ST) );
|
TimerAOver( &(F2610->OPN.ST) );
|
||||||
/* CSM mode key,TL control */
|
/* CSM mode key,TL controll */
|
||||||
if( F2610->OPN.ST.mode & 0x80 )
|
if( F2610->OPN.ST.mode & 0x80 )
|
||||||
{ /* CSM mode total level latch and auto key on */
|
{ /* CSM mode total level latch and auto key on */
|
||||||
CSMKeyControll( F2610->OPN.type, &(F2610->CH[2]) );
|
CSMKeyControll( F2610->OPN.type, &(F2610->CH[2]) );
|
||||||
|
@ -25,7 +25,7 @@ extern "C" {
|
|||||||
#define FM_INTERNAL_TIMER 1
|
#define FM_INTERNAL_TIMER 1
|
||||||
|
|
||||||
/* --- speedup optimize --- */
|
/* --- speedup optimize --- */
|
||||||
/* busy flag emulation , The definition of FM_GET_TIME_NOW() is necessary. */
|
/* busy flag enulation , The definition of FM_GET_TIME_NOW() is necessary. */
|
||||||
//#define FM_BUSY_FLAG_SUPPORT 1
|
//#define FM_BUSY_FLAG_SUPPORT 1
|
||||||
|
|
||||||
|
|
||||||
@ -44,7 +44,7 @@ typedef unsigned char FMSAMPLE;
|
|||||||
/* int n = chip number */
|
/* int n = chip number */
|
||||||
/* int c = Channel 0=TimerA,1=TimerB */
|
/* int c = Channel 0=TimerA,1=TimerB */
|
||||||
/* int count = timer count (0=stop) */
|
/* int count = timer count (0=stop) */
|
||||||
/* double stepTime = step time of one count (sec.)*/
|
/* doube stepTime = step time of one count (sec.)*/
|
||||||
|
|
||||||
/* FM_IRQHHANDLER : IRQ level changing sense */
|
/* FM_IRQHHANDLER : IRQ level changing sense */
|
||||||
/* int n = chip number */
|
/* int n = chip number */
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
**
|
**
|
||||||
** 2006~2009 Eke-Eke (Genesis Plus GX):
|
** 2006~2009 Eke-Eke (Genesis Plus GX):
|
||||||
** Huge thanks to Nemesis, lot of those fixes came from his tests on Sega Genesis hardware
|
** Huge thanks to Nemesis, lot of those fixes came from his tests on Sega Genesis hardware
|
||||||
** More information at http://gendev.spritesmind.net/forum/viewtopic.php?t=386
|
** More informations at http://gendev.spritesmind.net/forum/viewtopic.php?t=386
|
||||||
**
|
**
|
||||||
** TODO:
|
** TODO:
|
||||||
**
|
**
|
||||||
@ -26,7 +26,7 @@
|
|||||||
**
|
**
|
||||||
** - fixed LFO implementation:
|
** - fixed LFO implementation:
|
||||||
** .added support for CH3 special mode: fixes various sound effects (birds in Warlock, bug sound in Aladdin...)
|
** .added support for CH3 special mode: fixes various sound effects (birds in Warlock, bug sound in Aladdin...)
|
||||||
** .modified LFO behavior when switched off (AM/PM current level is held) and on (LFO step is reset): fixes intro in Spider-Man & Venom : Separation Anxiety
|
** .modified LFO behavior when switched off (AM/PM current level is held) and on (LFO step is reseted): fixes intro in Spider-Man & Venom : Separation Anxiety
|
||||||
** .improved LFO timing accuracy: now updated AFTER sample output, like EG/PG updates, and without any precision loss anymore.
|
** .improved LFO timing accuracy: now updated AFTER sample output, like EG/PG updates, and without any precision loss anymore.
|
||||||
** - improved internal timers emulation
|
** - improved internal timers emulation
|
||||||
** - adjusted lowest EG rates increment values
|
** - adjusted lowest EG rates increment values
|
||||||
@ -385,7 +385,7 @@ static const UINT32 lfo_samples_per_step[8] = {108, 77, 71, 67, 62, 44, 8, 5};
|
|||||||
5.9 dB = 0, 1, 2, 3, 4, 5, 6, 7, 8....63, 63, 62, 61, 60, 59,.....2,1,0
|
5.9 dB = 0, 1, 2, 3, 4, 5, 6, 7, 8....63, 63, 62, 61, 60, 59,.....2,1,0
|
||||||
1.4 dB = 0, 0, 0, 0, 1, 1, 1, 1, 2,...15, 15, 15, 15, 14, 14,.....0,0,0
|
1.4 dB = 0, 0, 0, 0, 1, 1, 1, 1, 2,...15, 15, 15, 15, 14, 14,.....0,0,0
|
||||||
|
|
||||||
(1.4 dB is losing precision as you can see)
|
(1.4 dB is loosing precision as you can see)
|
||||||
|
|
||||||
It's implemented as generator from 0..126 with step 2 then a shift
|
It's implemented as generator from 0..126 with step 2 then a shift
|
||||||
right N times, where N is:
|
right N times, where N is:
|
||||||
@ -597,7 +597,7 @@ typedef struct
|
|||||||
|
|
||||||
UINT32 fc; /* fnum,blk:adjusted to sample rate */
|
UINT32 fc; /* fnum,blk:adjusted to sample rate */
|
||||||
UINT8 kcode; /* key code: */
|
UINT8 kcode; /* key code: */
|
||||||
UINT32 block_fnum; /* current blk/fnum value for this slot (can be different between slots of one channel in 3slot mode) */
|
UINT32 block_fnum; /* current blk/fnum value for this slot (can be different betweeen slots of one channel in 3slot mode) */
|
||||||
UINT8 Muted;
|
UINT8 Muted;
|
||||||
} FM_CH;
|
} FM_CH;
|
||||||
|
|
||||||
@ -625,7 +625,7 @@ typedef struct
|
|||||||
INT32 TBC; /* timer b counter */
|
INT32 TBC; /* timer b counter */
|
||||||
/* local time tables */
|
/* local time tables */
|
||||||
INT32 dt_tab[8][32]; /* DeTune table */
|
INT32 dt_tab[8][32]; /* DeTune table */
|
||||||
/* Extension Timer and IRQ handler */
|
/* Extention Timer and IRQ handler */
|
||||||
} FM_ST;
|
} FM_ST;
|
||||||
|
|
||||||
|
|
||||||
@ -640,7 +640,7 @@ typedef struct
|
|||||||
UINT32 fc[3]; /* fnum3,blk3: calculated */
|
UINT32 fc[3]; /* fnum3,blk3: calculated */
|
||||||
UINT8 fn_h; /* freq3 latch */
|
UINT8 fn_h; /* freq3 latch */
|
||||||
UINT8 kcode[3]; /* key code */
|
UINT8 kcode[3]; /* key code */
|
||||||
UINT32 block_fnum[3]; /* current fnum value for this slot (can be different between slots of one channel in 3slot mode) */
|
UINT32 block_fnum[3]; /* current fnum value for this slot (can be different betweeen slots of one channel in 3slot mode) */
|
||||||
UINT8 key_csm; /* CSM mode Key-ON flag */
|
UINT8 key_csm; /* CSM mode Key-ON flag */
|
||||||
} FM_3SLOT;
|
} FM_3SLOT;
|
||||||
|
|
||||||
@ -1693,7 +1693,7 @@ static void FMCloseTable( void )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* CSM Key Control */
|
/* CSM Key Controll */
|
||||||
INLINE void CSMKeyControll(FM_OPN *OPN, FM_CH *CH)
|
INLINE void CSMKeyControll(FM_OPN *OPN, FM_CH *CH)
|
||||||
{
|
{
|
||||||
/* all key ON (verified by Nemesis on real hardware) */
|
/* all key ON (verified by Nemesis on real hardware) */
|
||||||
@ -1910,7 +1910,7 @@ static void OPNWriteReg(FM_OPN *OPN, int r, int v)
|
|||||||
|
|
||||||
Important is that when switch to Attack phase occurs, the phase counter
|
Important is that when switch to Attack phase occurs, the phase counter
|
||||||
of that operator will be zeroed-out (as in normal KEY-ON) but not always.
|
of that operator will be zeroed-out (as in normal KEY-ON) but not always.
|
||||||
(I haven't found the rule for that - perhaps only when the output level is low)
|
(I havent found the rule for that - perhaps only when the output level is low)
|
||||||
|
|
||||||
The difference (when compared to normal Envelope Generator mode) is
|
The difference (when compared to normal Envelope Generator mode) is
|
||||||
that the resolution in Decay and Sustain phases is 4 times lower;
|
that the resolution in Decay and Sustain phases is 4 times lower;
|
||||||
@ -1932,7 +1932,7 @@ static void OPNWriteReg(FM_OPN *OPN, int r, int v)
|
|||||||
0 -6 = -6dB in non-inverted EG output
|
0 -6 = -6dB in non-inverted EG output
|
||||||
96-6 = -90dB in inverted EG output
|
96-6 = -90dB in inverted EG output
|
||||||
Which means that EG compares its level to SL as usual, and that the
|
Which means that EG compares its level to SL as usual, and that the
|
||||||
output is simply inverted after all.
|
output is simply inverted afterall.
|
||||||
|
|
||||||
|
|
||||||
The Yamaha's manuals say that AR should be set to 0x1f (max speed).
|
The Yamaha's manuals say that AR should be set to 0x1f (max speed).
|
||||||
@ -2051,10 +2051,10 @@ static void init_timetables(FM_OPN *OPN, double freqbase)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* prescaler set (and make time tables) */
|
/* prescaler set (and make time tables) */
|
||||||
static void OPNSetPres(FM_OPN *OPN, int press, int timer_prescaler, int SSGpres)
|
static void OPNSetPres(FM_OPN *OPN, int pres, int timer_prescaler, int SSGpres)
|
||||||
{
|
{
|
||||||
/* frequency base */
|
/* frequency base */
|
||||||
OPN->ST.freqbase = (OPN->ST.rate) ? ((double)OPN->ST.clock / OPN->ST.rate) / press : 0;
|
OPN->ST.freqbase = (OPN->ST.rate) ? ((double)OPN->ST.clock / OPN->ST.rate) / pres : 0;
|
||||||
if ( fabs( OPN->ST.freqbase - 1.0 ) < 0.0001 )
|
if ( fabs( OPN->ST.freqbase - 1.0 ) < 0.0001 )
|
||||||
OPN->ST.freqbase = 1.0;
|
OPN->ST.freqbase = 1.0;
|
||||||
|
|
||||||
@ -2221,7 +2221,7 @@ void ym2612_update_one(void *chip, FMSAMPLE **buffer, int length)
|
|||||||
FM_CH *cch[6];
|
FM_CH *cch[6];
|
||||||
int lt,rt;
|
int lt,rt;
|
||||||
|
|
||||||
/* set buffer */
|
/* set bufer */
|
||||||
bufL = buffer[0];
|
bufL = buffer[0];
|
||||||
bufR = buffer[1];
|
bufR = buffer[1];
|
||||||
|
|
||||||
@ -2380,7 +2380,7 @@ void ym2612_update_one(void *chip, FMSAMPLE **buffer, int length)
|
|||||||
bufL[i] = F2612->WaveL;
|
bufL[i] = F2612->WaveL;
|
||||||
bufR[i] = F2612->WaveR;
|
bufR[i] = F2612->WaveR;
|
||||||
|
|
||||||
/* CSM mode: if CSM Key ON has occurred, CSM Key OFF need to be sent */
|
/* CSM mode: if CSM Key ON has occured, CSM Key OFF need to be sent */
|
||||||
/* only if Timer A does not overflow again (i.e CSM Key ON not set again) */
|
/* only if Timer A does not overflow again (i.e CSM Key ON not set again) */
|
||||||
OPN->SL3.key_csm <<= 1;
|
OPN->SL3.key_csm <<= 1;
|
||||||
|
|
||||||
@ -2602,7 +2602,7 @@ int ym2612_timer_over(void *chip,int c)
|
|||||||
{ /* Timer A */
|
{ /* Timer A */
|
||||||
/* timer update */
|
/* timer update */
|
||||||
TimerAOver( &(F2612->OPN.ST) );
|
TimerAOver( &(F2612->OPN.ST) );
|
||||||
/* CSM mode key,TL control */
|
/* CSM mode key,TL controll */
|
||||||
if ((F2612->OPN.ST.mode & 0xc0) == 0x80)
|
if ((F2612->OPN.ST.mode & 0xc0) == 0x80)
|
||||||
{ /* CSM mode total level latch and auto key on */
|
{ /* CSM mode total level latch and auto key on */
|
||||||
CSMKeyControll( &F2612->OPN, &(F2612->CH[2]) );
|
CSMKeyControll( &F2612->OPN, &(F2612->CH[2]) );
|
||||||
|
@ -552,7 +552,7 @@ static unsigned int sin_tab[SIN_LEN * 4];
|
|||||||
The whole table takes: 64 * 210 = 13440 samples.
|
The whole table takes: 64 * 210 = 13440 samples.
|
||||||
|
|
||||||
When AM = 1 data is used directly
|
When AM = 1 data is used directly
|
||||||
When AM = 0 data is divided by 4 before being used (losing precision is important)
|
When AM = 0 data is divided by 4 before being used (loosing precision is important)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define LFO_AM_TAB_ELEMENTS 210
|
#define LFO_AM_TAB_ELEMENTS 210
|
||||||
@ -2123,8 +2123,8 @@ static unsigned char OPLRead(FM_OPL *OPL,int a)
|
|||||||
case 0x1a: /* PCM-DATA */
|
case 0x1a: /* PCM-DATA */
|
||||||
if(OPL->type&OPL_TYPE_ADPCM)
|
if(OPL->type&OPL_TYPE_ADPCM)
|
||||||
{
|
{
|
||||||
/*logerror("Y8950 A/D conversion is accessed but not implemented !\n");*/
|
/*logerror("Y8950 A/D convertion is accessed but not implemented !\n");*/
|
||||||
return 0x80; /* 2's complement PCM data - result from A/D conversion */
|
return 0x80; /* 2's complement PCM data - result from A/D convertion */
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -2133,7 +2133,7 @@ static unsigned char OPLRead(FM_OPL *OPL,int a)
|
|||||||
return 0xff;
|
return 0xff;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* CSM Key Control */
|
/* CSM Key Controll */
|
||||||
INLINE void CSMKeyControll(OPL_CH *CH)
|
INLINE void CSMKeyControll(OPL_CH *CH)
|
||||||
{
|
{
|
||||||
FM_KEYON (&CH->SLOT[SLOT1], 4);
|
FM_KEYON (&CH->SLOT[SLOT1], 4);
|
||||||
@ -2155,7 +2155,7 @@ static int OPLTimerOver(FM_OPL *OPL,int c)
|
|||||||
else
|
else
|
||||||
{ /* Timer A */
|
{ /* Timer A */
|
||||||
OPL_STATUS_SET(OPL,0x40);
|
OPL_STATUS_SET(OPL,0x40);
|
||||||
/* CSM mode key,TL control */
|
/* CSM mode key,TL controll */
|
||||||
if( OPL->mode & 0x80 )
|
if( OPL->mode & 0x80 )
|
||||||
{ /* CSM mode total level latch and auto key on */
|
{ /* CSM mode total level latch and auto key on */
|
||||||
int ch;
|
int ch;
|
||||||
|
@ -110,7 +110,7 @@ void SMP::op_buswrite(uint16_t addr, uint8_t data) {
|
|||||||
sfm_last[ 3 ] = 0;
|
sfm_last[ 3 ] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//0->1 transition resets timers
|
//0->1 transistion resets timers
|
||||||
if(timer2.enable == false && (data & 0x04)) {
|
if(timer2.enable == false && (data & 0x04)) {
|
||||||
timer2.stage2_ticks = 0;
|
timer2.stage2_ticks = 0;
|
||||||
timer2.stage3_ticks = 0;
|
timer2.stage3_ticks = 0;
|
||||||
|
@ -170,7 +170,7 @@ void k053260_update(void *chip, stream_sample_t **outputs, int samples)
|
|||||||
|
|
||||||
if ( ppcm[i] ) { /* Packed PCM */
|
if ( ppcm[i] ) { /* Packed PCM */
|
||||||
/* we only update the signal if we're starting or a real sound sample has gone by */
|
/* we only update the signal if we're starting or a real sound sample has gone by */
|
||||||
/* this is all due to the dynamic sample rate conversion */
|
/* this is all due to the dynamic sample rate convertion */
|
||||||
if ( pos[i] == 0 || ( ( pos[i] ^ ( pos[i] - delta[i] ) ) & 0x8000 ) == 0x8000 )
|
if ( pos[i] == 0 || ( ( pos[i] ^ ( pos[i] - delta[i] ) ) & 0x8000 ) == 0x8000 )
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -46,7 +46,7 @@ void k054539_init_flags(void *, int flags);
|
|||||||
Note that the eight PCM channels of a K054539 do not have separate
|
Note that the eight PCM channels of a K054539 do not have separate
|
||||||
volume controls. Considering the global attenuation equation may not
|
volume controls. Considering the global attenuation equation may not
|
||||||
be entirely accurate, k054539_set_gain() provides means to control
|
be entirely accurate, k054539_set_gain() provides means to control
|
||||||
channel gain. It can be called anywhere but preferably from
|
channel gain. It can be called anywhere but preferrably from
|
||||||
DRIVER_INIT().
|
DRIVER_INIT().
|
||||||
|
|
||||||
Parameters:
|
Parameters:
|
||||||
|
@ -26,7 +26,7 @@ typedef struct {
|
|||||||
Int32 level32;
|
Int32 level32;
|
||||||
Uint8 key;
|
Uint8 key;
|
||||||
Uint8 level;
|
Uint8 level;
|
||||||
Uint8 granularity;
|
Uint8 granuality;
|
||||||
Uint8 pad4_3;
|
Uint8 pad4_3;
|
||||||
Uint8 regs[0x10];
|
Uint8 regs[0x10];
|
||||||
} common;
|
} common;
|
||||||
@ -150,7 +150,7 @@ static void sndwrite(YMDELTATPCMSOUND *sndp, Uint32 a, Uint32 v)
|
|||||||
break;
|
break;
|
||||||
case 0x02: /* Start Address L */
|
case 0x02: /* Start Address L */
|
||||||
case 0x03: /* Start Address H */
|
case 0x03: /* Start Address H */
|
||||||
sndp->common.granularity = (v & 2) ? 1 : 4;
|
sndp->common.granuality = (v & 2) ? 1 : 4;
|
||||||
sndp->common.start = ((sndp->common.regs[3] << 8) + sndp->common.regs[2]) << (sndp->memshift + 1);
|
sndp->common.start = ((sndp->common.regs[3] << 8) + sndp->common.regs[2]) << (sndp->memshift + 1);
|
||||||
sndp->common.mem = sndp->common.start;
|
sndp->common.mem = sndp->common.start;
|
||||||
break;
|
break;
|
||||||
@ -189,7 +189,7 @@ static void sndreset(YMDELTATPCMSOUND *sndp, Uint32 clock, Uint32 freq)
|
|||||||
sndp->common.cps = DivFix(clock, 72 * freq, CPS_SHIFT);
|
sndp->common.cps = DivFix(clock, 72 * freq, CPS_SHIFT);
|
||||||
sndp->romrambuf = (sndp->common.regs[1] & 1) ? sndp->rombuf : sndp->rambuf;
|
sndp->romrambuf = (sndp->common.regs[1] & 1) ? sndp->rombuf : sndp->rambuf;
|
||||||
sndp->romrammask = (sndp->common.regs[1] & 1) ? sndp->rommask : sndp->rammask;
|
sndp->romrammask = (sndp->common.regs[1] & 1) ? sndp->rommask : sndp->rammask;
|
||||||
sndp->common.granularity = 4;
|
sndp->common.granuality = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sndvolume(YMDELTATPCMSOUND *sndp, Int32 volume)
|
static void sndvolume(YMDELTATPCMSOUND *sndp, Int32 volume)
|
||||||
|
@ -107,7 +107,7 @@ typedef struct
|
|||||||
|
|
||||||
UINT32 csm_req; /* CSM KEY ON / KEY OFF sequence request */
|
UINT32 csm_req; /* CSM KEY ON / KEY OFF sequence request */
|
||||||
|
|
||||||
UINT32 irq_enable; /* IRQ enable for timer B (bit 3) and timer A (bit 2); bit 7 - CSM mode (keyon to all slots, every time timer A overflows) */
|
UINT32 irq_enable; /* IRQ enable for timer B (bit 3) and timer A (bit 2); bit 7 - CSM mode (keyon to all slots, everytime timer A overflows) */
|
||||||
UINT32 status; /* chip status (BUSY, IRQ Flags) */
|
UINT32 status; /* chip status (BUSY, IRQ Flags) */
|
||||||
UINT8 connect[8]; /* channels connections */
|
UINT8 connect[8]; /* channels connections */
|
||||||
|
|
||||||
@ -415,7 +415,7 @@ static const UINT16 phaseinc_rom[768]={
|
|||||||
|
|
||||||
Here are just 256 samples out of much longer data.
|
Here are just 256 samples out of much longer data.
|
||||||
|
|
||||||
It does NOT repeat every 256 samples on real chip and I wasn't able to find
|
It does NOT repeat every 256 samples on real chip and I wasnt able to find
|
||||||
the point where it repeats (even in strings as long as 131072 samples).
|
the point where it repeats (even in strings as long as 131072 samples).
|
||||||
|
|
||||||
I only put it here because its better than nothing and perhaps
|
I only put it here because its better than nothing and perhaps
|
||||||
@ -1399,7 +1399,7 @@ Two LSBs of the 'rate' above are the value 'x' (the shape type).
|
|||||||
(eg. '11 2' means that 'rate' is 11*4+2=46)
|
(eg. '11 2' means that 'rate' is 11*4+2=46)
|
||||||
|
|
||||||
NOTE: A 'sample' in the description below is actually 3 output samples,
|
NOTE: A 'sample' in the description below is actually 3 output samples,
|
||||||
that's because the Envelope Generator clock is equal to internal_clock/3.
|
thats because the Envelope Generator clock is equal to internal_clock/3.
|
||||||
|
|
||||||
Single '-' (minus) character in the diagrams below represents one sample
|
Single '-' (minus) character in the diagrams below represents one sample
|
||||||
on the output; this is for rates 11 x (11 0, 11 1, 11 2 and 11 3)
|
on the output; this is for rates 11 x (11 0, 11 1, 11 2 and 11 3)
|
||||||
@ -1831,7 +1831,7 @@ INLINE void advance(YM2151 *PSG)
|
|||||||
* the sound played is the same as after normal KEY ON.
|
* the sound played is the same as after normal KEY ON.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (PSG->csm_req) /* CSM KEYON/KEYOFF sequence request */
|
if (PSG->csm_req) /* CSM KEYON/KEYOFF seqeunce request */
|
||||||
{
|
{
|
||||||
if (PSG->csm_req==2) /* KEY ON */
|
if (PSG->csm_req==2) /* KEY ON */
|
||||||
{
|
{
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
** I would like to thank following people for making this project possible:
|
** I would like to thank following people for making this project possible:
|
||||||
**
|
**
|
||||||
** Beauty Planets - for making a lot of real YM2151 samples and providing
|
** Beauty Planets - for making a lot of real YM2151 samples and providing
|
||||||
** additional information about the chip. Also for the time spent making
|
** additional informations about the chip. Also for the time spent making
|
||||||
** the samples and the speed of replying to my endless requests.
|
** the samples and the speed of replying to my endless requests.
|
||||||
**
|
**
|
||||||
** Shigeharu Isoda - for general help, for taking time to scan his YM2151
|
** Shigeharu Isoda - for general help, for taking time to scan his YM2151
|
||||||
|
@ -636,7 +636,7 @@ INLINE void advance(YM2413 *chip)
|
|||||||
case EG_DMP: /* dump phase */
|
case EG_DMP: /* dump phase */
|
||||||
/*dump phase is performed by both operators in each channel*/
|
/*dump phase is performed by both operators in each channel*/
|
||||||
/*when CARRIER envelope gets down to zero level,
|
/*when CARRIER envelope gets down to zero level,
|
||||||
** phases in BOTH operators are reset (at the same time ?)
|
** phases in BOTH opearators are reset (at the same time ?)
|
||||||
*/
|
*/
|
||||||
if ( !(chip->eg_cnt & ((1<<op->eg_sh_dp)-1) ) )
|
if ( !(chip->eg_cnt & ((1<<op->eg_sh_dp)-1) ) )
|
||||||
{
|
{
|
||||||
|
@ -226,7 +226,7 @@ value: START, REC, MEMDAT, REPEAT, SPOFF, x,x,RESET meaning:
|
|||||||
if( DELTAT->portstate&0x20 ) /* do we access external memory? */
|
if( DELTAT->portstate&0x20 ) /* do we access external memory? */
|
||||||
{
|
{
|
||||||
DELTAT->now_addr = DELTAT->start << 1;
|
DELTAT->now_addr = DELTAT->start << 1;
|
||||||
DELTAT->memread = 2; /* two dummy reads needed before accessing external memory via register $08*/
|
DELTAT->memread = 2; /* two dummy reads needed before accesing external memory via register $08*/
|
||||||
|
|
||||||
/* if yes, then let's check if ADPCM memory is mapped and big enough */
|
/* if yes, then let's check if ADPCM memory is mapped and big enough */
|
||||||
if(DELTAT->memory == 0)
|
if(DELTAT->memory == 0)
|
||||||
|
@ -65,8 +65,8 @@ typedef struct deltat_adpcm_state { /* AT: rearranged and tigntened structur
|
|||||||
*/
|
*/
|
||||||
void * status_change_which_chip; /* this chip id */
|
void * status_change_which_chip; /* this chip id */
|
||||||
UINT8 status_change_EOS_bit; /* 1 on End Of Sample (record/playback/cycle time of AD/DA converting has passed)*/
|
UINT8 status_change_EOS_bit; /* 1 on End Of Sample (record/playback/cycle time of AD/DA converting has passed)*/
|
||||||
UINT8 status_change_BRDY_bit; /* 1 after recording 2 data (2x4bits) or after reading/writing 1 data */
|
UINT8 status_change_BRDY_bit; /* 1 after recording 2 datas (2x4bits) or after reading/writing 1 data */
|
||||||
UINT8 status_change_ZERO_bit; /* 1 if silence lasts for more than 290 milliseconds on ADPCM recording */
|
UINT8 status_change_ZERO_bit; /* 1 if silence lasts for more than 290 miliseconds on ADPCM recording */
|
||||||
|
|
||||||
/* neither Y8950 nor YM2608 can generate IRQ when PCMBSY bit changes, so instead of above,
|
/* neither Y8950 nor YM2608 can generate IRQ when PCMBSY bit changes, so instead of above,
|
||||||
** the statusflag gets ORed with PCM_BSY (below) (on each read of statusflag of Y8950 and YM2608)
|
** the statusflag gets ORed with PCM_BSY (below) (on each read of statusflag of Y8950 and YM2608)
|
||||||
|
@ -223,7 +223,7 @@ LIBOPENMPT_API void openmpt_free_string( const char * str );
|
|||||||
* - "source_revision": original source code revision
|
* - "source_revision": original source code revision
|
||||||
* - "source_is_modified": "1" if the original source has been modified
|
* - "source_is_modified": "1" if the original source has been modified
|
||||||
* - "source_has_mixed_revisions": "1" if the original source has been compiled from different various revision
|
* - "source_has_mixed_revisions": "1" if the original source has been compiled from different various revision
|
||||||
* - "source_is_package": "1" if the original source has been obtained from a source package instead of source code version control
|
* - "source_is_package": "1" if the original source has been obtained from a source pacakge instead of source code version control
|
||||||
* - "build": information about the current build (e.g. the build date or compiler used)
|
* - "build": information about the current build (e.g. the build date or compiler used)
|
||||||
* - "build_compiler": information about the compiler used to build libopenmpt
|
* - "build_compiler": information about the compiler used to build libopenmpt
|
||||||
* - "credits": all contributors
|
* - "credits": all contributors
|
||||||
@ -550,7 +550,7 @@ LIBOPENMPT_API LIBOPENMPT_DEPRECATED double openmpt_could_open_propability( open
|
|||||||
*/
|
*/
|
||||||
LIBOPENMPT_API double openmpt_could_open_probability2( openmpt_stream_callbacks stream_callbacks, void * stream, double effort, openmpt_log_func logfunc, void * loguser, openmpt_error_func errfunc, void * erruser, int * error, const char * * error_message );
|
LIBOPENMPT_API double openmpt_could_open_probability2( openmpt_stream_callbacks stream_callbacks, void * stream, double effort, openmpt_log_func logfunc, void * loguser, openmpt_error_func errfunc, void * erruser, int * error, const char * * error_message );
|
||||||
|
|
||||||
/*! \brief Get recommended header size for successful format probing
|
/*! \brief Get recommended header size for successfull format probing
|
||||||
*
|
*
|
||||||
* \sa openmpt_probe_file_header()
|
* \sa openmpt_probe_file_header()
|
||||||
* \sa openmpt_probe_file_header_without_filesize()
|
* \sa openmpt_probe_file_header_without_filesize()
|
||||||
@ -613,7 +613,7 @@ LIBOPENMPT_API int openmpt_probe_file_header( uint64_t flags, const void * data,
|
|||||||
* \param erruser Error function user context. Used to pass any user-defined data associated with this module to the logging function.
|
* \param erruser Error function user context. Used to pass any user-defined data associated with this module to the logging function.
|
||||||
* \param error Pointer to an integer where an error may get stored. May be NULL.
|
* \param error Pointer to an integer where an error may get stored. May be NULL.
|
||||||
* \param error_message Pointer to a string pointer where an error message may get stored. May be NULL.
|
* \param error_message Pointer to a string pointer where an error message may get stored. May be NULL.
|
||||||
* \remarks It is recommended to use openmpt_probe_file_header() and provide the actual file's size as a parameter if at all possible. libopenmpt can provide more accurate answers if the filesize is known.
|
* \remarks It is recommended to use openmpt_probe_file_header() and provide the acutal file's size as a parameter if at all possible. libopenmpt can provide more accurate answers if the filesize is known.
|
||||||
* \remarks It is recommended to provide openmpt_probe_file_header_get_recommended_size() bytes of data for data and size. If the file is smaller, only provide the filesize amount and set size to the file's size.
|
* \remarks It is recommended to provide openmpt_probe_file_header_get_recommended_size() bytes of data for data and size. If the file is smaller, only provide the filesize amount and set size to the file's size.
|
||||||
* \remarks openmpt_could_open_probability2() provides a more elaborate interface that might be required for special use cases. It is recommended to use openmpt_probe_file_header() though, if possible.
|
* \remarks openmpt_could_open_probability2() provides a more elaborate interface that might be required for special use cases. It is recommended to use openmpt_probe_file_header() though, if possible.
|
||||||
* \retval OPENMPT_PROBE_FILE_HEADER_RESULT_SUCCESS The file will most likely be supported by libopenmpt.
|
* \retval OPENMPT_PROBE_FILE_HEADER_RESULT_SUCCESS The file will most likely be supported by libopenmpt.
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
*
|
*
|
||||||
* \section libopenmpt_cpp_error Error Handling
|
* \section libopenmpt_cpp_error Error Handling
|
||||||
*
|
*
|
||||||
* libopenmpt C++ uses C++ exception handling for error reporting.
|
* libopenmpt C++ uses C++ exception handling for errror reporting.
|
||||||
*
|
*
|
||||||
* Unless otherwise noted, any libopenmpt function may throw exceptions and
|
* Unless otherwise noted, any libopenmpt function may throw exceptions and
|
||||||
* all exceptions thrown by libopenmpt itself are derived from
|
* all exceptions thrown by libopenmpt itself are derived from
|
||||||
@ -207,7 +207,7 @@ static const char license LIBOPENMPT_ATTR_DEPRECATED [] = "license";
|
|||||||
- "source_revision": original source code revision
|
- "source_revision": original source code revision
|
||||||
- "source_is_modified": "1" if the original source has been modified
|
- "source_is_modified": "1" if the original source has been modified
|
||||||
- "source_has_mixed_revisions": "1" if the original source has been compiled from different various revision
|
- "source_has_mixed_revisions": "1" if the original source has been compiled from different various revision
|
||||||
- "source_is_package": "1" if the original source has been obtained from a source package instead of source code version control
|
- "source_is_package": "1" if the original source has been obtained from a source pacakge instead of source code version control
|
||||||
- "build": information about the current build (e.g. the build date or compiler used)
|
- "build": information about the current build (e.g. the build date or compiler used)
|
||||||
- "build_compiler": information about the compiler used to build libopenmpt
|
- "build_compiler": information about the compiler used to build libopenmpt
|
||||||
- "credits": all contributors
|
- "credits": all contributors
|
||||||
@ -265,7 +265,7 @@ LIBOPENMPT_CXX_API double could_open_probability( std::istream & stream, double
|
|||||||
*/
|
*/
|
||||||
LIBOPENMPT_ATTR_DEPRECATED LIBOPENMPT_CXX_API double could_open_propability( std::istream & stream, double effort = 1.0, std::ostream & log = std::clog );
|
LIBOPENMPT_ATTR_DEPRECATED LIBOPENMPT_CXX_API double could_open_propability( std::istream & stream, double effort = 1.0, std::ostream & log = std::clog );
|
||||||
|
|
||||||
//! Get recommended header size for successful format probing
|
//! Get recommended header size for successfull format probing
|
||||||
/*!
|
/*!
|
||||||
\sa openmpt::probe_file_header()
|
\sa openmpt::probe_file_header()
|
||||||
\since 0.3.0
|
\since 0.3.0
|
||||||
|
@ -189,7 +189,7 @@ typedef struct openmpt_module_ext_interface_interactive {
|
|||||||
* \param factor The new pitch factor in range ]0.0, 4.0] - 1.0 means unmodified pitch.
|
* \param factor The new pitch factor in range ]0.0, 4.0] - 1.0 means unmodified pitch.
|
||||||
* \return 1 on success, 0 on failure.
|
* \return 1 on success, 0 on failure.
|
||||||
* \remarks Modifying the pitch without applying the the same tempo factor using openmpt_module_ext_interface_interactive::set_tempo_factor may cause rhythmic samples (e.g. drum loops) to go out of sync.
|
* \remarks Modifying the pitch without applying the the same tempo factor using openmpt_module_ext_interface_interactive::set_tempo_factor may cause rhythmic samples (e.g. drum loops) to go out of sync.
|
||||||
* \remarks To shift the pitch by `n` semitones, the parameter can be calculated as follows: `pow( 2.0, n / 12.0 )`
|
* \remarks To shift the pich by `n` semitones, the parameter can be calculated as follows: `pow( 2.0, n / 12.0 )`
|
||||||
* \sa openmpt_module_ext_interface_interactive::get_pitch_factor
|
* \sa openmpt_module_ext_interface_interactive::get_pitch_factor
|
||||||
*/
|
*/
|
||||||
int ( * set_pitch_factor ) ( openmpt_module_ext * mod_ext, double factor );
|
int ( * set_pitch_factor ) ( openmpt_module_ext * mod_ext, double factor );
|
||||||
|
@ -186,7 +186,7 @@ class interactive {
|
|||||||
\param factor The new pitch factor in range ]0.0, 4.0] - 1.0 means unmodified pitch.
|
\param factor The new pitch factor in range ]0.0, 4.0] - 1.0 means unmodified pitch.
|
||||||
\throws openmpt::exception Throws an exception derived from openmpt::exception if the factor is outside the specified range.
|
\throws openmpt::exception Throws an exception derived from openmpt::exception if the factor is outside the specified range.
|
||||||
\remarks Modifying the pitch without applying the the same tempo factor using openmpt::ext::interactive::set_tempo_factor may cause rhythmic samples (e.g. drum loops) to go out of sync.
|
\remarks Modifying the pitch without applying the the same tempo factor using openmpt::ext::interactive::set_tempo_factor may cause rhythmic samples (e.g. drum loops) to go out of sync.
|
||||||
\remarks To shift the pitch by `n` semitones, the parameter can be calculated as follows: `pow( 2.0, n / 12.0 )`
|
\remarks To shift the pich by `n` semitones, the parameter can be calculated as follows: `pow( 2.0, n / 12.0 )`
|
||||||
\sa openmpt::ext::interactive::get_pitch_factor
|
\sa openmpt::ext::interactive::get_pitch_factor
|
||||||
*/
|
*/
|
||||||
virtual void set_pitch_factor( double factor ) = 0;
|
virtual void set_pitch_factor( double factor ) = 0;
|
||||||
|
@ -327,7 +327,7 @@
|
|||||||
shall survive.
|
shall survive.
|
||||||
|
|
||||||
8.2. If You initiate litigation by asserting a patent infringement
|
8.2. If You initiate litigation by asserting a patent infringement
|
||||||
claim (excluding declaratory judgment actions) against Initial Developer
|
claim (excluding declatory judgment actions) against Initial Developer
|
||||||
or a Contributor (the Initial Developer or Contributor against whom
|
or a Contributor (the Initial Developer or Contributor against whom
|
||||||
You file such action is referred to as "Participant") alleging that:
|
You file such action is referred to as "Participant") alleging that:
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ namespace TagLib {
|
|||||||
* split between a collection of frames (which are in turn split into fields
|
* split between a collection of frames (which are in turn split into fields
|
||||||
* (Structure, <a href="id3v2-structure.html#4">4</a>)
|
* (Structure, <a href="id3v2-structure.html#4">4</a>)
|
||||||
* (<a href="id3v2-frames.html">Frames</a>). This class provides an API for
|
* (<a href="id3v2-frames.html">Frames</a>). This class provides an API for
|
||||||
* gathering information about and modifying ID3v2 frames. Functionality
|
* gathering information about and modifying ID3v2 frames. Funtionallity
|
||||||
* specific to a given frame type is handed in one of the many subclasses.
|
* specific to a given frame type is handed in one of the many subclasses.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -393,7 +393,7 @@ namespace TagLib {
|
|||||||
void setTextFrame(const ByteVector &id, const String &value);
|
void setTextFrame(const ByteVector &id, const String &value);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Downgrade frames from ID3v2.4 (used internally and by default) to ID3v2.3
|
* Dowgrade frames from ID3v2.4 (used internally and by default) to ID3v2.3
|
||||||
*/
|
*/
|
||||||
void downgradeFrames(FrameList *existingFrames, FrameList *newFrames) const;
|
void downgradeFrames(FrameList *existingFrames, FrameList *newFrames) const;
|
||||||
|
|
||||||
|
@ -251,7 +251,7 @@ void MPEG::Header::parse(File *file, long offset, bool checkLength)
|
|||||||
{ 11025, 12000, 8000, 0 } // Version 2.5
|
{ 11025, 12000, 8000, 0 } // Version 2.5
|
||||||
};
|
};
|
||||||
|
|
||||||
// The sample rate index is encoded as two bits in the 3rd byte, i.e. xxxx11xx
|
// The sample rate index is encoded as two bits in the 3nd byte, i.e. xxxx11xx
|
||||||
|
|
||||||
const int samplerateIndex = (static_cast<unsigned char>(data[2]) >> 2) & 0x03;
|
const int samplerateIndex = (static_cast<unsigned char>(data[2]) >> 2) & 0x03;
|
||||||
|
|
||||||
@ -261,7 +261,7 @@ void MPEG::Header::parse(File *file, long offset, bool checkLength)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// The channel mode is encoded as a 2 bit value at the end of the 3rd byte,
|
// The channel mode is encoded as a 2 bit value at the end of the 3nd byte,
|
||||||
// i.e. xxxxxx11
|
// i.e. xxxxxx11
|
||||||
|
|
||||||
d->channelMode = static_cast<ChannelMode>((static_cast<unsigned char>(data[3]) >> 6) & 0x03);
|
d->channelMode = static_cast<ChannelMode>((static_cast<unsigned char>(data[3]) >> 6) & 0x03);
|
||||||
|
@ -72,11 +72,11 @@ namespace TagLib {
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Used to specify if when saving files, if values between different tag
|
* Used to specify if when saving files, if values between different tag
|
||||||
* types should be synchronized.
|
* types should be syncronized.
|
||||||
*/
|
*/
|
||||||
enum DuplicateTags {
|
enum DuplicateTags {
|
||||||
Duplicate, //<! Synchronize values between different tag types
|
Duplicate, //<! Syncronize values between different tag types
|
||||||
DoNotDuplicate //<! Do not synchronize values between different tag types
|
DoNotDuplicate //<! Do not syncronize values between different tag types
|
||||||
};
|
};
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@ -47,7 +47,7 @@ static const String newComment(
|
|||||||
"This line is ok.");
|
"This line is ok.");
|
||||||
|
|
||||||
static const String commentAfter(
|
static const String commentAfter(
|
||||||
"This line will be turn\n"
|
"This line will be trun\n"
|
||||||
"This line is ok.\n"
|
"This line is ok.\n"
|
||||||
"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");
|
"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user