Re: Sound Recording using Cocoa (a bit long)
Re: Sound Recording using Cocoa (a bit long)
- Subject: Re: Sound Recording using Cocoa (a bit long)
- From: "Jeffrey T. Hazelwood" <email@hidden>
- Date: Wed, 5 Jun 2002 18:55:17 -0400
Welcome to the world of hell if your new to sound on the Mac. I've
tried SndKit, everything works but recording from the mic. You can play,
stop, pause sounds, but not record from a flat panel iMac as far as I
know. I tried everything in the book including rechecking out the source
from the CVS tree. Word is from the SndKit newgroup is that it's broken
right now for the iMac. Supposedly works fine on a PowerBook.
CoreAudio
There is a wrapper around Core Audio called MTCoreAudio
http://aldebaran.armory.com/~zenomt/macosx/MTCoreAudio/
I haven't tried this out yet.
Cocoa
In Cocoa, the NSSound class is lame. I can get play and stop to work,
but for some reason,
pause just does not work....and of course there's no record method at
all. Rant: Cocoa is pretty lame
still IMHO. Most of the apps on the market are Carbon, pre-carbon,
Realbasic, or some combination.
At any rate, Quicktime is your best bet in Cocoa although it's hardly
Cocoa, with al the C calls. I can record from the internal mic using
QuickTime and playback sounds, but have some bugs to work out still
because once I try to record again the SGStartRecord will crash with an
unknown error. Something in the playback is not getting closed out just
right.
No where does it mention definitively in what order you must do things
to record or play sounds properly. Things like: creating
channels,opening file specs, input devices, creating sequence grabbers,
opening devices, initialize components, etc. Trying to find out what is
exactly required and what's not is a real pain in the ass. For example:
How to play back the sound? NSMovie? StartMovie? Load in to a pointer
handle first? Maybe a fork? Load from a file? AddMovieResource? Create
movie from file? How to save the movie? SGWriteSamples?
SGSetDataOutput?SGWriteMovieData?
What exactly do I need to close everything out? StopMovie?
CloseMovieFile? DisposeMovie?
There are some examples in the QuickTime docs, but none that you can cut
and paste and work. At least none that I could find. (If you want to do
it in QuickTime for Java, it's 10 x easier. Just a few lines of code.)
Bottom line, put on your secret decoder ring and start looking at the
QuickTime documentation.
-jeff
On Tuesday, June 4, 2002, at 12:08 PM, Erick van Rijk wrote:
Hi,
I wondering if there was a way to record sound using Obj-C ie the Cocoa
framework in staid of diving into Core Audio?
I tried searching the archieves but it didn't really give usefull
information?
The Documentation on Audio in Cocoa is a bit lacking so I hoped someone
here
had some expriance in it.
Thanks,
Erick
--
Did you know that:
Oak trees do not produce acorns until they are fifty
years of age or older.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.