diff options
author | Miller Puckette <millerpuckette@users.sourceforge.net> | 2005-05-30 03:01:38 +0000 |
---|---|---|
committer | Miller Puckette <millerpuckette@users.sourceforge.net> | 2005-05-30 03:01:38 +0000 |
commit | 47729b52cb85e8a52bf2e6bbf8ee9a810ed331e1 (patch) | |
tree | b001d3f3bdf3539d928535e47a965c72f7044a26 /pd/portmidi_osx/ptdarwin.c | |
parent | fcba84c01167d5be4e4ed70619fda85cb63804fe (diff) |
Add new portmidi and update portaudio. CHanges to makefile.nt and various
sources. Checking that I'm in sync with "help" file changes. I ended
up deleting help files in extra and recreating them under the new names.
svn path=/trunk/; revision=3091
Diffstat (limited to 'pd/portmidi_osx/ptdarwin.c')
-rw-r--r-- | pd/portmidi_osx/ptdarwin.c | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/pd/portmidi_osx/ptdarwin.c b/pd/portmidi_osx/ptdarwin.c deleted file mode 100644 index be34eb6b..00000000 --- a/pd/portmidi_osx/ptdarwin.c +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Portable timer implementation for Darwin / MacOS X - * - * Jon Parise <jparise@cmu.edu> - * - * $Id: ptdarwin.c,v 1.8 2005-05-18 04:28:50 millerpuckette Exp $ - */ - -#include <stdio.h> -#include <sys/time.h> -#include "porttime.h" - -#define TRUE 1 -#define FALSE 0 - -static int time_started_flag = FALSE; -static struct timeval time_offset; - -PtError Pt_Start(int resolution, PtCallback *callback, void *userData) -{ - struct timezone tz; - - if (callback) printf("error in porttime: callbacks not implemented\n"); - time_started_flag = TRUE; - gettimeofday(&time_offset, &tz); - - return ptNoError; -} - - -PtError Pt_Stop(void) // xjs added void -{ - time_started_flag = FALSE; - return ptNoError; -} - - -int Pt_Started(void) // xjs added void -{ - return time_started_flag; -} - - -PtTimestamp Pt_Time(void *time_info) // xjs added void *time_info -{ - long seconds, milliseconds; - struct timeval now; - struct timezone tz; - - gettimeofday(&now, &tz); - seconds = now.tv_sec - time_offset.tv_sec; - milliseconds = (now.tv_usec - time_offset.tv_usec) / 1000; - - return (seconds * 1000 + milliseconds); -} - - - |