Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions src/audio-wavefiles-write.adb
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,11 @@ package body Audio.Wavefiles.Write is

function Chunk_Size (Format_Size : Unsigned_16) return Unsigned_32 is
begin
if Format_Size = 0 then
return Wave_Format_Chunk_Size'Enum_Rep (Wave_Format_18_Size);
else
return Wave_Format_Chunk_Size'Enum_Rep
(Wave_Format_Extensible_Size);
end if;
return
(if Format_Size = 0 then
Wave_Format_Chunk_Size'Enum_Rep (Wave_Format_18_Size)
else Wave_Format_Chunk_Size'Enum_Rep
(Wave_Format_Extensible_Size));
end Chunk_Size;

-----------------
Expand Down
21 changes: 6 additions & 15 deletions src/audio-wavefiles.adb
Original file line number Diff line number Diff line change
Expand Up @@ -206,13 +206,9 @@ package body Audio.Wavefiles is
(WF : in out Wavefile) return Boolean
is
begin
if End_Of_File (WF.Sample_Pos) or
Ada.Streams.Stream_IO.End_Of_File (WF.File)
then
return True;
else
return False;
end if;
return
End_Of_File (WF.Sample_Pos) or
Ada.Streams.Stream_IO.End_Of_File (WF.File);
end End_Of_File;

-----------
Expand Down Expand Up @@ -304,14 +300,9 @@ package body Audio.Wavefiles is
function Is_Supported_Format (W : Wave_Format_Extensible)
return Boolean is
begin
if not (W.Sub_Format = GUID_Undefined
or W.Sub_Format = GUID_PCM
or W.Sub_Format = GUID_IEEE_Float)
then
return False;
end if;

return True;
return
W.Sub_Format = GUID_Undefined or W.Sub_Format = GUID_PCM or
W.Sub_Format = GUID_IEEE_Float;
end Is_Supported_Format;

-------------------
Expand Down