mirror of
https://github.com/thestk/stk
synced 2026-04-19 14:06:55 +00:00
Removed use of register variables.
This commit is contained in:
@@ -65,8 +65,8 @@ struct TickData {
|
|||||||
// depending on the desired scheduling scheme.
|
// depending on the desired scheduling scheme.
|
||||||
void processMessage( TickData* data )
|
void processMessage( TickData* data )
|
||||||
{
|
{
|
||||||
register StkFloat value1 = data->message.floatValues[0];
|
StkFloat value1 = data->message.floatValues[0];
|
||||||
register StkFloat value2 = data->message.floatValues[1];
|
StkFloat value2 = data->message.floatValues[1];
|
||||||
|
|
||||||
// If only one instrument, allow messages from all channels to control it.
|
// If only one instrument, allow messages from all channels to control it.
|
||||||
//int group = 1;
|
//int group = 1;
|
||||||
@@ -164,7 +164,7 @@ int tick( void *outputBuffer, void *inputBuffer, unsigned int nBufferFrames,
|
|||||||
double streamTime, RtAudioStreamStatus status, void *dataPointer )
|
double streamTime, RtAudioStreamStatus status, void *dataPointer )
|
||||||
{
|
{
|
||||||
TickData *data = (TickData *) dataPointer;
|
TickData *data = (TickData *) dataPointer;
|
||||||
register StkFloat sample, *samples = (StkFloat *) outputBuffer;
|
StkFloat sample, *samples = (StkFloat *) outputBuffer;
|
||||||
int counter, nTicks = (int) nBufferFrames;
|
int counter, nTicks = (int) nBufferFrames;
|
||||||
|
|
||||||
while ( nTicks > 0 && !done ) {
|
while ( nTicks > 0 && !done ) {
|
||||||
|
|||||||
@@ -69,9 +69,9 @@ struct TickData {
|
|||||||
// depending on the desired scheduling scheme.
|
// depending on the desired scheduling scheme.
|
||||||
void processMessage( TickData* data )
|
void processMessage( TickData* data )
|
||||||
{
|
{
|
||||||
register unsigned int value1 = data->message.intValues[0];
|
unsigned int value1 = data->message.intValues[0];
|
||||||
register StkFloat value2 = data->message.floatValues[1];
|
StkFloat value2 = data->message.floatValues[1];
|
||||||
register StkFloat temp = value2 * ONE_OVER_128;
|
StkFloat temp = value2 * ONE_OVER_128;
|
||||||
|
|
||||||
switch( data->message.type ) {
|
switch( data->message.type ) {
|
||||||
|
|
||||||
@@ -151,8 +151,8 @@ int tick( void *outputBuffer, void *inputBuffer, unsigned int nBufferFrames,
|
|||||||
double streamTime, RtAudioStreamStatus status, void *dataPointer )
|
double streamTime, RtAudioStreamStatus status, void *dataPointer )
|
||||||
{
|
{
|
||||||
TickData *data = (TickData *) dataPointer;
|
TickData *data = (TickData *) dataPointer;
|
||||||
register StkFloat *oSamples = (StkFloat *) outputBuffer, *iSamples = (StkFloat *) inputBuffer;
|
StkFloat *oSamples = (StkFloat *) outputBuffer, *iSamples = (StkFloat *) inputBuffer;
|
||||||
register StkFloat sample;
|
StkFloat sample;
|
||||||
Effect *effect;
|
Effect *effect;
|
||||||
int i, counter, nTicks = (int) nBufferFrames;
|
int i, counter, nTicks = (int) nBufferFrames;
|
||||||
|
|
||||||
|
|||||||
@@ -104,8 +104,8 @@ struct TickData {
|
|||||||
// depending on the desired scheduling scheme.
|
// depending on the desired scheduling scheme.
|
||||||
void processMessage( TickData* data )
|
void processMessage( TickData* data )
|
||||||
{
|
{
|
||||||
register StkFloat value1 = data->message.floatValues[0];
|
StkFloat value1 = data->message.floatValues[0];
|
||||||
register StkFloat value2 = data->message.floatValues[1];
|
StkFloat value2 = data->message.floatValues[1];
|
||||||
unsigned int channel = (unsigned int) data->message.channel;
|
unsigned int channel = (unsigned int) data->message.channel;
|
||||||
|
|
||||||
switch( data->message.type ) {
|
switch( data->message.type ) {
|
||||||
@@ -212,7 +212,7 @@ int tick( void *outputBuffer, void *inputBuffer, unsigned int nBufferFrames,
|
|||||||
double streamTime, RtAudioStreamStatus status, void *dataPointer )
|
double streamTime, RtAudioStreamStatus status, void *dataPointer )
|
||||||
{
|
{
|
||||||
TickData *data = (TickData *) dataPointer;
|
TickData *data = (TickData *) dataPointer;
|
||||||
register StkFloat temp, sample, *samples = (StkFloat *) outputBuffer;
|
StkFloat temp, sample, *samples = (StkFloat *) outputBuffer;
|
||||||
int counter, nTicks = (int) nBufferFrames;
|
int counter, nTicks = (int) nBufferFrames;
|
||||||
|
|
||||||
while ( nTicks > 0 && !done ) {
|
while ( nTicks > 0 && !done ) {
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ int tick( void *outputBuffer, void *inputBuffer, unsigned int nBufferFrames,
|
|||||||
double streamTime, RtAudioStreamStatus status, void *userData )
|
double streamTime, RtAudioStreamStatus status, void *userData )
|
||||||
{
|
{
|
||||||
TickData *data = (TickData *) userData;
|
TickData *data = (TickData *) userData;
|
||||||
register StkFloat *samples = (StkFloat *) outputBuffer;
|
StkFloat *samples = (StkFloat *) outputBuffer;
|
||||||
|
|
||||||
for ( unsigned int i=0; i<nBufferFrames; i++ ) {
|
for ( unsigned int i=0; i<nBufferFrames; i++ ) {
|
||||||
*samples++ = data->instrument->tick();
|
*samples++ = data->instrument->tick();
|
||||||
|
|||||||
@@ -40,8 +40,8 @@ struct TickData {
|
|||||||
// depending on the desired scheduling scheme.
|
// depending on the desired scheduling scheme.
|
||||||
void processMessage( TickData* data )
|
void processMessage( TickData* data )
|
||||||
{
|
{
|
||||||
register StkFloat value1 = data->message.floatValues[0];
|
StkFloat value1 = data->message.floatValues[0];
|
||||||
register StkFloat value2 = data->message.floatValues[1];
|
StkFloat value2 = data->message.floatValues[1];
|
||||||
|
|
||||||
switch( data->message.type ) {
|
switch( data->message.type ) {
|
||||||
|
|
||||||
@@ -82,7 +82,7 @@ int tick( void *outputBuffer, void *inputBuffer, unsigned int nBufferFrames,
|
|||||||
double streamTime, RtAudioStreamStatus status, void *dataPointer )
|
double streamTime, RtAudioStreamStatus status, void *dataPointer )
|
||||||
{
|
{
|
||||||
TickData *data = (TickData *) dataPointer;
|
TickData *data = (TickData *) dataPointer;
|
||||||
register StkFloat *samples = (StkFloat *) outputBuffer;
|
StkFloat *samples = (StkFloat *) outputBuffer;
|
||||||
int counter, nTicks = (int) nBufferFrames;
|
int counter, nTicks = (int) nBufferFrames;
|
||||||
|
|
||||||
while ( nTicks > 0 && !data->done ) {
|
while ( nTicks > 0 && !data->done ) {
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ int tick( void *outputBuffer, void *inputBuffer, unsigned int nBufferFrames,
|
|||||||
double streamTime, RtAudioStreamStatus status, void *dataPointer )
|
double streamTime, RtAudioStreamStatus status, void *dataPointer )
|
||||||
{
|
{
|
||||||
SineWave *sine = (SineWave *) dataPointer;
|
SineWave *sine = (SineWave *) dataPointer;
|
||||||
register StkFloat *samples = (StkFloat *) outputBuffer;
|
StkFloat *samples = (StkFloat *) outputBuffer;
|
||||||
|
|
||||||
for ( unsigned int i=0; i<nBufferFrames; i++ )
|
for ( unsigned int i=0; i<nBufferFrames; i++ )
|
||||||
*samples++ = sine->tick();
|
*samples++ = sine->tick();
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ int tick( void *outputBuffer, void *inputBuffer, unsigned int nBufferFrames,
|
|||||||
double streamTime, RtAudioStreamStatus status, void *dataPointer )
|
double streamTime, RtAudioStreamStatus status, void *dataPointer )
|
||||||
{
|
{
|
||||||
Granulate *grani = (Granulate *) dataPointer;
|
Granulate *grani = (Granulate *) dataPointer;
|
||||||
register StkFloat *samples = (StkFloat *) outputBuffer;
|
StkFloat *samples = (StkFloat *) outputBuffer;
|
||||||
const StkFrames& lastframe = grani->lastFrame();
|
const StkFrames& lastframe = grani->lastFrame();
|
||||||
unsigned int nChannels = lastframe.channels();
|
unsigned int nChannels = lastframe.channels();
|
||||||
|
|
||||||
|
|||||||
@@ -33,8 +33,8 @@ struct TickData {
|
|||||||
// depending on the desired scheduling scheme.
|
// depending on the desired scheduling scheme.
|
||||||
void processMessage( TickData* data )
|
void processMessage( TickData* data )
|
||||||
{
|
{
|
||||||
register StkFloat value1 = data->message.floatValues[0];
|
StkFloat value1 = data->message.floatValues[0];
|
||||||
register StkFloat value2 = data->message.floatValues[1];
|
StkFloat value2 = data->message.floatValues[1];
|
||||||
|
|
||||||
switch( data->message.type ) {
|
switch( data->message.type ) {
|
||||||
|
|
||||||
@@ -81,7 +81,7 @@ int tick( void *outputBuffer, void *inputBuffer, unsigned int nBufferFrames,
|
|||||||
double streamTime, RtAudioStreamStatus status, void *dataPointer )
|
double streamTime, RtAudioStreamStatus status, void *dataPointer )
|
||||||
{
|
{
|
||||||
TickData *data = (TickData *) dataPointer;
|
TickData *data = (TickData *) dataPointer;
|
||||||
register StkFloat *samples = (StkFloat *) outputBuffer;
|
StkFloat *samples = (StkFloat *) outputBuffer;
|
||||||
int counter, nTicks = (int) nBufferFrames;
|
int counter, nTicks = (int) nBufferFrames;
|
||||||
|
|
||||||
while ( nTicks > 0 && !data->done ) {
|
while ( nTicks > 0 && !data->done ) {
|
||||||
|
|||||||
@@ -86,9 +86,9 @@ StkFloat droneFreqs[3] = { 55.0, 82.5, 220.0 };
|
|||||||
// depending on the desired scheduling scheme.
|
// depending on the desired scheduling scheme.
|
||||||
void processMessage( TickData* data )
|
void processMessage( TickData* data )
|
||||||
{
|
{
|
||||||
register unsigned int value1 = data->message.intValues[0];
|
unsigned int value1 = data->message.intValues[0];
|
||||||
register StkFloat value2 = data->message.floatValues[1];
|
StkFloat value2 = data->message.floatValues[1];
|
||||||
register StkFloat temp = value2 * ONE_OVER_128;
|
StkFloat temp = value2 * ONE_OVER_128;
|
||||||
|
|
||||||
switch( data->message.type ) {
|
switch( data->message.type ) {
|
||||||
|
|
||||||
@@ -161,7 +161,7 @@ int tick( void *outputBuffer, void *inputBuffer, unsigned int nBufferFrames,
|
|||||||
double streamTime, RtAudioStreamStatus status, void *dataPointer )
|
double streamTime, RtAudioStreamStatus status, void *dataPointer )
|
||||||
{
|
{
|
||||||
TickData *data = (TickData *) dataPointer;
|
TickData *data = (TickData *) dataPointer;
|
||||||
register StkFloat temp, outs[2], *samples = (StkFloat *) outputBuffer;
|
StkFloat temp, outs[2], *samples = (StkFloat *) outputBuffer;
|
||||||
int i, voiceNote, counter, nTicks = (int) nBufferFrames;
|
int i, voiceNote, counter, nTicks = (int) nBufferFrames;
|
||||||
|
|
||||||
while ( nTicks > 0 && !done ) {
|
while ( nTicks > 0 && !done ) {
|
||||||
|
|||||||
Reference in New Issue
Block a user