text
stringlengths
0
234
#else
Fixed_64_PCM_As_Integer_Text_IO.Put
(PCM_Integer, Base => 2, Width => 68);
#end if;
end if;
New_Line;
Function Definition: procedure Display_Info
Function Body: (WF : Wavefile;
Header : String)
is
Separator : constant String
:= "===========================================================";
begin
Put_Line (Separator);
Put_Line (Header);
Display_Info (WF);
Put_Line (Separator);
end Display_Info;
--------------------
-- Write_Wavefile --
--------------------
procedure Write_Wavefile
(Wav_File_Name : String;
Test_Bits : Wav_Bit_Depth)
is
WF_Out : Wavefile;
Wave_Format : Wave_Format_Extensible;
begin
Wave_Format := Init (Bit_Depth => Test_Bits,
Sample_Rate => Sample_Rate_44100,
Number_Of_Channels => 2,
#if NUM_TYPE'Defined and then (NUM_TYPE = "FLOAT") then
Use_Float => True);
#else
Use_Float => False);
#end if;
WF_Out.Set_Format_Of_Wavefile (Wave_Format);
WF_Out.Create (Out_File, Wav_File_Name);
Write_PCM_Vals (WF_Out, PCM_Ref);
WF_Out.Close;
end Write_Wavefile;
-------------------
-- Read_Wavefile --
-------------------
procedure Read_Wavefile
(Wav_File_Name : String;
PCM_DUT : out PCM_Buffer)
is
WF_In : Wavefile;
-- Wave_Format : Wave_Format_Extensible;
EOF : Boolean;
Samples : Integer := 0;
begin
WF_In.Open (In_File, Wav_File_Name);
-- Wave_Format := WF_In.Format_Of_Wavefile;
if Verbose then
Display_Info (WF_In, "Input File:");
end if;
Samples := 0;
PCM_DUT := (others => 0.0);
loop
Samples := Samples + 1;
-- Put ("[" & Integer'Image (Samples) & "]");
declare
PCM_Buf : constant PCM_Buffer := Get (WF_In);
begin
PCM_DUT (Samples) := PCM_Buf (PCM_Buf'First);
Function Definition: procedure Display_PCM_Vals
Function Body: (PCM_Vals : PCM_Buffer;
Header : String);
procedure Write_PCM_Vals
(WF : in out Wavefile;
PCM_Vals : PCM_Buffer);
function PCM_Data_Is_OK
(PCM_Ref, PCM_DUT : PCM_Buffer) return Boolean;
function PCM_Data_Is_OK
(Test_Bits : Wav_Bit_Depth;
PCM_DUT : PCM_Buffer) return Boolean;
function Wav_IO_OK_For_Audio_Resolution
(Test_Bits : Wav_Bit_Depth;
Wav_Test_File_Name : String) return Boolean;
procedure Display_Info
(WF : Wavefile;