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.

47 lines
1.1KB

  1. #ifndef STK_WVIN_H
  2. #define STK_WVIN_H
  3. #include "Stk.h"
  4. namespace stk {
  5. /***************************************************/
  6. /*! \class WvIn
  7. \brief STK audio input abstract base class.
  8. This class provides common functionality for a variety of audio
  9. data input subclasses.
  10. by Perry R. Cook and Gary P. Scavone, 1995-2011.
  11. */
  12. /***************************************************/
  13. class WvIn : public Stk
  14. {
  15. public:
  16. //! Return the number of audio channels in the data or stream.
  17. unsigned int channelsOut( void ) const { return data_.channels(); };
  18. //! Return an StkFrames reference to the last computed sample frame.
  19. /*!
  20. If no file data is loaded, an empty container is returned.
  21. */
  22. const StkFrames& lastFrame( void ) const { return lastFrame_; };
  23. //! Compute one sample frame and return the specified \c channel value.
  24. virtual StkFloat tick( unsigned int channel = 0 ) = 0;
  25. //! Fill the StkFrames argument with computed frames and return the same reference.
  26. virtual StkFrames& tick( StkFrames& frames ) = 0;
  27. protected:
  28. StkFrames data_;
  29. StkFrames lastFrame_;
  30. };
  31. } // stk namespace
  32. #endif