xue@0
|
1 /*
|
xue@0
|
2 Harmonic Visualiser
|
xue@0
|
3
|
xue@0
|
4 An audio file viewer and editor.
|
xue@0
|
5 Centre for Digital Music, Queen Mary, University of London.
|
xue@0
|
6 This file copyright 2011 Wen Xue.
|
xue@0
|
7
|
xue@0
|
8 This program is free software; you can redistribute it and/or
|
xue@0
|
9 modify it under the terms of the GNU General Public License as
|
xue@0
|
10 published by the Free Software Foundation; either version 2 of the
|
xue@0
|
11 License, or (at your option) any later version.
|
xue@0
|
12 */
|
xue@0
|
13 //---------------------------------------------------------------------------
|
xue@0
|
14
|
xue@0
|
15 #include <vcl.h>
|
xue@0
|
16 #pragma hdrstop
|
xue@0
|
17
|
xue@0
|
18 #include "RecordingUnit.h"
|
xue@0
|
19 #include "Unit1.h"
|
xue@0
|
20 //---------------------------------------------------------------------------
|
xue@0
|
21 #pragma package(smart_init)
|
xue@0
|
22 #pragma resource "*.dfm"
|
xue@0
|
23 TRecordingForm *RecordingForm;
|
xue@0
|
24 //---------------------------------------------------------------------------
|
xue@0
|
25 __fastcall TRecordingForm::TRecordingForm(TComponent* Owner)
|
xue@0
|
26 : TForm(Owner)
|
xue@0
|
27 {
|
xue@0
|
28 }
|
xue@0
|
29 //---------------------------------------------------------------------------
|
xue@0
|
30 void __fastcall TRecordingForm::SpeedButton1Click(TObject *Sender)
|
xue@0
|
31 {
|
xue@0
|
32 Close();
|
xue@0
|
33 }
|
xue@0
|
34 //---------------------------------------------------------------------------
|
xue@0
|
35 void __fastcall TRecordingForm::SpeedButton2Click(TObject *Sender)
|
xue@0
|
36 {
|
xue@0
|
37 AnsiString FileName1=ExtractFilePath(Application->ExeName)+"noname.wav";
|
xue@0
|
38 AnsiString FileName2=ExtractFilePath(Application->ExeName)+"noname"+Now().FormatString("yymmddhhmmss")+".wav";
|
xue@0
|
39 Form1->RecentFile(Form1->WaveAudio1->FileName);
|
xue@0
|
40 RenameFile(FileName1, FileName2);
|
xue@0
|
41 Form1->WaveAudio1->LoadFromFile(FileName2);
|
xue@0
|
42 Close();
|
xue@0
|
43 }
|
xue@0
|
44 //---------------------------------------------------------------------------
|
xue@0
|
45 void __fastcall TRecordingForm::FormDblClick(TObject *Sender)
|
xue@0
|
46 {
|
xue@0
|
47 Form1->SpeedButtonRecordClick(Sender);
|
xue@0
|
48 }
|
xue@0
|
49 //---------------------------------------------------------------------------
|
xue@0
|
50
|
xue@0
|
51 void __fastcall TRecordingForm::SpeedButtonRecordClick(TObject *Sender)
|
xue@0
|
52 {
|
xue@0
|
53 Form1->SpeedButtonRecordClick(Sender);
|
xue@0
|
54 }
|
xue@0
|
55 //---------------------------------------------------------------------------
|
xue@0
|
56
|