Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / Mac Programming / October 2005



Tip: Looking for answers? Try searching our database.

NSSound record?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
paul - 29 Sep 2005 12:38 GMT
Hi,

I'm sure this has been asked many times but is there any sample code to
record audio, into a buffer, using NSSound? NSSound seems to be only for
playback. Can't find anything on Apple's website about Cocoa sound
recording.

Any help appreciated, thanks.

Paul
Michael Ash - 29 Sep 2005 23:04 GMT
> Hi,
>
> I'm sure this has been asked many times but is there any sample code to
> record audio, into a buffer, using NSSound? NSSound seems to be only for
> playback. Can't find anything on Apple's website about Cocoa sound
> recording.

NSSound is only for playback, and Cocoa has nothing built-in for recording
sound. Check out MTCoreAudio for a fairly comprehensive third-party audio
framework which can feed you audio from an input device.

Signature

Michael Ash
Rogue Amoeba Software

paul - 30 Sep 2005 00:58 GMT
Hi,

Can I mix Carbon and Cocoa to record sound? I'm converting a project from
Carbon to Cocoa and have sound recording working in Carbon. When is Apple
going to get their act together about this? It seems pretty fundamental to
me to have Cocoa sound recording.

Thanks,

Paul

>> Hi,
>>
[quoted text clipped - 6 lines]
> sound. Check out MTCoreAudio for a fairly comprehensive third-party audio
> framework which can feed you audio from an input device.
Michael Ash - 30 Sep 2005 11:06 GMT
> Hi,
>
> Can I mix Carbon and Cocoa to record sound?

Certainly. Carbon and Cocoa are just libraries, and you can use them both
in the same application. There are certain limitations, like being unable
to mix controls from the two within the same window (and if you go back to
10.1 and earlier, you can't mix Carbon and Cocoa events in the same app
without doing some manual dispatching), but for the vast majority of stuff
you can just pick up and go.

> I'm converting a project from
> Carbon to Cocoa and have sound recording working in Carbon. When is Apple
> going to get their act together about this? It seems pretty fundamental to
> me to have Cocoa sound recording.

Given the existence of Carbon APIs, CoreAudio APIs, and the very free
MTCoreAudio framework, I see no particular need for a Cocoa API here.
Cocoa apps can access the full set of libraries available on the system,
so Cocoa doesn't have to provide absolutely everything itself.

Signature

Michael Ash
Rogue Amoeba Software

Simon Slavin - 01 Oct 2005 22:52 GMT
On 29/09/2005, paul wrote in message
<433bd247$0$21879$afc38c87@news.optusnet.com.au>:

> I'm sure this has been asked many times but is there any sample code to
> record audio, into a buffer, using NSSound?

No, that's just for playing.  Recording can be done with Core Audio
but I can't find any documentation for it.  Try looking at

/Developer/Examples/CoreAudio/Services/AudioFileTools/

Also, QuickTime 7 and up has built-in recording but I don't have the
documentation here to find out where.

Simon.
Signature

http://www.hearsay.demon.co.uk

paul - 04 Oct 2005 12:46 GMT
No, never using Quicktime - got caught with that before with QT2. Need my
own code so I'm hesitant to use MTCoreAudio as well.

Paul

> On 29/09/2005, paul wrote in message
> <433bd247$0$21879$afc38c87@news.optusnet.com.au>:
[quoted text clipped - 11 lines]
>
> Simon.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.