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: Bill Stewart <email@hidden>
- Date: Thu, 13 Feb 2003 11:46:52 -0800
And at the risk of doing self-promotion.. I think the AudioFile API is
by far your best choice... It deals with different types of audio files
transparently and we are doing more work on this for the next release
to support some other files types as well as deal with the whacky
encoded data you can find in these files... On top of all this, it
interfaces nicely to the AudioConverter API to do with any data
transformations you need to do...
Bill
On Wednesday, February 12, 2003, at 09:46 PM, john wrote:
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.
--
mailto:email@hidden
tel: +1 408 974 4056
________________________________________________________________________
__
"Much human ingenuity has gone into finding the ultimate Before.
The current state of knowledge can be summarized thus:
In the beginning, there was nothing, which exploded" - Terry Pratchett
________________________________________________________________________
__
_______________________________________________
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.