Re: Getting raw audio data from an AIFF file
Re: Getting raw audio data from an AIFF file
- Subject: Re: Getting raw audio data from an AIFF file
- From: john <email@hidden>
- Date: Thu, 13 Feb 2003 00:46:13 -0500
Hi Brian,
If I may add to your posting. While SndKit is great certainly, and its
ObjC makes it even more desirable, I think it's worth mentioning
setting up a basic AIFF reader using an NSFileHandle is quite simple.
Taking a quick look at the many open source code for reading sound
files, you can easily get an understanding of what is necessary.
Probably more quickly than learning the SndKit API (though that
provides many other goodies worth checking out!).
-- John
Hello,
I am sorry for the delay in my response (things move fast on this
list!), but
I wanted to do a little research before replying.
I remember that the original AppKit/SoundKit "Sound" class allowed
access to
audio data, including routines for compacting the data after edits
which have
inserted or deleted samples. But a quick check of the Cocoa
documentation for
the NSSound class does not seem to reveal any access to sound data,
although
there is support for playing AIFF within a limited subset of the
possible data
formats. If you want to use Cocoa, you might be able to get at the
sound data
via -[NSSound writeToPasteboard:] or by directly accessing the _data0
and
_data1 instance variables (the former is a bit of a hack, and the
latter is a
highly contraindicated hack!). It would really be nice if Apple
implemented
all the functionality that was in the former AppKit/SoundKit Sound
class for
the newer Cocoa AppKit NSSound class. I think of the SoundKit as part
of the
AppKit, because it predates even the Foundation Kit, but technically
the
SoundKit was not part of the AppKit proper.
Fortunately, ever since NeXT let the SoundKit go to the Stanford Music
Department (I believe that was the path it took), expert programmers
have been
maintaining the original SoundKit code in the renamed SndKit, which is
distributed as part of the MusicKit. Check out MusicKit.org - a good
starting
place might be http://www.musickit.org/MusicKitConcepts/thesndkit.html
for your
particular interests.
The two options above are the most Objective-C-friendly choices I am
aware of
at this time. I would recommend the SndKit "Snd" object over hacking
too
deeply into NSSound. You should find that the SndKit is as easy to
use as
Cocoa, due to its object oriented design, as opposed to QuickTime or
other
old-school standard C libraries.
Brian Willoughby
Sound Consulting
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.