Re: Recording system audio
Re: Recording system audio
- Subject: Re: Recording system audio
- From: Thorrin <email@hidden>
- Date: Tue, 18 Mar 2008 16:43:38 -0700 (PDT)
Check out RecordAudioToFile and CAPlaythrough on the
apple developer site.
http://developer.apple.com/samplecode/MusicAudio/index-date.html#doclist
For a proof of concept, you could run these 2 programs
at the same time and 'chain' them together.
Do this:
-Set your default system OUTPUT to soundflower
-Set the INPUT of CAPlaythrough to the same
soundflower device
-Set the OUTPUT of CAPlaythrough to speakers or
headphones (whatever you choose)
-Set the input source of RecordAudioToFile to be
Soundflower.
-Make some sound from itunes or whatever.
This will record system audio to a file and play the
sound out through the speakers. I'm actually in front
of a PC right now (gasp) and I'm reciting this from
memory... It will work though ;)
This is a really big hack, but should do what you are
trying to do. The source to the two programs above is
provided so you can modify them as needed. These
programs have a lot of good stuff in there, including
the code that will show you how to set your system
devices programatically (if not, it will at least get
you very close to it).
T
--- Martin Redington
<email@hidden> wrote:
> Thanks very very much for all the very quick
> replies.
>
> I've got SoundFlower and Jack, and have played
> around with the Apple
> Samples. Everything builds fine, and I can install
> the kexts no
> problem.
>
> I still think I'm missing something though - I can
> set SoundFlower to
> be the default input and output device globally, and
> record the system
> sound that way, but its not clear to me how to do
> the equivalent
> programmatically, and that setup loses me the normal
> input, which I'd
> like to record as well, and the system output to the
> speakers as well.
>
> I guess what I want is
>
> system audio - presented as a device, so that I can
> record an audio
> track, but also played through to the speakers
>
> normal input - presented as a device, so that I can
> record from this too.
>
> I guess one kext which handles the system audio and
> passes it through
> to the output it's normally configured for would do
> the trick, but I'm
> not sure how to get to that from the samples, or
> without setting stuff
> manually and globally from the System Preferences
>
>
>
> On Thu, Mar 13, 2008 at 9:02 PM, tahome izwah
> <email@hidden> wrote:
> > I believe they did, that's why I posted the link
> to the latest
> > version. Here it is again for your convenience:
> >
> >
> > http://thirdcog.eu/apps/soundflower
> >
> > --th
> >
> > 2008/3/13, Jeff Moore <email@hidden>:
> >
> >
> > > Just FYI, the AudioReflectorDriver and
> SoundFlower do the basically
> > > the same thing. They take the audio from their
> output side and present
> > > it back to the system through it's input side.
> > >
> > > Did Cycling'74 ever fix the timing issues in
> SoundFlower? I recall a
> > > while back that this driver had a wandering
> clock due to the way it
> > > did it's timing (which I think was based on
> some older driver sample
> > > code we put out). I last looked at it a few
> years ago, so take it with
> > > grain of salt.
> > >
> > >
> > > On Mar 13, 2008, at 12:18 PM, Philippe GRUCHET
> wrote:
> > >
> > > >
> > > > You could also take a look at the
> Soundflower source code:
> > > >
> > > > http://cycling74.com/downloads/soundflower
> > > >
> > > > Bye,
> > > > PG
> > > >
> > > >
> > > > On Mar 13, 2008, at 10:16 AM, Martin
> Redington wrote:
> > > >>> I'd like to record the system audio, on
> 10.4 and 10.5
> > > >>>
> > > >>> Looking at other apps that do this, they
> commonly seem to install
> > > >>> a kernel extension which create a pseudo
> audio device.
> > > >>>
> > > >>> Is this approach documented anywhere in
> the sample code or docs?
> > > >>> It seems to be common enough to qualify as
> an idiom, but I can't
> > > >>> seem to uncover any direct references to
> it.
> > > >>>
> > > >>> Any pointers will be gratefully received
> ...
> > > >
> > > >
> > > > Jeff Moore replied:
> > > >> There really aren't any docs about doing
> what you want to do. The
> > > >> system doesn't really make it particularly
> easy. Even using a fake
> > > >> device has it's drawbacks (see some of my
> recent posts). At any
> > > >> rate, the closest we have for sample code
> in this area are the two
> > > >> sample drivers in
> /Developer/Examples/CoreAudio/HAL. The sample
> > > >> kernel audio driver is the
> AudioReflectorDriver project. The sample
> > > >> user-land audio driver is the
> SampleHardwarePlugIn project.
> > >
> > >
> > >
> > >
> > > --
> > >
> > > Jeff Moore
> > > Core Audio
> > > Apple
> > >
> > _______________________________________________
> > Do not post admin requests to the list. They will
> be ignored.
> > Coreaudio-api mailing list
> (email@hidden)
> > Help/Unsubscribe/Update your Subscription:
> >
>
> >
> > This email sent to
> email@hidden
> >
>
>
>
> --
> http://www.mildmanneredindustries.com/
> _______________________________________________
> Do not post admin requests to the list. They will be
> ignored.
> Coreaudio-api mailing list
> (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
>
> This email sent to email@hidden
>
"Everyone is allergic to giant rocks hitting them in the head!"
-Thorrin's elf chick after casting a 'meteor swarm' spell ;)
____________________________________________________________________________________
Never miss a thing. Make Yahoo your home page.
http://www.yahoo.com/r/hs
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden