text stringlengths 0 234 |
|---|
Wav_Buf : constant Wav_Buffer_Fixed_16 |
(1 .. Number_Of_Channels (WF_In)) := (others => 0.5); |
begin |
Start_Time := Clock; |
loop |
Write_Wav_MC_Samples : declare |
begin |
Cnt := Cnt + 1; |
Put (WF_Out, Wav_Buf); |
exit when Cnt = Total_Cnt; |
end Write_Wav_MC_Samples; |
end loop; |
Stop_Time := Clock; |
Elapsed_Time := Stop_Time - Start_Time; |
-- Res (Wavefile_Write_Benchmark) := Elapsed_Time; |
Res (Wavefile_Write_Benchmark) := |
kHz_Per_Sample (Elapsed_Time, |
CPU_MHz, |
Number_Of_Channels (WF_In), |
Cnt); |
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; |
Header : String); |
procedure Write_Wavefile |
(Wav_File_Name : String; |
Test_Bits : Wav_Bit_Depth); |
procedure Read_Wavefile |
(Wav_File_Name : String; |
PCM_DUT : out PCM_Buffer); |
function Image (B : Wav_Bit_Depth) return String renames |
Audio.RIFF.Wav.Formats.Report.Image; |
---------------------- |
-- Display_PCM_Vals -- |
---------------------- |
procedure Display_PCM_Vals (PCM_Vals : PCM_Buffer; |
Header : String) |
is |
#if NUM_TYPE'Defined and then (NUM_TYPE = "FLOAT") then |
Display_Integer_Value : constant Boolean := False; |
#else |
Display_Integer_Value : constant Boolean := True; |
#end if; |
begin |
Put_Line (Header); |
for Sample_Count in PCM_Vals'Range loop |
declare |
#if NUM_TYPE'Defined and then (NUM_TYPE = "FLOAT") then |
PCM_Integer : array (1 .. 2) of Integer_64 |
with |
Address => PCM_Vals (Sample_Count)'Address, |
Size => 128; |
#else |
PCM_Integer : Integer_64 |
with |
Address => PCM_Vals (Sample_Count)'Address, |
Size => 64; |
#end if; |
begin |
Put (" Val: "); |
PCM_Sample_Text_IO.Put (Item => PCM_Vals (Sample_Count), |
Fore => 5, |
Aft => 60, |
Exp => 5); |
if Display_Integer_Value then |
Put (" - "); |
#if NUM_TYPE'Defined and then (NUM_TYPE = "FLOAT") then |
for I in PCM_Integer'Range loop |
Fixed_64_PCM_As_Integer_Text_IO.Put |
(PCM_Integer (I), Base => 2, Width => 68); |
end loop; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.