Sync to master

This commit is contained in:
cam900 2022-09-30 20:01:31 +09:00
parent 987cc113b4
commit c83d919fbc
2 changed files with 14 additions and 14 deletions

View File

@ -270,9 +270,6 @@ void DivPlatformES5506::e_pin(bool state) {
unsigned int loopFlag=(chan[ch].pcm.bank<<14)|(chan[ch].pcm.reversed?0x0040:0x0000);
chan[ch].isReverseLoop=false;
switch (chan[ch].pcm.loopMode) {
case DIV_SAMPLE_LOOP_MAX: // no loop
default:
break;
case DIV_SAMPLE_LOOP_FORWARD: // Foward loop
loopFlag|=0x0008;
break;
@ -283,6 +280,9 @@ void DivPlatformES5506::e_pin(bool state) {
case DIV_SAMPLE_LOOP_PINGPONG: // Pingpong loop: Hardware support
loopFlag|=0x0018;
break;
case DIV_SAMPLE_LOOP_MAX: // no loop
default:
break;
}
// Set loop mode & Bank
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);
chan[i].isReverseLoop=false;
switch (chan[i].pcm.loopMode) {
case DIV_SAMPLE_LOOP_MAX: // no loop
default:
break;
case DIV_SAMPLE_LOOP_FORWARD: // Foward loop
loopFlag|=0x0008;
break;
@ -758,6 +755,9 @@ void DivPlatformES5506::tick(bool sysTick) {
case DIV_SAMPLE_LOOP_PINGPONG: // Pingpong loop: Hardware support
loopFlag|=0x0018;
break;
case DIV_SAMPLE_LOOP_MAX: // no loop
default:
break;
}
// Set loop mode & Bank
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;
chan[i].isReverseLoop=false;
switch (chan[i].pcm.loopMode) {
case DIV_SAMPLE_LOOP_MAX: // no loop
default:
break;
case DIV_SAMPLE_LOOP_FORWARD: // Foward loop
loopFlag|=0x0008;
break;
@ -892,6 +889,9 @@ void DivPlatformES5506::tick(bool sysTick) {
case DIV_SAMPLE_LOOP_PINGPONG: // Pingpong loop: Hardware support
loopFlag|=0x0018;
break;
case DIV_SAMPLE_LOOP_MAX: // no loop
default:
break;
}
if (chan[i].pcm.pause) {
loopFlag|=0x0002;
@ -1324,8 +1324,8 @@ void DivPlatformES5506::notifyInsDeletion(void* ins) {
}
}
void DivPlatformES5506::setFlags(unsigned int flags) {
initChanMax=MAX(4,flags&0x1f);
void DivPlatformES5506::setFlags(const DivConfig& flags) {
initChanMax=MAX(4,flags.getInt("channels",0)&0x1f);
chanMax=initChanMax;
pageWriteMask(0x00,0x60,0x0b,chanMax);
}
@ -1401,7 +1401,7 @@ void DivPlatformES5506::renderSamples() {
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)];
sampleMemLen=0;
parent=p;

View File

@ -290,7 +290,7 @@ class DivPlatformES5506: public DivDispatch, public es550x_intf {
virtual void muteChannel(int ch, bool mute) override;
virtual bool isStereo() 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 notifyWaveChange(int wave) 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 void renderSamples() 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;
DivPlatformES5506():
DivDispatch(),