33 lines · 704 B · C++
RawDownload
// RTcmix - Copyright (C) 2005  The RTcmix Development Team// See ``AUTHORS'' for a list of contributors. See ``LICENSE'' for// the license to this software and for a DISCLAIMER OF ALL WARRANTIES. #include "Obucket.h" Obucket::Obucket(int len, ProcessFunction callback, void *context)	: _len(len), _index(0), _callback(callback), _context(context){	_buf = new float [len];} Obucket::~Obucket(){	delete [] _buf;} void Obucket::flush(float defaultval){	if (_index > 0) {		for (int i = _index; i < _len; i++)			_buf[i] = defaultval;		(*_callback)(_buf, _len, _context);		_index = 0;	}} void Obucket::clear(float defaultval){	for (int i = 0; i < _len; i++)		_buf[i] = defaultval;} 

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t