aboutsummaryrefslogtreecommitdiff
path: root/sound/softsynth/opl
diff options
context:
space:
mode:
authorJohannes Schickel2009-05-24 15:17:42 +0000
committerJohannes Schickel2009-05-24 15:17:42 +0000
commitb3c6751b9b7fc1401fd5e87a034cdaec92b67b20 (patch)
treeaa00dba58fb88ea2e095b886963370c7290c692b /sound/softsynth/opl
parent7c1eb057146af11793c627327f3fefe309d27fbb (diff)
downloadscummvm-rg350-b3c6751b9b7fc1401fd5e87a034cdaec92b67b20.tar.gz
scummvm-rg350-b3c6751b9b7fc1401fd5e87a034cdaec92b67b20.tar.bz2
scummvm-rg350-b3c6751b9b7fc1401fd5e87a034cdaec92b67b20.zip
Strip trailing whitespaces in the whole code base.
svn-id: r40867
Diffstat (limited to 'sound/softsynth/opl')
-rw-r--r--sound/softsynth/opl/dosbox.cpp22
-rw-r--r--sound/softsynth/opl/opl_impl.h14
-rw-r--r--sound/softsynth/opl/opl_inc.h8
3 files changed, 22 insertions, 22 deletions
diff --git a/sound/softsynth/opl/dosbox.cpp b/sound/softsynth/opl/dosbox.cpp
index cbb3090608..25fda7f2e6 100644
--- a/sound/softsynth/opl/dosbox.cpp
+++ b/sound/softsynth/opl/dosbox.cpp
@@ -40,7 +40,7 @@
#include <string.h>
namespace OPL {
-namespace DOSBox {
+namespace DOSBox {
Timer::Timer() {
masked = false;
@@ -51,7 +51,7 @@ Timer::Timer() {
}
void Timer::update(double time) {
- if (!enabled || !delay)
+ if (!enabled || !delay)
return;
double deltaStart = time - startTime;
// Only set the overflow flag when not masked
@@ -66,7 +66,7 @@ void Timer::reset(double time) {
double delta = (time - startTime);
double rem = fmod(delta, delay);
double next = delay - rem;
- startTime = time + next;
+ startTime = time + next;
}
void Timer::stop() {
@@ -116,7 +116,7 @@ bool Chip::write(uint32 reg, uint8 val) {
timer[1].stop();
timer[1].masked = (val & 0x20) > 0;
-
+
if (timer[1].masked)
timer[1].overflow = false;
}
@@ -148,7 +148,7 @@ namespace OPL2 {
#include "opl_impl.h"
struct Handler : public DOSBox::Handler {
- void writeReg(uint32 reg, uint8 val) {
+ void writeReg(uint32 reg, uint8 val) {
adlib_write(reg, val);
}
@@ -171,7 +171,7 @@ namespace OPL3 {
#include "opl_impl.h"
struct Handler : public DOSBox::Handler {
- void writeReg(uint32 reg, uint8 val) {
+ void writeReg(uint32 reg, uint8 val) {
adlib_write(reg, val);
}
@@ -217,13 +217,13 @@ bool OPL::init(int rate) {
case Config::kOpl3:
_handler = new OPL3::Handler();
break;
-
+
default:
return false;
}
_handler->init(rate);
-
+
if (_type == Config::kDualOpl2) {
// Setup opl3 mode in the hander
_handler->writeReg(0x105, 1);
@@ -234,7 +234,7 @@ bool OPL::init(int rate) {
}
void OPL::reset() {
- init(_rate);
+ init(_rate);
}
void OPL::write(int port, int val) {
@@ -325,7 +325,7 @@ void OPL::writeReg(int r, int v) {
void OPL::dualWrite(uint8 index, uint8 reg, uint8 val) {
// Make sure you don't use opl3 features
- // Don't allow write to disable opl3
+ // Don't allow write to disable opl3
if (reg == 5)
return;
@@ -334,7 +334,7 @@ void OPL::dualWrite(uint8 index, uint8 reg, uint8 val) {
val &= 3;
// Write to the timer?
- if (_chip[index].write(reg, val))
+ if (_chip[index].write(reg, val))
return;
// Enabling panning
diff --git a/sound/softsynth/opl/opl_impl.h b/sound/softsynth/opl/opl_impl.h
index c5ef87ce3c..5c68baa485 100644
--- a/sound/softsynth/opl/opl_impl.h
+++ b/sound/softsynth/opl/opl_impl.h
@@ -6,12 +6,12 @@
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
- *
+ *
* This library 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 library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
@@ -131,7 +131,7 @@ static fltype decrelconst[4] = {1/39.28064,1/31.41608,1/26.17344,1/22.44608};
void operator_advance(op_type* op_pt, Bit32s vib) {
op_pt->wfpos = op_pt->tcount; // waveform position
-
+
// advance waveform time
op_pt->tcount += op_pt->tinc;
op_pt->tcount += (Bit32s)(op_pt->tinc)*vib/FIXEDPT;
@@ -311,7 +311,7 @@ void change_attackrate(Bitu regbase, op_type* op_pt) {
op_pt->env_step_a = (1<<(steps<=12?12-steps:0))-1;
Bits step_num = (step_skip<=48)?(4-(step_skip&3)):0;
- static Bit8u step_skip_mask[5] = {0xff, 0xfe, 0xee, 0xba, 0xaa};
+ static Bit8u step_skip_mask[5] = {0xff, 0xfe, 0xee, 0xba, 0xaa};
op_pt->env_step_skip_a = step_skip_mask[step_num];
#if defined(OPLTYPE_IS_OPL3)
@@ -1001,7 +1001,7 @@ void adlib_getsample(Bit16s* sndptr, Bits numsamples) {
operator_advance(&cptr[9],vibval1[i]);
opfuncs[cptr[9].op_state](&cptr[9]);
operator_output(&cptr[9],0,tremval1[i]);
-
+
Bit32s chanval = cptr[9].cval*2;
CHANVAL_OUT
}
@@ -1033,7 +1033,7 @@ void adlib_getsample(Bit16s* sndptr, Bits numsamples) {
operator_advance(&cptr[9],vibval2[i]);
opfuncs[cptr[9].op_state](&cptr[9]);
operator_output(&cptr[9],cptr[0].cval*FIXEDPT,tremval2[i]);
-
+
Bit32s chanval = cptr[9].cval*2;
CHANVAL_OUT
}
@@ -1347,7 +1347,7 @@ void adlib_getsample(Bit16s* sndptr, Bits numsamples) {
} else {
// FM-FM-style synthesis (op1[fb] * op2 * op3 * op4)
- if ((cptr[0].op_state != OF_TYPE_OFF) || (cptr[9].op_state != OF_TYPE_OFF) ||
+ if ((cptr[0].op_state != OF_TYPE_OFF) || (cptr[9].op_state != OF_TYPE_OFF) ||
(cptr[3].op_state != OF_TYPE_OFF) || (cptr[3+9].op_state != OF_TYPE_OFF)) {
if ((cptr[0].vibrato) && (cptr[0].op_state != OF_TYPE_OFF)) {
vibval1 = vibval_var1;
diff --git a/sound/softsynth/opl/opl_inc.h b/sound/softsynth/opl/opl_inc.h
index 0798bd9f6a..b7b6ac1d41 100644
--- a/sound/softsynth/opl/opl_inc.h
+++ b/sound/softsynth/opl/opl_inc.h
@@ -6,12 +6,12 @@
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
- *
+ *
* This library 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 library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
@@ -132,7 +132,7 @@ typedef struct operator_struct {
Bit32u act_state; // activity state (regular, percussion)
bool sus_keep; // keep sustain level when decay finished
bool vibrato,tremolo; // vibrato/tremolo enable bits
-
+
// variables used to provide non-continuous envelopes
Bit32u generator_pos; // for non-standard sample rates we need to determine how many samples have passed
Bits cur_env_step; // current (standardized) sample position
@@ -151,7 +151,7 @@ Bitu chip_num;
op_type op[MAXOPERATORS];
Bits int_samplerate;
-
+
Bit8u status;
Bit32u index;
#if defined(OPLTYPE_IS_OPL3)