Hi,
I'm wondering about converting my Carbon app to Cocoa but there's two big
problems (for me). My app reads several data files created by another
application and within a data file lurks image and AIFF files. That is a
data file can be comprised of several PCX and AIFF files concatenated
together. In Carbon I can seek to the correct spot in the data file and read
the image data or AIFF data into memory and then convert and use DrawPicture
or PlaySound. But what do I use in Cocoa? Every function that could be ok
seems to want to read a disk file rather than a file already loaded into
RAM.
Any help appreciated, thanks.
Paul
Doc O'Leary - 27 Oct 2004 13:26 GMT
In article
<417f374e$0$687$61c65585@uq-127creek-reader-02.brisbane.pipenetworks.com
.au>,
> In Carbon I can seek to the correct spot in the data file and read
> the image data or AIFF data into memory and then convert and use DrawPicture
> or PlaySound. But what do I use in Cocoa? Every function that could be ok
> seems to want to read a disk file rather than a file already loaded into
> RAM.
I highly suggest actually reading the Cocoa documentation. Both NSImage
(and various representations) and NSSound support the -initWithData:
method.