mirror of
https://github.com/cookiengineer/audacity
synced 2025-05-03 00:59:43 +02:00
Remove wxArray(Int|Long|Double) except where wxWidgets fns need it
This commit is contained in:
parent
080dd34e61
commit
8be1e8fdad
@ -487,10 +487,10 @@ wxDEFINE_EVENT(EVT_AUDIOIO_MONITOR, wxCommandEvent);
|
||||
// static
|
||||
int AudioIO::mNextStreamToken = 0;
|
||||
int AudioIO::mCachedPlaybackIndex = -1;
|
||||
wxArrayLong AudioIO::mCachedPlaybackRates;
|
||||
std::vector<long> AudioIO::mCachedPlaybackRates;
|
||||
int AudioIO::mCachedCaptureIndex = -1;
|
||||
wxArrayLong AudioIO::mCachedCaptureRates;
|
||||
wxArrayLong AudioIO::mCachedSampleRates;
|
||||
std::vector<long> AudioIO::mCachedCaptureRates;
|
||||
std::vector<long> AudioIO::mCachedSampleRates;
|
||||
double AudioIO::mCachedBestRateIn = 0.0;
|
||||
double AudioIO::mCachedBestRateOut;
|
||||
|
||||
@ -1464,7 +1464,7 @@ void AudioIO::HandleDeviceChange()
|
||||
|
||||
// that might have given us no rates whatsoever, so we have to guess an
|
||||
// answer to do the next bit
|
||||
int numrates = mCachedSampleRates.GetCount();
|
||||
int numrates = mCachedSampleRates.size();
|
||||
int highestSampleRate;
|
||||
if (numrates > 0)
|
||||
{
|
||||
@ -2975,7 +2975,7 @@ double AudioIO::GetStreamTime()
|
||||
}
|
||||
|
||||
|
||||
wxArrayLong AudioIO::GetSupportedPlaybackRates(int devIndex, double rate)
|
||||
std::vector<long> AudioIO::GetSupportedPlaybackRates(int devIndex, double rate)
|
||||
{
|
||||
if (devIndex == -1)
|
||||
{ // weren't given a device index, get the prefs / default one
|
||||
@ -2984,12 +2984,12 @@ wxArrayLong AudioIO::GetSupportedPlaybackRates(int devIndex, double rate)
|
||||
|
||||
// Check if we can use the cached rates
|
||||
if (mCachedPlaybackIndex != -1 && devIndex == mCachedPlaybackIndex
|
||||
&& (rate == 0.0 || mCachedPlaybackRates.Index(rate) != wxNOT_FOUND))
|
||||
&& (rate == 0.0 || make_iterator_range(mCachedPlaybackRates).contains(rate)))
|
||||
{
|
||||
return mCachedPlaybackRates;
|
||||
}
|
||||
|
||||
wxArrayLong supported;
|
||||
std::vector<long> supported;
|
||||
int irate = (int)rate;
|
||||
const PaDeviceInfo* devInfo = NULL;
|
||||
int i;
|
||||
@ -3022,22 +3022,22 @@ wxArrayLong AudioIO::GetSupportedPlaybackRates(int devIndex, double rate)
|
||||
// DirectSound rate is devised.
|
||||
if (!(isDirectSound && RatesToTry[i] > 200000))
|
||||
if (Pa_IsFormatSupported(NULL, &pars, RatesToTry[i]) == 0)
|
||||
supported.Add(RatesToTry[i]);
|
||||
supported.push_back(RatesToTry[i]);
|
||||
}
|
||||
|
||||
if (irate != 0 && supported.Index(irate) == wxNOT_FOUND)
|
||||
if (irate != 0 && !make_iterator_range(supported).contains(irate))
|
||||
{
|
||||
// LLL: Remove when a proper method of determining actual supported
|
||||
// DirectSound rate is devised.
|
||||
if (!(isDirectSound && RatesToTry[i] > 200000))
|
||||
if (Pa_IsFormatSupported(NULL, &pars, irate) == 0)
|
||||
supported.Add(irate);
|
||||
supported.push_back(irate);
|
||||
}
|
||||
|
||||
return supported;
|
||||
}
|
||||
|
||||
wxArrayLong AudioIO::GetSupportedCaptureRates(int devIndex, double rate)
|
||||
std::vector<long> AudioIO::GetSupportedCaptureRates(int devIndex, double rate)
|
||||
{
|
||||
if (devIndex == -1)
|
||||
{ // not given a device, look up in prefs / default
|
||||
@ -3046,12 +3046,12 @@ wxArrayLong AudioIO::GetSupportedCaptureRates(int devIndex, double rate)
|
||||
|
||||
// Check if we can use the cached rates
|
||||
if (mCachedCaptureIndex != -1 && devIndex == mCachedCaptureIndex
|
||||
&& (rate == 0.0 || mCachedCaptureRates.Index(rate) != wxNOT_FOUND))
|
||||
&& (rate == 0.0 || make_iterator_range(mCachedCaptureRates).contains(rate)))
|
||||
{
|
||||
return mCachedCaptureRates;
|
||||
}
|
||||
|
||||
wxArrayLong supported;
|
||||
std::vector<long> supported;
|
||||
int irate = (int)rate;
|
||||
const PaDeviceInfo* devInfo = NULL;
|
||||
int i;
|
||||
@ -3088,22 +3088,22 @@ wxArrayLong AudioIO::GetSupportedCaptureRates(int devIndex, double rate)
|
||||
// DirectSound rate is devised.
|
||||
if (!(isDirectSound && RatesToTry[i] > 200000))
|
||||
if (Pa_IsFormatSupported(&pars, NULL, RatesToTry[i]) == 0)
|
||||
supported.Add(RatesToTry[i]);
|
||||
supported.push_back(RatesToTry[i]);
|
||||
}
|
||||
|
||||
if (irate != 0 && supported.Index(irate) == wxNOT_FOUND)
|
||||
if (irate != 0 && !make_iterator_range(supported).contains(irate))
|
||||
{
|
||||
// LLL: Remove when a proper method of determining actual supported
|
||||
// DirectSound rate is devised.
|
||||
if (!(isDirectSound && RatesToTry[i] > 200000))
|
||||
if (Pa_IsFormatSupported(&pars, NULL, irate) == 0)
|
||||
supported.Add(irate);
|
||||
supported.push_back(irate);
|
||||
}
|
||||
|
||||
return supported;
|
||||
}
|
||||
|
||||
wxArrayLong AudioIO::GetSupportedSampleRates(int playDevice, int recDevice, double rate)
|
||||
std::vector<long> AudioIO::GetSupportedSampleRates(int playDevice, int recDevice, double rate)
|
||||
{
|
||||
// Not given device indices, look up prefs
|
||||
if (playDevice == -1) {
|
||||
@ -3117,21 +3117,21 @@ wxArrayLong AudioIO::GetSupportedSampleRates(int playDevice, int recDevice, doub
|
||||
if (mCachedPlaybackIndex != -1 && mCachedCaptureIndex != -1 &&
|
||||
playDevice == mCachedPlaybackIndex &&
|
||||
recDevice == mCachedCaptureIndex &&
|
||||
(rate == 0.0 || mCachedSampleRates.Index(rate) != wxNOT_FOUND))
|
||||
(rate == 0.0 || make_iterator_range(mCachedSampleRates).contains(rate)))
|
||||
{
|
||||
return mCachedSampleRates;
|
||||
}
|
||||
|
||||
wxArrayLong playback = GetSupportedPlaybackRates(playDevice, rate);
|
||||
wxArrayLong capture = GetSupportedCaptureRates(recDevice, rate);
|
||||
auto playback = GetSupportedPlaybackRates(playDevice, rate);
|
||||
auto capture = GetSupportedCaptureRates(recDevice, rate);
|
||||
int i;
|
||||
|
||||
// Return only sample rates which are in both arrays
|
||||
wxArrayLong result;
|
||||
std::vector<long> result;
|
||||
|
||||
for (i = 0; i < (int)playback.GetCount(); i++)
|
||||
if (capture.Index(playback[i]) != wxNOT_FOUND)
|
||||
result.Add(playback[i]);
|
||||
for (i = 0; i < (int)playback.size(); i++)
|
||||
if (make_iterator_range(capture).contains(playback[i]))
|
||||
result.push_back(playback[i]);
|
||||
|
||||
// If this yields no results, use the default sample rates nevertheless
|
||||
/* if (result.IsEmpty())
|
||||
@ -3149,12 +3149,12 @@ wxArrayLong AudioIO::GetSupportedSampleRates(int playDevice, int recDevice, doub
|
||||
* the real rates. */
|
||||
int AudioIO::GetOptimalSupportedSampleRate()
|
||||
{
|
||||
wxArrayLong rates = GetSupportedSampleRates();
|
||||
auto rates = GetSupportedSampleRates();
|
||||
|
||||
if (rates.Index(44100) != wxNOT_FOUND)
|
||||
if (make_iterator_range(rates).contains(44100))
|
||||
return 44100;
|
||||
|
||||
if (rates.Index(48000) != wxNOT_FOUND)
|
||||
if (make_iterator_range(rates).contains(48000))
|
||||
return 48000;
|
||||
|
||||
// if there are no supported rates, the next bit crashes. So check first,
|
||||
@ -3162,9 +3162,9 @@ int AudioIO::GetOptimalSupportedSampleRate()
|
||||
// will still get an error later, but with any luck may have changed
|
||||
// something by then. It's no worse than having an invalid default rate
|
||||
// stored in the preferences, which we don't check for
|
||||
if (rates.IsEmpty()) return 44100;
|
||||
if (rates.empty()) return 44100;
|
||||
|
||||
return rates[rates.GetCount() - 1];
|
||||
return rates.back();
|
||||
}
|
||||
|
||||
double AudioIO::GetBestRate(bool capturing, bool playing, double sampleRate)
|
||||
@ -3178,7 +3178,7 @@ double AudioIO::GetBestRate(bool capturing, bool playing, double sampleRate)
|
||||
// and jump to finished
|
||||
double retval;
|
||||
|
||||
wxArrayLong rates;
|
||||
std::vector<long> rates;
|
||||
if (capturing) wxLogDebug(wxT("AudioIO::GetBestRate() for capture"));
|
||||
if (playing) wxLogDebug(wxT("AudioIO::GetBestRate() for playback"));
|
||||
wxLogDebug(wxT("GetBestRate() suggested rate %.0lf Hz"), sampleRate);
|
||||
@ -3197,7 +3197,7 @@ double AudioIO::GetBestRate(bool capturing, bool playing, double sampleRate)
|
||||
* configuration), sampleRate is the Project Rate (desired sample rate) */
|
||||
long rate = (long)sampleRate;
|
||||
|
||||
if (rates.Index(rate) != wxNOT_FOUND) {
|
||||
if (make_iterator_range(rates).contains(rate)) {
|
||||
wxLogDebug(wxT("GetBestRate() Returning %.0ld Hz"), rate);
|
||||
retval = rate;
|
||||
goto finished;
|
||||
@ -3215,14 +3215,14 @@ double AudioIO::GetBestRate(bool capturing, bool playing, double sampleRate)
|
||||
* rate to use.
|
||||
* * If there aren't any higher, we use the highest available rate */
|
||||
|
||||
if (rates.IsEmpty()) {
|
||||
if (rates.empty()) {
|
||||
/* we're stuck - there are no supported rates with this hardware. Error */
|
||||
wxLogDebug(wxT("GetBestRate() Error - no supported sample rates"));
|
||||
retval = 0.0;
|
||||
goto finished;
|
||||
}
|
||||
int i;
|
||||
for (i = 0; i < (int)rates.GetCount(); i++) // for each supported rate
|
||||
for (i = 0; i < (int)rates.size(); i++) // for each supported rate
|
||||
{
|
||||
if (rates[i] > rate) {
|
||||
// supported rate is greater than requested rate
|
||||
@ -3232,8 +3232,8 @@ double AudioIO::GetBestRate(bool capturing, bool playing, double sampleRate)
|
||||
}
|
||||
}
|
||||
|
||||
wxLogDebug(wxT("GetBestRate() Returning highest rate - %.0ld Hz"), rates[rates.GetCount() - 1]);
|
||||
retval = rates[rates.GetCount() - 1]; // the highest available rate
|
||||
wxLogDebug(wxT("GetBestRate() Returning highest rate - %.0ld Hz"), rates.back());
|
||||
retval = rates.back(); // the highest available rate
|
||||
goto finished;
|
||||
|
||||
finished:
|
||||
@ -3504,10 +3504,10 @@ wxString AudioIO::GetDeviceInfo()
|
||||
s << wxT("High Recording Latency: ") << info->defaultHighInputLatency << e;
|
||||
s << wxT("High Playback Latency: ") << info->defaultHighOutputLatency << e;
|
||||
|
||||
wxArrayLong rates = GetSupportedPlaybackRates(j, 0.0);
|
||||
auto rates = GetSupportedPlaybackRates(j, 0.0);
|
||||
|
||||
s << wxT("Supported Rates:") << e;
|
||||
for (int k = 0; k < (int) rates.GetCount(); k++) {
|
||||
for (int k = 0; k < (int) rates.size(); k++) {
|
||||
s << wxT(" ") << (int)rates[k] << e;
|
||||
}
|
||||
|
||||
@ -3542,13 +3542,13 @@ wxString AudioIO::GetDeviceInfo()
|
||||
s << wxT("No playback device found for '") << playDevice << wxT("'.") << e;
|
||||
}
|
||||
|
||||
wxArrayLong supportedSampleRates;
|
||||
std::vector<long> supportedSampleRates;
|
||||
|
||||
if(havePlayDevice && haveRecDevice){
|
||||
supportedSampleRates = GetSupportedSampleRates(playDeviceNum, recDeviceNum);
|
||||
|
||||
s << wxT("Supported Rates:") << e;
|
||||
for (int k = 0; k < (int) supportedSampleRates.GetCount(); k++) {
|
||||
for (int k = 0; k < (int) supportedSampleRates.size(); k++) {
|
||||
s << wxT(" ") << (int)supportedSampleRates[k] << e;
|
||||
}
|
||||
}else{
|
||||
@ -3557,9 +3557,9 @@ wxString AudioIO::GetDeviceInfo()
|
||||
}
|
||||
|
||||
#if defined(USE_PORTMIXER)
|
||||
if (supportedSampleRates.GetCount() > 0)
|
||||
if (supportedSampleRates.size() > 0)
|
||||
{
|
||||
int highestSampleRate = supportedSampleRates[supportedSampleRates.GetCount() - 1];
|
||||
int highestSampleRate = supportedSampleRates.back();
|
||||
bool EmulateMixerInputVol = true;
|
||||
bool EmulateMixerOutputVol = true;
|
||||
float MixerInputVol = 1.0;
|
||||
|
@ -318,7 +318,7 @@ class AUDACITY_DLL_API AudioIO final {
|
||||
* You may also specify a rate for which to check in addition to the
|
||||
* standard rates.
|
||||
*/
|
||||
static wxArrayLong GetSupportedPlaybackRates(int DevIndex = -1,
|
||||
static std::vector<long> GetSupportedPlaybackRates(int DevIndex = -1,
|
||||
double rate = 0.0);
|
||||
|
||||
/** \brief Get a list of sample rates the input (recording) device
|
||||
@ -333,7 +333,7 @@ class AUDACITY_DLL_API AudioIO final {
|
||||
* You may also specify a rate for which to check in addition to the
|
||||
* standard rates.
|
||||
*/
|
||||
static wxArrayLong GetSupportedCaptureRates(int devIndex = -1,
|
||||
static std::vector<long> GetSupportedCaptureRates(int devIndex = -1,
|
||||
double rate = 0.0);
|
||||
|
||||
/** \brief Get a list of sample rates the current input/output device
|
||||
@ -350,7 +350,7 @@ class AUDACITY_DLL_API AudioIO final {
|
||||
* You may also specify a rate for which to check in addition to the
|
||||
* standard rates.
|
||||
*/
|
||||
static wxArrayLong GetSupportedSampleRates(int playDevice = -1,
|
||||
static std::vector<long> GetSupportedSampleRates(int playDevice = -1,
|
||||
int recDevice = -1,
|
||||
double rate = 0.0);
|
||||
|
||||
@ -745,10 +745,10 @@ private:
|
||||
|
||||
// For cacheing supported sample rates
|
||||
static int mCachedPlaybackIndex;
|
||||
static wxArrayLong mCachedPlaybackRates;
|
||||
static std::vector<long> mCachedPlaybackRates;
|
||||
static int mCachedCaptureIndex;
|
||||
static wxArrayLong mCachedCaptureRates;
|
||||
static wxArrayLong mCachedSampleRates;
|
||||
static std::vector<long> mCachedCaptureRates;
|
||||
static std::vector<long> mCachedSampleRates;
|
||||
static double mCachedBestRateIn;
|
||||
static double mCachedBestRateOut;
|
||||
|
||||
|
@ -294,7 +294,7 @@ void AudacityProject::CreateMenusAndCommands()
|
||||
{
|
||||
CommandManager *c = &mCommandManager;
|
||||
wxArrayString names;
|
||||
wxArrayInt indices;
|
||||
std::vector<int> indices;
|
||||
|
||||
// The list of defaults to exclude depends on
|
||||
// preference wxT("/GUI/Shortcuts/FullDefaults"), which may have changed.
|
||||
@ -7536,8 +7536,8 @@ void AudacityProject::HandleAlign(int index, bool moveSel)
|
||||
Track *t = iter.First();
|
||||
double delta = 0.0;
|
||||
double newPos = -1.0;
|
||||
wxArrayDouble trackStartArray;
|
||||
wxArrayDouble trackEndArray;
|
||||
std::vector<double> trackStartArray;
|
||||
std::vector<double> trackEndArray;
|
||||
double firstTrackOffset=0.0f;
|
||||
|
||||
while (t) {
|
||||
@ -7561,8 +7561,8 @@ void AudacityProject::HandleAlign(int index, bool moveSel)
|
||||
}
|
||||
numSelected++;
|
||||
}
|
||||
trackStartArray.Add(t->GetStartTime());
|
||||
trackEndArray.Add(t->GetEndTime());
|
||||
trackStartArray.push_back(t->GetStartTime());
|
||||
trackEndArray.push_back(t->GetEndTime());
|
||||
|
||||
if (offset < minOffset)
|
||||
minOffset = offset;
|
||||
|
@ -586,10 +586,10 @@ void PluginRegistrationDialog::PopulateOrExchange(ShuttleGui &S)
|
||||
}
|
||||
S.EndVerticalLay();
|
||||
|
||||
wxArrayInt colWidths;
|
||||
std::vector<int> colWidths;
|
||||
for (int i = 0, cnt = mEffects->GetColumnCount(); i < cnt; i++)
|
||||
{
|
||||
colWidths.Add(0);
|
||||
colWidths.push_back(0);
|
||||
}
|
||||
|
||||
for (int i = 0, cnt = mStates.GetCount(); i < cnt; i++)
|
||||
@ -900,16 +900,16 @@ void PluginRegistrationDialog::OnClearAll(wxCommandEvent & WXUNUSED(evt))
|
||||
|
||||
void PluginRegistrationDialog::OnEnable(wxCommandEvent & WXUNUSED(evt))
|
||||
{
|
||||
wxArrayLong items;
|
||||
std::vector<long> items;
|
||||
|
||||
long i = mEffects->GetNextItem(-1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
|
||||
while (i != wxNOT_FOUND)
|
||||
{
|
||||
items.Insert(i, 0);
|
||||
items.insert(items.begin(), i);
|
||||
i = mEffects->GetNextItem(i, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
|
||||
}
|
||||
|
||||
for (size_t i = 0, cnt = items.GetCount(); i < cnt; i++)
|
||||
for (size_t i = 0, cnt = items.size(); i < cnt; i++)
|
||||
{
|
||||
SetState(items[i], false, STATE_Enabled);
|
||||
}
|
||||
@ -917,16 +917,16 @@ void PluginRegistrationDialog::OnEnable(wxCommandEvent & WXUNUSED(evt))
|
||||
|
||||
void PluginRegistrationDialog::OnDisable(wxCommandEvent & WXUNUSED(evt))
|
||||
{
|
||||
wxArrayLong items;
|
||||
std::vector<long> items;
|
||||
|
||||
long i = mEffects->GetNextItem(-1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
|
||||
while (i != wxNOT_FOUND)
|
||||
{
|
||||
items.Insert(i, 0);
|
||||
items.insert(items.begin(), i);
|
||||
i = mEffects->GetNextItem(i, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
|
||||
}
|
||||
|
||||
for (size_t i = 0, cnt = items.GetCount(); i < cnt; i++)
|
||||
for (size_t i = 0, cnt = items.size(); i < cnt; i++)
|
||||
{
|
||||
SetState(items[i], false, STATE_Disabled);
|
||||
}
|
||||
|
@ -1533,23 +1533,23 @@ wxString ShuttleGuiBase::TranslateFromIndex( const int nIn, const wxArrayString
|
||||
}
|
||||
|
||||
/// Int-to-Index (choices can be items like e.g 0x400120 )
|
||||
int ShuttleGuiBase::TranslateToIndex( const int Value, const wxArrayInt &Choices )
|
||||
int ShuttleGuiBase::TranslateToIndex( const int Value, const std::vector<int> &Choices )
|
||||
{
|
||||
int n = Choices.Index( Value );
|
||||
if( n== wxNOT_FOUND )
|
||||
int n = make_iterator_range(Choices).index( Value );
|
||||
if( n == wxNOT_FOUND )
|
||||
n=miNoMatchSelector;
|
||||
miNoMatchSelector = 0;
|
||||
return n;
|
||||
}
|
||||
|
||||
/// Index-to-int (choices can be items like e.g 0x400120 )
|
||||
int ShuttleGuiBase::TranslateFromIndex( const int nIn, const wxArrayInt &Choices )
|
||||
int ShuttleGuiBase::TranslateFromIndex( const int nIn, const std::vector<int> &Choices )
|
||||
{
|
||||
int n = nIn;
|
||||
if( n== wxNOT_FOUND )
|
||||
n=miNoMatchSelector;
|
||||
miNoMatchSelector = 0;
|
||||
if( n < (int)Choices.GetCount() )
|
||||
if( n < (int)Choices.size() )
|
||||
{
|
||||
return Choices[n];
|
||||
}
|
||||
@ -1815,7 +1815,7 @@ wxChoice * ShuttleGuiBase::TieChoice(
|
||||
const wxString &SettingName,
|
||||
const int Default,
|
||||
const wxArrayString & Choices,
|
||||
const wxArrayInt & TranslatedChoices)
|
||||
const std::vector<int> & TranslatedChoices)
|
||||
{
|
||||
wxChoice * pChoice=(wxChoice*)NULL;
|
||||
|
||||
@ -2257,11 +2257,11 @@ void ShuttleGui::SetSizeHints( wxWindow *window, const wxArrayString & items )
|
||||
window->SetSizeHints( maxw, -1 );
|
||||
}
|
||||
|
||||
void ShuttleGui::SetSizeHints( wxWindow *window, const wxArrayInt & items )
|
||||
void ShuttleGui::SetSizeHints( wxWindow *window, const std::vector<int> & items )
|
||||
{
|
||||
wxArrayString strs;
|
||||
|
||||
for( size_t i = 0; i < items.GetCount(); i++ )
|
||||
for( size_t i = 0; i < items.size(); i++ )
|
||||
{
|
||||
strs.Add( wxString::Format( wxT("%d"), items[i] ) );
|
||||
}
|
||||
@ -2277,7 +2277,7 @@ void ShuttleGui::SetSizeHints( const wxArrayString & items )
|
||||
SetSizeHints( mpLastWind, items );
|
||||
}
|
||||
|
||||
void ShuttleGui::SetSizeHints( const wxArrayInt & items )
|
||||
void ShuttleGui::SetSizeHints( const std::vector<int> & items )
|
||||
{
|
||||
if( mShuttleMode != eIsCreating )
|
||||
return;
|
||||
|
@ -16,6 +16,7 @@
|
||||
|
||||
#include "Audacity.h"
|
||||
|
||||
#include <vector>
|
||||
#include "MemoryX.h"
|
||||
#include <wx/grid.h>
|
||||
#include <wx/sizer.h>
|
||||
@ -41,7 +42,6 @@ enum teShuttleMode
|
||||
eIsSavingToPrefs
|
||||
};
|
||||
|
||||
class wxArrayInt;
|
||||
class wxListCtrl;
|
||||
class wxCheckBox;
|
||||
class wxChoice;
|
||||
@ -149,8 +149,8 @@ public:
|
||||
bool DoStep( int iStep );
|
||||
int TranslateToIndex( const wxString &Value, const wxArrayString &Choices );
|
||||
wxString TranslateFromIndex( const int nIn, const wxArrayString &Choices );
|
||||
int TranslateToIndex( const int Value, const wxArrayInt &Choices );
|
||||
int TranslateFromIndex( const int nIn, const wxArrayInt &Choices );
|
||||
int TranslateToIndex( const int Value, const std::vector<int> &Choices );
|
||||
int TranslateFromIndex( const int nIn, const std::vector<int> &Choices );
|
||||
|
||||
//-- Tie functions both add controls and also read/write to them.
|
||||
// The ones taking a 'WrappedType' are type-generic and are used by the type specific ones.
|
||||
@ -212,7 +212,7 @@ public:
|
||||
const wxString &SettingName,
|
||||
const int Default,
|
||||
const wxArrayString & Choices,
|
||||
const wxArrayInt & TranslatedChoices);
|
||||
const std::vector<int> & TranslatedChoices);
|
||||
wxTextCtrl * TieTextBox(
|
||||
const wxString &Prompt,
|
||||
const wxString &SettingName,
|
||||
@ -380,9 +380,9 @@ public:
|
||||
|
||||
void SetSizeHints( int minX = -1, int minY = -1 );
|
||||
void SetSizeHints( const wxArrayString & items );
|
||||
void SetSizeHints( const wxArrayInt & items );
|
||||
void SetSizeHints( const std::vector<int> & items );
|
||||
static void SetSizeHints( wxWindow *window, const wxArrayString & items );
|
||||
static void SetSizeHints( wxWindow *window, const wxArrayInt & items );
|
||||
static void SetSizeHints( wxWindow *window, const std::vector<int> & items );
|
||||
|
||||
teShuttleMode GetMode() { return mShuttleMode; };
|
||||
};
|
||||
|
@ -487,7 +487,7 @@ void ThemeBase::RegisterImage( int &iIndex, const wxImage &Image, const wxString
|
||||
#endif
|
||||
|
||||
mBitmapNames.Add( Name );
|
||||
mBitmapFlags.Add( mFlow.mFlags );
|
||||
mBitmapFlags.push_back( mFlow.mFlags );
|
||||
mFlow.mFlags &= ~resFlagSkip;
|
||||
iIndex = mBitmaps.size() - 1;
|
||||
}
|
||||
|
@ -146,7 +146,7 @@ protected:
|
||||
std::vector<wxImage> mImages;
|
||||
std::vector<wxBitmap> mBitmaps;
|
||||
wxArrayString mBitmapNames;
|
||||
wxArrayInt mBitmapFlags;
|
||||
std::vector<int> mBitmapFlags;
|
||||
|
||||
std::vector<wxColour> mColours;
|
||||
wxArrayString mColourNames;
|
||||
|
@ -803,7 +803,7 @@ void WaveTrack::ClearAndPaste(double t0, // Start of time to clear
|
||||
return;
|
||||
}
|
||||
|
||||
wxArrayDouble splits;
|
||||
std::vector<double> splits;
|
||||
WaveClipHolders cuts;
|
||||
|
||||
// If provided time warper was NULL, use a default one that does nothing
|
||||
@ -822,13 +822,13 @@ void WaveTrack::ClearAndPaste(double t0, // Start of time to clear
|
||||
|
||||
// Remember clip boundaries as locations to split
|
||||
st = LongSamplesToTime(TimeToLongSamples(clip->GetStartTime()));
|
||||
if (st >= t0 && st <= t1 && splits.Index(st) == wxNOT_FOUND) {
|
||||
splits.Add(st);
|
||||
if (st >= t0 && st <= t1 && !make_iterator_range(splits).contains(st)) {
|
||||
splits.push_back(st);
|
||||
}
|
||||
|
||||
st = LongSamplesToTime(TimeToLongSamples(clip->GetEndTime()));
|
||||
if (st >= t0 && st <= t1 && splits.Index(st) == wxNOT_FOUND) {
|
||||
splits.Add(st);
|
||||
if (st >= t0 && st <= t1 && !make_iterator_range(splits).contains(st)) {
|
||||
splits.push_back(st);
|
||||
}
|
||||
|
||||
// Search for cut lines
|
||||
@ -862,7 +862,7 @@ void WaveTrack::ClearAndPaste(double t0, // Start of time to clear
|
||||
Paste(t0, src);
|
||||
{
|
||||
// First, merge the NEW clip(s) in with the existing clips
|
||||
if (merge && splits.GetCount() > 0)
|
||||
if (merge && splits.size() > 0)
|
||||
{
|
||||
// Now t1 represents the absolute end of the pasted data.
|
||||
t1 = t0 + src->GetEndTime();
|
||||
|
@ -2287,11 +2287,11 @@ bool Effect::RealtimeAddProcessor(int group, unsigned chans, float rate)
|
||||
if (group == 0)
|
||||
{
|
||||
mCurrentProcessor = 0;
|
||||
mGroupProcessor.Clear();
|
||||
mGroupProcessor.clear();
|
||||
}
|
||||
|
||||
// Remember the processor starting index
|
||||
mGroupProcessor.Add(mCurrentProcessor);
|
||||
mGroupProcessor.push_back(mCurrentProcessor);
|
||||
|
||||
// Call the client until we run out of input or output channels
|
||||
while (ichans > 0 && ochans > 0)
|
||||
|
@ -530,7 +530,7 @@ private:
|
||||
size_t mBlockSize;
|
||||
unsigned mNumChannels;
|
||||
|
||||
wxArrayInt mGroupProcessor;
|
||||
std::vector<int> mGroupProcessor;
|
||||
int mCurrentProcessor;
|
||||
|
||||
wxCriticalSection mRealtimeSuspendLock;
|
||||
|
@ -470,7 +470,7 @@ void EffectManager::RealtimeInitialize(double rate)
|
||||
|
||||
// (Re)Set processor parameters
|
||||
mRealtimeChans.clear();
|
||||
mRealtimeRates.Clear();
|
||||
mRealtimeRates.clear();
|
||||
|
||||
// RealtimeAdd/RemoveEffect() needs to know when we're active so it can
|
||||
// initialize newly added effects
|
||||
@ -492,7 +492,7 @@ void EffectManager::RealtimeAddProcessor(int group, unsigned chans, float rate)
|
||||
e->RealtimeAddProcessor(group, chans, rate);
|
||||
|
||||
mRealtimeChans.push_back(chans);
|
||||
mRealtimeRates.Add(rate);
|
||||
mRealtimeRates.push_back(rate);
|
||||
}
|
||||
|
||||
void EffectManager::RealtimeFinalize()
|
||||
@ -509,7 +509,7 @@ void EffectManager::RealtimeFinalize()
|
||||
|
||||
// Reset processor parameters
|
||||
mRealtimeChans.clear();
|
||||
mRealtimeRates.Clear();
|
||||
mRealtimeRates.clear();
|
||||
|
||||
// No longer active
|
||||
mRealtimeActive = false;
|
||||
|
@ -158,7 +158,7 @@ private:
|
||||
bool mRealtimeSuspended;
|
||||
bool mRealtimeActive;
|
||||
std::vector<unsigned> mRealtimeChans;
|
||||
wxArrayDouble mRealtimeRates;
|
||||
std::vector<double> mRealtimeRates;
|
||||
|
||||
// Set true if we want to skip pushing state
|
||||
// after processing at effect run time.
|
||||
|
@ -192,7 +192,7 @@ void EffectRack::Add(Effect *effect, bool active, bool favorite)
|
||||
bb->SetBitmapSelected(mPowerRaised);
|
||||
bb->SetName(_("Active State"));
|
||||
bb->SetToolTip(_("Set effect active state"));
|
||||
mPowerState.Add(active);
|
||||
mPowerState.push_back(active);
|
||||
if (active)
|
||||
{
|
||||
bb->SetBitmapLabel(mPowerPushed);
|
||||
@ -229,7 +229,7 @@ void EffectRack::Add(Effect *effect, bool active, bool favorite)
|
||||
bb->SetBitmapSelected(mFavPushed);
|
||||
bb->SetName(_("Favorite"));
|
||||
bb->SetToolTip(_("Mark effect as a favorite"));
|
||||
mFavState.Add(favorite);
|
||||
mFavState.push_back(favorite);
|
||||
if (favorite)
|
||||
{
|
||||
bb->SetBitmapLabel(mFavPushed);
|
||||
@ -432,8 +432,8 @@ void EffectRack::OnRemove(wxCommandEvent & evt)
|
||||
}
|
||||
|
||||
mEffects.erase(mEffects.begin() + index);
|
||||
mPowerState.RemoveAt(index);
|
||||
mFavState.RemoveAt(index);
|
||||
mPowerState.erase(mPowerState.begin() + index);
|
||||
mFavState.erase(mFavState.begin() + index);
|
||||
|
||||
if (mEffects.size() == 0)
|
||||
{
|
||||
@ -516,12 +516,12 @@ void EffectRack::MoveRowUp(int row)
|
||||
mEffects.insert(mEffects.begin() + row - 1, effect);
|
||||
|
||||
int state = mPowerState[row];
|
||||
mPowerState.RemoveAt(row);
|
||||
mPowerState.Insert(state, row - 1);
|
||||
mPowerState.erase(mPowerState.begin() + row);
|
||||
mPowerState.insert(mPowerState.begin() + row - 1, state);
|
||||
|
||||
state = mFavState[row];
|
||||
mFavState.RemoveAt(row);
|
||||
mFavState.Insert(state, row - 1);
|
||||
mFavState.erase(mFavState.begin() + row);
|
||||
mFavState.insert(mFavState.begin() + row - 1, state);
|
||||
|
||||
row *= NUMCOLS;
|
||||
|
||||
|
@ -76,8 +76,8 @@ private:
|
||||
wxBitmap mRemovePushed;
|
||||
wxBitmap mRemoveRaised;
|
||||
|
||||
wxArrayInt mPowerState;
|
||||
wxArrayInt mFavState;
|
||||
std::vector<int> mPowerState;
|
||||
std::vector<int> mFavState;
|
||||
|
||||
int mNumEffects;
|
||||
|
||||
|
@ -697,14 +697,14 @@ void VSTEffectsModule::Check(const wxChar *path)
|
||||
VSTEffect effect(path);
|
||||
if (effect.SetHost(NULL))
|
||||
{
|
||||
wxArrayInt effectIDs = effect.GetEffectIDs();
|
||||
auto effectIDs = effect.GetEffectIDs();
|
||||
wxString out;
|
||||
|
||||
if (effectIDs.GetCount() > 0)
|
||||
if (effectIDs.size() > 0)
|
||||
{
|
||||
wxString subids;
|
||||
|
||||
for (size_t i = 0, cnt = effectIDs.GetCount(); i < cnt; i++)
|
||||
for (size_t i = 0, cnt = effectIDs.size(); i < cnt; i++)
|
||||
{
|
||||
subids += wxString::Format(wxT("%d;"), effectIDs[i]);
|
||||
}
|
||||
@ -2269,9 +2269,9 @@ void VSTEffect::Unload()
|
||||
}
|
||||
}
|
||||
|
||||
wxArrayInt VSTEffect::GetEffectIDs()
|
||||
std::vector<int> VSTEffect::GetEffectIDs()
|
||||
{
|
||||
wxArrayInt effectIDs;
|
||||
std::vector<int> effectIDs;
|
||||
|
||||
// Are we a shell?
|
||||
if (mVstVersion >= 2 && (VstPlugCategory) callDispatcher(effGetPlugCategory, 0, 0, NULL, 0) == kPlugCategShell)
|
||||
@ -2282,7 +2282,7 @@ wxArrayInt VSTEffect::GetEffectIDs()
|
||||
effectID = (int) callDispatcher(effShellGetNextPlugin, 0, 0, &name, 0);
|
||||
while (effectID)
|
||||
{
|
||||
effectIDs.Add(effectID);
|
||||
effectIDs.push_back(effectID);
|
||||
effectID = (int) callDispatcher(effShellGetNextPlugin, 0, 0, &name, 0);
|
||||
}
|
||||
}
|
||||
|
@ -179,7 +179,7 @@ private:
|
||||
// Plugin loading and unloading
|
||||
bool Load();
|
||||
void Unload();
|
||||
wxArrayInt GetEffectIDs();
|
||||
std::vector<int> GetEffectIDs();
|
||||
|
||||
// Parameter loading and saving
|
||||
bool LoadParameters(const wxString & group);
|
||||
|
@ -461,11 +461,11 @@ bool LV2Effect::SetHost(EffectHostInterface *host)
|
||||
{
|
||||
if (lilv_port_is_a(mPlug, port, gInput))
|
||||
{
|
||||
mAudioInputs.Add(index);
|
||||
mAudioInputs.push_back(index);
|
||||
}
|
||||
else if (lilv_port_is_a(mPlug, port, gOutput))
|
||||
{
|
||||
mAudioOutputs.Add(index);
|
||||
mAudioOutputs.push_back(index);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
@ -521,7 +521,7 @@ bool LV2Effect::SetHost(EffectHostInterface *host)
|
||||
{
|
||||
const LilvScalePoint *point = lilv_scale_points_get(points, j);
|
||||
|
||||
ctrl.mScaleValues.Add(lilv_node_as_float(lilv_scale_point_get_value(point)));
|
||||
ctrl.mScaleValues.push_back(lilv_node_as_float(lilv_scale_point_get_value(point)));
|
||||
ctrl.mScaleLabels.Add(LilvString(lilv_scale_point_get_label(point)));
|
||||
}
|
||||
lilv_scale_points_free(points);
|
||||
@ -595,7 +595,7 @@ bool LV2Effect::SetHost(EffectHostInterface *host)
|
||||
}
|
||||
else
|
||||
{
|
||||
mGroupMap[ctrl.mGroup].Add(mControls.size());
|
||||
mGroupMap[ctrl.mGroup].push_back(mControls.size());
|
||||
mControls.push_back(ctrl);
|
||||
}
|
||||
}
|
||||
@ -667,12 +667,12 @@ bool LV2Effect::SetHost(EffectHostInterface *host)
|
||||
|
||||
unsigned LV2Effect::GetAudioInCount()
|
||||
{
|
||||
return mAudioInputs.GetCount();
|
||||
return mAudioInputs.size();
|
||||
}
|
||||
|
||||
unsigned LV2Effect::GetAudioOutCount()
|
||||
{
|
||||
return mAudioOutputs.GetCount();
|
||||
return mAudioOutputs.size();
|
||||
}
|
||||
|
||||
int LV2Effect::GetMidiInCount()
|
||||
@ -782,12 +782,12 @@ bool LV2Effect::ProcessFinalize()
|
||||
|
||||
size_t LV2Effect::ProcessBlock(float **inbuf, float **outbuf, size_t size)
|
||||
{
|
||||
for (size_t p = 0, cnt = mAudioInputs.GetCount(); p < cnt; p++)
|
||||
for (size_t p = 0, cnt = mAudioInputs.size(); p < cnt; p++)
|
||||
{
|
||||
lilv_instance_connect_port(mProcess, mAudioInputs[p], inbuf[p]);
|
||||
}
|
||||
|
||||
for (size_t p = 0, cnt = mAudioOutputs.GetCount(); p < cnt; p++)
|
||||
for (size_t p = 0, cnt = mAudioOutputs.size(); p < cnt; p++)
|
||||
{
|
||||
lilv_instance_connect_port(mProcess, mAudioOutputs[p], outbuf[p]);
|
||||
}
|
||||
@ -799,12 +799,12 @@ size_t LV2Effect::ProcessBlock(float **inbuf, float **outbuf, size_t size)
|
||||
|
||||
bool LV2Effect::RealtimeInitialize()
|
||||
{
|
||||
mMasterIn.reinit( mAudioInputs.GetCount(), mBlockSize );
|
||||
for (size_t p = 0, cnt = mAudioInputs.GetCount(); p < cnt; p++)
|
||||
mMasterIn.reinit( mAudioInputs.size(), mBlockSize );
|
||||
for (size_t p = 0, cnt = mAudioInputs.size(); p < cnt; p++)
|
||||
lilv_instance_connect_port(mMaster, mAudioInputs[p], mMasterIn[p].get());
|
||||
|
||||
mMasterOut.reinit( mAudioOutputs.GetCount(), mBlockSize );
|
||||
for (size_t p = 0, cnt = mAudioOutputs.GetCount(); p < cnt; p++)
|
||||
mMasterOut.reinit( mAudioOutputs.size(), mBlockSize );
|
||||
for (size_t p = 0, cnt = mAudioOutputs.size(); p < cnt; p++)
|
||||
lilv_instance_connect_port(mMaster, mAudioOutputs[p], mMasterOut[p].get());
|
||||
|
||||
lilv_instance_activate(mMaster);
|
||||
@ -843,7 +843,7 @@ bool LV2Effect::RealtimeResume()
|
||||
|
||||
bool LV2Effect::RealtimeProcessStart()
|
||||
{
|
||||
for (size_t p = 0, cnt = mAudioInputs.GetCount(); p < cnt; p++)
|
||||
for (size_t p = 0, cnt = mAudioInputs.size(); p < cnt; p++)
|
||||
memset(mMasterIn[p].get(), 0, mBlockSize * sizeof(float));
|
||||
|
||||
mNumSamples = 0;
|
||||
@ -864,7 +864,7 @@ size_t LV2Effect::RealtimeProcess(int group,
|
||||
return 0;
|
||||
}
|
||||
|
||||
for (size_t p = 0, cnt = mAudioInputs.GetCount(); p < cnt; p++)
|
||||
for (size_t p = 0, cnt = mAudioInputs.size(); p < cnt; p++)
|
||||
{
|
||||
for (decltype(numSamples) s = 0; s < numSamples; s++)
|
||||
{
|
||||
@ -875,12 +875,12 @@ size_t LV2Effect::RealtimeProcess(int group,
|
||||
|
||||
LilvInstance *slave = mSlaves[group];
|
||||
|
||||
for (size_t p = 0, cnt = mAudioInputs.GetCount(); p < cnt; p++)
|
||||
for (size_t p = 0, cnt = mAudioInputs.size(); p < cnt; p++)
|
||||
{
|
||||
lilv_instance_connect_port(slave, mAudioInputs[p], inbuf[p]);
|
||||
}
|
||||
|
||||
for (size_t p = 0, cnt = mAudioOutputs.GetCount(); p < cnt; p++)
|
||||
for (size_t p = 0, cnt = mAudioOutputs.size(); p < cnt; p++)
|
||||
{
|
||||
lilv_instance_connect_port(slave, mAudioOutputs[p], outbuf[p]);
|
||||
}
|
||||
@ -1589,8 +1589,8 @@ bool LV2Effect::BuildPlain()
|
||||
auto gridSizer = std::make_unique<wxFlexGridSizer>(numCols, 5, 5);
|
||||
gridSizer->AddGrowableCol(3);
|
||||
|
||||
const wxArrayInt & params = mGroupMap[mGroups[i]];
|
||||
for (size_t pi = 0, cnt = params.GetCount(); pi < cnt; pi++)
|
||||
const auto & params = mGroupMap[mGroups[i]];
|
||||
for (size_t pi = 0, cnt = params.size(); pi < cnt; pi++)
|
||||
{
|
||||
int p = params[pi];
|
||||
LV2Port & ctrl = mControls[p];
|
||||
@ -1633,7 +1633,7 @@ bool LV2Effect::BuildPlain()
|
||||
else if (ctrl.mEnumeration) // Check before integer
|
||||
{
|
||||
int s;
|
||||
for (s = (int)ctrl.mScaleValues.GetCount() - 1; s >= 0; s--)
|
||||
for (s = (int)ctrl.mScaleValues.size() - 1; s >= 0; s--)
|
||||
{
|
||||
if (ctrl.mVal >= ctrl.mScaleValues[s])
|
||||
{
|
||||
@ -1751,8 +1751,7 @@ bool LV2Effect::BuildPlain()
|
||||
innerSizer->Layout();
|
||||
|
||||
// Calculate the maximum width of all columns (bypass Generator sizer)
|
||||
wxArrayInt widths;
|
||||
widths.Add(0, numCols);
|
||||
std::vector<int> widths(numCols);
|
||||
|
||||
size_t cnt = innerSizer->GetChildren().GetCount();
|
||||
for (size_t i = (GetType() == EffectTypeGenerate); i < cnt; i++)
|
||||
@ -1846,8 +1845,8 @@ bool LV2Effect::TransferDataToWindow()
|
||||
|
||||
for (size_t i = 0, cnt = mGroups.GetCount(); i < cnt; i++)
|
||||
{
|
||||
const wxArrayInt & params = mGroupMap[mGroups[i]];
|
||||
for (size_t pi = 0, cnt = params.GetCount(); pi < cnt; pi++)
|
||||
const auto & params = mGroupMap[mGroups[i]];
|
||||
for (size_t pi = 0, cnt = params.size(); pi < cnt; pi++)
|
||||
{
|
||||
int p = params[pi];
|
||||
LV2Port & ctrl = mControls[p];
|
||||
@ -1866,7 +1865,7 @@ bool LV2Effect::TransferDataToWindow()
|
||||
else if (ctrl.mEnumeration) // Check before integer
|
||||
{
|
||||
int s;
|
||||
for (s = (int) ctrl.mScaleValues.GetCount() - 1; s >= 0; s--)
|
||||
for (s = (int) ctrl.mScaleValues.size() - 1; s >= 0; s--)
|
||||
{
|
||||
if (ctrl.mVal >= ctrl.mScaleValues[s])
|
||||
{
|
||||
|
@ -91,11 +91,11 @@ public:
|
||||
LilvPort *mPort;
|
||||
|
||||
// ScalePoints
|
||||
wxArrayDouble mScaleValues;
|
||||
std::vector<double> mScaleValues;
|
||||
wxArrayString mScaleLabels;
|
||||
};
|
||||
|
||||
using LV2GroupMap = std::unordered_map<wxString, wxArrayInt>;
|
||||
using LV2GroupMap = std::unordered_map<wxString, std::vector<int>>;
|
||||
WX_DEFINE_ARRAY_PTR(LilvInstance *, LV2SlaveArray);
|
||||
|
||||
class LV2EffectSettingsDialog;
|
||||
@ -268,8 +268,8 @@ private:
|
||||
|
||||
wxLongToLongHashMap mControlsMap;
|
||||
std::vector<LV2Port> mControls;
|
||||
wxArrayInt mAudioInputs;
|
||||
wxArrayInt mAudioOutputs;
|
||||
std::vector<int> mAudioInputs;
|
||||
std::vector<int> mAudioOutputs;
|
||||
|
||||
LV2GroupMap mGroupMap;
|
||||
wxArrayString mGroups;
|
||||
|
@ -149,7 +149,7 @@ ExportFFmpegAC3Options::ExportFFmpegAC3Options(wxWindow *parent, int WXUNUSED(fo
|
||||
for (unsigned int i=0; i < (sizeof(iAC3BitRates)/sizeof(int)); i++)
|
||||
{
|
||||
mBitRateNames.Add(wxString::Format(_("%i kbps"),iAC3BitRates[i]/1000));
|
||||
mBitRateLabels.Add(iAC3BitRates[i]);
|
||||
mBitRateLabels.push_back(iAC3BitRates[i]);
|
||||
}
|
||||
|
||||
ShuttleGui S(this, eIsCreatingFromPrefs);
|
||||
@ -275,7 +275,7 @@ ExportFFmpegAMRNBOptions::ExportFFmpegAMRNBOptions(wxWindow *parent, int WXUNUSE
|
||||
for (unsigned int i=0; i < (sizeof(iAMRNBBitRate)/sizeof(int)); i++)
|
||||
{
|
||||
mBitRateNames.Add(wxString::Format(_("%.2f kbps"),(float)iAMRNBBitRate[i]/1000));
|
||||
mBitRateLabels.Add(iAMRNBBitRate[i]);
|
||||
mBitRateLabels.push_back(iAMRNBBitRate[i]);
|
||||
}
|
||||
|
||||
ShuttleGui S(this, eIsCreatingFromPrefs);
|
||||
@ -345,7 +345,7 @@ ExportFFmpegWMAOptions::ExportFFmpegWMAOptions(wxWindow *parent, int WXUNUSED(fo
|
||||
for (unsigned int i=0; i < (sizeof(iWMABitRate)/sizeof(int)); i++)
|
||||
{
|
||||
mBitRateNames.Add(wxString::Format(wxT("%i kbps"),iWMABitRate[i]/1000));
|
||||
mBitRateLabels.Add(iWMABitRate[i]);
|
||||
mBitRateLabels.push_back(iWMABitRate[i]);
|
||||
}
|
||||
|
||||
ShuttleGui S(this, eIsCreatingFromPrefs);
|
||||
@ -1380,14 +1380,14 @@ ExportFFmpegOptions::ExportFFmpegOptions(wxWindow *parent)
|
||||
|
||||
for (unsigned int i = 0; i < 6; i++)
|
||||
{
|
||||
mPredictionOrderMethodLabels.Add(i);
|
||||
mPredictionOrderMethodLabels.push_back(i);
|
||||
mPredictionOrderMethodNames.Add(wxString::Format(wxT("%s"),PredictionOrderMethodNames(i)));
|
||||
}
|
||||
|
||||
for (unsigned int i=0; i < (sizeof(iAACProfileValues)/sizeof(int)); i++)
|
||||
{
|
||||
mProfileNames.Add(wxString::Format(wxT("%s"),iAACProfileNames(i)));
|
||||
mProfileLabels.Add(iAACProfileValues[i]);
|
||||
mProfileLabels.push_back(iAACProfileValues[i]);
|
||||
}
|
||||
|
||||
PopulateOrExchange(S);
|
||||
|
@ -87,7 +87,7 @@ public:
|
||||
private:
|
||||
|
||||
wxArrayString mBitRateNames;
|
||||
wxArrayInt mBitRateLabels;
|
||||
std::vector<int> mBitRateLabels;
|
||||
|
||||
wxChoice *mBitRateChoice;
|
||||
int mBitRateFromChoice;
|
||||
@ -125,7 +125,7 @@ public:
|
||||
private:
|
||||
|
||||
wxArrayString mBitRateNames;
|
||||
wxArrayInt mBitRateLabels;
|
||||
std::vector<int> mBitRateLabels;
|
||||
|
||||
wxChoice *mBitRateChoice;
|
||||
int mBitRateFromChoice;
|
||||
@ -148,7 +148,7 @@ public:
|
||||
private:
|
||||
|
||||
wxArrayString mBitRateNames;
|
||||
wxArrayInt mBitRateLabels;
|
||||
std::vector<int> mBitRateLabels;
|
||||
|
||||
wxChoice *mBitRateChoice;
|
||||
int mBitRateFromChoice;
|
||||
@ -222,9 +222,9 @@ private:
|
||||
wxArrayString mCodecNames;
|
||||
wxArrayString mCodecLongNames;
|
||||
wxArrayString mProfileNames;
|
||||
wxArrayInt mProfileLabels;
|
||||
std::vector<int> mProfileLabels;
|
||||
wxArrayString mPredictionOrderMethodNames;
|
||||
wxArrayInt mPredictionOrderMethodLabels;
|
||||
std::vector<int> mPredictionOrderMethodLabels;
|
||||
|
||||
wxChoice *mFormatChoice;
|
||||
wxChoice *mCodecChoice;
|
||||
|
@ -94,7 +94,7 @@ public:
|
||||
|
||||
private:
|
||||
wxArrayString mBitRateNames;
|
||||
wxArrayInt mBitRateLabels;
|
||||
std::vector<int> mBitRateLabels;
|
||||
};
|
||||
|
||||
///
|
||||
@ -105,7 +105,7 @@ ExportMP2Options::ExportMP2Options(wxWindow *parent, int WXUNUSED(format))
|
||||
for (unsigned int i=0; i < (sizeof(iBitrates)/sizeof(int)); i++)
|
||||
{
|
||||
mBitRateNames.Add(wxString::Format(_("%i kbps"),iBitrates[i]));
|
||||
mBitRateLabels.Add(iBitrates[i]);
|
||||
mBitRateLabels.push_back(iBitrates[i]);
|
||||
}
|
||||
|
||||
ShuttleGui S(this, eIsCreatingFromPrefs);
|
||||
|
@ -283,7 +283,7 @@ public:
|
||||
|
||||
void LoadNames(CHOICES *choices, int count);
|
||||
wxArrayString GetNames(CHOICES *choices, int count);
|
||||
wxArrayInt GetLabels(CHOICES *choices, int count);
|
||||
std::vector<int> GetLabels(CHOICES *choices, int count);
|
||||
int FindIndex(CHOICES *choices, int cnt, int needle, int def);
|
||||
|
||||
private:
|
||||
@ -552,12 +552,12 @@ wxArrayString ExportMP3Options::GetNames(CHOICES *choices, int count)
|
||||
return names;
|
||||
}
|
||||
|
||||
wxArrayInt ExportMP3Options::GetLabels(CHOICES *choices, int count)
|
||||
std::vector<int> ExportMP3Options::GetLabels(CHOICES *choices, int count)
|
||||
{
|
||||
wxArrayInt labels;
|
||||
std::vector<int> labels;
|
||||
|
||||
for (int i = 0; i < count; i++) {
|
||||
labels.Add(choices[i].label);
|
||||
labels.push_back(choices[i].label);
|
||||
}
|
||||
|
||||
return labels;
|
||||
|
@ -119,7 +119,7 @@ private:
|
||||
wxChoice *mEncodingChoice;
|
||||
int mHeaderFromChoice;
|
||||
int mEncodingFromChoice;
|
||||
wxArrayInt mEncodingFormats;
|
||||
std::vector<int> mEncodingFormats;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
@ -157,7 +157,7 @@ ExportPCMOptions::ExportPCMOptions(wxWindow *parent, int selformat)
|
||||
if (valid)
|
||||
{
|
||||
mEncodingNames.Add(sf_encoding_index_name(i));
|
||||
mEncodingFormats.Add(enc);
|
||||
mEncodingFormats.push_back(enc);
|
||||
if ((format & SF_FORMAT_SUBMASK) == (int)sf_encoding_index_to_subtype(i))
|
||||
mEncodingFromChoice = sel;
|
||||
else
|
||||
@ -234,17 +234,17 @@ void ExportPCMOptions::OnHeaderChoice(wxCommandEvent & WXUNUSED(evt))
|
||||
|
||||
mEncodingNames.Clear();
|
||||
mEncodingChoice->Clear();
|
||||
mEncodingFormats.Clear();
|
||||
mEncodingFormats.clear();
|
||||
int sel = wxNOT_FOUND;
|
||||
int i,j;
|
||||
|
||||
int sfnum = sf_num_simple_formats();
|
||||
wxArrayInt sfs;
|
||||
std::vector<int> sfs;
|
||||
|
||||
for (i = 0; i < sfnum; i++)
|
||||
{
|
||||
SF_FORMAT_INFO *fi = sf_simple_format(i);
|
||||
sfs.Add(fi->format);
|
||||
sfs.push_back(fi->format);
|
||||
}
|
||||
|
||||
int num = sf_num_encodings();
|
||||
@ -258,13 +258,13 @@ void ExportPCMOptions::OnHeaderChoice(wxCommandEvent & WXUNUSED(evt))
|
||||
const auto name = sf_encoding_index_name(i);
|
||||
mEncodingNames.Add(name);
|
||||
mEncodingChoice->Append(name);
|
||||
mEncodingFormats.Add(enc);
|
||||
mEncodingFormats.push_back(enc);
|
||||
for (j = 0; j < sfnum; j++)
|
||||
{
|
||||
int enc = sfs[j];
|
||||
if ((sel == wxNOT_FOUND) && (fmt == enc))
|
||||
{
|
||||
sel = mEncodingFormats.GetCount()-1;
|
||||
sel = mEncodingFormats.size() - 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ void ModulePrefs::GetAllModuleStatuses(){
|
||||
// TODO: On an Audacity upgrade we should (?) actually untick modules.
|
||||
// The old modules might be still around, and we do not want to use them.
|
||||
mModules.Clear();
|
||||
mStatuses.Clear();
|
||||
mStatuses.clear();
|
||||
mPaths.Clear();
|
||||
|
||||
|
||||
@ -73,7 +73,7 @@ void ModulePrefs::GetAllModuleStatuses(){
|
||||
}
|
||||
//wxLogDebug( wxT("Entry: %s Value: %i"), str, iStatus );
|
||||
mModules.Add( str );
|
||||
mStatuses.Add( iStatus );
|
||||
mStatuses.push_back( iStatus );
|
||||
mPaths.Add( fname );
|
||||
}
|
||||
bCont = gPrefs->GetNextEntry(str, dummy);
|
||||
|
@ -47,7 +47,7 @@ class ModulePrefs final : public PrefsPanel
|
||||
void Populate();
|
||||
void PopulateOrExchange(ShuttleGui & S);
|
||||
wxArrayString mModules;
|
||||
wxArrayInt mStatuses;
|
||||
std::vector<int> mStatuses;
|
||||
wxArrayString mPaths;
|
||||
};
|
||||
|
||||
|
@ -72,10 +72,10 @@ void QualityPrefs::Populate()
|
||||
void QualityPrefs::GetNamesAndLabels()
|
||||
{
|
||||
//------------ Dither Names
|
||||
mDitherNames.Add(_("None")); mDitherLabels.Add(Dither::none);
|
||||
mDitherNames.Add(_("Rectangle")); mDitherLabels.Add(Dither::rectangle);
|
||||
mDitherNames.Add(_("Triangle")); mDitherLabels.Add(Dither::triangle);
|
||||
mDitherNames.Add(_("Shaped")); mDitherLabels.Add(Dither::shaped);
|
||||
mDitherNames.Add(_("None")); mDitherLabels.push_back(Dither::none);
|
||||
mDitherNames.Add(_("Rectangle")); mDitherLabels.push_back(Dither::rectangle);
|
||||
mDitherNames.Add(_("Triangle")); mDitherLabels.push_back(Dither::triangle);
|
||||
mDitherNames.Add(_("Shaped")); mDitherLabels.push_back(Dither::shaped);
|
||||
|
||||
//------------ Sample Rate Names
|
||||
// JKC: I don't understand the following comment.
|
||||
@ -93,25 +93,25 @@ void QualityPrefs::GetNamesAndLabels()
|
||||
// how do you get at them as they are on the Audio I/O page????
|
||||
for (int i = 0; i < AudioIO::NumStandardRates; i++) {
|
||||
int iRate = AudioIO::StandardRates[i];
|
||||
mSampleRateLabels.Add(iRate);
|
||||
mSampleRateLabels.push_back(iRate);
|
||||
mSampleRateNames.Add(wxString::Format(wxT("%i Hz"), iRate));
|
||||
}
|
||||
|
||||
mSampleRateNames.Add(_("Other..."));
|
||||
|
||||
// The label for the 'Other...' case can be any value at all.
|
||||
mSampleRateLabels.Add(44100); // If chosen, this value will be overwritten
|
||||
mSampleRateLabels.push_back(44100); // If chosen, this value will be overwritten
|
||||
|
||||
//------------- Sample Format Names
|
||||
mSampleFormatNames.Add(wxT("16-bit")); mSampleFormatLabels.Add(int16Sample);
|
||||
mSampleFormatNames.Add(wxT("24-bit")); mSampleFormatLabels.Add(int24Sample);
|
||||
mSampleFormatNames.Add(wxT("32-bit float")); mSampleFormatLabels.Add(floatSample);
|
||||
mSampleFormatNames.Add(wxT("16-bit")); mSampleFormatLabels.push_back(int16Sample);
|
||||
mSampleFormatNames.Add(wxT("24-bit")); mSampleFormatLabels.push_back(int24Sample);
|
||||
mSampleFormatNames.Add(wxT("32-bit float")); mSampleFormatLabels.push_back(floatSample);
|
||||
|
||||
//------------- Converter Names
|
||||
int numConverters = Resample::GetNumMethods();
|
||||
for (int i = 0; i < numConverters; i++) {
|
||||
mConverterNames.Add(Resample::GetMethodName(i));
|
||||
mConverterLabels.Add(i);
|
||||
mConverterLabels.push_back(i);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -12,6 +12,7 @@
|
||||
#ifndef __AUDACITY_QUALITY_PREFS__
|
||||
#define __AUDACITY_QUALITY_PREFS__
|
||||
|
||||
#include <vector>
|
||||
#include <wx/defs.h>
|
||||
|
||||
#include <wx/arrstr.h>
|
||||
@ -38,13 +39,13 @@ class QualityPrefs final : public PrefsPanel
|
||||
void OnSampleRateChoice(wxCommandEvent & e);
|
||||
|
||||
wxArrayString mDitherNames;
|
||||
wxArrayInt mDitherLabels;
|
||||
std::vector<int> mDitherLabels;
|
||||
wxArrayString mSampleRateNames;
|
||||
wxArrayInt mSampleRateLabels;
|
||||
std::vector<int> mSampleRateLabels;
|
||||
wxArrayString mSampleFormatNames;
|
||||
wxArrayInt mSampleFormatLabels;
|
||||
std::vector<int> mSampleFormatLabels;
|
||||
wxArrayString mConverterNames;
|
||||
wxArrayInt mConverterLabels;
|
||||
std::vector<int> mConverterLabels;
|
||||
|
||||
wxChoice *mSampleRates;
|
||||
wxTextCtrl *mOtherSampleRate;
|
||||
|
@ -69,41 +69,41 @@ void TracksPrefs::Populate()
|
||||
// we don't display them by increasing integer values.
|
||||
|
||||
mViewChoices.Add(_("Waveform"));
|
||||
mViewCodes.Add((int)(WaveTrack::Waveform));
|
||||
mViewCodes.push_back((int)(WaveTrack::Waveform));
|
||||
|
||||
mViewChoices.Add(_("Waveform (dB)"));
|
||||
mViewCodes.Add((int)(WaveTrack::obsoleteWaveformDBDisplay));
|
||||
mViewCodes.push_back((int)(WaveTrack::obsoleteWaveformDBDisplay));
|
||||
|
||||
mViewChoices.Add(_("Spectrogram"));
|
||||
mViewCodes.Add(WaveTrack::Spectrum);
|
||||
mViewCodes.push_back(WaveTrack::Spectrum);
|
||||
|
||||
|
||||
// How samples are displayed when zoomed in:
|
||||
|
||||
mSampleDisplayChoices.Add(_("Connect dots"));
|
||||
mSampleDisplayCodes.Add((int) WaveTrack::LinearInterpolate);
|
||||
mSampleDisplayCodes.push_back((int) WaveTrack::LinearInterpolate);
|
||||
|
||||
mSampleDisplayChoices.Add(_("Stem plot"));
|
||||
mSampleDisplayCodes.Add((int) WaveTrack::StemPlot);
|
||||
mSampleDisplayCodes.push_back((int) WaveTrack::StemPlot);
|
||||
|
||||
mZoomChoices.Add( _("Fit to Width") );
|
||||
mZoomCodes.Add( WaveTrack::kZoomToFit );
|
||||
mZoomCodes.push_back( WaveTrack::kZoomToFit );
|
||||
mZoomChoices.Add( _("Zoom to Selection") );
|
||||
mZoomCodes.Add( WaveTrack::kZoomToSelection );
|
||||
mZoomCodes.push_back( WaveTrack::kZoomToSelection );
|
||||
mZoomChoices.Add( _("Zoom Default") );
|
||||
mZoomCodes.Add( WaveTrack::kZoomDefault );
|
||||
mZoomCodes.push_back( WaveTrack::kZoomDefault );
|
||||
mZoomChoices.Add( _("Minutes") );
|
||||
mZoomCodes.Add( WaveTrack::kZoomMinutes );
|
||||
mZoomCodes.push_back( WaveTrack::kZoomMinutes );
|
||||
mZoomChoices.Add( _("Seconds") );
|
||||
mZoomCodes.Add( WaveTrack::kZoomSeconds );
|
||||
mZoomCodes.push_back( WaveTrack::kZoomSeconds );
|
||||
mZoomChoices.Add( _("MilliSeconds") );
|
||||
mZoomCodes.Add( WaveTrack::kZoomMilliSeconds );
|
||||
mZoomCodes.push_back( WaveTrack::kZoomMilliSeconds );
|
||||
mZoomChoices.Add( _("Samples") );
|
||||
mZoomCodes.Add( WaveTrack::kZoomSamples );
|
||||
mZoomCodes.push_back( WaveTrack::kZoomSamples );
|
||||
mZoomChoices.Add( _("4 Pixels per Sample") );
|
||||
mZoomCodes.Add( WaveTrack::kZoom4To1 );
|
||||
mZoomCodes.push_back( WaveTrack::kZoom4To1 );
|
||||
mZoomChoices.Add( _("Max Zoom") );
|
||||
mZoomCodes.Add( WaveTrack::kMaxZoom );
|
||||
mZoomCodes.push_back( WaveTrack::kMaxZoom );
|
||||
|
||||
|
||||
|
||||
|
@ -18,6 +18,7 @@
|
||||
//#include <wx/arrstr.h>
|
||||
//#include <wx/window.h>
|
||||
|
||||
#include <vector>
|
||||
#include "PrefsPanel.h"
|
||||
|
||||
class ShuttleGui;
|
||||
@ -41,11 +42,11 @@ class TracksPrefs final : public PrefsPanel
|
||||
|
||||
static int iPreferencePinned;
|
||||
|
||||
wxArrayInt mViewCodes;
|
||||
std::vector<int> mViewCodes;
|
||||
wxArrayString mViewChoices;
|
||||
wxArrayInt mSampleDisplayCodes;
|
||||
std::vector<int> mSampleDisplayCodes;
|
||||
wxArrayString mSampleDisplayChoices;
|
||||
wxArrayInt mZoomCodes;
|
||||
std::vector<int> mZoomCodes;
|
||||
wxArrayString mZoomChoices;
|
||||
};
|
||||
|
||||
|
@ -653,7 +653,7 @@ int ToolManager::FilterEvent(wxEvent &event)
|
||||
void ToolManager::ReadConfig()
|
||||
{
|
||||
wxString oldpath = gPrefs->GetPath();
|
||||
wxArrayInt unordered[ DockCount ];
|
||||
std::vector<int> unordered[ DockCount ];
|
||||
std::vector<ToolBar*> dockedAndHidden;
|
||||
bool show[ ToolBarCount ];
|
||||
int width[ ToolBarCount ];
|
||||
@ -806,7 +806,7 @@ void ToolManager::ReadConfig()
|
||||
if (!ordered)
|
||||
{
|
||||
// These must go at the end
|
||||
unordered[ dock - 1 ].Add( ndx );
|
||||
unordered[ dock - 1 ].push_back( ndx );
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -859,7 +859,7 @@ void ToolManager::ReadConfig()
|
||||
|
||||
// Add all unordered toolbars
|
||||
bool deviceWasPositioned = false;
|
||||
for( int ord = 0; ord < (int) unordered[ dock ].GetCount(); ord++ )
|
||||
for( int ord = 0; ord < (int) unordered[ dock ].size(); ord++ )
|
||||
{
|
||||
ToolBar *t = mBars[ unordered[ dock ][ ord ] ].get();
|
||||
|
||||
|
@ -97,7 +97,7 @@ class ToolBarArrangement
|
||||
public:
|
||||
ExpandingToolBarArray childArray;
|
||||
std::vector<wxRect> rectArray;
|
||||
wxArrayInt rowArray;
|
||||
std::vector<int> rowArray;
|
||||
};
|
||||
|
||||
//
|
||||
@ -1154,7 +1154,7 @@ void ToolBarArea::CollapseAll(bool now)
|
||||
void ToolBarArea::AddChild(ExpandingToolBar *child)
|
||||
{
|
||||
mChildArray.Add(child);
|
||||
mRowArray.Add(-1); // unknown row
|
||||
mRowArray.push_back(-1); // unknown row
|
||||
LayoutOne(mChildArray.GetCount()-1);
|
||||
Fit(false, true);
|
||||
}
|
||||
@ -1168,7 +1168,7 @@ void ToolBarArea::RemoveChild(ExpandingToolBar *child)
|
||||
child->Hide();
|
||||
|
||||
mChildArray.RemoveAt(i);
|
||||
mRowArray.RemoveAt(i);
|
||||
mRowArray.erase(mRowArray.begin() + i);
|
||||
|
||||
for(j=i; j<(int)mChildArray.GetCount(); j++)
|
||||
mRowArray[j] = -1;
|
||||
@ -1215,8 +1215,8 @@ void ToolBarArea::RestoreArrangement(std::unique_ptr<ToolBarArrangement>&& arran
|
||||
std::vector<wxRect> ToolBarArea::GetDropTargets()
|
||||
{
|
||||
mDropTargets.clear();
|
||||
mDropTargetIndices.Clear();
|
||||
mDropTargetRows.Clear();
|
||||
mDropTargetIndices.clear();
|
||||
mDropTargetRows.clear();
|
||||
|
||||
int numChildren = (int)mChildArray.GetCount();
|
||||
int i;
|
||||
@ -1232,15 +1232,15 @@ std::vector<wxRect> ToolBarArea::GetDropTargets()
|
||||
if (childRow != row) {
|
||||
// Add a target before this child (at beginning of row only)
|
||||
row = childRow;
|
||||
mDropTargetIndices.Add(i);
|
||||
mDropTargetRows.Add(row);
|
||||
mDropTargetIndices.push_back(i);
|
||||
mDropTargetRows.push_back(row);
|
||||
mDropTargets.push_back(wxRect(childRect.x, childRect.y,
|
||||
0, childRect.height));
|
||||
}
|
||||
|
||||
// Add a target after this child (always)
|
||||
mDropTargetIndices.Add(i+1);
|
||||
mDropTargetRows.Add(row);
|
||||
mDropTargetIndices.push_back(i+1);
|
||||
mDropTargetRows.push_back(row);
|
||||
mDropTargets.push_back(wxRect(childRect.x+childRect.width, childRect.y,
|
||||
0, childRect.height));
|
||||
}
|
||||
@ -1258,7 +1258,7 @@ void ToolBarArea::MoveChild(ExpandingToolBar *toolBar, wxRect dropTarget)
|
||||
int newRow = mDropTargetRows[i];
|
||||
|
||||
mChildArray.Insert(toolBar, newIndex);
|
||||
mRowArray.Insert(newRow, newIndex);
|
||||
mRowArray.insert(mRowArray.begin() + newIndex, newRow);
|
||||
|
||||
for(j=newIndex+1; j<(int)mChildArray.GetCount(); j++)
|
||||
mRowArray[j] = -1;
|
||||
|
@ -240,7 +240,7 @@ class ToolBarArea final : public wxPanelWrapper
|
||||
void Fit(bool horizontal, bool vertical);
|
||||
|
||||
ExpandingToolBarArray mChildArray;
|
||||
wxArrayInt mRowArray;
|
||||
std::vector<int> mRowArray;
|
||||
wxSize mLastLayoutSize;
|
||||
bool mInOnSize;
|
||||
|
||||
@ -251,8 +251,8 @@ class ToolBarArea final : public wxPanelWrapper
|
||||
wxSize mActualSize;
|
||||
|
||||
std::vector<wxRect> mDropTargets;
|
||||
wxArrayInt mDropTargetIndices;
|
||||
wxArrayInt mDropTargetRows;
|
||||
std::vector<int> mDropTargetIndices;
|
||||
std::vector<int> mDropTargetRows;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
@ -68,7 +68,7 @@ XMLWriter::XMLWriter()
|
||||
{
|
||||
mDepth = 0;
|
||||
mInTag = false;
|
||||
mHasKids.Add(false);
|
||||
mHasKids.push_back(false);
|
||||
}
|
||||
|
||||
XMLWriter::~XMLWriter()
|
||||
@ -93,7 +93,7 @@ void XMLWriter::StartTag(const wxString &name)
|
||||
|
||||
mTagstack.Insert(name, 0);
|
||||
mHasKids[0] = true;
|
||||
mHasKids.Insert(false, 0);
|
||||
mHasKids.insert(mHasKids.begin(), false);
|
||||
mDepth++;
|
||||
mInTag = true;
|
||||
}
|
||||
@ -120,7 +120,7 @@ void XMLWriter::EndTag(const wxString &name)
|
||||
Write(wxT(">\n"));
|
||||
}
|
||||
mTagstack.RemoveAt(0);
|
||||
mHasKids.RemoveAt(0);
|
||||
mHasKids.erase(mHasKids.begin());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -10,6 +10,7 @@
|
||||
#ifndef __AUDACITY_XML_XML_FILE_WRITER__
|
||||
#define __AUDACITY_XML_XML_FILE_WRITER__
|
||||
|
||||
#include <vector>
|
||||
#include <wx/arrstr.h>
|
||||
#include <wx/ffile.h>
|
||||
|
||||
@ -54,7 +55,7 @@ class AUDACITY_DLL_API XMLWriter /* not final */ {
|
||||
bool mInTag;
|
||||
int mDepth;
|
||||
wxArrayString mTagstack;
|
||||
wxArrayInt mHasKids;
|
||||
std::vector<int> mHasKids;
|
||||
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user