Skip to content

Commit

Permalink
Updated to version 2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
CWBudde committed Mar 12, 2017
1 parent 5dbeacf commit be7812f
Show file tree
Hide file tree
Showing 15 changed files with 608 additions and 127 deletions.
Binary file modified Binaries/Win32/csfml-audio-2.dll
Binary file not shown.
Binary file modified Binaries/Win32/csfml-graphics-2.dll
Binary file not shown.
Binary file modified Binaries/Win32/csfml-network-2.dll
Binary file not shown.
Binary file modified Binaries/Win32/csfml-system-2.dll
Binary file not shown.
Binary file modified Binaries/Win32/csfml-window-2.dll
Binary file not shown.
Binary file modified Binaries/Win64/csfml-audio-2.dll
Binary file not shown.
Binary file modified Binaries/Win64/csfml-graphics-2.dll
Binary file not shown.
Binary file modified Binaries/Win64/csfml-network-2.dll
Binary file not shown.
Binary file modified Binaries/Win64/csfml-system-2.dll
Binary file not shown.
Binary file modified Binaries/Win64/csfml-window-2.dll
Binary file not shown.
8 changes: 4 additions & 4 deletions Examples/shader/Shader.dpr
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ begin

// Load the Shader
Assert(FileExists('../Resources/Pixelate.frag'));
FShader := TSfmlShader.CreateFromFile('', '../Resources/Pixelate.frag');
FShader := TSfmlShader.CreateFromFile('', '', '../Resources/Pixelate.frag');
FShader.SetCurrentTextureParameter('texture');
Result := Assigned(FShader);
end;
Expand Down Expand Up @@ -139,7 +139,7 @@ begin
// Load the Shader
Assert(FileExists('../Resources/Wave.vert'));
Assert(FileExists('../Resources/Blur.frag'));
FShader := TSfmlShader.CreateFromFile('../Resources/Wave.vert', '../Resources/Blur.frag');
FShader := TSfmlShader.CreateFromFile('../Resources/Wave.vert', '', '../Resources/Blur.frag');
Result := Assigned(FShader);
end;

Expand Down Expand Up @@ -187,7 +187,7 @@ begin
// Load the Shader
Assert(FileExists('../Resources/Storm.vert'));
Assert(FileExists('../Resources/Blink.frag'));
FShader := TSfmlShader.CreateFromFile('../Resources/Storm.vert', '../Resources/Blink.frag');
FShader := TSfmlShader.CreateFromFile('../Resources/Storm.vert', '', '../Resources/Blink.frag');
Result := Assigned(FShader);
end;

Expand Down Expand Up @@ -255,7 +255,7 @@ begin

// Load the Shader
Assert(FileExists('../Resources/Edge.frag'));
FShader := TSfmlShader.CreateFromFile('', '../Resources/Edge.frag');
FShader := TSfmlShader.CreateFromFile('', '', '../Resources/Edge.frag');
FShader.SetCurrentTextureParameter('texture');

Result := Assigned(FShader);
Expand Down
24 changes: 20 additions & 4 deletions Source/SfmlAudio.pas
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ TSfmlSoundStreamChunk = record
TSfmlSoundBufferCreateFromFile = function (const FileName: PAnsiChar): PSfmlSoundBuffer; cdecl;
TSfmlSoundBufferCreateFromMemory = function (const Data: Pointer; SizeInBytes: NativeUInt): PSfmlSoundBuffer; cdecl;
TSfmlSoundBufferCreateFromStream = function (Stream: PSfmlInputStream): PSfmlSoundBuffer; cdecl;
TSfmlSoundBufferCreateFromSamples = function (const Samples: PSmallInt; SampleCount: NativeUInt; ChannelCount, SampleRate: Cardinal): PSfmlSoundBuffer; cdecl;
TSfmlSoundBufferCreateFromSamples = function (const Samples: PSmallInt; SampleCount: UInt64; ChannelCount, SampleRate: Cardinal): PSfmlSoundBuffer; cdecl;
TSfmlSoundBufferCopy = function (const SoundBuffer: PSfmlSoundBuffer): PSfmlSoundBuffer; cdecl;
TSfmlSoundBufferDestroy = procedure (SoundBuffer: PSfmlSoundBuffer); cdecl;
TSfmlSoundBufferSaveToFile = function (const SoundBuffer: PSfmlSoundBuffer; const FileName: PAnsiChar): LongBool; cdecl;
Expand All @@ -176,10 +176,12 @@ TSfmlSoundStreamChunk = record

TSfmlSoundBufferRecorderCreate = function : PSfmlSoundBufferRecorder; cdecl;
TSfmlSoundBufferRecorderDestroy = procedure (soundBufferRecorder: PSfmlSoundBufferRecorder); cdecl;
TSfmlSoundBufferRecorderStart = procedure (soundBufferRecorder: PSfmlSoundBufferRecorder; SampleRate: Cardinal); cdecl;
TSfmlSoundBufferRecorderStart = function (soundBufferRecorder: PSfmlSoundBufferRecorder; SampleRate: Cardinal): LongBool; cdecl;
TSfmlSoundBufferRecorderStop = procedure (soundBufferRecorder: PSfmlSoundBufferRecorder); cdecl;
TSfmlSoundBufferRecorderGetSampleRate = function (const soundBufferRecorder: PSfmlSoundBufferRecorder): Cardinal; cdecl;
TSfmlSoundBufferRecorderGetBuffer = function (const soundBufferRecorder: PSfmlSoundBufferRecorder): PSfmlSoundBuffer; cdecl;
TSfmlSoundBufferRecorderSetDevice = function (SoundRecorder: PSfmlSoundBufferRecorder; const Name: PAnsiChar): LongBool; cdecl;
TSfmlSoundBufferRecorderGetDevice = function (SoundRecorder: PSfmlSoundBufferRecorder): PAnsiChar; cdecl;

TSfmlSoundRecorderCreate = function (OnStart: TSfmlSoundRecorderStartCallback; OnProcess: TSfmlSoundRecorderProcessCallback; OnStop: TSfmlSoundRecorderStopCallback; UserData: Pointer): PSfmlSoundRecorder; cdecl;
TSfmlSoundRecorderDestroy = procedure (SoundRecorder: PSfmlSoundRecorder); cdecl;
Expand All @@ -192,6 +194,8 @@ TSfmlSoundStreamChunk = record
TSfmlSoundRecorderGetDefaultDevice = function : PAnsiChar; cdecl;
TSfmlSoundRecorderSetDevice = function (SoundRecorder: PSfmlSoundRecorder; const Name: PAnsiChar): LongBool; cdecl;
TSfmlSoundRecorderGetDevice = function (SoundRecorder: PSfmlSoundRecorder): PAnsiChar; cdecl;
TSfmlSoundRecorderSetChannelCount = function (SoundRecorder: PSfmlSoundRecorder; const ChannelCount: Cardinal): LongBool; cdecl;
TSfmlSoundRecorderGetChannelCount = function (const SoundRecorder: PSfmlSoundRecorder): Cardinal; cdecl;

var
SfmlListenerSetGlobalVolume: TSfmlListenerSetGlobalVolume;
Expand Down Expand Up @@ -296,6 +300,8 @@ TSfmlSoundStreamChunk = record
SfmlSoundBufferRecorderStop: TSfmlSoundBufferRecorderStop;
SfmlSoundBufferRecorderGetSampleRate: TSfmlSoundBufferRecorderGetSampleRate;
SfmlSoundBufferRecorderGetBuffer: TSfmlSoundBufferRecorderGetBuffer;
SfmlSoundBufferRecorderSetDevice: TSfmlSoundBufferRecorderSetDevice;
SfmlSoundBufferRecorderGetDevice: TSfmlSoundBufferRecorderGetDevice;

SfmlSoundRecorderCreate: TSfmlSoundRecorderCreate;
SfmlSoundRecorderDestroy: TSfmlSoundRecorderDestroy;
Expand All @@ -308,6 +314,8 @@ TSfmlSoundStreamChunk = record
SfmlSoundRecorderGetDefaultDevice: TSfmlSoundRecorderGetDefaultDevice;
SfmlSoundRecorderSetDevice: TSfmlSoundRecorderSetDevice;
SfmlSoundRecorderGetDevice: TSfmlSoundRecorderGetDevice;
SfmlSoundRecorderSetChannelCount: TSfmlSoundRecorderSetChannelCount;
SfmlSoundRecorderGetChannelCount: TSfmlSoundRecorderGetChannelCount;

{$IFNDEF INT64RETURNWORKAROUND}
SfmlMusicGetDuration: TSfmlMusicGetDuration;
Expand Down Expand Up @@ -417,7 +425,7 @@ TSfmlSoundStreamChunk = record
function SfmlSoundBufferCreateFromFile(const FileName: PAnsiChar): PSfmlSoundBuffer; cdecl; external CSfmlAudioLibrary name 'sfSoundBuffer_createFromFile';
function SfmlSoundBufferCreateFromMemory(const Data: Pointer; SizeInBytes: NativeUInt): PSfmlSoundBuffer; cdecl; external CSfmlAudioLibrary name 'sfSoundBuffer_createFromMemory';
function SfmlSoundBufferCreateFromStream(Stream: PSfmlInputStream): PSfmlSoundBuffer; cdecl; external CSfmlAudioLibrary name 'sfSoundBuffer_createFromStream';
function SfmlSoundBufferCreateFromSamples(const Samples: PSmallInt; SampleCount: NativeUInt; ChannelCount, SampleRate: Cardinal): PSfmlSoundBuffer; cdecl; external CSfmlAudioLibrary name 'sfSoundBuffer_createFromSamples';
function SfmlSoundBufferCreateFromSamples(const Samples: PSmallInt; SampleCount: UInt64; ChannelCount, SampleRate: Cardinal): PSfmlSoundBuffer; cdecl; external CSfmlAudioLibrary name 'sfSoundBuffer_createFromSamples';
function SfmlSoundBufferCopy(const SoundBuffer: PSfmlSoundBuffer): PSfmlSoundBuffer; cdecl; external CSfmlAudioLibrary name 'sfSoundBuffer_copy';
procedure SfmlSoundBufferDestroy(SoundBuffer: PSfmlSoundBuffer); cdecl; external CSfmlAudioLibrary name 'sfSoundBuffer_destroy';
function SfmlSoundBufferSaveToFile(const SoundBuffer: PSfmlSoundBuffer; const FileName: PAnsiChar): LongBool; cdecl; external CSfmlAudioLibrary name 'sfSoundBuffer_saveToFile';
Expand All @@ -431,10 +439,12 @@ TSfmlSoundStreamChunk = record

function SfmlSoundBufferRecorderCreate: PSfmlSoundBufferRecorder; cdecl; external CSfmlAudioLibrary name 'sfSoundBufferRecorder_create';
procedure SfmlSoundBufferRecorderDestroy(soundBufferRecorder: PSfmlSoundBufferRecorder); cdecl; external CSfmlAudioLibrary name 'sfSoundBufferRecorder_destroy';
procedure SfmlSoundBufferRecorderStart(soundBufferRecorder: PSfmlSoundBufferRecorder; SampleRate: Cardinal); cdecl; external CSfmlAudioLibrary name 'sfSoundBufferRecorder_start';
function SfmlSoundBufferRecorderStart(soundBufferRecorder: PSfmlSoundBufferRecorder; SampleRate: Cardinal): Longbool; cdecl; external CSfmlAudioLibrary name 'sfSoundBufferRecorder_start';
procedure SfmlSoundBufferRecorderStop(soundBufferRecorder: PSfmlSoundBufferRecorder); cdecl; external CSfmlAudioLibrary name 'sfSoundBufferRecorder_stop';
function SfmlSoundBufferRecorderGetSampleRate(const soundBufferRecorder: PSfmlSoundBufferRecorder): Cardinal; cdecl; external CSfmlAudioLibrary name 'sfSoundBufferRecorder_getSampleRate';
function SfmlSoundBufferRecorderGetBuffer(const soundBufferRecorder: PSfmlSoundBufferRecorder): PSfmlSoundBuffer; cdecl; external CSfmlAudioLibrary name 'sfSoundBufferRecorder_getBuffer';
function SfmlSoundBufferRecorderSetDevice(SoundRecorder: PSfmlSoundBufferRecorder; const Name: PAnsiChar): LongBool; cdecl; external CSfmlAudioLibrary name 'sfSoundBufferRecorder_setDevice';
function SfmlSoundBufferRecorderGetDevice(SoundRecorder: PSfmlSoundBufferRecorder): PAnsiChar; cdecl; external CSfmlAudioLibrary name 'sfSoundBufferRecorder_getDevice';

function SfmlSoundRecorderCreate(OnStart: TSfmlSoundRecorderStartCallback; OnProcess: TSfmlSoundRecorderProcessCallback; OnStop: TSfmlSoundRecorderStopCallback; UserData: Pointer): PSfmlSoundRecorder; cdecl; external CSfmlAudioLibrary name 'sfSoundRecorder_create';
procedure SfmlSoundRecorderDestroy(SoundRecorder: PSfmlSoundRecorder); cdecl; external CSfmlAudioLibrary name 'sfSoundRecorder_destroy';
Expand All @@ -447,6 +457,8 @@ TSfmlSoundStreamChunk = record
function SfmlSoundRecorderGetDefaultDevice: PAnsiChar; cdecl; external CSfmlAudioLibrary name 'sfSoundRecorder_getDefaultDevice';
function SfmlSoundRecorderSetDevice(SoundRecorder: PSfmlSoundRecorder; const Name: PAnsiChar): LongBool; cdecl; external CSfmlAudioLibrary name 'sfSoundRecorder_setDevice';
function SfmlSoundRecorderGetDevice(SoundRecorder: PSfmlSoundRecorder): PAnsiChar; cdecl; external CSfmlAudioLibrary name 'sfSoundRecorder_getDevice';
function SfmlSoundRecorderSetChannelCount(SoundRecorder: PSfmlSoundRecorder; const ChannelCount: Cardinal): LongBool; cdecl; external CSfmlAudioLibrary name 'sfSoundRecorder_getChannelCount';
function SfmlSoundRecorderGetChannelCount(const SoundRecorder: PSfmlSoundRecorder): Cardinal; cdecl; external CSfmlAudioLibrary name 'sfSoundRecorder_setChannelCount';
{$ENDIF}

type
Expand Down Expand Up @@ -1382,6 +1394,8 @@ procedure InitDLL;
SfmlSoundBufferRecorderStop := BindFunction('sfSoundBufferRecorder_stop');
SfmlSoundBufferRecorderGetSampleRate := BindFunction('sfSoundBufferRecorder_getSampleRate');
SfmlSoundBufferRecorderGetBuffer := BindFunction('sfSoundBufferRecorder_getBuffer');
SfmlSoundBufferRecorderSetDevice := BindFunction('sfSoundBufferRecorder_setDevice');
SfmlSoundBufferRecorderGetDevice := BindFunction('sfSoundBufferRecorder_getDevice');
SfmlSoundRecorderCreate := BindFunction('sfSoundRecorder_create');
SfmlSoundRecorderDestroy := BindFunction('sfSoundRecorder_destroy');
SfmlSoundRecorderStart := BindFunction('sfSoundRecorder_start');
Expand All @@ -1393,6 +1407,8 @@ procedure InitDLL;
SfmlSoundRecorderGetDefaultDevice := BindFunction('sfSoundRecorder_getDefaultDevice');
SfmlSoundRecorderSetDevice := BindFunction('sfSoundRecorder_setDevice');
SfmlSoundRecorderGetDevice := BindFunction('sfSoundRecorder_getDevice');
SfmlSoundRecorderSetChannelCount := BindFunction('sfSoundRecorder_setChannelCount');
SfmlSoundRecorderGetChannelCount := BindFunction('sfSoundRecorder_getChannelCount');

{$IFDEF INT64RETURNWORKAROUND}
sfMusic_getDuration := BindFunction('sfMusic_getDuration');
Expand Down
Loading

0 comments on commit be7812f

Please sign in to comment.