[ANN] Sample-code: A 'cheap' oscilloscope
[ANN] Sample-code: A 'cheap' oscilloscope
- Subject: [ANN] Sample-code: A 'cheap' oscilloscope
- From: Jens Bauer <email@hidden>
- Date: Thu, 5 Feb 2004 11:03:54 +0100
Hi all,
Craig requested some example-source on recording. I ('quickly') wrote
an example on how this could be done.
I use a FIFO buffer for transferring the data between the recording
callback and a buffer, which is displayed in a view.
The view is updated by setNeedsDisplay:YES from a 75Hz NSTimer.
There is one catch, though: I do not make any locking at all, so it's
not thread-safe (but it won't crash or anything real bad).
If you need to record your data to disk for later use, I suggest you
enhance it with locks, otherwise you'll probably get skips or repeats.
Another thing is that I read the FIFO from within drawRect. Heh.
Ofcourse it would be better doing this in a separate timer.
Anyway, you're free to use it as you like. =)
URL :
http://objc-source.com/junkyard.html
File: OscExample.tgz
Love,
Jens
_______________________________________________
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.