Charles Chen wrote:

Hi, Roger,
I tried your code, and it works very well. I estimated that the speed was about 2ms per irp(200bytes) and good enough for the standard audio sampling rate of 44.1k.

Good, but you should be able to get close to 1000 irp/s, but it could be according to the device specs that it only sends an irp for every 2 possible timeslots.

There is one thing I am not clear. I send irp with 200 bytes, but each time I just get 192 bytes (actual length) back. I guess that is normal?

Again, could also be according to the device specs. To me and possible other octet fanatics, 192 is a more "nice round number" than 200 ;-). Do you know how it behaves in windows? (also applies to the previous question).

Other thing bothering me is, when I record a pure sine wave sound signal, the data I captured show some periodic jitters (non-smooth points) on the sine curve. Have any idea where should I look to solve this problem?

Have not seen this with my program, but then of course it would not show up as easely with video as with sound. Do you know where the jitter occurs? Does it happen within an irp, between irps, or only between the two group of irps that we are using? The implementation today does not actually pass one irp from the kernel for each ms, instead it passes 20 irp's every 20ms, and it could be that we then manage to miss one irp (I thought that should be taken care of by always having a fresh group of irps submitted). If you interpolate and add an extra irp where you have the jitter, would the signal be smooth then? If yes, then perhaps you should have the JVM log the GC activity and see if that correlates to the jitter.

//Roger Lindsjö


-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP,
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
javax-usb-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/javax-usb-devel

Reply via email to