Loading files
/*****************************************************************************
AudioInJackDetection.hpp
Copyright (c) 2020 Raphael DINGE
*Tab=3***********************************************************************/
#pragma once
/*\\\ INCLUDE FILES \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
namespace erb
{
/*\\\ PUBLIC \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
/*
==============================================================================
Name : ctor
==============================================================================
*/
AudioInJackDetection::AudioInJackDetection (const Buffer & data, const uint8_t & npr)
: impl_data (data)
, impl_npr (npr)
{
}
/*
==============================================================================
Name : plugged
==============================================================================
*/
bool AudioInJackDetection::plugged () const
{
return _jack_detection.plugged ();
}
/*
==============================================================================
Name : operator const Buffer &
==============================================================================
*/
AudioInJackDetection::operator const Buffer & () const
{
return impl_data;
}
/*
==============================================================================
Name : size
==============================================================================
*/
std::size_t AudioInJackDetection::size () const
{
return impl_data.size ();
}
/*
==============================================================================
Name : operator []
==============================================================================
*/
const float & AudioInJackDetection::operator [] (std::size_t index)
{
return impl_data [index];
}
/*\\\ INTERNAL \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
/*
==============================================================================
Name : impl_preprocess
==============================================================================
*/
void AudioInJackDetection::impl_preprocess ()
{
_jack_detection.push (impl_data [impl_data.size () - 1] < .1f, impl_npr != 0);
}
/*\\\ PROTECTED \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
/*\\\ PRIVATE \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
} // namespace erb
/*\\\ EOF \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
1c962d8cfThis file is pinned to the selected release. Download the original to open it in your design tool.