Page 2 of 2 FirstFirst 12
Results 21 to 35 of 35
  1. #21
    willemjav is offline Senior Member
    Join Date
    Dec 2007
    Location
    Spain
    Posts
    1,075
    Rep Power
    9

    Default

    If the pc timer can´get any better than 18 milliseconds.
    What timer should one be using when doing signal processing?
    JAVA is no good for real time stuff?
    or should one look for a dramatical different approach when
    going into SP?

  2. #22
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,891
    Rep Power
    25

    Default

    For the Wait statement all the times are the same. Look at the args for wait() . I guess the nanosecs don't do anything???
    For the Spinloop the times vary with the delay time.

  3. #23
    willemjav is offline Senior Member
    Join Date
    Dec 2007
    Location
    Spain
    Posts
    1,075
    Rep Power
    9

    Default

    For the moment I do not see how to tackle this
    problem. So I should live with the fact that
    the program runs well on mac but and can not
    run on pc because clock can not do
    any better than 15 msec (tracks take double of the time)

  4. #24
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,891
    Rep Power
    25

    Default

    because clock can not do
    any better than 15 msec
    I thought my spinloop using nanotime could repeatedly call a method in less than 15 msec.
    But maybe I'm mistaken

  5. #25
    fishtoprecords's Avatar
    fishtoprecords is offline Senior Member
    Join Date
    Jun 2008
    Posts
    571
    Rep Power
    7

    Default

    Quote Originally Posted by Norm View Post
    I thought my spinloop using nanotime could repeatedly call a method in less than 15 msec.
    I'm pretty sure that timer resolution is platform implementation defendant.

    For many versions of Windows, 18 mSec was as small as you could get reliably.

  6. #26
    willemjav is offline Senior Member
    Join Date
    Dec 2007
    Location
    Spain
    Posts
    1,075
    Rep Power
    9

    Default

    Maybe a silly question?
    How does one do signal processing on PC,
    with anything finer as 18 mSec?

  7. #27
    fishtoprecords's Avatar
    fishtoprecords is offline Senior Member
    Join Date
    Jun 2008
    Posts
    571
    Rep Power
    7

    Default

    Quote Originally Posted by willemjav View Post
    Maybe a silly question? How does one do signal processing on PC, with anything finer as 18 mSec?
    Allow me an edit, PC => Windows box.

    Think about it a few seconds. early versions of Windows the OS will not reliably resolve times below 18 msec. If you are inventing something, say an audio capture card, that needs much better timing, what do you do?

    The obivious choices are:
    1) use something besides windows
    2) do it before the signal gets to windows

    For most products, #1 is a loser, since 90% of the world's PCs run Windows, and you will not have a mass market for your product if it uses some weird OS.

    So how do you do #2? Its easy, use a driver. Design your product to require a driver, put all the magic in the driver or firmware on the card.

  8. #28
    willemjav is offline Senior Member
    Join Date
    Dec 2007
    Location
    Spain
    Posts
    1,075
    Rep Power
    9

    Default

    could java get to that chard and ignore window box?

  9. #29
    willemjav is offline Senior Member
    Join Date
    Dec 2007
    Location
    Spain
    Posts
    1,075
    Rep Power
    9

    Default

    what are the changes with linux
    lunix runs on pc and java
    communicates with linux?

  10. #30
    fishtoprecords's Avatar
    fishtoprecords is offline Senior Member
    Join Date
    Jun 2008
    Posts
    571
    Rep Power
    7

    Default

    Quote Originally Posted by willemjav View Post
    could java get to that chard and ignore window box?
    I can't follow this, can you try rephrasing it?

  11. #31
    fishtoprecords's Avatar
    fishtoprecords is offline Senior Member
    Join Date
    Jun 2008
    Posts
    571
    Rep Power
    7

    Default

    Quote Originally Posted by willemjav View Post
    what are the changes with linux? lunix runs on pc and java communicates with linux?
    Linux is a different Operating System than Windows. They have nearly nothing in common.

    But to do serious timing stuff, you need a driver for linux as well. There are drivers for a lot more weird stuff for Windows XP than there are for Linux

  12. #32
    willemjav is offline Senior Member
    Join Date
    Dec 2007
    Location
    Spain
    Posts
    1,075
    Rep Power
    9

    Default

    Could the driver that reach the card be written in java?
    Java runs on jvm which uses windows?
    It is all a little confusing?

  13. #33
    fishtoprecords's Avatar
    fishtoprecords is offline Senior Member
    Join Date
    Jun 2008
    Posts
    571
    Rep Power
    7

    Default

    Quote Originally Posted by willemjav View Post
    Could the driver that reach the card be written in java? Java runs on jvm which uses windows? It is all a little confusing?
    You need to do some research on realtime devices, drivers, etc.

    Drivers are nearly always written in C or assembly language. They run in protected space, within the O/S. They are not user programs.

    Whether or not you could get access to the driver from Java depends on too many things for me to answer. Its implementation dependent.

    You might be able to do it with JNI, but JNI is really no longer Java.

    You really have some fundamental confusion here about the basic concepts of how device drivers work, what access is allowed, etc.

  14. #34
    willemjav is offline Senior Member
    Join Date
    Dec 2007
    Location
    Spain
    Posts
    1,075
    Rep Power
    9

    Default

    Anyway what would be the situation of the 18 msec window timer
    compared to possible linux timers that java could implement?
    I mean to say could I find a higher resolution of timers at linux?

  15. #35
    willemjav is offline Senior Member
    Join Date
    Dec 2007
    Location
    Spain
    Posts
    1,075
    Rep Power
    9

    Default

    At the moment I can reach a 1 msec resolution on mac os and
    maybe go beyond that!
    I am also studying K. sierra´s book that deals with java´s
    grammatical issues which I do not master still. I´ll first read that through.

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Applet doubts
    By anithababu in forum Java Applets
    Replies: 0
    Last Post: 01-18-2008, 06:09 AM
  2. Dialog and JList Doubts
    By hemanthjava in forum AWT / Swing
    Replies: 0
    Last Post: 12-05-2007, 09:42 PM
  3. Sun Java Platform, Standard Edition 6u3
    By JavaBean in forum Java Software
    Replies: 0
    Last Post: 10-04-2007, 10:10 PM
  4. Sun Java Platform, Standard Edition 6u2
    By JavaBean in forum Java Software
    Replies: 0
    Last Post: 07-08-2007, 06:45 PM
  5. Doubts with the method handleEvent()
    By Albert in forum Advanced Java
    Replies: 1
    Last Post: 07-06-2007, 06:12 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •