Concatenating binary files?

Boris Gaertner Boris.Gaertner at gmx.net
Sun Mar 30 08:01:06 UTC 2003


Jimmie Houchin <jhouchin at texoma.net> wrote:
> I tried using StandardFileStream and #nextPutAll: to write the 2 wave 
> files into a single then I got an error because #nextPutAll: accepts 
> only strings. (I forgot) :)
> 
This is not always true.
As soon as you have created the stream, you should send it the message
binary. This messages replaces the standard buffer (an instance of String)
with a buffer that is an instance of ByteArray.
As soon as you have this buffer, you should be able to file out instances
of ByteArray.

(Have a look at AbstractSound>>storeWAVOnFileNamed)

Hope this helps.
Boris



More information about the Squeak-dev mailing list