summaryrefslogtreecommitdiff
path: root/apps/codecs/libgme/nes_fme7_apu.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs/libgme/nes_fme7_apu.c')
-rw-r--r--apps/codecs/libgme/nes_fme7_apu.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/codecs/libgme/nes_fme7_apu.c b/apps/codecs/libgme/nes_fme7_apu.c
index 8a2c21ea26..3e47e0b17c 100644
--- a/apps/codecs/libgme/nes_fme7_apu.c
+++ b/apps/codecs/libgme/nes_fme7_apu.c
@@ -64,8 +64,6 @@ void Fme7_run_until( struct Nes_Fme7_Apu* this, blip_time_t end_time )
64 struct Blip_Buffer* const osc_output = this->oscs [index].output; 64 struct Blip_Buffer* const osc_output = this->oscs [index].output;
65 if ( !osc_output ) 65 if ( !osc_output )
66 continue; 66 continue;
67 /* osc_output->set_modified(); */
68 Blip_set_modified( osc_output );
69 67
70 // check for unsupported mode 68 // check for unsupported mode
71 #ifndef NDEBUG 69 #ifndef NDEBUG
@@ -92,11 +90,13 @@ void Fme7_run_until( struct Nes_Fme7_Apu* this, blip_time_t end_time )
92 int amp = volume; 90 int amp = volume;
93 if ( !this->phases [index] ) 91 if ( !this->phases [index] )
94 amp = 0; 92 amp = 0;
93
95 { 94 {
96 int delta = amp - this->oscs [index].last_amp; 95 int delta = amp - this->oscs [index].last_amp;
97 if ( delta ) 96 if ( delta )
98 { 97 {
99 this->oscs [index].last_amp = amp; 98 this->oscs [index].last_amp = amp;
99 Blip_set_modified( osc_output );
100 Synth_offset( &this->synth, this->last_time, delta, osc_output ); 100 Synth_offset( &this->synth, this->last_time, delta, osc_output );
101 } 101 }
102 } 102 }
@@ -105,6 +105,7 @@ void Fme7_run_until( struct Nes_Fme7_Apu* this, blip_time_t end_time )
105 if ( time < end_time ) 105 if ( time < end_time )
106 { 106 {
107 int delta = amp * 2 - volume; 107 int delta = amp * 2 - volume;
108 Blip_set_modified( osc_output );
108 if ( volume ) 109 if ( volume )
109 { 110 {
110 do 111 do
@@ -123,7 +124,7 @@ void Fme7_run_until( struct Nes_Fme7_Apu* this, blip_time_t end_time )
123 // maintain phase when silent 124 // maintain phase when silent
124 int count = (end_time - time + period - 1) / period; 125 int count = (end_time - time + period - 1) / period;
125 this->phases [index] ^= count & 1; 126 this->phases [index] ^= count & 1;
126 time += (blargg_long) count * period; 127 time += count * period;
127 } 128 }
128 } 129 }
129 130