Skip to content

Commit

Permalink
Fixed some implicit conversions
Browse files Browse the repository at this point in the history
Fixed some implicit conversions from long long int to int
  • Loading branch information
passivist committed Feb 10, 2017
1 parent 3a7d48d commit cd4ade6
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
endingColumnNumber = "9223372036854775807"
startingLineNumber = "132"
endingLineNumber = "132"
landmarkName = "process (AudioSampleBuffer& currentBlock, AudioSampleBuffer& fileBuffer, int numChannels, int blockNumSamples, int fileNumSamples, int time)"
landmarkName = "process (AudioSampleBuffer& currentBlock, AudioSampleBuffer& fileBuffer, int numChannels, int blockNumSamples, int fileNumSamples, long long int time)"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
Expand Down
Binary file modified Builds/MacOSX/build/Debug/libGRRNLRR.a
Binary file not shown.
6 changes: 3 additions & 3 deletions Source/Grain.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
class Grain
{
public:
const int onset;
const long long int onset;
const int length;
const int startPosition;

Expand All @@ -26,7 +26,7 @@ class Grain
const float rate;
const float amp;

Grain(int onset, int length, int startPos, float center, float sustain, float curve, float r, float a) : onset(onset), length(length), startPosition(startPos),
Grain(long long int onset, int length, int startPos, float center, float sustain, float curve, float r, float a) : onset(onset), length(length), startPosition(startPos),
envAttack((1 - sustain) * center), envAttackRecip(1/envAttack),
envRelease(sustain + envAttack), envReleaseRecip(1/(1-envRelease)),
envCurve(curve),
Expand Down Expand Up @@ -102,7 +102,7 @@ class Grain
return ((c3 * x + c2) * x + c1) * x + c0;
}

void process (AudioSampleBuffer& currentBlock, AudioSampleBuffer& fileBuffer, int numChannels, int blockNumSamples, int fileNumSamples, int time)
void process (AudioSampleBuffer& currentBlock, AudioSampleBuffer& fileBuffer, int numChannels, int blockNumSamples, int fileNumSamples, long long int time)
{
for(int channel=0; channel<numChannels; ++channel){
const float gain = envelope(time);
Expand Down
4 changes: 2 additions & 2 deletions Source/PluginProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ void GrrnlrrAudioProcessor::run()
if( grainStack.size() > 0){
for (int i=grainStack.size() - 1; i >= 0; --i) {
// check if the grain has ended
int grainEnd = grainStack[i].onset + grainStack[i].length;
long long int grainEnd = grainStack[i].onset + grainStack[i].length;
bool hasEnded = grainEnd < time;

if(hasEnded) grainStack.remove(i); // [4]
Expand Down Expand Up @@ -156,7 +156,7 @@ void GrrnlrrAudioProcessor::run()
//dur *= (1 / ratio);

int schedDelay = 700;
int onset = nextGrainOnset + schedDelay;
long long int onset = nextGrainOnset + schedDelay;

// Length
float density = *densityParam * (1 + (*randDensityParam * (Random::getSystemRandom().nextFloat() * 2 - 1)));
Expand Down

0 comments on commit cd4ade6

Please sign in to comment.