midi_0.2.0_6a6306df/src/midi-encoder.adb

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package body MIDI.Encoder is

   ------------
   -- Encode --
   ------------

   function Encode (Msg : Message) return HAL.UInt8_Array is
      Result : HAL.UInt8_Array (1 .. Rep_Size (Msg))
        with Address => Msg'Address;
   begin
      return Result;
   end Encode;

   ------------
   -- Encode --
   ------------

   function Encode (Msg : Message) return System.Storage_Elements.Storage_Array
   is
      use System.Storage_Elements;
      Result : Storage_Array  (1 .. Storage_Offset (Rep_Size (Msg)))
        with Address => Msg'Address;
   begin
      return Result;
   end Encode;

end MIDI.Encoder;