kk so I am having a problem on a mac where the audio doesnt work very well unless my finger is on the touchpad... it works perfectly smooth...


I want to write code to detect whether the finger is there or not and if it isnt then move the mouse x pixels and repeat until i actually touch the pad...


I found this in java that seems extremely relevant but Im not sure how to write this in c++ or if there is a better way to do it... currently im trying to do it in windows as I dont know yet how to program c++ on a mac or get it to run on a mac... I also heard objective c is for mac but Im sure c++ can work on it too... :S not sure where to start or how to do this in c++

document.onmousemove = (function() {
  var onmousestop = function() {
    /* do stuff */
  }, thread;

  return function() {
    clearTimeout(thread);
    thread = setTimeout(onmousestop, 500);
  };
})();

Code explanation:

Detects if the mouse is moving and does nothing if it is... but if the mouse has stopped for more than half a second, it executes the code and repeats until the mouse is moved.

Do you want to move the mouse programatically to fix the sound issue? It sound more like a hardware problem to me. Does the same thing happen with a regular mouse connected?

Mouse events in C++ are a lot more complicated that in java. I'm no expert on that but here a thread where the topic is covered...

http://www.daniweb.com/forums/thread172653.html

yeah I wanna move it programatically... thing is when I touch the pad sound works, if i move the usb mouse in circles, sound works... the second i stop either of them, the sound stops, slows down, or crackles...

my touchpad is heat sensitive aswell so If i put a coin or object on it, the sound will still be crappy but if I put my finger NEAR it or ON it, the sound quality increases dramatically...

I thought it was a driver problem since the sound works perfect in windows 7 but in xp or mac osx (hackintosh) tripple booting on the same machine, sound does not work well... XP = crappy sound, Mac = crappy sound, windows 7 = best sound I ever heard in my life.

I can already do those mouseevents and move the mouse to specific spots in c++ and stuff but I just cannot make it detect movements:

{
   If (Mouse not moving for 0.5s) 
    {
      run code
    }
   else if (Mouse moves for >= 0.5s)
     {
       stop running code
     }
}

and Repeat

Edited 6 Years Ago by triumphost: n/a

HAHA! Iv'e never heard of this problem before, sounds (hehe) really weird. But if you move the mouse programmatically, how is your program going to detect when you start moving the real mouse? I don't think I can help you with this. Best of luck!

lol well I guess I gotta compile this in java then -_- time to hit the books and research and learn java better... hopefully I get it to compile or work or else i'd have to learn Objective c and reprogram my own audio driver...

Apparently this problem only happens on AMD processors as this only happened on the amd computers in my house... never happened on my intel computers and they're running the EXACT same os's... I tried reinstalling and seeing if it works but so far it happened on all amd computers...


Note: If i make the processor sweat/do a lot of work, the audio works fine... so I have a theory that the computer goes to sleep or the processor slows down when its not in use or no one is touching it... I tried turning sleep of and it still slows down and has the same problem but yet running programs run at the same speed... I guess when i touch the mouse the processor detects a human and plays audio lol... dont know why but even if I dont move the finger on the touchpad aka if I just leave a finger there without moving it, the audio still works perfectly... as long as the finger is there. it does not have to move but it has to be close to the touchpad or on it.

I guess I gotta go figure this stuff out on java on a mac and win xp...

Edited 6 Years Ago by triumphost: n/a

This article has been dead for over six months. Start a new discussion instead.