Trying to make Linux squawk (startPlayingImmediately:)
Andreas Raab
raab at isgnw.cs.Uni-Magdeburg.DE
Sun Feb 15 12:15:50 UTC 1998
Christopher,
> I'm trying to cruft up some sound code for Linux, and the main worrisome
> part is snd_InsertSamplesFromLeadTime().
I wouldn't worry to much about it. Here is an email I recently sent to
John concerning snd_InsertSamplesFromLeadTime().
Forwarded message:
> From raab Thu Feb 5 23:04:35 1998
> Subject: SoundPlayer>>startPlayingImmediately
> To: johnm at wdi.disney.com (John Maloney)
> Date: Thu, 5 Feb 1998 23:04:35 +0100 (MEZ)
> X-Mailer: ELM [version 2.4 PL21]
> MIME-Version: 1.0
> Content-Type: text/plain; charset=US-ASCII
> Content-Transfer-Encoding: 7bit
> Content-Length: 1666
>
> John,
>
> After reviewing SoundPlayer>>startSoundImmediately I found that the
> current implementation can not work unless one is extremely careful about
> buffer sizes in the VM. Currently, the VM is assumed to slurp at least one
> buffer or the code will fail. Unfortunately one can easily enlarge
> the buffer in SoundPlayer>>initialize and I know of people who have done
> this. In this case you can't garantuee at all that the VM will take your
> buffer. There are two possible solutions for the problem:
> a) Add the possibility to rewind sounds. In this case one could just add a
> (rather large) mix in buffer for the new sound which can be partially
> (or not at all) processed by the VM. The remaining samples are rewinded
> (rewound? whatsoever :) in the sound.
> b) In case you don't want a) (which has number of problems) the
> alternative is to just ask the VM how many samples it can mix in.
> This value may not be actual number of samples mixed in (because of
> the time needed to prepare the buffer) but could be used as upper bound
> such that
> upperBound - numberOfMixedSamples < bufferSize
> holds. It's probably the better solution although it needs an
> additional primitive.
>
> Thoughts? Comments?
> Andreas
>
> PS. For 1.31 I'll be just disabling the quick start feature until we
> sorted it out.
> --
> Linear algebra is your friend - Trigonometry is your enemy.
> +===== Andreas Raab ============= (raab at isg.cs.uni-magdeburg.de) =====+
> I Department of Simulation and Graphics Phone: +49 391 671 8065 I
> I University of Magdeburg, Germany Fax: +49 391 671 1164 I
> +=============< http://isgwww.cs.uni-magdeburg.de/~raab >=============+
>
--
Linear algebra is your friend - Trigonometry is your enemy.
+===== Andreas Raab ============= (raab at isg.cs.uni-magdeburg.de) =====+
I Department of Simulation and Graphics Phone: +49 391 671 8065 I
I University of Magdeburg, Germany Fax: +49 391 671 1164 I
+=============< http://isgwww.cs.uni-magdeburg.de/~raab >=============+
More information about the Squeak-dev
mailing list
|