Skip to content

Commit d178f76

Browse files
committed
app
1 parent 7e5a493 commit d178f76

File tree

3 files changed

+16
-7
lines changed

3 files changed

+16
-7
lines changed

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ deploy:
2727
description: 'BasicDSP 64-bit windows binary'
2828
provider: GitHub
2929
auth_token:
30-
secure: KrfGWHTb26AlgQb3nrffO1P0RqhX0O8FLT4DYlhkofgWW9zySIyTTisnD4KoN3MY # your encrypted token from GitHub
30+
secure: AfcsCy2CYmodNEHdPy+DJ4BQXvYdATXLV3m/N2vhq3Xpy7SgauXQ0/t/81TZd2vM
3131
artifact: /.*\.zip/ # upload all zip packages to release assets
3232
draft: false
3333
prerelease: false

virtualmachine.cpp

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ static int portaudioCallback(
4444
(timeInfo);
4545

4646
/* Cast data passed through stream to our structure. */
47-
float *inbuf = (float*)inputBuffer;
47+
const float *inbuf = (const float*)inputBuffer;
4848
float *outbuf = (float*)outputBuffer;
4949

5050
if (userData != 0)
@@ -321,9 +321,18 @@ bool VirtualMachine::start()
321321
return true;
322322
}
323323
}
324-
325-
qDebug() << "Portaudio: " << Pa_GetErrorText(error) << "\n";
326-
324+
else
325+
{
326+
if (error == paUnanticipatedHostError)
327+
{
328+
const PaHostErrorInfo *info = Pa_GetLastHostErrorInfo();
329+
qDebug() << "Portaudio host error: " << info->errorText << "\n";
330+
}
331+
else
332+
{
333+
qDebug() << "Portaudio: " << Pa_GetErrorText(error) << "\n";
334+
}
335+
}
327336
return false;
328337
}
329338

@@ -367,7 +376,7 @@ void VirtualMachine::setFrequency(double Hz)
367376
m_freq = Hz;
368377
}
369378

370-
void VirtualMachine::processSamples(float *inbuf, float *outbuf,
379+
void VirtualMachine::processSamples(const float *inbuf, float *outbuf,
371380
uint32_t framesPerBuffer)
372381
{
373382
// as this is a time-critical function that is

virtualmachine.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ class VirtualMachine
106106
}
107107

108108
/** execute VM */
109-
void processSamples(float *inbuf,
109+
void processSamples(const float *inbuf,
110110
float *outbuf,
111111
uint32_t framesPerBuffer);
112112

0 commit comments

Comments
 (0)