view RecordingUnit.cpp @ 1:f3fd4e19cec0 tip

first binary upload
author wenx <xue.wen@eecs.qmul.ac.uk>
date Wed, 10 Aug 2011 14:56:28 +0100
parents a6a46af64546
children
line wrap: on
line source
/*
    Harmonic Visualiser

    An audio file viewer and editor.
    Centre for Digital Music, Queen Mary, University of London.
    This file copyright 2011 Wen Xue.

    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License as
    published by the Free Software Foundation; either version 2 of the
    License, or (at your option) any later version. 
*/
//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop

#include "RecordingUnit.h"
#include "Unit1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TRecordingForm *RecordingForm;
//---------------------------------------------------------------------------
__fastcall TRecordingForm::TRecordingForm(TComponent* Owner)
  : TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TRecordingForm::SpeedButton1Click(TObject *Sender)
{
  Close();  
}
//---------------------------------------------------------------------------
void __fastcall TRecordingForm::SpeedButton2Click(TObject *Sender)
{
  AnsiString FileName1=ExtractFilePath(Application->ExeName)+"noname.wav";
  AnsiString FileName2=ExtractFilePath(Application->ExeName)+"noname"+Now().FormatString("yymmddhhmmss")+".wav";
  Form1->RecentFile(Form1->WaveAudio1->FileName);
  RenameFile(FileName1, FileName2);
  Form1->WaveAudio1->LoadFromFile(FileName2);
  Close();
}
//---------------------------------------------------------------------------
void __fastcall TRecordingForm::FormDblClick(TObject *Sender)
{
  Form1->SpeedButtonRecordClick(Sender);
}
//---------------------------------------------------------------------------

void __fastcall TRecordingForm::SpeedButtonRecordClick(TObject *Sender)
{
  Form1->SpeedButtonRecordClick(Sender);
}
//---------------------------------------------------------------------------