mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-29 22:58:39 +02:00
Use std::vector to hold WaveClips
This commit is contained in:
parent
afc22caf5a
commit
4cbca5d75c
@ -78,7 +78,7 @@ bool CrossFader::CrossFadeMix(samplePtr buffer, sampleFormat format, sampleCount
|
||||
//this could be 'optimized' by getting all of the sequences and then
|
||||
//iterating through each of them.
|
||||
|
||||
int numclips = mClips.GetCount();
|
||||
int numclips = mClips.size();
|
||||
|
||||
//create vectors to store the important info for each clip.
|
||||
std::vector<sampleCount> clipStart(numclips);
|
||||
@ -263,13 +263,7 @@ bool CrossFader::CrossFadeMix(samplePtr buffer, sampleFormat format, sampleCount
|
||||
}
|
||||
|
||||
|
||||
void CrossFader::AddClip( WaveClip * clip)
|
||||
{
|
||||
mClips.Append(clip);
|
||||
}
|
||||
|
||||
void CrossFader::ClearClips()
|
||||
{
|
||||
if(mClips.GetCount())
|
||||
mClips.Clear();
|
||||
mClips.clear();
|
||||
}
|
||||
|
@ -40,7 +40,6 @@ class CrossFader
|
||||
void SetTriangularCrossFade(){mType = FT_TRIANGULAR;};
|
||||
void SetExponentialCrossFade(){mType = FT_EXPONENTIAL;};
|
||||
|
||||
void AddClip( WaveClip * clip);
|
||||
void ClearClips();
|
||||
//Produces samples according to crossfading rules.
|
||||
bool GetSamples(samplePtr buffer, sampleFormat format,
|
||||
|
@ -42,8 +42,6 @@
|
||||
|
||||
#include "Experimental.h"
|
||||
|
||||
WX_DEFINE_LIST(WaveClipList);
|
||||
|
||||
class WaveCache {
|
||||
public:
|
||||
WaveCache()
|
||||
|
@ -24,7 +24,6 @@
|
||||
|
||||
#include <wx/gdicmn.h>
|
||||
#include <wx/longlong.h>
|
||||
#include <wx/list.h>
|
||||
#include <wx/msgdlg.h>
|
||||
|
||||
#include <vector>
|
||||
@ -150,7 +149,7 @@ public:
|
||||
|
||||
class WaveClip;
|
||||
|
||||
WX_DECLARE_USER_EXPORTED_LIST(WaveClip, WaveClipList, AUDACITY_DLL_API);
|
||||
using WaveClipList = std::vector < WaveClip* > ;
|
||||
WX_DEFINE_USER_EXPORTED_ARRAY_PTR(WaveClip*, WaveClipArray, class AUDACITY_DLL_API);
|
||||
|
||||
// A bundle of arrays needed for drawing waveforms. The object may or may not
|
||||
|
Loading…
x
Reference in New Issue
Block a user