diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/portaudio-streams.adb | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/src/portaudio-streams.adb b/src/portaudio-streams.adb index 070da8b..e067d24 100644 --- a/src/portaudio-streams.adb +++ b/src/portaudio-streams.adb @@ -17,8 +17,7 @@ use type Interfaces.C.double, Interfaces.C.int, Interfaces.C.long, - Interfaces.C.unsigned_long, - System.Address; + Interfaces.C.unsigned_long; package body Portaudio.Streams is @@ -255,32 +254,32 @@ package body Portaudio.Streams is ---------------------- function Stream_Callback_Hook - (Input_Ptr : in System.Address; - Output_Ptr : in System.Address; + (Input_Ptr : in Storage.Integer_Address; + Output_Ptr : in Storage.Integer_Address; Frame_Count : in Interfaces.C.unsigned_long; - Time_Ptr : in System.Address; + Time_Ptr : in Storage.Integer_Address; Flag_Mask : in Interfaces.C.unsigned_long; - Userdata : in System.Address) + Userdata : in Storage.Integer_Address) return Interfaces.C.int is Stream_Actual : Audio_Stream; - for Stream_Actual'Address use Userdata; + for Stream_Actual'Address use Storage.To_Address (Userdata); pragma Import (Ada, Stream_Actual); Input_Buffer : Buffer := (My_Sam_Code => Stream_Actual.Sin, My_Channels => Natural (Stream_Actual.Chin), My_Frames => Frame_Amount (Frame_Count), - My_Array => Input_Ptr); + My_Array => Storage.To_Address (Input_Ptr)); Output_Buffer : Buffer := (My_Sam_Code => Stream_Actual.Sout, My_Channels => Natural (Stream_Actual.Chout), My_Frames => Frame_Amount (Frame_Count), - My_Array => Output_Ptr); + My_Array => Storage.To_Address (Output_Ptr)); Raw_Time : C_Callback_Time_Info; - for Raw_Time'Address use Time_Ptr; + for Raw_Time'Address use Storage.To_Address (Time_Ptr); pragma Import (Ada, Raw_Time); Result : Callback_Result; @@ -301,10 +300,10 @@ package body Portaudio.Streams is end Stream_Callback_Hook; procedure Stream_Finished_Callback_Hook - (Userdata : in System.Address) + (Userdata : in Storage.Integer_Address) is Stream_Actual : Audio_Stream; - for Stream_Actual'Address use Userdata; + for Stream_Actual'Address use Storage.To_Address (Userdata); pragma Import (Ada, Stream_Actual); begin Stream_Actual.Finfun.all; |