[Scummvm-cvs-logs] SF.net SVN: scummvm:[48181] scummvm/trunk/sound/softsynth/opl/dbopl.cpp
lordhoto at users.sourceforge.net
lordhoto at users.sourceforge.net
Mon Mar 8 01:34:30 CET 2010
Revision: 48181
http://scummvm.svn.sourceforge.net/scummvm/?rev=48181&view=rev
Author: lordhoto
Date: 2010-03-08 00:34:29 +0000 (Mon, 08 Mar 2010)
Log Message:
-----------
Use memset instead of a custom loop for zeroing the sample buffer.
Modified Paths:
--------------
scummvm/trunk/sound/softsynth/opl/dbopl.cpp
Modified: scummvm/trunk/sound/softsynth/opl/dbopl.cpp
===================================================================
--- scummvm/trunk/sound/softsynth/opl/dbopl.cpp 2010-03-08 00:34:01 UTC (rev 48180)
+++ scummvm/trunk/sound/softsynth/opl/dbopl.cpp 2010-03-08 00:34:29 UTC (rev 48181)
@@ -1196,9 +1196,7 @@
void Chip::GenerateBlock2( Bitu total, Bit32s* output ) {
while ( total > 0 ) {
Bit32u samples = ForwardLFO( total );
- for ( Bitu i = 0; i < samples; i++ ) {
- output[i] = 0;
- }
+ memset(output, 0, sizeof(Bit32s) * samples);
int count = 0;
for( Channel* ch = chan; ch < chan + 9; ) {
count++;
@@ -1212,10 +1210,7 @@
void Chip::GenerateBlock3( Bitu total, Bit32s* output ) {
while ( total > 0 ) {
Bit32u samples = ForwardLFO( total );
- for ( Bitu i = 0; i < samples; i++ ) {
- output[i * 2 + 0 ] = 0;
- output[i * 2 + 1 ] = 0;
- }
+ memset(output, 0, sizeof(Bit32s) * 2 * samples);
int count = 0;
for( Channel* ch = chan; ch < chan + 18; ) {
count++;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list