href=http://www.son.washington.edu/~brianp>brianp@u.washington.edu get

Subject: Re: How many clips can you mmopen? and what error can you get

> I have been told that There is no physical limit to how many clips you can
> have open at one time.  And I have been advised to opening clips as you
enter
> pages.
>
> But hoe long can you keep do this, will the use run out of memmory on a low
> speced system, how can I check how much memmory is left tolaod clips, and
what
> sort of error would I expect
>
> A complete lesion is likly to be about 1Mb of sound files
> Any thoughts on the subject?
The number of clips you can open at the one time seems to be dependant on the amount of free DOS conventional memory. If you have 550K free then you will be able to open about 20 clips. If you have only 480K then you may only be able to open 4 or 5 clips at the one time. Of course your mileage will vary.

Since my apps depend on preloading clips etc. I need to know what the clip memory situation really is, so I wrote this:

if clipsFree() < 4
  request "You do not have enough conventional DOS memory to run this app." \
    with "Exit" or "Continue Anyway"
  if it is "Exit"
      send exit
  end
end
The support routine requires that you have defined MAXCLIP number of clips which are called "keyTone1" "keyTone2" "keyTone3" "keyTone4" etc. Of course you can use a different root name e.g. z1 z2 z3 etc.


to get clipsFree
        local openLzt, numClipsAlreadyOpen
        MAXCLIPS = 9
        ROOTCLIPNAME = "keyTone"

        numClipsAlreadyOpen = itemCount(sysOpenMedia)

        sv = sysSuspend
        sysSuspend = false
        step i from numClipsAlreadyOpen to MAXCLIPS
                get ROOTCLIPNAME & i
                clear sysError
                mmOpen Clip it
                mmyield; mmyield; mmyield; mmyield; mmyield; mmyield
                if sysError <> null
                        send closeClipList openLzt
                        return i
                else
                        push Clip it onto openLzt
                end
        end
        send closeClipList openLzt
        sysSuspend = sv
        return MAXCLIPS
end

to handle closeClipList openLzt
        while openLzt <> null
                pop openLzt
                mmclose it
                mmyield; mmyield; mmyield; mmyield; mmyield; mmyield
        end
end
---------------------------------------------------
Andy Bulka  abulka@empire.com.au  ph: +613 593-1389
         "Author Level - and loving it"
  Melbourne TUG (Toolbook User Group) Australia.
---------------------------------------------------

Revised 9/6/95
brianp@u.washington.edu (Brian Parkhurst)
University of Washington
Box 357260
Seattle, WA 98195-7260
206/543-9175