diff options
author | Andree Buschmann <AndreeBuschmann@t-online.de> | 2011-08-31 19:19:49 +0000 |
---|---|---|
committer | Andree Buschmann <AndreeBuschmann@t-online.de> | 2011-08-31 19:19:49 +0000 |
commit | 13cbade08a07296d92e7a7d3e20475de0032cba1 (patch) | |
tree | 731a1a4a99d86632a719ae49e3b3d2a12e764a3a /apps/codecs/libgme/nes_fme7_apu.c | |
parent | d089e104034fdf5562bea125d2cacf4ee486782a (diff) | |
download | rockbox-13cbade08a07296d92e7a7d3e20475de0032cba1.tar.gz rockbox-13cbade08a07296d92e7a7d3e20475de0032cba1.zip |
Update libgme to Blargg's Game_Music_Emu 0.6-pre.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30397 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libgme/nes_fme7_apu.c')
-rw-r--r-- | apps/codecs/libgme/nes_fme7_apu.c | 7 |
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 | ||