aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-06-30 23:32:09 -0700
committerChris Robinson <[email protected]>2019-06-30 23:32:09 -0700
commit90b1bc7b7a009113932b15208e3bdfbed2b3b65b (patch)
tree8adc3f68e0c2ed4ab65f90ff931d74e9b4b48531 /examples
parent01300d9735c732d4e9beef960a8758c2d056a5fd (diff)
Make sure a variable is set before use
Diffstat (limited to 'examples')
-rw-r--r--examples/alrecord.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/examples/alrecord.c b/examples/alrecord.c
index 30f5f792..c4984f99 100644
--- a/examples/alrecord.c
+++ b/examples/alrecord.c
@@ -317,6 +317,7 @@ int main(int argc, char **argv)
recorder.mRecTime, (recorder.mRecTime != 1.0f) ? "s" : ""
);
+ err = ALC_NO_ERROR;
alcCaptureStart(recorder.mDevice);
while((double)recorder.mDataSize/(double)recorder.mSampleRate < recorder.mRecTime &&
(err=alcGetError(recorder.mDevice)) == ALC_NO_ERROR && !ferror(recorder.mFile))