MCPcopy Create free account
hub / github.com/MaxBelkov/visualsyslog / PlayButtonClick

Method PlayButtonClick

source/messprocessframe.cpp:88–108  ·  view source on GitHub ↗

---------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

86}
87//---------------------------------------------------------------------------
88void __fastcall TMessProcessFr::PlayButtonClick(TObject *Sender)
89{
90 String f = SoundFileEdit->Text;
91
92 if( f.Length() == 0 )
93 return;
94
95 if( f.Length() > 0 && ExtractFilePath(f).Length() == 0 )
96 f = WorkDir + f;
97
98 if( FileExists(f) )
99 {
100 if( ::PlaySound(f.c_str(), NULL, SND_FILENAME | SND_NODEFAULT |
101 SND_NOWAIT | SND_ASYNC) == FALSE )
102 ReportError2("Error play sound file: \"%s\"", FormatLastError2(GetLastError()).c_str());
103 }
104 else
105 {
106 ReportError2("File \"%s\" not found!", f.c_str());
107 }
108}
109//---------------------------------------------------------------------------
110void __fastcall TMessProcessFr::SpeedButton1Click(TObject *Sender)
111{

Callers

nothing calls this directly

Calls 2

ReportError2Function · 0.85
FormatLastError2Function · 0.85

Tested by

no test coverage detected