Problems with sound

John.Maloney at disney.com John.Maloney at disney.com
Mon Jun 7 14:59:12 UTC 1999


Paul,

One possible problem is that you tried to uncompress all the
sound data at once. This would be 45 * 60 * 8000 * 2
or 43,200,000 bytes of sound data, in addition to the
GSM compressed bytes (roughly a tenth of the uncompressed
size) plus space for the image itself and perhaps some
working room. The 60m you allocated to the VM may not have
been quite enough...

Another posssible problem is that the GSM file created
outside of Squeak may include header or block information. If
so, you'll need to parse the file format and extract the
actual GSM data before passing to Squeak's GSM codec.

What tool did you use to do the compression?

I'd try to separate these two possible problems by trying
this on a small test file. If that works, then it's just
a memory problem. If not, you'll need to get into the GSM
file format created by your non-Squeak application.

	-- John


At 6:27 PM -0400 6/6/99, Paul R. Bernard wrote:
>I was experimenting with playing sampled sounds and GSM compression
>and I've run across a problem.
>
>I have a GSM compressed file about 45 minutes in length.  It had been
>recorded and compressed completely outside of squeak.  I wanted to see
>if I could play it within squeak.
>
>I did the following in a workspace with squeak 2.4c.
>
>---------------------------------------------------------------------------
>gsmFile := (FileStream readOnlyFileNamed: '/home/prb/scifri2.gsm') binary.
>gsmChannels := Array new: 1.
>gsmChannels at: 1 put: gsmFile contentsOfEntireFile.
>gsmFile close.
>
>gsm := CompressedSoundData new
>	codecName: #GSMCodec;
>	soundClassName: #SampledSound.
>gsm
>	channels: gsmChannels;
>	samplingRate: 8000;
>	firstSample: 1;
>	loopEnd: (gsmChannels at: 1) size;
>	loopLength: 0.0;
>	perceivedPitch: 100.0;
>	gain: 1.0.
>
>Time millisecondsToRun: [uncompressed := gsm asSound].
>
>SoundPlayer startPlayerProcessBufferSize: 1000 rate: 8000 stereo: false;
>	stopReverb;
>	playSound: uncompressed.
>---------------------------------------------------------------------------
>
>Everything up to the playback worked exactly as I expected.  The actual
>playback failed quite early with a segmentation fault as follows
>...





More information about the Squeak-dev mailing list