Re: In need of documentation 2
Re: In need of documentation 2
- Subject: Re: In need of documentation 2
- From: Rolley <email@hidden>
- Date: Wed, 16 Jan 2002 22:25:29 -0500
Thanks !
ok, I took a look at the source code for PlayThru :
What I understand (please tell me if i am wrong or missed anything) all
you need is :
catch get the data written the input and pass it to the ouput.
To do this you need to define the input and output :
AudioHardwareGetProperty(...); which gives you a pointer to both of
them.
then there are two methods that (I guess) the OS calls :
- InputIOProc
Where you get the data written to the input buffer and put it in
your own Queue.
- OutputIOProc
Where you "BlitThisData". Here you "send" the data which is in
your own Queue.
This seems to be the "big deal" of this program : (here I need
explications)
i.e. you process the data found in your queue to be playable and
send it to the output.
But I don't understand AT ALL what is being done in this function.
So I could write this in C, C++, or Java, all I need is a data structure
to keep the inputs, and then send them to the ouput. This being done with
the three functions above
Ok, this starts to make sense (I hope). Are there any other needed
operations I should know of ?
And please could you clarify what BlitThisData() does, expecially since
(French being my usual language) I have no idea what Blit means ! 8)
Thanks again,
Rolley
On Wednesday, January 16, 2002, at 07:06 PM, Lieven Dekeyser wrote:
>
> Hi,
>
>
>
> I'd like to write an audio application that would just play in real-rime
>
> what's coming through an input port. For exemple, I have a G4 with a
>
> standard input and I would like to be able to plug-in an instrument
>
> (guitar, mic...), start that application and "voila" my computer is my
>
> amplifier (sound is processed by computer). I know this already exists
>
> (TCWorks' SPARKme) but I would just like to get some experience with the
>
> audio system of OSX.
>
>
I've put some sample code how to do this on my website:
>
http://studwww.rug.ac.be/~lbdkeyse/source/CoreAudio/
>
>
> I went through apple's web site and, yes, there is are some pdfs
>
> (coreaudio.pdf) explaining how CoreAudio is built but I can't find any
>
> that actually explains how to code with it.
>
>
the documentation is horrible indeed (to the person(s) that actually wrote
>
it : no offence :) )
>
>
Maybe the most useful information is in the headers...
>
Other than that, I suggest you take a look at some sample code.
>
If you still have questions, the people on this list are very very
>
very helpful (thanks again for all the answers!)... I just hope I didn't
>
bother them too much with all my questions ;)
>
>
> Also I don't understand where is Objective-C is required. I did a Cocoa
>
> Project in Project-Builder with OpenGL and C++, no need for Objective-C.
>
> Please tell me I don't need Obj-C to write audio utilities 8)
>
>
/msg Rolley "you don't need Obj-C to write audio utilities" :-)
>
>
but Obj-C is a great language, and together with Cocoa, Project Builder
>
and Interface Builder, it's (in my humble opinion) one of the best ways to
>
create flexible & maintainable applications.
>
>
But as I said, you don't need Obj-C... you can use C, C++, Obj-C and
>
even Java
>
>
The sample code on my website is (as you might have guessed) in Obj-C, but
>
you can just copy the parts you need to your C/C++ project...
>
>
yo!
>
>
--Lieven