-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathActions.cpp
More file actions
37 lines (33 loc) · 1.09 KB
/
Actions.cpp
File metadata and controls
37 lines (33 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#include "Common.h"
// ID = 0
// ============================================================================
//
// ACTIONS
//
// ============================================================================
// ID = 0
void Extension::InitialiseRecordingToMemory()
{
ThreadSafe_Start();
bool temp = RecordingAlreadyStarted;
ThreadSafe_End();
if (temp)
Explode("Already started recording...");
else
{
StructPassThru* Parameters = new StructPassThru;
Parameters -> para_Extension = this;
Parameters -> para_totalFrames = NUM_SECONDS * SAMPLE_RATE; /* Record for a few seconds. */
Parameters -> para_numSamples = (NUM_SECONDS * SAMPLE_RATE) * NUM_CHANNELS;
Parameters -> para_numBytes = ((NUM_SECONDS * SAMPLE_RATE) * NUM_CHANNELS) * sizeof(SAMPLE);
Report("Reporting just before recording thread start.");
CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)&Record, Parameters, NULL, NULL);
Report("Reporting just after recording thread end.");
}
}
// ID = 1
void Extension::TestReportAndExplode()
{
Report("Test of action 1's Report() okay.");
Explode("Test of action 1's Explode() okay.");
}