Audio plugin host https://kx.studio/carla
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Rewire.cpp 2.0KB

10 years ago
10 years ago
10 years ago
10 years ago
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /*
  2. * Carla Tests
  3. * Copyright (C) 2014 Filipe Coelho <falktx@falktx.com>
  4. *
  5. * This program is free software; you can redistribute it and/or
  6. * modify it under the terms of the GNU General Public License as
  7. * published by the Free Software Foundation; either version 2 of
  8. * the License, or any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * For a full copy of the GNU General Public License see the doc/GPL.txt file.
  16. */
  17. #include "CarlaLibUtils.hpp"
  18. // -----------------------------------------------------------------------
  19. int main(/*int argc, char* argv[]*/)
  20. {
  21. static const char* const filename = "C:\\Program Files\\Waves\\ReWire\\WavesReWireDevice.dll";
  22. // static const char* const filename = "C:\\Program Files\\AudioGL\\AudioGL.dll";
  23. RewireBridge bridge(filename);
  24. DevInfo devInfo;
  25. carla_zeroStruct<DevInfo>(devInfo);
  26. devInfo.size = 8288;
  27. (bridge.RWDEFGetDeviceInfo)(&devInfo);
  28. carla_stdout("Ok, this is the info:");
  29. carla_stdout("\tVersion: %i", devInfo.version);
  30. carla_stdout("\tName: \"%s\"", devInfo.name);
  31. carla_stdout("\tChannels: %l", devInfo.channelCount);
  32. for (long i=0; i < devInfo.channelCount; ++i)
  33. carla_stdout("\t\t#%i: \"%s\"", i+1, devInfo.channelNames[i]);
  34. OpenInfo info;
  35. info.size1 = sizeof(OpenInfo);
  36. info.size2 = 12;
  37. info.sampleRate = 44100;
  38. info.bufferSize = 512;
  39. (bridge.RWDEFOpenDevice)(&info);
  40. #if 0
  41. carla_stdout("Starting panel...");
  42. (bridge.RWDEFLaunchPanelApp)();
  43. for (int i=0; i<500; ++i)
  44. //for (; (bridge.RWDEFIsPanelAppLaunched)() != 0;)
  45. {
  46. (bridge.RWDEFIdle)();
  47. carla_msleep(20);
  48. }
  49. (bridge.RWDEFQuitPanelApp)();
  50. #endif
  51. for (; (bridge.RWDEFIsCloseOK)() == 0;)
  52. carla_msleep(10);
  53. (bridge.RWDEFCloseDevice)();
  54. return 0;
  55. }