Unusual wireless latency and speed issue

I have an odd problem where wireless connections to the home hub 3 will start to exhibit very high and varied latency from 40ms up to 1000ms every 15 to 30 seconds (pinging from laptop to homehub) and slow throughput of about 4Mbit.  The link speed is solid at 144Mbit/sec and the signal is always on maximum.
If I change the wireless channel on the router and the change it back to its original value the connection starts to behave and latency is normally 1-3ms with the odd spike up to 90 or so and realworld throughput jumps up to 60+Mbit/sec.
I suspected packet fragmentation back have confirmed this is not the case and now believe it to be a problem with the home hub as restarting it or changing the wireless channel will fix the issue for a few hours.  Anyone else had this problem and resolved it?  It is a pain because the connection does still work but it makes streaming high quality media impossible and online gaming becomes a pain with constant lag until I poke the router.

I assume you're using windows vista, 7 and it probably affects windows 8 as well.
When you're connected wirelessly, it never stops searching for a wireless connection and briefly disconnects you from the one you are connect to.
You can turn this off with a program called WLAN Optimizer.
If this helped you please click the Star beside my name.
If this answered your question please click "Mark as Accepted Solution" below.

Similar Messages

  • Can I use more than one blue-tooth device at the same time on IPhone 4S? Like a wireless headsets and speed and cadence sensor for cycling computer, receive the data and listen music simultaneously

    Can I use more than one blue-tooth device at the same time on IPhone 4S? Like a wireless headsets and speed and cadence sensor for cycling computer, receive the data and listen music simultaneously

    As long as the profiles are different (ex. HID vs AD2P) you will not have any issues. But say if you try to use 2 keyboards at once, it won't work. Or 2 headsets at once. Your scenario seems fine.

  • Latency and Jitter issue

    I am facing Latency and Jitter issue on few sites. What is the best way to test those hop by hop between two sites?

    Disclaimer
    The Author of this posting offers the information contained within this posting without consideration and with the reader's understanding that there's no implied or expressed suitability or fitness for any purpose. Information provided is for informational purposes only and should not be construed as rendering professional advice of any kind. Usage of this posting's information is solely at reader's own risk.
    Liability Disclaimer
    In no event shall Author be liable for any damages whatsoever (including, without limitation, damages for loss of use, data or profit) arising out of the use or inability to use the posting's information even if Author has been advised of the possibility of such damage.
    Posting
    If your equipment supports, IP SLA can create an artificial VoIP call flow and it can measure latency and jitter.
    Traceroute can be use to obtain (rough) hop-by-hop latencies values.

  • Wireless mouse and Keyboard Issue after closing the lid - external display

    Can anyone give any insight. Recent purchase of a new Late 2008 15" MBP. I have connected it to an external 24" Apple monitor on my desk and use a wireless mouse and wireless keyboard on my desk top. I have configured the laptop to wake on bluetooth devices. So here is the problem: The laptop when the lid is up recognizes the bluetooth keyboard and mouse. I close the lid/screen. Laptop powers down... the after several seconds I move the mouse and the laptop comes alive... But after that there are no bluetooth devices attached. When I use the mouse, I get "connection lost" with a white figure of the mighty mouse on the screen. The wireless keyboard is not there and I have to open the lid and manually find the mouse and reconnect. The keyboard seems to work however....
    Apple..... any thoughts..... anyone?????

    Hi Stentdoc; I'm thinking, 'connection lost ~= sorta low AA batteries in the Mighty Mouse? (I would put in fresh AA batteries in the mouse and keyboard, to eliminate as an issue that the 'connection lost' is due to low batt voltage; that this is causing the failure to wake.) ... then, in System Preferences > Hardware > Energy Saver, settings for Power Adapter > Sleep, set to "never" for "Put the computer to sleep when it is inactive for ..." to eliminate that as a conflict when trying to wake with bluetooth from sleep induced by closing the lid ...
    Check your current "Sleep" setup (I left my MBP as "3")
    go to Utilities > Terminal
    After you launch Terminal, the first step is to determine which sleep mode your Mac is currently using. You can both view and change the sleep mode using the Unix program pmset. To see your current settings, type (or, copy and paste)
    pmset -g | grep hibernatemode
    press 'enter'
    You should see something like this:
    $ pmset -g | grep hibernatemode
    hibernatemode 3
    So your machine is using mode 3 ... thanks to the documentation for the handy Deep Sleep Dashboard widget, which puts your machine immediately into hibernation mode (so you don’t have to yank all the power sources to invoke it):
    * 0 - Old style sleep mode, with RAM powered on while sleeping, safe sleep disabled, and super-fast wake.
    * 1 - Hibernation mode, with RAM contents written to disk, system totally shut down while “sleeping,” and slower wake up, due to reading the contents of RAM off the hard drive.
    * 3 - The default mode on machines introduced since about fall 2005. RAM is powered on while sleeping, but RAM contents are also written to disk before sleeping. In the event of total power loss, the system enters hibernation mode automatically.
    also, I enabled this (to change back, input "lidwake 1":
    go to Utilities > Terminal
    type in sudo pmset lidwake 0 then "enter"
    it will ask for your password. type it in, that's it!
    Now, when your computer is sleeping with the lid closed, when you open the lid nothing happens until you press any key ... nice: keeps it off when accidentally opened, like in a backpack?
    WARNING: Improper use of the sudo command could lead to data loss
    or the deletion of important system files. Please double-check your
    typing when using sudo. Type "man sudo" for more information.
    To proceed, enter your password, or type Ctrl-C to abort.

  • 9124 duplex and speed issue

    Trying to install a new 9124.
    The ethernet switch port for the mgmt port of the 9124 is set to full 100 and the 9124 came set to auto auto.
    The mgmt port is comming up as half duplex.
    When trying to set the duplex and speed of the mgmt port to full 100, it appers to take the change but does not retain it and it still comes up as half duplex.
    So it appears that the 9214 mgmt port will not take the change of setting to full 100.
    I have tried to change it with the port down but it won't take changes when down.
    If I change it while up and save it and bounce the port it reverts back to half when it comes up.
    If I make the change and reboot it reverts back.
    Any idea how to force the mgmt port to full 100 and get it to stick?

    There is one more defect solved in later 5.x releases where 91xx will end up in half duplex for mgmt interface.
    Workaround would be to configure both sides to auto.
    http://tools.cisco.com/Support/BugToolKit/search/getBugDetails.do?method=fetchBugDetails&bugId=CSCte76880
    - Filiph

  • Disconnections and Speed Issues.

    To start off, our BT Internet connection has been fine for years, not a problem at all, speeds weren't high, but they were modest and certainly enough for my needs, and there weren't really any major problems, just the occasional maintenance work interfering with it and other minor things...
    Until the past 6 months that is, it happened it seemed for an alternating monthly period, on and off the quality would just drop ridiculously.
    There would be disconnects and <1Mbps speeds (is that even broadband?), and just where we got to the point where we were going to call up, suddenly it would go back and become even better.
    Sometimes going as high as 18Mbps which was unheard of for our area, until it crashed down again, this cycle happened until just over a month ago when it got a lot worse.
    It started off the internet would disconnect and reconnect at a random speed, ranging from really low, to modestly high, and then a new symptom came into play, everytime a device connected to the router, the router would drop the connection and try reconnecting, it wasn't random anymore, we now know when it's going to disconnect.
    Everytime my brother walks into the house with his smartphone automatically seeking our wireless connection, it drops.
    Everytime someone powers up a PC that's on a wired connection, you guessed it! It drops the connection
    Far more annoyingly though, everytime someone walks past the house and connects to our BT FON source, it drops (which I'd like to point out, at the time we had a Home Hub 1.0 and the BT FON was automatically always on and couldn't be disabled, a nice feature for our problem -_-)
    We called up the technicians after this started, and they tried to diagnose the problem, and I use the word tried loosely.
    Instructions were basically unplug the internet, plug it back in, and change the filter.
    We did manage to wrangle a BT Home Hub 3 into our hands though, the morning it arrived we cradled our saviour, delicately placing it on the desk top, preparing to worship it's blessing of providing us with hassle-free internet at last..
    But it was not to be, set it up, everything fine! Brother walks in from work.. and I'm sure you know how the rest goes..   
    Humourous thing is, it came with a letter from BT saying we're on the up to such and such package (I think it was up to 20mb), it says our average speed should be 12mbps, but we've sat on pretty solidly for the past month 1.5mbps, it's been lower, but I don't think it's been higher...
    We've tried the BT Help Phone Lines, they can't seem to help us, so I'm putting this puzzle to a wider audience of people who may have had past experience.
    The only theory we have is that it was a BT mistake that they haven't realised, my father saying he saw workmen from BT working on the telephone pylon in our alleyway.
    I'd ask our neighbours if they have any problems, but I don't want to get burgled if they find out we can afford internet...
    I hope some people on here may be able to shed some insight or advice with how to tackle this problem, I'll say right now, we're paying something like £30 a month (maybe more, I don't get to see the bills) for an internet connection I could buy from a smaller company for £2 a month (1.2mbps average in the past month) 
    Thanks in advance, Mike.

    Test1 comprises of two tests
    1. Best Effort Test:  -provides background information.
    Download  Speed
    1821 Kbps
    0 Kbps
    2000 Kbps
    Max Achievable Speed
     Download speedachieved during the test was - 1821 Kbps
     For your connection, the acceptable range of speeds is 800-2000 Kbps.
     Additional Information:
     Your DSL Connection Rate :2264 Kbps(DOWN-STREAM), 1127 Kbps(UP-STREAM)
     IP Profile for your line is - 1997 Kbps
    2. Upstream Test:  -provides background information.
    Upload Speed
    864 Kbps
    0 Kbps
    1127 Kbps
    Max Achievable Speed
    >Upload speed achieved during the test was - 864 Kbps
     Additional Information:
     Upstream Rate IP profile on your line is - 1127 Kbps
    Installed a different browser on my machine for this test, internet speed has changed so I'll post an updated version of the router details
    ADSL Line Status
    Connection Information
    Line state:
    Connected
    Connection time:
    0 days, 00:45:53
    Downstream:
    2.212 Mbps
    Upstream:
    1.101 Mbps
    ADSL Settings
    VPI/VCI:
    0/38
    Type:
    PPPoA
    Modulation:
    G.992.5 Annex A
    Latency type:
    Interleaved
    Noise margin (Down/Up):
    31.1 dB / 6.5 dB
    Line attenuation (Down/Up):
    24.3 dB / 13.5 dB
    Output power (Down/Up):
    13.8 dBm / 11.4 dBm
    FEC Events (Down/Up):
    0 / 0
    CRC Events (Down/Up):
    42 / 74
    Loss of Framing (Local/Remote):
    0 / 0
    Loss of Signal (Local/Remote):
    0 / 0
    Loss of Power (Local/Remote):
    0 / 0
    HEC Events (Down/Up):
    38 / 53
    Error Seconds (Local/Remote):
    200 / 63

  • New wireless mouse and keyboard issues

    I have a new 20", 2.4GHz alu iMac, and I ordered it with the new bluetooth keyboard, and bluetooth mighty mouse. They've always worked great, but yesterday, the mouse has had intermittant lag, and it says that the keyboard has lost connection. I've been running Leopard since it came out, and I've never had such problems with Tiger. I reinstalled Leopard a few hours ago (erase and install), and I'm still getting the lag. I wanted to see whether it is my mouse, so I tried pairing it with my brother's white intel iMac, and it couldn't pair, but it made my brother's bluetooth mighty mouse lag too! Could this be due to interference? Our rooms are right beside each other.
    Also, when the lag occurs, I get the message that its lost connection with the keyboard, however it still works perfectly. The lag is very noticeable, and it takes about 3-4 times longer for the mouse to move, while being very choppy. This is for about 10-15 seconds, and then it goes normal speed again.
    Is anyone else having this challenge? Could anyone diagnose whether it's likely to be the computer, the mouse, or interference, (or other!)?
    Any feedback is greatly appreciated.

    I have a 6 week old imac 24" alu intel with wireless keyboard & mouse and it was all working fine until the 10.5.1 upgrade. it also started on the same day there was a big rain storm so I thought that might be messing with my blue tooth connections. i have no other bluetooth devices other than the mouse and keyboard. at first it was intolerable. i'd get the keyboard connection lost message every few minutes, the keyboard would continue to function and the mouse would go very sluggish for a minute or 2. this was happening every 5 minutes or so. i deleted each one an reconnected, shut everything off, restarted the computer and it seemed ok for about 1 hour and then it happened again a few times. definitely not as often as before but it still happens from time to time every few hours. power on both is about 75% and seeing as they have new duracel batteries i'm sure they are not dead.
    I did the auto update to 10.5.1 and had all the permission issues so then downloaded and installed the larger 100+ meg update. not sure if this has caused any problems.
    So far leopard has only been a pain. Reason 4 crashes, Parallels 3 crashes, Mail crashes (I wrote some important notes which I guess don't get automatically saved like drafts and lost the notes when mail crashed several hours after I wrote them), my software update even crashed once. is Leopard built on OS 9 technology? what a disappointment.
    Oh and internet and wireless connection to ADSL seems pretty slow, slower than tiger I think.
    Windows should start a new campaign called "Come back".
    One last beef, do other people find this wireless keyword (metal) not so responsive, letters get missed as I type, space bar is stiff and squeaky, overall not great for someone doing a lot of writing? that's what I think.

  • BT Infinity connnection and speed issue

    Last saturday (1 week ago) My internet went off for a couple of hours. It came back on around 9pm. then every day for the next week my broadband went off some time in the afternoon and came back on around 9pm. I checked the service status and there isn't any problems in my area but my broadband kept going off. I tried the call centres but i may as well just ask my cat what is the problem.  Now when i run a speed test im getting 18mb download and only 2mb upload. How come its dropped speed so much. When i first started with Bt Infinity i was getting 45mb download and 20mb upload, it dropped after a few weeks to 26mb down and 10 upload. Its been at this speed for months but now its dropped to 18mb down and 2mb up, which i am not happy with, why is this. I havnt changed anything in my house setup and i allways use wired connection. Thanks in advance for any help

    If the disconnects have stopped your line will now be seen as being stable and the DLM will start to increase the speed again. This can take up to 3 weeks to get back up to where you were. If you are still getting disconnects you will need to establish what is causing them. This could be anything from a problem at the exchange, the cabinet or your line. As long as the problem is not within your property then BT should check it out and repair free of charge. If the fault is within your property there will be a charge.
    It is therefore in your own interest to eliminate problems within your own property.
    If you are still getting disconnects then take a note of when and what happens when this happens... does the modem go off, does the homehub go off,  do lights flash on either modem or homehub, is it just wireless or ethernet etc etc. This will help to try and diagnose the problem.

  • My Mac wireless keyboard and mouse won't reconnect

    My Mac wireless keyboard and and mouse one day disconnected and I can't  reconnect. They have new batteries.

    Hi Saint Anne,
    Happy Thanksgiving Day!  Since both of your wireless input devices are not working at the moment, do you have a wired mouse you can use to straighten this out?  Here are some troubleshooting steps to try:
    Wireless Connection issue
    Make sure Bluetooth is turned on
    First, choose Apple () menu > System Preferences > Bluetooth and confirm that Bluetooth is turned ON.
    The Bluetooth menu bar icon should turn:
    Black if Bluetooth is turned ON and no devices are connected.
    Light grey with three dots if Bluetooth is ON and at least one wireless device is connected.
    Light grey (or disappear completely) if Bluetooth is turned OFF, or if the iMac is unable to communicate with the Bluetooth module.
    Refer to the Bluetooth Menu Icon table below for more information on determining the Bluetooth status. If the Bluetooth icon does not appear, or if the menu bar status continues to indicate that Bluetooth is off, restart your computer and then attempt to turn Bluetooth ON again.
    Bluetooth OFF
    Bluetooth ON and connected to wireless device
    Bluetooth menu icon
    Bluetooth status
    Bluetooth turned on, but there are no devices connected to the Mac. See the "Make sure the wireless mouse or keyboard is turned on" section of this article.
    Bluetooth turned on and at least one wireless device is connected.  See the "Make sure the wireless mouse or keyboard is turned on" section of this article.
    When this icon flashes, at least one wireless device has a low battery. Click the Bluetooth icon to identify the affected device, then replace the batteries.
    Bluetooth is off. Click the Bluetooth icon using a USB mouse and select "Turn Bluetooth On". Note: Mac OS X won’t allow Bluetooth to be turned off unless a USB mouse is connected.
    Bluetooth offline. Restart your Mac. If the Bluetooth status doesn’t change, disconnect all USB devices and restart your Mac again.
    Make sure the wireless mouse and keyboard are turned on.
    Mouse
    Slide the On/Off switch on the bottom of your mouse to turn it on. Note: If the battery compartment cover is not installed properly the On/Off switch may not function correctly or may be difficult to operate. Remove the battery compartment cover and carefully reinstall it.
    When your mouse is on and paired, and the batteries are charged, the indicator light glows steadily.
    If your mouse isn’t paired with a Mac, the indicator light will blink, indicating your mouse is in discovery mode and ready to pair.
    If the indicator light doesn't illuminate, check to make sure you have two good batteries and that they're installed correctly. 
    Keyboard
    Push and release the On/Off switch to turn on the Apple Wireless Keyboard.
    When your keyboard is on and paired, and the batteries are charged, the light will glow steadily for several seconds, then turn off.
    If your wireless keyboard isn’t paired with your Mac, the indicator light will begin to blink. This indicates your keyboard is in discovery mode and ready to pair with your Mac.
    If the LED doesn't light up, remove the batteries to make sure they're good and that they're installed correctly. 
    Check preferences
    From the Apple () menu, choose System Preferences, then choose Bluetooth from the View menu. The Bluetooth preferences pane will list the Bluetooth devices paired with the computer, the status of the devices (paired or connected), and whether Bluetooth power is on or not.
    Click the gear icon and choose "Connect" to connect a device that is powered on.
    To set up a new device, click the + icon and follow the Bluetooth setup assistant.
    If the Mouse System Preferences pane is open and no wired or wireless mouse is connected, your Mac will immediately start looking for a wireless mouse (with Mac OS X v10.6.  For Mac OS X v10.5, the Setup Assistant should open).
    Keyboard or mouse intermittently stops responding
    Click the mouse
    Click the mouse once to reconnect it with your Mac. It may take a moment for the mouse to respond.
    Check the battery level of the mouse. Choose System Preferences from the Apple (), then choose Mouse from the View menu. The battery level indicator is in the lower-left corner. Replace the batteries if they are low.  Note: Choose Keyboard & Mouse from the View menu with Mac OS X v10.5.  For more information on keyboard and mouse battery levels in Mac OS X v10.5, see Desktop computers: Troubleshooting wireless keyboard and mouse issues.
    Press a key on the keyboard 
    Press a key on the keyboard to reconnect it with your Mac. It may take a moment for the keyboard to respond.
    Check the battery level of the keyboard. Choose System Preferences from the Apple (),  then choose Keyboard from the View menu and select the Keyboard tab. The battery level indicator is in the lower-left corner. Replace the batteries if they are low.
    Check for signal interference
    Wireless networks that operate on 2.4GHz may cause interference.
    Move cordless phone base stations, microwave ovens, and other 2.4GHz electrical devices away from the Mac if you suspect interference.
    Keep wireless devices within 10 meters (33 feet) of the Mac.
    Avoid putting metal objects between the device and the Mac.
    Mouse doesn't scroll up or down or side to side
    For mice that have a scroll ball, refer to How to clean your Mighty Mouse.
    Check the Scrolling speed slide-control at the top, and make sure the “Scroll” checkbox is checked.
    For scrolling side-to-side, make sure the application you’re using supports side-to-side scrolling.
    Remember, scrolling is done with one finger, and navigating is done by swiping side-to-side with two fingers.
    Navigating moves from page to page in a document or internet browser unlike scrolling.
    Mouse does not track as expected (jittery, jumpy, slow, fast).
    The Apple Wireless Mouse can be used on most smooth surfaces, however if tracking issues occur try these options:
    Choose System Preferences from the Apple () menu, then choose Mouse from the View menu. Set the Tracking slider to adjust how fast the pointer moves as you move the mouse.
    Try using a different surface to see if the tracking improves.
    Turn the mouse over and inspect the sensor window. Use compressed air to gently clean the sensor window if dust or debris is present.
    If multiple Bluetooth wireless devices are in use nearby, try turning them off one at a time to see if the issue improves. Bandwidth intensive devices could affect tracking.
    Mouse buttons do not work as expected.
    The Mouse preference pane allows users to customize the mouse features to meet their needs.
    Choose System Preferences from the Apple () menu, then choose Mouse from the View menu. Set the Tracking slider to adjust how fast the pointer moves as you move the mouse.
    Try using a different surface to see if the tracking improves.
    Turn the mouse over and inspect the sensor window. Use compressed air to gently clean the sensor window if dust or debris is present.
    If multiple Bluetooth wireless devices are in use nearby, try turning them off one at a time to see if the issue improves. Bandwidth intensive devices could affect tracking.
    Keyboard has one or more keys that do not respond. 
    Use the Keyboard Viewer to test whether the keyboard keys are responding correctly when they are pressed.
    Choose System Preferences from the Apple () menu, then choose Language & Textfrom the View menu (or International from the View menu in Mac OS X v10.5 or earlier).
    Select Input Sources.
    Select the Keyboard & Character Viewer checkbox.
    Enable the input source for the keyboard layout you are testing by selecting the checkbox next to it.
    Make sure that "Show Input menu in menu bar" is enabled.
    Choose Show Keyboard Viewer from the Input menu in the menu bar, as shown.  
    The Keyboard Viewer shows the keyboard layout.
    Type the key on the keyboard that doesn’t respond and observe whether the corresponding key highlights on the Keyboard Viewer. If it does, that particular key is functioning correctly. In the sample shown above the shift and command keys are being pressed.
    If the mouse keys feature in the Universal Access System Preferences pane is enabled, many of the keyboard keys may not respond as expected.
    Try starting up into single user mode to determine whether a software issue is causing the issue.
    Cheers,
    Judy

  • Macbook Pro Retina (15") can't connect to wireless mouse and external USB keyboard

    Hi All,
    I got my new MacBook Pro Retina (15 inch) about 3 weeks ago. It works fine. I got a 30" Dell screen that I am using via thunderbolt/usb adapter. Also, I am using a thunderbolt ethernet adapter. Both adapters work fine without any problems.
    I have an apple usb keyboard connected to the USB hub of the screen, as well as my iphone cable. It is a regular, full size apple keyboard. In addition to this, I have a logitech nano connected directly to the right usb port of the macbook pro.
    This setup was working well until a few days ago. I lost connectivity with my mouse. Initially, I thought the batteries are empty. After replacing them, I still had no connection (again, the usb receiver is *directly* connected to the macbook).
    I changed a few cables here and there and noticed that I can get either the keyboard to work or the mouse but not both at the same time. A reboot did not help.
    Did anybody encounter such a strange problem already? If so, what could I possibly do?
    Thank You,
    --Martin

    Hello nikkig00,
    It is certainly difficult to use the computer if your wireless keyboard and mouse do not connect.  I found a few resources I recommend for this issue.
    I recommend reviewing this article first:
    Troubleshooting wireless mouse and keyboard issues
    http://support.apple.com/kb/ts3048
    If the issue persists, I recommend reviewing the section titled "Top troubleshooting tips" in the article below.  Step 9 specifically stands out to me for the issue you described:
    9. Restart your computer
    Sometimes a simple restart of your Mac is all it takes to get things running smoothly again. You may also want to try resetting your computer's PRAM and NVRAM.
    Bluetooth Quick Assist
    http://support.apple.com/kb/ht1153
    Thank you for using Apple Support Communities.
    Best,
    Sheila M.

  • How can I get my new wireless keyboard and track pad set up?

    I just bought a new mac mini, wireless keyboard and trackpad. Do I still need a wired keyboard and mouse to get the thing set up? Trackpad seems to be working as I can move around the screen but I can't click where I need to click to move onto the next step...

    It should work initially withe BT KB and mouse
    Troubleshooting wireless mouse and keyboard issues
    Maybe
    OS X: Bluetooth devices become unresponsive
    ALso see:
    http://support.apple.com/kb/TS4456
    Mac mini (Mid 2011 and later) and iMac (Late 2012): Bluetooth keyboard may not pair during Setup Assistant

  • Java Audio Metronome | Timing and Speed Problems

    Hi all,
    I’m starting to work on a music/metronome application in Java and I’m running into some problems with the timing and speed.
    For testing purposes I’m trying to play two sine wave tones at the same time at regular intervals, but instead they play in sync for a few beats and then slightly out of sync for a few beats and then back in sync again for a few beats.
    From researching good metronome programming, I found that Thread.sleep() is horrible for timing, so I completely avoided that and went with checking System.nanoTime() to determine when the sounds should play.
    I’m using AudioSystem’s SourceDataLine for my audio player and I’m using a thread for each tone that constantly polls System.nanoTime() in order to determine when the sound should play. I create a new SourceDataLine and delete the previous one each time a sound plays, because the volume fluctuates if I leave the line open and keep playing sounds on the same line. I create the player before polling nanoTime() so that the player is already created and all it has to do is play the sound when it is time.
    In theory this seemed like a good method for getting each sound to play on time, but it’s not working correctly.
    At the moment this is just a simple test in Java, but my goal is to create my app on mobile devices (Android, iOS, Windows Phone, etc)...however my current method isn’t even keeping perfect time on a PC, so I’m worried that certain mobile devices with limited resources will have even more timing problems. I will also be adding more sounds to it to create more complex rhythms, so it needs to be able to handle multiple sounds going simultaneously without sounds lagging.
    Another problem I’m having is that the max tempo is controlled by the length of the tone since the tones don’t overlap each other. I tried adding additional threads so that every tone that played would get its own thread...but that really screwed up the timing, so I took it out. I would like to have a way to overlap the previous sound to allow for much higher tempos.
    I posted this question on StackOverflow where I got one reply and my response back explains why I went this direction instead of preloading a larger buffer (which is what they recommended). In short, I did try the buffer method first, but I want to also update a “beat counter” visual display and there was no way to know when the hardware was actually playing the sounds from the buffer. I mentioned that on StackOverflow and I also asked a couple more questions regarding the buffer method, but I haven’t received any more responses.
    http://stackoverflow.com/questions/24110247/java-audio-metronome-timing-and-speed-problems
    Any help getting these timing and speed issues straightened out would be greatly appreciated! Thanks.
    Here is my code...
    SoundTest.java
    import java.awt.*; 
    import java.awt.event.*; 
    import javax.swing.*; 
    import javax.swing.event.*; 
    import java.io.*; 
    import javax.sound.sampled.*; 
    public class SoundTest implements ActionListener { 
        static SoundTest soundTest; 
        // ENABLE/DISABLE SOUNDS 
        boolean playSound1  = true; 
        boolean playSound2  = true; 
        JFrame mainFrame; 
        JPanel mainContent; 
        JPanel center; 
        JButton buttonPlay; 
        int sampleRate = 44100; 
        long startTime;  
        SourceDataLine line = null;  
        int tickLength; 
        boolean playing = false; 
        SoundElement sound01; 
        SoundElement sound02; 
        public static void main (String[] args) {        
            soundTest = new SoundTest(); 
            SwingUtilities.invokeLater(new Runnable() { public void run() { 
                soundTest.gui_CreateAndShow(); 
        public void gui_CreateAndShow() { 
            gui_FrameAndContentPanel(); 
            gui_AddContent(); 
        public void gui_FrameAndContentPanel() { 
            mainContent = new JPanel(); 
            mainContent.setLayout(new BorderLayout()); 
            mainContent.setPreferredSize(new Dimension(500,500)); 
            mainContent.setOpaque(true); 
            mainFrame = new JFrame("Sound Test");                
            mainFrame.setContentPane(mainContent);               
            mainFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); 
            mainFrame.pack(); 
            mainFrame.setVisible(true); 
        public void gui_AddContent() { 
            JPanel center = new JPanel(); 
            center.setOpaque(true); 
            buttonPlay = new JButton("PLAY / STOP"); 
            buttonPlay.setActionCommand("play"); 
            buttonPlay.addActionListener(this); 
            buttonPlay.setPreferredSize(new Dimension(200, 50)); 
            center.add(buttonPlay); 
            mainContent.add(center, BorderLayout.CENTER); 
        public void actionPerformed(ActionEvent e) { 
            if (!playing) { 
                playing = true; 
                if (playSound1) 
                    sound01 = new SoundElement(this, "Sound1", 800, 1); 
                if (playSound2) 
                    sound02 = new SoundElement(this, "Sound2", 1200, 1); 
                startTime = System.nanoTime(); 
                if (playSound1) 
                    new Thread(sound01).start(); 
                if (playSound2) 
                    new Thread(sound02).start(); 
            else { 
                playing = false; 
    SoundElement.java
    import java.io.*; 
    import javax.sound.sampled.*; 
    public class SoundElement implements Runnable { 
        SoundTest soundTest; 
        // TEMPO CHANGE 
        // 750000000=80bpm | 300000000=200bpm | 200000000=300bpm 
        long nsDelay = 750000000; 
        long before; 
        long after; 
        long diff; 
        String name=""; 
        int clickLength = 4100;  
        byte[] audioFile; 
        double clickFrequency; 
        double subdivision; 
        SourceDataLine line = null; 
        long audioFilePlay; 
        public SoundElement(SoundTest soundTestIn, String nameIn, double clickFrequencyIn, double subdivisionIn){ 
            soundTest = soundTestIn; 
            name = nameIn; 
            clickFrequency = clickFrequencyIn; 
            subdivision = subdivisionIn; 
            generateAudioFile(); 
        public void generateAudioFile(){ 
            audioFile = new byte[clickLength * 2]; 
            double temp; 
            short maxSample; 
            int p=0; 
            for (int i = 0; i < audioFile.length;){ 
                temp = Math.sin(2 * Math.PI * p++ / (soundTest.sampleRate/clickFrequency)); 
                maxSample = (short) (temp * Short.MAX_VALUE); 
                audioFile[i++] = (byte) (maxSample & 0x00ff);            
                audioFile[i++] = (byte) ((maxSample & 0xff00) >>> 8); 
        public void run() { 
            createPlayer(); 
            audioFilePlay = soundTest.startTime + nsDelay; 
            while (soundTest.playing){ 
                if (System.nanoTime() >= audioFilePlay){ 
                    play(); 
                    destroyPlayer(); 
                    createPlayer();              
                    audioFilePlay += nsDelay; 
            try { destroyPlayer(); } catch (Exception e) { } 
        public void createPlayer(){ 
            AudioFormat af = new AudioFormat(soundTest.sampleRate, 16, 1, true, false); 
            try { 
                line = AudioSystem.getSourceDataLine(af); 
                line.open(af); 
                line.start(); 
            catch (Exception ex) { ex.printStackTrace(); } 
        public void play(){ 
            line.write(audioFile, 0, audioFile.length); 
        public void destroyPlayer(){ 
            line.drain(); 
            line.close(); 

    Thanks but you have never posted reply s0lutions before ?? And F 4 is definitely not 10 times faster as stated before I upgraded !!

  • Audio pitch / playback speed issue, MacBook Pro 10.4.10

    I experienced a very strange audio pitch and speed issue that affected a recording I was making in Ableton Live 6.0.3.
    Setup is MacBook Pro 2.16GHz, Mackie Onyx Satellite FW interface for audio, recording straight to internal HD.
    I made two multitrack recordings (3-4 tracks each) which played back fine initially within Live. I then rendered the audio to AIFF in order to burn data and audio CDs.
    Testing the playback in iTunes, the audio was strangely pitched lower than what we originally recorded. Checking other tracks from my iTunes library, they were playing back FASTER or higher-pitched than normal, and so did audio streamed from MySpace that I was familiar with.
    CDs burnt from these AIFFs exhibited the same "lower pitch" / slower playback.
    Reopening the Live Set, they were now also playing back lower pitched than what we had heard just minutes beforehand during the recording / mixing.
    After I let the computer sleep for a few hours, I came back and checked -- system and internet audio was now playing back at normal speed, but the Live Set was still lower-pitched - the individual WAV files in the set were all pitched lower.
    The Live recording prefs were stock standard - set to record 24 bit WAV at 44.1Khz. Since the issue seemed to affect non-Live audio as well, I'm guessing it was something more at the CoreAudio level?
    I managed to salvage the session by taking the exported AIFFs into Tracktion 3 and using the pitch change function in the Clip Properties pane. One track was 1.5x off, the other was 1.125x off.
    I'm at a complete loss as to why this would happen. It's a first (and hopefully only) occurrence. Has anyone had this happen to them? Could this be some sort of intermittent hardware (clock) glitch? Something to do with 6.0.3 and OS 10.4.10?
    I do need to take this MacBook Pro in for servicing - it experienced the "bulging battery" issue and has a partially dead keyboard (the keys near the upper right) - but even with those issues I've not had audio issues like this.

    In any case, if my Mac had problems, I'd send it in for service....!!!
    About your problem, I don't think that it depends on hardware.
    I'd check Live configuration and the SR of the audio files: you know, Live has so many features to modify speed and a lot of other parameters that bacomes easy to forget something.
    Try recording something with Garage Band so you will be sure if there is a real problem.
    cheers
    rob

  • Why do I sometimes suddenly lose Bluetooth from my Imac? I use it for my wireless mouse and keyboard. I then can't find it in system preferences but have to shutdown my Mac and hope it comes back

    This is an infuriating problem and wondered if it happens to other people too and if I am doing the right thing by turning the Mac off then on again.

    Hi there vickivoo,
    You may find the troubleshooting steps in the article below helpful.
    Troubleshooting wireless mouse and keyboard issues
    http://support.apple.com/kb/ts3048
    -Griff W. 

  • Robohelp scalability and speed

    I am encountering scalability/speed issues with a 4000 file
    Robohelp 6 project. This has 2000 HTML files and 2000 images.
    This appears to be the result of Robohelp performing a number
    of background file scanning/parsing threads that prevent the user
    interface refreshing in a timely manner. The problem is most acute
    at start up when it checks every HTML file in the project - the
    user interface only becomes responsive after about 90 seconds.
    There are also problems at other times particularly after saving a
    file that has multiple hyperlinks. At the current authoring rate I
    am adding about 1000 HTML files per year. Will Robohelp be usable
    in 12 months from now?
    As a test I created an artificial project containing 10,000
    empty HTML files and it was totally unusable. Does Robohelp 7 have
    the same scalability and speed issues?

    This has happened before for me too - I just recreated the
    folders, imported the topics back into them, and all was well. This
    happened after a CPD rebuild as well.
    I considered it a good thing - I am convinced that CPD bloat
    and the attempt to reconcile file and folder locations was slowing
    down the program significantly. The CPD just needed to be rebuilt.
    Of course, I have a large project, and it took a few hours to get
    back to running speed, but yours is about twice the size, so you
    will be down for awhile.
    If I were you, I wouldn't necessarily consider returning to
    the backed up dataset right away. You'll be back to the same
    performance issues. In your shoes, I would suck it up - just
    rebuild what needs to be rebuilt, and move on. And keep an eye on
    your CPD file size occasionally. I find that if the file size
    increases significantly all of a sudden, it's probably time to
    rebuild it.
    You may want to consider Peter's suggestion (reminiscence?)
    of breaking up your project into usable chunks and merging them.
    That's my two cents, take it for what it's worth.

Maybe you are looking for

  • Reciever File adapter

    HI, I am doing a mail(attachment)-xi-file scenario. The message structure on the source side is : Lead code:12929 Order ref: sp/jaksd/1212 order type: S Item code                      Qty 1221231                        123 1212232                    

  • Dock Problem with External Display

    I have a macbook hooked up to an external monitor. I made the external display the primary display so it has the menubar and main desktop, but for some reason the dock wont move from the macbook's display, which is the secondary one. I tried restarti

  • Help!! PROC  program

    Hello REDHAT 8 and Oracle 920 When I make sample proc program the message as follow cc -o tst sample1.o -L/oracle/product/8.1.7/lib/ -lclntsh `cat /oracle/productm sample1.o: In function `main': sample1.o(.text+0x67b): the `gets' function is dangerou

  • Can someone help with my EtreCheck report - my macbookpro became slow all of a sudden

    Hardware Information:           MacBook Pro (15-inch, Mid 2010)           MacBook Pro - model: MacBookPro6,2           1 2.53 GHz Intel Core i5 CPU: 2 cores           4 GB RAM Video Information:           NVIDIA GeForce GT 330M - VRAM: 256 MB        

  • Selecting record from a variable table

    Hi, I need to display the records from a table and the table name is saved in a variable. I am writing the code like create or replace procedure test_col as      t_name VARCHAR2(40);      V_ID VARCHAR2(10);      cursor c_table is SELECT TABLE_NAME FR