Skip to content

Commit

Permalink
app
Browse files Browse the repository at this point in the history
  • Loading branch information
trcwm committed Aug 21, 2018
1 parent 7e5a493 commit d178f76
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ deploy:
description: 'BasicDSP 64-bit windows binary'
provider: GitHub
auth_token:
secure: KrfGWHTb26AlgQb3nrffO1P0RqhX0O8FLT4DYlhkofgWW9zySIyTTisnD4KoN3MY # your encrypted token from GitHub
secure: AfcsCy2CYmodNEHdPy+DJ4BQXvYdATXLV3m/N2vhq3Xpy7SgauXQ0/t/81TZd2vM
artifact: /.*\.zip/ # upload all zip packages to release assets
draft: false
prerelease: false
Expand Down
19 changes: 14 additions & 5 deletions virtualmachine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ static int portaudioCallback(
(timeInfo);

/* Cast data passed through stream to our structure. */
float *inbuf = (float*)inputBuffer;
const float *inbuf = (const float*)inputBuffer;
float *outbuf = (float*)outputBuffer;

if (userData != 0)
Expand Down Expand Up @@ -321,9 +321,18 @@ bool VirtualMachine::start()
return true;
}
}

qDebug() << "Portaudio: " << Pa_GetErrorText(error) << "\n";

else
{
if (error == paUnanticipatedHostError)
{
const PaHostErrorInfo *info = Pa_GetLastHostErrorInfo();
qDebug() << "Portaudio host error: " << info->errorText << "\n";
}
else
{
qDebug() << "Portaudio: " << Pa_GetErrorText(error) << "\n";
}
}
return false;
}

Expand Down Expand Up @@ -367,7 +376,7 @@ void VirtualMachine::setFrequency(double Hz)
m_freq = Hz;
}

void VirtualMachine::processSamples(float *inbuf, float *outbuf,
void VirtualMachine::processSamples(const float *inbuf, float *outbuf,
uint32_t framesPerBuffer)
{
// as this is a time-critical function that is
Expand Down
2 changes: 1 addition & 1 deletion virtualmachine.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class VirtualMachine
}

/** execute VM */
void processSamples(float *inbuf,
void processSamples(const float *inbuf,
float *outbuf,
uint32_t framesPerBuffer);

Expand Down

0 comments on commit d178f76

Please sign in to comment.