diff options
author | Jedidiah Barber <contact@jedbarber.id.au> | 2023-07-26 22:32:42 +1200 |
---|---|---|
committer | Jedidiah Barber <contact@jedbarber.id.au> | 2023-07-26 22:32:42 +1200 |
commit | a9a297e8f7282bcc9b3ffb14862160bb1abad511 (patch) | |
tree | a98e21194729781855a7844235994afe5cb91b98 /src/libao.adb | |
parent | 2a68b941e023a891df495ae6636fe3ae7c5e66b6 (diff) |
Changed data buffer type for better interop with other libraries
Diffstat (limited to 'src/libao.adb')
-rw-r--r-- | src/libao.adb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libao.adb b/src/libao.adb index 0875ba4..48a0ac1 100644 --- a/src/libao.adb +++ b/src/libao.adb @@ -119,7 +119,7 @@ package body Libao is function ao_play (Output_Device : in System.Address; - Samples : in Interfaces.C.char_array; + Samples : in System.Address; Num_Bytes : in Interfaces.Unsigned_32) return Interfaces.C.int; pragma Import (C, ao_play, "ao_play"); @@ -588,7 +588,8 @@ package body Libao is is Result : Interfaces.C.int := ao_play (Output_Device => Output.Ptr, - Samples => Interfaces.C.To_C (Item => String (Samples), Append_Nul => False), + Samples => Samples'Address, + --Samples => Interfaces.C.To_C (Item => String (Samples), Append_Nul => False), Num_Bytes => Interfaces.Unsigned_32 (Samples'Length)); begin if Result = 0 then |