PropWare
C++ objects and CMake build system for Parallax Propeller
Home
Download
Getting Started
Documentation
Reference
About
Related Links
Namespace List
Class List
File List
Examples
Build System
File List
File Members
propsideworkspace
Learn
Simple Libraries
Sensor
libsoundimpact
libsoundimpact.c
1
/*
2
libsoundimpact.c
3
4
Test harness for the sound impact library.
5
6
By Andy Lindsay, Parallax Inc., 3/11/14.
7
8
Copyright (C) Parallax, Inc. 2014. All Rights MIT Licensed.
9
*/
10
11
#include "simpletools.h"
// Include simpletools
12
#include "soundimpact.h"
// Include soundimpact
13
14
int
main
()
// Main function
15
{
16
print(
"Tracks sound impacts and \n"
);
// User prompt
17
print(
"updates every 3 seconds.\n"
);
18
19
int
*cog = soundImpact_run(4);
// Run in other cog
20
21
// Check 10 times, every 3 seconds.
22
for
(
int
s = 0; s < 30; s += 3)
// Count to 30 in steps of 3
23
{
24
int
count = soundImpact_getCount();
// Get impact count
25
print(
"count = %d\n"
, count);
// Display
26
pause(3000);
// Wait 3 seconds
27
}
28
29
print(
"Ending sound impact cog.\n"
);
// User info
30
print(
"Cog is now free for other\n"
);
31
print(
"process.\n"
);
32
33
soundImpact_end(cog);
// Stop sound impact cog
34
}
35
main
int main(void)
Definition:
GraphicsTest.c:20
Generated on Sat Aug 27 2016 00:58:09 for PropWare by
1.8.12