The JUCE cross-platform C++ framework, with DISTRHO/KXStudio specific changes
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.

30 lines
1.6KB

  1. /**
  2. @page example_block_finder BlockFinder
  3. In order to compile and run this application you need to first download and compile the BLOCKS-SDK, which can be obtained from GitHub @blocksgithub{here}. If you need help with this step, please refer to @ref the_standalone_blocks_sdk section.
  4. @section standalone_example An example application
  5. The source code for this example can be found in the @blocksgithub{BLOCKS-SDK repository} at @s_file{examples/BlockFinder/}, with the parts that are specific to different operating systems in the corresponding subdirectories.
  6. The main functionality of the application is contained within the following class:
  7. @s_file{BlockFinder/BlockFinder.h}:
  8. @include BlockFinder/BlockFinder.h
  9. @s_file{BlockFinder/BlockFinder.cpp}:
  10. @include BlockFinder/BlockFinder.cpp
  11. All this class does is create a PhysicalTopologySource and register for TopologySource::Listener::topologyChanged() callbacks --- for more information about how this works you should see the @ref discovering_blocks section.
  12. When the topology changes we print some information about the available BLOCKS.
  13. The @s_projcode{main} function of the macOS application is the easiest to understand.
  14. @s_file{BlockFinder/MacOS/main.mm}:
  15. @include BlockFinder/MacOS/main.mm
  16. Here we simply perform some JUCE initialisation, instantiate a BlockFinder class, then run the event loop.
  17. Whilst in the event loop, the @s_projcode{finder} object receives TopologySource::Listener::topologyChanged() callbacks and we see output printed to @s_code{stdout} when BLOCKS are connected or disconnected.
  18. */