From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,441ab6d6abb8b3af X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-10-11 23:27:24 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!wn14feed!wn13feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi.com!sccrnsc03.POSTED!not-for-mail From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: Re: Ada and MidiShare References: <3f88cb3d$1@news.broadpark.no> X-Newsreader: Tom's custom newsreader Message-ID: NNTP-Posting-Host: 12.234.124.41 X-Complaints-To: abuse@comcast.net X-Trace: sccrnsc03 1065940043 12.234.124.41 (Sun, 12 Oct 2003 06:27:23 GMT) NNTP-Posting-Date: Sun, 12 Oct 2003 06:27:23 GMT Organization: Comcast Online Date: Sun, 12 Oct 2003 06:27:23 GMT Xref: archiver1.google.com comp.lang.ada:712 Date: 2003-10-12T06:27:23+00:00 List-Id: >It seems that Claw supports at least audio, but that is only for Windows. >The audio support I'd want is very simple, just buffered streams to/from >the audio inputs/outputs for realtime recording and playback. Claw multimedia audio under Windows includes things like: For simple buffered Stream IO: type Stream_Type(Channel_Count : Channel_Counts; Byte_Depth : Byte_Depths; Sample_Rate, Length : CLAW.DWord; Buffer_Count : Buffer_Counts) is new Ada.Streams.Root_Stream_Type with private; procedure Open_Output(Stream : in out Stream_Type; Playing_Device : in Playing_Device_ID_Type); procedure Write(Stream : in out Stream_Type; Item : in Ada.Streams.Stream_Element_Array); procedure Close(Stream : in out Stream_Type); For buffered IO with structured data (ie, Mono8_Wave_Type, Stereo16_Wave_Type, etc): type Mono8_Stream_Type(Sample_Rate, Length : CLAW.DWord; Buffer_Count : Buffer_Counts) is new Stream_Type with private; procedure Mono8_Wave_Type_Read(Stream : access Ada.Streams.Root_Stream_Type'class; Item : out Mono8_Wave_Type); procedure Mono8_Wave_Type_Write(Stream : access Ada.Streams.Root_Stream_Type'class; Item : in Mono8_Wave_Type); For asynchronous IO, where you get a callback on each buffer load: type Async_Type(Channel_Count : Channel_Counts; Byte_Depth : Byte_Depths; Sample_Rate, Length : CLAW.DWord; Buffer_Count : Buffer_Counts) is abstract new Ada.Finalization.Limited_Controlled with private; procedure When_Listen(Async : in out Mono8_Async_Type; Sound : in Mono8_Wave_Type) is abstract; -- User supplied routine, called with each buffer load of incoming sound. procedure When_Say(Async : in out Mono8_Async_Type; Sound : out Mono8_Wave_Type) is abstract; -- User supplied routine, called to get sound for outgoing buffer. etc.