DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Rational R1000/400

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦61f61c44d⟧ Ada Source

    Length: 9216 (0x2400)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, generic, package Sound, seg_021fed

Derivation

└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
    └─ ⟦5a81ac88f⟧ »Space Info Vol 1« 
        └─⟦this⟧ 

E3 Source Code



--      Copyright (c) 1990 Meridian Software Systems, Inc.      --
with Mac_Types;
use Mac_Types;
package Sound is

    Swmode : constant := -1;
    Ftmode : constant := 1;
    Ffmode : constant := 0;
    Synthcodersrc : constant := 16#736E7468#;  -- "snth"
    Soundlistrsrc : constant := 16#736E6420#;  -- "snd "
    Notesynth : constant := 1;
    Wavetablesynth : constant := 3;
    Sampledsynth : constant := 5;
    Midisynthin : constant := 7;
    Midisynthout : constant := 9;
    Midiinitchanfilter : constant := 16#10#;
    Midiinitrawmode : constant := 16#100#;
    Twelthroottwo : constant := 1.05946309434;
    Infinitetime : constant := 16#7FFFFFFF#;
    Nullcmd : constant := 0;
    Initcmd : constant := 1;
    Freecmd : constant := 2;
    Quietcmd : constant := 3;
    Flushcmd : constant := 4;
    Waitcmd : constant := 10;
    Pausecmd : constant := 11;
    Resumecmd : constant := 12;
    Callbackcmd : constant := 13;
    Synccmd : constant := 14;
    Emptycmd : constant := 15;
    Ticklecmd : constant := 20;
    Requestnextcmd : constant := 21;
    Howoftencmd : constant := 22;
    Wakeupcmd : constant := 23;
    Availablecmd : constant := 24;
    Versioncmd : constant := 25;
    Scalecmd : constant := 30;
    Tempocmd : constant := 31;
    Notecmd : constant := 40;
    Restcmd : constant := 41;
    Freqcmd : constant := 42;
    Ampcmd : constant := 43;
    Timbrecmd : constant := 44;
    Wavetablecmd : constant := 60;
    Phasecmd : constant := 61;
    Soundcmd : constant := 80;
    Buffercmd : constant := 81;
    Ratecmd : constant := 82;
    Mididatacmd : constant := 100;
    Setptrbit : constant := 16#8000#;
    Stdqlength : constant := 128;
    Datapointerflag : constant := 16#8000#;
    Initchanleft : constant := 2;
    Initchanright : constant := 3;
    Initchan0 : constant := 4;
    Initchan1 : constant := 5;
    Initchan2 : constant := 6;
    Initchan3 : constant := 7;
    Initsrate22k : constant := 16#20#;
    Initsrate44k : constant := 16#30#;
    Initmono : constant := 16#80#;
    Initstereo : constant := 16#C0#;
    Firstsoundformat : constant := 1;

    type Freewave is array (0 .. 30000) of Byte;

    type Ffsynthrec is
        record
            Mode : Mac_Types.Integer;
            Count : Fixed;
            Wavebytes : Freewave;
        end record;
    type Ffsynthptr is access Ffsynthrec;

    type Tone is
        record
            Count : Mac_Types.Integer;
            Amplitude : Mac_Types.Integer;
            Duration : Mac_Types.Integer;
        end record;

    type Tones is array (0 .. 5000) of Tone;

    type Swsynthrec is
        record
            Mode : Mac_Types.Integer;
            Triplets : Tones;
        end record;
    type Swsynthptr is access Swsynthrec;

    type Wave is array (0 .. 255) of Byte;
    type Waveptr is access Wave;

    type Ftsoundrec is
        record
            Duration : Mac_Types.Integer;
            Sound1rate : Fixed;
            Sound1phase : Longint;
            Sound2rate : Fixed;
            Sound2phase : Longint;
            Sound3rate : Fixed;
            Sound3phase : Longint;
            Sound4rate : Fixed;
            Sound4phase : Longint;
            Sound1wave : Waveptr;
            Sound2wave : Waveptr;
            Sound3wave : Waveptr;
            Sound4wave : Waveptr;
        end record;
    type Ftsndrecptr is access Ftsoundrec;

    type Ftsynthrec is
        record
            Mode : Mac_Types.Integer;
            Sndrec : Ftsndrecptr;
        end record;
    type Ftsynthptr is access Ftsynthrec;

    type Sndcommand is
        record
            Cmd : Mac_Types.Integer;
            Param1 : Mac_Types.Integer;
            Param2 : Longint;
        end record;

    subtype Time is Longint;

    type Modifierstub;
    type Modifierstubptr is access Modifierstub;
    type Modifierstub is
        record
            Nextstub : Modifierstubptr;
            Code : Procptr;
            Userinfo : Longint;
            Count : Time;
            Every : Time;
            Flags : Signedbyte;
            Hstate : Signedbyte;
        end record;

    type Sndchannel;
    type Sndchannelptr is access Sndchannel;
    type Array0_127sndcommand is array (0 .. 127) of Sndcommand;
    type Sndchannel is
        record
            Nextchan : Sndchannelptr;
            Firstmod : Modifierstubptr;
            Callback : Procptr;
            Userinfo : Longint;
            Wait : Time;
            Cmdinprogress : Sndcommand;
            Flags : Mac_Types.Integer;
            Qlength : Mac_Types.Integer;
            Qhead : Mac_Types.Integer;
            Qtail : Mac_Types.Integer;
            Queue : Array0_127sndcommand;
        end record;

    type Array0_1byte is array (0 .. 1) of Byte;
    type Soundheader is
        record
            Sampleptr : Ptr;
            Length : Longint;
            Samplerate : Fixed;
            Loopstart : Longint;
            Loopend : Longint;
            Basenote : Mac_Types.Integer;
            Samplearea : Array0_1byte;
        end record;
    type Soundheaderptr is access Soundheader;

    type Modref is
        record
            Modnumber : Mac_Types.Integer;
            Modinit : Longint;
        end record;

    function Snddocommand
                (Chan : Sndchannelptr; Cmd : Sndcommand; Nowait : Boolean)
                return Oserr;
    pragma Interface (Mpwpascal, Snddocommand, "16#A803#");

    function Snddoimmediate
                (Chan : Sndchannelptr; Cmd : Sndcommand) return Oserr;
    pragma Interface (Mpwpascal, Snddoimmediate, "16#A804#");

    function Sndnewchannel (Chan : Sndchannelptr;
                            Synth : Mac_Types.Integer;
                            Init : Longint;
                            Userroutine : Procptr) return Oserr;
    pragma Interface (Mpwpascal, Sndnewchannel, "16#A807#");

    function Snddisposechannel
                (Chan : Sndchannelptr; Quietnow : Boolean) return Oserr;
    pragma Interface (Mpwpascal, Snddisposechannel, "16#A801#");

    function Sndplay (Chan : Sndchannelptr; Sndhdl : Handle; Async : Boolean)
                     return Oserr;
    pragma Interface (Mpwpascal, Sndplay, "16#A805#");

    function Sndcontrol (Id : Mac_Types.Integer; Cmd : Sndcommand) return Oserr;
    pragma Interface (Mpwpascal, Sndcontrol, "16#A806#");

    procedure Setsoundvol (Level : Mac_Types.Integer);
    pragma Interface (Mpwpascal, Setsoundvol, "SETSOUNDVOL");

    procedure Getsoundvol (Level : in out Mac_Types.Integer);
    pragma Interface (Mpwpascal, Getsoundvol, "GETSOUNDVOL");

    procedure Startsound
                 (Synthrec : Ptr; Numbytes : Longint; Completionrtn : Procptr);
    pragma Interface (Mpwpascal, Startsound, "STARTSOUND");

    procedure Stopsound;
    pragma Interface (Mpwpascal, Stopsound, "STOPSOUND");

    function Sounddone return Boolean;
    pragma Interface (Mpwpascal, Sounddone, "SOUNDDONE");

    function Sndaddmodifier (Chan : Sndchannelptr;
                             Modifier : Procptr;
                             Id : Mac_Types.Integer;
                             Init : Longint) return Oserr;
    pragma Interface (Mpwpascal, Sndaddmodifier, "16#A802#");

    generic
        with procedure Routine (Chan : Sndchannelptr; Cmd : Sndcommand);
    procedure Usercallbackroutine;

    generic
        with procedure Routine;
    procedure Usercompletionroutine;

    generic
        with function Routine (Chan : Sndchannelptr;
                               Cmd : Sndcommand;
                               Firstmod : Modifierstubptr) return Boolean;
    procedure Usermodifierroutine;

end Sound;


E3 Meta Data

    nblk1=8
    nid=0
    hdr6=10
        [0x00] rec0=1e rec1=00 rec2=01 rec3=02a
        [0x01] rec0=1d rec1=00 rec2=02 rec3=03c
        [0x02] rec0=25 rec1=00 rec2=03 rec3=01c
        [0x03] rec0=22 rec1=00 rec2=04 rec3=060
        [0x04] rec0=20 rec1=00 rec2=05 rec3=00e
        [0x05] rec0=1d rec1=00 rec2=06 rec3=01e
        [0x06] rec0=16 rec1=00 rec2=07 rec3=044
        [0x07] rec0=1f rec1=00 rec2=08 rec3=000
    tail 0x2151d44ec83906e48f34d 0x42a00088462060003