0 Replies Latest reply on Jun 3, 2007 7:37 AM by RavenWorks

    Microphone activityLevel sampling rate

    RavenWorks
      I want to make a script that listens for the peaks in a microphone's activityLevel, to try and detect roughly when the user is speaking... however, it seems that variable only updates itself intermittently.

      I'm currently drawing the values to a graph, where 1px = 2ms, but it turns out looking like this: http://img.ravenworks.ca/micgraph.gif
      (every pixel drawn comes from a Timer set to fire at 1ms intervals, the gaps are when it fails to...)

      Surely there's a much more efficient way of doing this? Is there some listener that can be used every time the Microphone object changes its activityLevel? (Or can I force it to update this value more often than it is currently?)