summaryrefslogtreecommitdiff
path: root/example/sine_block.adb
diff options
context:
space:
mode:
authorJedidiah Barber <contact@jedbarber.id.au>2023-07-26 19:51:33 +1200
committerJedidiah Barber <contact@jedbarber.id.au>2023-07-26 19:51:33 +1200
commit6a4fd86a07ebe97c8067e0e732efc2f708a2c6a8 (patch)
tree67e44274d89448305c3b54c204789a3e0aae0382 /example/sine_block.adb
parenta9eb2fc7099b78287faf5765e6b9721ce4e93fc1 (diff)
Changed data buffer types for easier interop with other libraries
Diffstat (limited to 'example/sine_block.adb')
-rw-r--r--example/sine_block.adb5
1 files changed, 3 insertions, 2 deletions
diff --git a/example/sine_block.adb b/example/sine_block.adb
index 52c46fe..5ff5be5 100644
--- a/example/sine_block.adb
+++ b/example/sine_block.adb
@@ -8,6 +8,7 @@ with
Ada.Numerics.Long_Elementary_Functions,
Ada.Text_IO,
+ Interfaces,
Portaudio.Streams;
@@ -30,7 +31,7 @@ procedure Sine_Block is
Sample_Buffer : Pstm.Buffer := Pstm.Wrap (Sample_Array, Per_Buffer, Channels);
type Table_Index is mod 200;
- Sine_Table : array (Table_Index) of Pstm.Float_32;
+ Sine_Table : array (Table_Index) of Interfaces.IEEE_Float_32;
Left_Phase, Right_Phase : Table_Index := 0;
Left_Increment : Table_Index := 1;
@@ -49,7 +50,7 @@ begin
"Buffer Size =" & Pstm.Frame_Amount'Image (Per_Buffer));
for Index in Table_Index loop
- Sine_Table (Index) := Pstm.Float_32
+ Sine_Table (Index) := Interfaces.IEEE_Float_32
(Elem.Sin (Long_Float (Index) / Long_Float (Table_Index'Last_Valid) * Num.Pi * 2.0));
end loop;