Sync to master
This commit is contained in:
parent
987cc113b4
commit
c83d919fbc
|
@ -270,9 +270,6 @@ void DivPlatformES5506::e_pin(bool state) {
|
||||||
unsigned int loopFlag=(chan[ch].pcm.bank<<14)|(chan[ch].pcm.reversed?0x0040:0x0000);
|
unsigned int loopFlag=(chan[ch].pcm.bank<<14)|(chan[ch].pcm.reversed?0x0040:0x0000);
|
||||||
chan[ch].isReverseLoop=false;
|
chan[ch].isReverseLoop=false;
|
||||||
switch (chan[ch].pcm.loopMode) {
|
switch (chan[ch].pcm.loopMode) {
|
||||||
case DIV_SAMPLE_LOOP_MAX: // no loop
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
case DIV_SAMPLE_LOOP_FORWARD: // Foward loop
|
case DIV_SAMPLE_LOOP_FORWARD: // Foward loop
|
||||||
loopFlag|=0x0008;
|
loopFlag|=0x0008;
|
||||||
break;
|
break;
|
||||||
|
@ -283,6 +280,9 @@ void DivPlatformES5506::e_pin(bool state) {
|
||||||
case DIV_SAMPLE_LOOP_PINGPONG: // Pingpong loop: Hardware support
|
case DIV_SAMPLE_LOOP_PINGPONG: // Pingpong loop: Hardware support
|
||||||
loopFlag|=0x0018;
|
loopFlag|=0x0018;
|
||||||
break;
|
break;
|
||||||
|
case DIV_SAMPLE_LOOP_MAX: // no loop
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
// Set loop mode & Bank
|
// Set loop mode & Bank
|
||||||
pageWriteMask(0x00|ch,0x5f,0x00,loopFlag,0xfcfc);
|
pageWriteMask(0x00|ch,0x5f,0x00,loopFlag,0xfcfc);
|
||||||
|
@ -745,9 +745,6 @@ void DivPlatformES5506::tick(bool sysTick) {
|
||||||
unsigned int loopFlag=(chan[i].pcm.bank<<14)|(chan[i].pcm.reversed?0x0040:0x0000);
|
unsigned int loopFlag=(chan[i].pcm.bank<<14)|(chan[i].pcm.reversed?0x0040:0x0000);
|
||||||
chan[i].isReverseLoop=false;
|
chan[i].isReverseLoop=false;
|
||||||
switch (chan[i].pcm.loopMode) {
|
switch (chan[i].pcm.loopMode) {
|
||||||
case DIV_SAMPLE_LOOP_MAX: // no loop
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
case DIV_SAMPLE_LOOP_FORWARD: // Foward loop
|
case DIV_SAMPLE_LOOP_FORWARD: // Foward loop
|
||||||
loopFlag|=0x0008;
|
loopFlag|=0x0008;
|
||||||
break;
|
break;
|
||||||
|
@ -758,6 +755,9 @@ void DivPlatformES5506::tick(bool sysTick) {
|
||||||
case DIV_SAMPLE_LOOP_PINGPONG: // Pingpong loop: Hardware support
|
case DIV_SAMPLE_LOOP_PINGPONG: // Pingpong loop: Hardware support
|
||||||
loopFlag|=0x0018;
|
loopFlag|=0x0018;
|
||||||
break;
|
break;
|
||||||
|
case DIV_SAMPLE_LOOP_MAX: // no loop
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
// Set loop mode & Bank
|
// Set loop mode & Bank
|
||||||
pageWriteMask(0x00|i,0x5f,0x00,loopFlag,0xfcfd);
|
pageWriteMask(0x00|i,0x5f,0x00,loopFlag,0xfcfd);
|
||||||
|
@ -879,9 +879,6 @@ void DivPlatformES5506::tick(bool sysTick) {
|
||||||
unsigned int loopFlag=chan[i].pcm.reversed?0x0040:0x0000;
|
unsigned int loopFlag=chan[i].pcm.reversed?0x0040:0x0000;
|
||||||
chan[i].isReverseLoop=false;
|
chan[i].isReverseLoop=false;
|
||||||
switch (chan[i].pcm.loopMode) {
|
switch (chan[i].pcm.loopMode) {
|
||||||
case DIV_SAMPLE_LOOP_MAX: // no loop
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
case DIV_SAMPLE_LOOP_FORWARD: // Foward loop
|
case DIV_SAMPLE_LOOP_FORWARD: // Foward loop
|
||||||
loopFlag|=0x0008;
|
loopFlag|=0x0008;
|
||||||
break;
|
break;
|
||||||
|
@ -892,6 +889,9 @@ void DivPlatformES5506::tick(bool sysTick) {
|
||||||
case DIV_SAMPLE_LOOP_PINGPONG: // Pingpong loop: Hardware support
|
case DIV_SAMPLE_LOOP_PINGPONG: // Pingpong loop: Hardware support
|
||||||
loopFlag|=0x0018;
|
loopFlag|=0x0018;
|
||||||
break;
|
break;
|
||||||
|
case DIV_SAMPLE_LOOP_MAX: // no loop
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
if (chan[i].pcm.pause) {
|
if (chan[i].pcm.pause) {
|
||||||
loopFlag|=0x0002;
|
loopFlag|=0x0002;
|
||||||
|
@ -1324,8 +1324,8 @@ void DivPlatformES5506::notifyInsDeletion(void* ins) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DivPlatformES5506::setFlags(unsigned int flags) {
|
void DivPlatformES5506::setFlags(const DivConfig& flags) {
|
||||||
initChanMax=MAX(4,flags&0x1f);
|
initChanMax=MAX(4,flags.getInt("channels",0)&0x1f);
|
||||||
chanMax=initChanMax;
|
chanMax=initChanMax;
|
||||||
pageWriteMask(0x00,0x60,0x0b,chanMax);
|
pageWriteMask(0x00,0x60,0x0b,chanMax);
|
||||||
}
|
}
|
||||||
|
@ -1401,7 +1401,7 @@ void DivPlatformES5506::renderSamples() {
|
||||||
sampleMemLen=memPos+256;
|
sampleMemLen=memPos+256;
|
||||||
}
|
}
|
||||||
|
|
||||||
int DivPlatformES5506::init(DivEngine* p, int channels, int sugRate, unsigned int flags) {
|
int DivPlatformES5506::init(DivEngine* p, int channels, int sugRate, const DivConfig& flags) {
|
||||||
sampleMem=new signed short[getSampleMemCapacity()/sizeof(short)];
|
sampleMem=new signed short[getSampleMemCapacity()/sizeof(short)];
|
||||||
sampleMemLen=0;
|
sampleMemLen=0;
|
||||||
parent=p;
|
parent=p;
|
||||||
|
|
|
@ -290,7 +290,7 @@ class DivPlatformES5506: public DivDispatch, public es550x_intf {
|
||||||
virtual void muteChannel(int ch, bool mute) override;
|
virtual void muteChannel(int ch, bool mute) override;
|
||||||
virtual bool isStereo() override;
|
virtual bool isStereo() override;
|
||||||
virtual bool keyOffAffectsArp(int ch) override;
|
virtual bool keyOffAffectsArp(int ch) override;
|
||||||
virtual void setFlags(unsigned int flags) override;
|
virtual void setFlags(const DivConfig& flags) override;
|
||||||
virtual void notifyInsChange(int ins) override;
|
virtual void notifyInsChange(int ins) override;
|
||||||
virtual void notifyWaveChange(int wave) override;
|
virtual void notifyWaveChange(int wave) override;
|
||||||
virtual void notifyInsDeletion(void* ins) override;
|
virtual void notifyInsDeletion(void* ins) override;
|
||||||
|
@ -301,7 +301,7 @@ class DivPlatformES5506: public DivDispatch, public es550x_intf {
|
||||||
virtual size_t getSampleMemUsage(int index = 0) override;
|
virtual size_t getSampleMemUsage(int index = 0) override;
|
||||||
virtual void renderSamples() override;
|
virtual void renderSamples() override;
|
||||||
virtual const char** getRegisterSheet() override;
|
virtual const char** getRegisterSheet() override;
|
||||||
virtual int init(DivEngine* parent, int channels, int sugRate, unsigned int flags) override;
|
virtual int init(DivEngine* parent, int channels, int sugRate, const DivConfig& flags) override;
|
||||||
virtual void quit() override;
|
virtual void quit() override;
|
||||||
DivPlatformES5506():
|
DivPlatformES5506():
|
||||||
DivDispatch(),
|
DivDispatch(),
|
||||||
|
|
Loading…
Reference in New Issue