diff --git a/example_null.cpp b/example_null.cpp deleted file mode 100644 index ee73f44..0000000 --- a/example_null.cpp +++ /dev/null @@ -1,62 +0,0 @@ -/* Copyright (C) 2007-2008 Erik Faye-Lund and Egbert Teeselink - * For conditions of distribution and use, see copyright notice in LICENSE.TXT - */ - -#define WIN32_LEAN_AND_MEAN -#include // needed for Sleep() - -#include -#include -#include - -#include "sync/device.h" -#include "sync/timer.h" - -class NullTimer : public sync::Timer -{ -public: - NullTimer(float delta) : paused(true), row(0), delta(delta) {} - - void pause() { paused = true; } - void play() { paused = false; } - - float getRow() - { - float ret = row; - if (!paused) row += delta; - return ret; - } - - void setRow(float row) { this->row = row; } - bool isPlaying() { return !paused; } - -private: - bool paused; - float row; - float delta; -}; - -int main(int argc, char *argv[]) -{ - NullTimer timer(0.1f); - std::auto_ptr syncDevice = std::auto_ptr(sync::createDevice("sync", timer)); - if (NULL == syncDevice.get()) - { - printf("wft?!"); - return -1; - } - - sync::Track &track = syncDevice->getTrack("test"); - - timer.play(); - while (1) - { - float row = float(timer.getRow()); - if (!syncDevice->update(row)) break; - - printf("%2.2f: %2.2f\n", row, track.getValue(row)); - Sleep(100); - } - - return 0; -}