|
kwave
18.07.70
|


Public Member Functions | |
| MappedArray (Stripe &stripe) | |
| virtual | ~MappedArray () |
| unsigned int | copy (unsigned int dst, unsigned int src, unsigned int cnt) |
| unsigned int | read (Kwave::SampleArray &buffer, unsigned int dstoff, unsigned int offset, unsigned int length) |
Public Member Functions inherited from Kwave::SampleArray | |
| SampleArray () | |
| SampleArray (unsigned int size) | |
| virtual | ~SampleArray () |
| const sample_t * | constData () const |
| sample_t * | data () |
| void | setRawData (sample_t *data, unsigned int size) |
| void | resetRawData () |
| void | fill (sample_t value) |
| sample_t & | operator[] (unsigned int index) |
| const sample_t & | operator[] (unsigned int index) const |
| bool | resize (unsigned int size) Q_REQUIRED_RESULT |
| unsigned int | size () const |
| bool | isEmpty () const |
Private Attributes | |
| Stripe & | m_stripe |
| sample_t * | m_storage |
| unsigned int | m_length |
Wrapper for mapping the storage into memory and accessing it like a normal QMemArray<sample_t>. Should be used like a guard, internally uses a MapStorageGuard.
|
explicit |
Constructor
| stripe | should be *this of the stripe |
Definition at line 32 of file Stripe.cpp.
References m_length, m_storage, m_stripe, Kwave::Stripe::mapStorage(), and Kwave::SampleArray::setRawData().

|
virtual |
Destructor
Definition at line 41 of file Stripe.cpp.
References m_length, m_storage, m_stripe, Kwave::SampleArray::resetRawData(), and Kwave::Stripe::unmapStorage().

| unsigned int Kwave::Stripe::MappedArray::copy | ( | unsigned int | dst, |
| unsigned int | src, | ||
| unsigned int | cnt | ||
| ) |
Copy a portion of samples to another location, within the same storage.
| dst | destination index [samples] |
| src | source index [samples] |
| cnt | number of samples |
Definition at line 48 of file Stripe.cpp.
References m_length, and m_storage.
Referenced by Kwave::Stripe::deleteRange().

| unsigned int Kwave::Stripe::MappedArray::read | ( | Kwave::SampleArray & | buffer, |
| unsigned int | dstoff, | ||
| unsigned int | offset, | ||
| unsigned int | length | ||
| ) |
Read a portion of samples into an array of samples.
| buffer | array for samples to be read (destination) |
| dstoff | offset within the destination buffer |
| offset | the offset within the stripe (source) |
| length | number of samples to read |
Definition at line 71 of file Stripe.cpp.
References Kwave::Stripe::length(), m_length, m_storage, and MEMCPY.

|
private |
length in samples
Definition at line 295 of file Stripe.h.
Referenced by copy(), MappedArray(), read(), and ~MappedArray().
|
private |
pointer to the memory used for storage
Definition at line 292 of file Stripe.h.
Referenced by copy(), MappedArray(), read(), and ~MappedArray().
|
private |
stripe which gets it's storage mapped
Definition at line 289 of file Stripe.h.
Referenced by MappedArray(), and ~MappedArray().