Add StkFrames constructor that wraps pointer to existing buffer

This commit is contained in:
Grzegorz Szwoch (sound)
2021-03-08 09:26:15 +01:00
parent 7b94384705
commit 109f0bd9a8
2 changed files with 22 additions and 6 deletions

View File

@@ -285,6 +285,9 @@ public:
//! Overloaded constructor that initializes the frame data to the specified size with \c value.
StkFrames( const StkFloat& value, unsigned int nFrames, unsigned int nChannels );
//! Overloaded constructor that wraps the provided pointer to \c data.
StkFrames( StkFloat* data, unsigned int nFrames, unsigned int nChannels = 1 );
//! The destructor.
~StkFrames();
@@ -440,6 +443,7 @@ private:
unsigned int nChannels_;
size_t size_;
size_t bufferSize_;
bool ownData_;
};