mirror of
https://github.com/LMMS/lmms.git
synced 2026-06-10 15:17:15 -04:00
Move BufferPool::clear to MixHelpers and rewrite
* Move out of BufferPool because it's not related to memory allocation * Rewrite because memset() is not portable because it sets all bytes to zero which depends on the platform's float representation of 0.0 to be all zero bytes
This commit is contained in:
@@ -34,12 +34,5 @@ class LMMS_EXPORT BufferPool
|
||||
public:
|
||||
static void init( fpp_t framesPerPeriod );
|
||||
static sampleFrame * acquire();
|
||||
// audio-buffer-mgm
|
||||
static void clear( sampleFrame * ab, const f_cnt_t frames,
|
||||
const f_cnt_t offset = 0 );
|
||||
#ifndef LMMS_DISABLE_SURROUND
|
||||
static void clear( surroundSampleFrame * ab, const f_cnt_t frames,
|
||||
const f_cnt_t offset = 0 );
|
||||
#endif
|
||||
static void release( sampleFrame * buf );
|
||||
};
|
||||
|
||||
@@ -37,6 +37,11 @@ bool useNaNHandler();
|
||||
|
||||
void setNaNHandler( bool use );
|
||||
|
||||
void clear(sampleFrame * src, int frames);
|
||||
#ifndef LMMS_DISABLE_SURROUND
|
||||
void clear(surroundSampleFrame * src, int frames);
|
||||
#endif
|
||||
|
||||
bool sanitize( sampleFrame * src, int frames );
|
||||
|
||||
/*! \brief Add samples from src to dst */
|
||||
|
||||
Reference in New Issue
Block a user