本文整理汇总了C++中ThreadLocalValue::get方法的典型用法代码示例。如果您正苦于以下问题:C++ ThreadLocalValue::get方法的具体用法?C++ ThreadLocalValue::get怎么用?C++ ThreadLocalValue::get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ThreadLocalValue
的用法示例。
在下文中一共展示了ThreadLocalValue::get方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getEnv
JNIEnv* getEnv() noexcept
{
JNIEnv* env = androidJNIEnv.get();
jassert (env != nullptr);
return env;
}
示例2: wrapperType
AudioProcessor::AudioProcessor()
: wrapperType (wrapperTypeBeingCreated.get()),
playHead (nullptr),
sampleRate (0),
blockSize (0),
latencySamples (0),
#if JUCE_DEBUG
textRecursionCheck (false),
#endif
suspended (false),
nonRealtime (false),
processingPrecision (singlePrecision)
{
#if ! JucePlugin_IsMidiEffect
#ifdef JucePlugin_PreferredChannelConfigurations
const short channelConfigs[][2] = { JucePlugin_PreferredChannelConfigurations };
#else
const short channelConfigs[][2] = { {2, 2} };
#endif
int numChannelConfigs = sizeof (channelConfigs) / sizeof (*channelConfigs);
if (numChannelConfigs > 0)
{
#if ! JucePlugin_IsSynth
busArrangement.inputBuses.add (AudioProcessorBus ("Input", AudioChannelSet::canonicalChannelSet (channelConfigs[0][0])));
#endif
busArrangement.outputBuses.add (AudioProcessorBus ("Output", AudioChannelSet::canonicalChannelSet (channelConfigs[0][1])));
}
#endif
updateSpeakerFormatStrings();
}
示例3: wrapperType
AudioProcessor::AudioProcessor()
: wrapperType (wrapperTypeBeingCreated.get()),
playHead (nullptr),
currentSampleRate (0),
blockSize (0),
latencySamples (0),
#if JUCE_DEBUG
textRecursionCheck (false),
#endif
suspended (false),
nonRealtime (false),
processingPrecision (singlePrecision)
{
#ifdef JucePlugin_PreferredChannelConfigurations
const short channelConfigs[][2] = { JucePlugin_PreferredChannelConfigurations };
#else
const short channelConfigs[][2] = { {2, 2} };
#endif
#ifdef JucePlugin_MaxNumInputChannels
const int maxInChannels = JucePlugin_MaxNumInputChannels;
#else
const int maxInChannels = std::numeric_limits<int>::max();
#endif
ignoreUnused (maxInChannels);
#ifdef JucePlugin_MaxNumOutputChannels
const int maxOutChannels = JucePlugin_MaxNumOutputChannels;
#else
const int maxOutChannels = std::numeric_limits<int>::max();
#endif
ignoreUnused (maxOutChannels);
#if ! JucePlugin_IsMidiEffect
// #if ! JucePlugin_IsSynth
const int numInChannels = jmin (maxInChannels, (int) channelConfigs[0][0]);
if (numInChannels > 0)
busArrangement.inputBuses.add (AudioProcessorBus ("Input", AudioChannelSet::canonicalChannelSet (numInChannels)));
// #endif
const int numOutChannels = jmin (maxOutChannels, (int) channelConfigs[0][1]);
if (numOutChannels > 0)
busArrangement.outputBuses.add (AudioProcessorBus ("Output", AudioChannelSet::canonicalChannelSet (numOutChannels)));
#ifdef JucePlugin_PreferredChannelConfigurations
// #if ! JucePlugin_IsSynth
AudioProcessor::setPreferredBusArrangement (true, 0, AudioChannelSet::stereo());
// #endif
AudioProcessor::setPreferredBusArrangement (false, 0, AudioChannelSet::stereo());
#endif
#endif
updateSpeakerFormatStrings();
}
示例4: check
static void check(const char *tname) {
StackChecker *sc = checker.get();
const char *p = sc->buf;
int i = 0;
for( ; i < SZ; i++ ) {
if( p[i] != 42 )
break;
}
log() << "thread " << tname << " stack usage was " << SZ-i << " bytes" << endl;
wassert( i > 16000 );
}
示例5: wrapperType
AudioProcessor::AudioProcessor()
: wrapperType (wrapperTypeBeingCreated.get()),
playHead (nullptr),
sampleRate (0),
blockSize (0),
numInputChannels (0),
numOutputChannels (0),
latencySamples (0),
suspended (false),
nonRealtime (false)
{
}
示例6: setEnv
void setEnv (JNIEnv* env) noexcept
{
androidJNIEnv.get() = env;
}