From: tmoran@acm.org
Subject: Re: Ada and MidiShare
Date: Sun, 12 Oct 2003 06:27:23 GMT
Date: 2003-10-12T06:27:23+00:00 [thread overview]
Message-ID: <fv6ib.740551$Ho3.181752@sccrnsc03> (raw)
In-Reply-To: 3f88cb3d$1@news.broadpark.no
>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.
next prev parent reply other threads:[~2003-10-12 6:27 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-12 3:24 Ada and MidiShare Dr. Justice
2003-10-12 6:27 ` tmoran [this message]
2003-10-12 13:59 ` aleistad
2003-10-12 19:01 ` tmoran
2003-10-12 10:30 ` Stephane Richard
2003-10-12 14:16 ` aleistad
2003-10-12 14:47 ` Stephane Richard
2003-10-13 8:51 ` Craig Carey
2003-10-13 14:02 ` aleistad
2003-10-14 2:01 ` Jeff C,
2003-10-14 16:02 ` aleistad
2003-10-14 16:12 ` aleistad
2003-10-14 16:58 ` Preben Randhol
2003-10-15 20:55 ` aleistad
2003-10-15 22:24 ` Chad R. Meiners
2003-10-16 1:08 ` aleistad
2003-10-16 17:08 ` Pascal Obry
2003-10-16 17:36 ` aleistad
2003-10-16 19:48 ` Pascal Obry
2003-10-16 20:39 ` Stephen Leake
2003-10-16 8:16 ` Preben Randhol
2003-10-16 12:54 ` aleistad
2003-10-16 20:00 ` tmoran
2003-10-16 23:50 ` aleistad
2003-10-17 0:04 ` aleistad
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox