From: doiron@starpt.UUCP (Glenn Doiron)
Newsgroups: comp.sys.amiga.advocacy
Subject: Big Deal (Was Re: OS/2 .MOD player! Wheee!)
Date: 6 Nov 92 02:48:32 GMT
Organization: 68K Software Development
X-NewsSoftware: GRn 1.16e (7/4/92) by Mike Schwartz & Michael B. Smith

In article <1992Oct28.180233.6085@ncsu.edu> linville@garfield.catt.ncsu.edu (John W. Linville) writes:
> In article <BwtvJw.EEu@lysator.liu.se> boberg@lysator.liu.se (Stefan Boberg) writes:
> >linville@garfield.catt.ncsu.edu (John W. Linville) writes:
> >>How about the fact that it is multi-threaded?  Has AmigaDOS added this ability
> >>yet?  If not, I'll bet there aren't many multi-threaded MOD players for Amigas.

Watch out, we have another newbie that just learned his first buzzword...

> >  1. The Amiga has got DMA sound, so a MOD player doesn't need multithreading.
> >     In fact, the amount of work it takes to play sounds is so small that most
> >     players run as an interrupt that is executed 50 times/second.
> 
> It will probably surprise you to learn that the SB and SBPro both have DMA.  
> What happens when a mod is big enough to eat-up your available Chip RAM?  You
> either can't play it or you have to store part of it in Fast RAM and swap it.

What kind of samples are *YOU* using?  I've never seen a .mod that's more
than 512K, much less a meg or even two.  MOD's are NOT digitized segments
of an actual song.  So fast->chip copying should never take place... it's a
waste of CPU time.  Different pitches are created by changing the playback
frequency.

> Multi-threading comes in really handy, so that you can constantly keep the
> 'buffer' (Chip RAM in your case) full without any interruption.  The method
> you suggest (running on an arbitrary timer) seems wasteful to me.

That's because you are thinking in terms of the SB, which is NOT an Amiga.
And your extrapolation of your SB experience -> Amiga experience, however,
is *quite* incorrect.  Either method will work, and neither is more
'wasteful' than the other (well, let me qualify that:  it depends on how
much overhead there is in processing an interrupt vs. a signal/task
switch).

> >  2. AmigaDOS doesn't need anything called "threads" since ALL processes in
> >     AmigaDOS are threads. I.e. all processes/tasks share the same address
> >     space.
> 
> You have a poor idea of what threads are.  The purpose of threads is not to
> share memory, but to allow different parts of the same program to execute
> (virtually) in parallel.

<< sarcastic mode ON >>

Gee, I wish the Amiga had that.

> BTW, all processes/tasks sharing the same address space under AmigaDOS is a 
> BUG, not a feature.

<< sarcastic mode PERMANENTLY on >>

Maybe I should file a BUG report to Commodore about that one.

> John W. Linville
> 
> +-----------------------------------------------------------------------------+
> |   John W. Linville                 Amateur radio:  KD4KHC                   |
> |   #include "std_disclaimer.h"      E-mail:  linville@catt.ncsu.edu          |
> +-----------------------------------------------------------------------------+

Glenn Doiron
--
Amiga UUCP+
Origin:  uunet.uu.net!starpt.UUCP!doiron (Organization:68K Software Development)
         BIX: gdoiron
** Not enough memory to perform requested operation.  Add 4 megs and retry.
Newsgroups: comp.sys.amiga.advocacy