Mercurial > hg > hv
comparison SUThread.cpp @ 0:a6a46af64546
first upload
author | wenx <xue.wen@eecs.qmul.ac.uk> |
---|---|
date | Wed, 10 Aug 2011 14:55:38 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:a6a46af64546 |
---|---|
1 /* | |
2 Harmonic Visualiser | |
3 | |
4 An audio file viewer and editor. | |
5 Centre for Digital Music, Queen Mary, University of London. | |
6 This file copyright 2011 Wen Xue. | |
7 | |
8 This program is free software; you can redistribute it and/or | |
9 modify it under the terms of the GNU General Public License as | |
10 published by the Free Software Foundation; either version 2 of the | |
11 License, or (at your option) any later version. | |
12 */ | |
13 //--------------------------------------------------------------------------- | |
14 | |
15 #include <vcl.h> | |
16 #pragma hdrstop | |
17 | |
18 #include "SUThread.h" | |
19 #include "hs.h" | |
20 #pragma package(smart_init) | |
21 //--------------------------------------------------------------------------- | |
22 | |
23 // Important: Methods and properties of objects in VCL can only be | |
24 // used in a method called using Synchronize, for example: | |
25 // | |
26 // Synchronize(UpdateCaption); | |
27 // | |
28 // where UpdateCaption could look like: | |
29 // | |
30 // void __fastcall TSUThread::UpdateCaption() | |
31 // { | |
32 // Form1->Caption = "Updated in a thread"; | |
33 // } | |
34 //--------------------------------------------------------------------------- | |
35 | |
36 __fastcall TSUThread::TSUThread(bool CreateSuspended) | |
37 : TThread(CreateSuspended) | |
38 { | |
39 xrec=0; | |
40 data=0; | |
41 sf=false; | |
42 HS=0; | |
43 } | |
44 | |
45 __fastcall TSUThread::~TSUThread() | |
46 { | |
47 free8(xrec); | |
48 delete[] data; | |
49 delete HS; | |
50 } | |
51 | |
52 | |
53 //--------------------------------------------------------------------------- | |
54 void __fastcall TSUThread::Execute() | |
55 { | |
56 //---- Place thread code here ---- | |
57 xrec=SynthesisHS(HS, dst, den, &Terminated); | |
58 } | |
59 //--------------------------------------------------------------------------- |