To V0.0.8.0 Bugfix for linux systems

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7025 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
gbamber
2019-07-11 14:32:50 +00:00
parent 88c8be65cf
commit 5183bfe531
5 changed files with 23 additions and 23 deletions

View File

@ -585,7 +585,7 @@ begin
Font.Size:=10; Font.Size:=10;
// BackGroundColor shows if no BackGround image is set // BackGroundColor shows if no BackGround image is set
BackGroundColor := clWindow; BackGroundColor := clWindow;
Version := '0.0.4.0'; Version := '0.0.8.0';
AuthorName := 'Gordon Bamber'; AuthorName := 'Gordon Bamber';
AuthorEmail := 'minesadorada@charcodelvalle.com'; AuthorEmail := 'minesadorada@charcodelvalle.com';
Organisation := 'Public Domain'; Organisation := 'Public Domain';

View File

@ -2,7 +2,7 @@
<CONFIG> <CONFIG>
<ProjectSession> <ProjectSession>
<PathDelim Value="\"/> <PathDelim Value="\"/>
<Version Value="9"/> <Version Value="11"/>
<BuildModes Active="Default"/> <BuildModes Active="Default"/>
<Units Count="6"> <Units Count="6">
<Unit0> <Unit0>
@ -16,9 +16,9 @@
<ComponentName Value="mainform"/> <ComponentName Value="mainform"/>
<HasResources Value="True"/> <HasResources Value="True"/>
<ResourceBaseClass Value="Form"/> <ResourceBaseClass Value="Form"/>
<EditorIndex Value="-1"/>
<CursorPos X="32" Y="9"/> <CursorPos X="32" Y="9"/>
<UsageCount Value="20"/> <UsageCount Value="20"/>
<Loaded Value="True"/>
<LoadedDesigner Value="True"/> <LoadedDesigner Value="True"/>
</Unit1> </Unit1>
<Unit2> <Unit2>
@ -28,11 +28,10 @@
</Unit2> </Unit2>
<Unit3> <Unit3>
<Filename Value="..\uplaysound.pas"/> <Filename Value="..\uplaysound.pas"/>
<EditorIndex Value="1"/> <EditorIndex Value="-1"/>
<TopLine Value="118"/> <TopLine Value="118"/>
<CursorPos X="28" Y="118"/> <CursorPos X="28" Y="118"/>
<UsageCount Value="10"/> <UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit3> </Unit3>
<Unit4> <Unit4>
<Filename Value="X:\TEMP\wzbed3\grille.pas"/> <Filename Value="X:\TEMP\wzbed3\grille.pas"/>
@ -43,24 +42,19 @@
<Unit5> <Unit5>
<Filename Value="..\aboutplaysound.pas"/> <Filename Value="..\aboutplaysound.pas"/>
<IsVisibleTab Value="True"/> <IsVisibleTab Value="True"/>
<EditorIndex Value="2"/> <EditorIndex Value="-1"/>
<TopLine Value="580"/> <TopLine Value="580"/>
<CursorPos X="32" Y="589"/> <CursorPos X="22" Y="588"/>
<UsageCount Value="10"/> <UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit5> </Unit5>
</Units> </Units>
<JumpHistory Count="3" HistoryIndex="2"> <General>
<Position1> <ActiveWindowIndexAtStart Value="-1"/>
<Filename Value="umainform.pas"/> </General>
</Position1> <JumpHistory HistoryIndex="-1"/>
<Position2> <RunParams>
<Filename Value="umainform.pas"/> <FormatVersion Value="2"/>
<Caret Line="44" Column="3" TopLine="10"/> <Modes Count="0" ActiveMode="default"/>
</Position2> </RunParams>
<Position3>
<Filename Value="..\aboutplaysound.pas"/>
</Position3>
</JumpHistory>
</ProjectSession> </ProjectSession>
</CONFIG> </CONFIG>

View File

@ -47,7 +47,7 @@
along with this library; if not, write to the Free Software Foundation, along with this library; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
"/> "/>
<Version Release="7"/> <Version Release="8"/>
<Files Count="2"> <Files Count="2">
<Item1> <Item1>
<Filename Value="uplaysound.pas"/> <Filename Value="uplaysound.pas"/>

View File

@ -143,12 +143,13 @@ begin
AboutBoxBackgroundColor := clCream; AboutBoxBackgroundColor := clCream;
//AboutBoxFontName (string) //AboutBoxFontName (string)
//AboutBoxFontSize (integer) //AboutBoxFontSize (integer)
AboutBoxVersion := '0.0.7'; AboutBoxVersion := '0.0.8';
AboutBoxAuthorname := 'Gordon Bamber'; AboutBoxAuthorname := 'Gordon Bamber';
AboutBoxOrganisation := 'Public Domain'; AboutBoxOrganisation := 'Public Domain';
AboutBoxAuthorEmail := 'minesadorada@charcodelvalle.com'; AboutBoxAuthorEmail := 'minesadorada@charcodelvalle.com';
AboutBoxLicenseType := 'MODIFIEDGPL'; AboutBoxLicenseType := 'MODIFIEDGPL';
AboutBoxDescription := 'Plays WAVE sounds in Windows or Linux'; AboutBoxDescription := 'Plays WAVE sounds in Windows or Linux' + LineEnding +
'Public methods: Execute and StopSound';
end; end;
destructor Tplaysound.Destroy; destructor Tplaysound.Destroy;
@ -164,6 +165,11 @@ procedure Tplaysound.Execute;
begin begin
if not FileExists(fPathToSoundFile) then if not FileExists(fPathToSoundFile) then
Exit; Exit;
{$IFDEF WINDOWS}
fDefaultPlayCommand := 'sndPlaySound';
{$ELSE}
fDefaultPlayCommand := GetNonWindowsPlayCommand; // Linux, Mac etc.
{$ENDIF}
Try Try
PlaySound(fPathToSoundFile); PlaySound(fPathToSoundFile);
Except Except