Nsound
0.9.4
|
Searches the target Buffer for zero crossings at or after the window_size position. More...
#include <Nsound/BufferWindowSearch.h>
Public Member Functions | |
BufferWindowSearch (const Buffer &buffer, uint32 window_size=2048) | |
BufferWindowSearch (const BufferWindowSearch ©) | |
~BufferWindowSearch () | |
BufferWindowSearch & | operator= (const BufferWindowSearch &rhs) |
Buffer | getNextWindow () |
Searches the target Buffer for a zero crossing at or after the window_size position. More... | |
uint32 | getSamplesLeft () const |
Returns how many samples are left in the target Buffer. More... | |
void | reset () |
Resets the search. More... | |
void | setBuffer (const Buffer &buffer) |
Search a different Buffer. More... | |
Protected Attributes | |
const Buffer * | target_buffer_ |
uint32 | window_size_ |
uint32 | position_ |
Searches the target Buffer for zero crossings at or after the window_size position.
Definition at line 46 of file BufferWindowSearch.h.
Definition at line 49 of file BufferWindowSearch.cc.
References M_ASSERT_VALUE, and window_size_.
BufferWindowSearch::BufferWindowSearch | ( | const BufferWindowSearch & | copy | ) |
Definition at line 60 of file BufferWindowSearch.cc.
|
inline |
Definition at line 54 of file BufferWindowSearch.h.
BufferWindowSearch & BufferWindowSearch::operator= | ( | const BufferWindowSearch & | rhs | ) |
Definition at line 71 of file BufferWindowSearch.cc.
References position_, target_buffer_, and window_size_.
Buffer BufferWindowSearch::getNextWindow | ( | ) |
Searches the target Buffer for a zero crossing at or after the window_size position.
Definition at line 87 of file BufferWindowSearch.cc.
References Nsound::Buffer::getLength(), position_, Nsound::Buffer::subbuffer(), target_buffer_, and window_size_.
Referenced by Nsound::Buffer::getResample().
uint32 BufferWindowSearch::getSamplesLeft | ( | ) | const |
Returns how many samples are left in the target Buffer.
Definition at line 223 of file BufferWindowSearch.cc.
References Nsound::Buffer::getLength(), position_, and target_buffer_.
Referenced by Nsound::Buffer::getResample().
|
inline |
Resets the search.
Definition at line 69 of file BufferWindowSearch.h.
References position_.
Referenced by setBuffer().
|
inline |
Search a different Buffer.
Definition at line 74 of file BufferWindowSearch.h.
References reset(), and target_buffer_.
|
protected |
Definition at line 82 of file BufferWindowSearch.h.
Referenced by getNextWindow(), getSamplesLeft(), operator=(), and setBuffer().
|
protected |
Definition at line 83 of file BufferWindowSearch.h.
Referenced by BufferWindowSearch(), getNextWindow(), and operator=().
|
protected |
Definition at line 84 of file BufferWindowSearch.h.
Referenced by getNextWindow(), getSamplesLeft(), operator=(), and reset().