Mercurial > audlegacy-plugins
diff src/console/Gb_Oscs.cxx @ 316:fb513e10174e trunk
[svn] - merge libconsole-blargg into mainline libconsole:
+ obsoletes plugins-ugly:sapplug
author | nenolod |
---|---|
date | Thu, 30 Nov 2006 19:54:33 -0800 |
parents | 3da1b8942b8b |
children | 986f098da058 |
line wrap: on
line diff
--- a/src/console/Gb_Oscs.cxx Wed Nov 29 14:42:11 2006 -0800 +++ b/src/console/Gb_Oscs.cxx Thu Nov 30 19:54:33 2006 -0800 @@ -1,5 +1,4 @@ - -// Gb_Snd_Emu 0.1.4. http://www.slack.net/~ant/ +// Gb_Snd_Emu 0.1.5. http://www.slack.net/~ant/ #include "Gb_Apu.h" @@ -11,12 +10,12 @@ version 2.1 of the License, or (at your option) any later version. This module is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. You should have received a copy of the GNU Lesser General -Public License along with this module; if not, write to the Free Software -Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more +details. You should have received a copy of the GNU Lesser General Public +License along with this module; if not, write to the Free Software Foundation, +Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include BLARGG_SOURCE_BEGIN +#include "blargg_source.h" // Gb_Osc @@ -53,7 +52,7 @@ switch ( reg ) { case 1: - length = 64 - (regs [1] & 0x3f); + length = 64 - (regs [1] & 0x3F); break; case 2: @@ -111,7 +110,7 @@ } } -void Gb_Square::run( gb_time_t time, gb_time_t end_time, int playing ) +void Gb_Square::run( blip_time_t time, blip_time_t end_time, int playing ) { if ( sweep_freq == 2048 ) playing = false; @@ -167,9 +166,7 @@ // Gb_Noise -#include BLARGG_ENABLE_OPTIMIZER - -void Gb_Noise::run( gb_time_t time, gb_time_t end_time, int playing ) +void Gb_Noise::run( blip_time_t time, blip_time_t end_time, int playing ) { int amp = volume & playing; int tap = 13 - (regs [3] & 8); @@ -251,7 +248,7 @@ } } -void Gb_Wave::run( gb_time_t time, gb_time_t end_time, int playing ) +void Gb_Wave::run( blip_time_t time, blip_time_t end_time, int playing ) { int volume_shift = (volume - 1) & 7; // volume = 0 causes shift = 7 int amp = (wave [wave_pos] >> volume_shift & playing) * 2; @@ -330,4 +327,3 @@ noise.bits = 0x7FFF; } } -