Commit 4980b082 authored by sletz's avatar sletz
Browse files

Cleanup, compilation on Windows.

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@3120 0c269be4-1314-0410-8aa9-9f06e86f4224
parent 8273564a
......@@ -16,17 +16,14 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
// --------------------------------------------------------------------------------
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <unistd.h>
#include <jack/jack.h>
class Freq
{
public:
......@@ -40,7 +37,6 @@ public:
float yf;
};
class MTDM
{
public:
......@@ -62,7 +58,6 @@ private:
Freq _freq [5];
};
MTDM::MTDM (void) : _cnt (0), _inv (0)
{
int i;
......@@ -88,7 +83,6 @@ MTDM::MTDM (void) : _cnt (0), _inv (0)
}
}
int MTDM::process (size_t len, float *ip, float *op)
{
int i;
......@@ -125,7 +119,6 @@ int MTDM::process (size_t len, float *ip, float *op)
return 0;
}
int MTDM::resolve (void)
{
int i, k, m;
......@@ -158,16 +151,13 @@ int MTDM::resolve (void)
return 0;
}
// --------------------------------------------------------------------------------
static MTDM mtdm;
static jack_client_t *jack_handle;
static jack_port_t *jack_capt;
static jack_port_t *jack_play;
int jack_callback (jack_nframes_t nframes, void *arg)
{
float *ip, *op;
......@@ -178,7 +168,6 @@ int jack_callback (jack_nframes_t nframes, void *arg)
return 0;
}
int main (int ac, char *av [])
{
float t;
......@@ -211,15 +200,19 @@ int main (int ac, char *av [])
while (1)
{
usleep (250000);
#ifdef WIN32
Sleep (250);
#else
usleep (250000);
#endif
if (mtdm.resolve () < 0) printf ("Signal below threshold...\n");
else
{
if (mtdm.err () > 0.3)
{
mtdm.invert ();
mtdm.resolve ();
mtdm.invert ();
mtdm.resolve ();
}
printf ("%10.3lf frames %10.3lf ms", mtdm.del (), mtdm.del () * t);
if (mtdm.err () > 0.2) printf (" ??");
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment