void add_sink( sink* s ) { flut_assert( s != nullptr ); if ( std::find( global_sinks.begin(), global_sinks.end(), s ) == global_sinks.end() ) { global_sinks.push_back( s ); get_global_log_level(); } }
T get_interpolated_value( index_t frame0, index_t channel, T pos ) { flut_assert( frame0 >= frame_count() - num_frames && frame0 < frame_count() && channel < this->channel_count() ); index_t ofs0 = ( frame0 % num_frames ) * this->channel_count() + channel; index_t ofs1 = ( ( frame0 + 1 ) % num_frames ) * this->channel_count() + channel; return ( T(1) - pos ) * data[ ofs0 ] + pos * data[ ofs1 ]; }
T get_value( index_t frame, index_t channel ) { flut_assert( frame >= frame_count() - num_frames && frame < frame_count() && channel < this->channel_count() ); return data[ ( frame % num_frames ) * this->channel_count() + channel ]; }
const T* get_frame( index_t frame ) { flut_assert( frame >= frame_count() - num_frames && frame < frame_count() ); return data[ ( frame % num_frames ) * this->channel_count() ]; }
T& operator()( index_t row, index_t col ) { flut_assert( row < row_size() && col < column_size() ); return data_[ row * column_size() + col ]; }