1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-02-05 03:50:07 +00:00

Modernised some old code.

This commit is contained in:
Julian Storer 2010-02-20 15:27:48 +00:00
parent 5c027142f4
commit 39b583fe1e
27 changed files with 966 additions and 1426 deletions

View file

@ -919,10 +919,13 @@ void AudioDeviceManager::CallbackHandler::handleIncomingMidiMessage (MidiInput*
//==============================================================================
void AudioDeviceManager::playTestSound()
{
{
audioCallbackLock.enter();
ScopedPointer <AudioSampleBuffer> oldSound (testSound);
audioCallbackLock.exit();
{ // cunningly nested to swap, unlock and delete in that order.
ScopedPointer <AudioSampleBuffer> oldSound;
{
const ScopedLock sl (audioCallbackLock);
oldSound = testSound;
}
}
testSoundPosition = 0;