Re: Reasons why an AudioDeviceIOProc won't be added ?
Re: Reasons why an AudioDeviceIOProc won't be added ?
- Subject: Re: Reasons why an AudioDeviceIOProc won't be added ?
- From: Laurent de Segur <email@hidden>
- Date: Fri, 1 Mar 2002 20:59:25 -0800
Hi Roland,
A couple of things:
- I replaced your queue implementation with a java.util.LinkedList in
the java.util collection. I also took the liberty to add synchronized on
the wrapper methods in your queue class as the methods can be accessed
by more than one thread (input and output) and the java collections are
not MT safe as you probably know already. Your queue implementation was
also missing synchronized.
- The first switch case in the controller didn't have a break at the end
of the first case statement.
- The getdefaultoutput() and getdefaultinput() can be called in the
constructor of your main controller class and stored in fields for later
use.
- Or you can still do that in the switch statement and null it when you
turn off the I/O and then test on these two fields and do the right
thing accordingly. I can send you the files modified with my changes if
you are interested.
The bad memory access error still happens in the output and I narrowed
it down to the com.apple.audio.util.CAMemoryObject.copyFromTo() method
which you use to copy input buffers to output buffers (usually only 1.)
If I pass a length half of the numBytesToCopy in the last argument of
this method then I don't get the bus error anymore.
Can someone in the CoreAudio team, please, double check the
implementation of this method, and let me know if this is the number of
samples rather than the number of bytes that this method is supposed to
get passed (the javadoc says number of bytes.) If I bracket the call
with a catch (CAOutOfBoundsException e) and pass the number of bytes
(which in theory, should work), I still get a SIGBUS exit which is bad.
Thanks,
LdS
On Friday, March 1, 2002, at 06:57 PM, Rolley wrote:
>
Thanks a lot,
>
here is my project:
>
>
>
Note:
>
I have a Queue which holds the input data. I've made a lot of tests on
>
it (LogicAmp_Tests.java) , and it seems to work fine. So I don't think
>
this is where my problem lies.
>
>
My problem is certainly my lack of knowledge of any audio
>
system/environnement.
>
>
I appreciate your help a lot,
>
I am stuck and I couldn't find any code showing how to send the input
>
received to the output system.
>
>
Roland Fines
>
>
PS: Laurent de Segur me semble de consonnance frangaise, me
>
tromperais-je 8) ?
>
>
On Friday, March 1, 2002, at 11:48 AM, Laurent de Segur wrote:
>
>
> Hi Roland,
>
>
>
> Do you have a simple test case I can use to reproduce your problem
>
> (sit project would be cool)?
>
> Thanks,
>
>
>
> LdS
_______________________________________________
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.