aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Classes
diff options
context:
space:
mode:
authortobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-07-03 20:44:43 +0000
committertobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-07-03 20:44:43 +0000
commit71acdf2e69e3cf1cbc073dbbb423d59c6c4a83c7 (patch)
tree07b288e8c1496fa3f44bbfdf665242d2a0e96235 /Game/Code/Classes
parent2aa9fda75f215ed02f674a90b4229b511e68a354 (diff)
downloadusdx-71acdf2e69e3cf1cbc073dbbb423d59c6c4a83c7.tar.gz
usdx-71acdf2e69e3cf1cbc073dbbb423d59c6c4a83c7.tar.xz
usdx-71acdf2e69e3cf1cbc073dbbb423d59c6c4a83c7.zip
64bit compatibility fix
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1162 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Game/Code/Classes')
-rw-r--r--Game/Code/Classes/UAudioConverter.pas9
1 files changed, 5 insertions, 4 deletions
diff --git a/Game/Code/Classes/UAudioConverter.pas b/Game/Code/Classes/UAudioConverter.pas
index aa7918fe..74ae88df 100644
--- a/Game/Code/Classes/UAudioConverter.pas
+++ b/Game/Code/Classes/UAudioConverter.pas
@@ -11,6 +11,7 @@ interface
uses
UMusic,
ULog,
+ ctypes,
{$IFDEF UseSRCResample}
samplerate,
{$ENDIF}
@@ -373,7 +374,7 @@ begin
end else begin
NumSamples := InputSize div AudioSampleSize[SrcFormatInfo.Format];
GetMem(FloatInputBuffer, NumSamples * SizeOf(Single));
- src_short_to_float_array(PSmallInt(InputBuffer), FloatInputBuffer, NumSamples);
+ src_short_to_float_array(PCshort(InputBuffer), PCfloat(FloatInputBuffer), NumSamples);
end;
// calculate approx. output size
@@ -389,9 +390,9 @@ begin
with ConversionData do
begin
- data_in := FloatInputBuffer;
+ data_in := PCFloat(FloatInputBuffer);
input_frames := InputSize div SrcFormatInfo.FrameSize;
- data_out := FloatOutputBuffer;
+ data_out := PCFloat(FloatOutputBuffer);
output_frames := OutputSize div DstFormatInfo.FrameSize;
// TODO: set this to 1 at end of file-playback
end_of_input := 0;
@@ -416,7 +417,7 @@ begin
if (DstFormatInfo.Format <> asfFloat) then
begin
NumSamples := ConversionData.output_frames_gen * DstFormatInfo.Channels;
- src_float_to_short_array(FloatOutputBuffer, PSmallInt(OutputBuffer), NumSamples);
+ src_float_to_short_array(PCfloat(FloatOutputBuffer), PCshort(OutputBuffer), NumSamples);
FreeMem(FloatOutputBuffer);
end;