'From Squeak3.3alpha of 30 January 2002 [latest update: #4827] on 28 April 2002 at 3:53:25 pm'! "Change Set: sndPlugComments-ls Date: 28 April 2002 Author: Lex Spoon Updates three sound-related comments regarding sound data formats" ! !SoundPlugin commentStamp: 'ls 4/28/2002 15:47' prior: 0! This plugin implements the main sound related primiives. FORMAT OF SOUND DATA Squeak uses 16-bit signed samples encoded in the host's endian order. A sound buffer is a sequence of "frames", or "slices", where each frame usually includes one sample per channel. The exception is that for playback, each frame always includes 2 samples; for monaural playback, every other sample is ignored. ! !SoundPlugin methodsFor: 'primitives' stamp: 'ls 4/28/2002 15:32'! primitiveSoundAvailableSpace "Returns the number of bytes of available sound output buffer space. This should be (frames*4) if the device is in stereo mode, or (frames*2) otherwise" | frames | self primitive: 'primitiveSoundAvailableSpace'. frames _ self cCode: 'snd_AvailableSpace()'. "-1 if sound output not started" interpreterProxy success: frames >= 0. ^frames asPositiveIntegerObj! !