diff options
| author | mzed <github@mikezed.com> | 2017-07-13 12:10:18 +0100 |
|---|---|---|
| committer | mzed <github@mikezed.com> | 2017-07-13 12:10:18 +0100 |
| commit | 1162c2a6e89b5adaea2685b3ff2b844aa9cacff4 (patch) | |
| tree | 2c859f2697da7d72021e0a028ffff94afd36f09e | |
| parent | f5cfd55793699b3a8ed9a2ac08cd8db9b9082732 (diff) | |
silencing some warnings about casting
| -rw-r--r-- | maximilian.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/maximilian.cpp b/maximilian.cpp index b0c0b5e..ee6d8de 100644 --- a/maximilian.cpp +++ b/maximilian.cpp @@ -1287,7 +1287,7 @@ void maxiSample::setLength(unsigned long numSamples) { memcpy(newData, temp, sizeof(short) * copyLength); } temp = newData; - myDataSize = numSamples * 2; + myDataSize = int(numSamples * 2); length=numSamples; position=0; recordPosition=0; @@ -1328,7 +1328,7 @@ void maxiSample::autoTrim(float alpha, float threshold, bool trimStart, bool tri } } - int endMarker = length-1; + int endMarker = int(length-1); if(trimEnd) { maxiLagExp<float> endLag(alpha, 0); while(endMarker > 0) { @@ -1355,7 +1355,7 @@ void maxiSample::autoTrim(float alpha, float threshold, bool trimStart, bool tri position=0; recordPosition=0; //envelope the start - int fadeSize=min((long)100, length); + int fadeSize=int(min((long)100, length)); for(int i=0; i < fadeSize; i++) { float factor = i / (float) fadeSize; temp[i] = round(temp[i] * factor); @@ -2285,7 +2285,7 @@ void* maxiRecorder::update(void* _context) _this->threadRunning = true; while (_this->doRecord) { - usleep((long)(10000. / bufferSize / maxiSettings::sampleRate)); + usleep((useconds_t)(10000. / bufferSize / maxiSettings::sampleRate)); while (_this->bufferQueueSize > _this->bufferQueue.size()) { _this->enqueueBuffer(); @@ -2394,7 +2394,7 @@ void maxiRecorder::saveToWav() int sampleRate = maxiSettings::sampleRate; short channels = maxiSettings::channels; - int buffSize = pcmDataInt.size() * 2; + int buffSize = int(pcmDataInt.size()) * 2; std::ofstream stream(filename.c_str(), std::ios::binary); @@ -2442,7 +2442,7 @@ void maxiRecorder::saveToWav() std::vector<double> maxiRecorder::getProcessedData() { std::vector<double> userData; - int dataSize = savedBuffers.size() * bufferSize; + int dataSize = int(savedBuffers.size()) * bufferSize; userData.resize(dataSize); int savedIndex = 0; |
