mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-18 00:54:19 +00:00
Added fake placeholder versions of the new c++0x 'noexcept' and 'nullptr' keywords, and altered the library classes to use these instead of 'throw()' and '0'. This shouldn't make any difference at all to existing code, but will enable better static checking with future c++0x compilers.
This commit is contained in:
parent
e0a38a30db
commit
f04309f44a
533 changed files with 13927 additions and 13931 deletions
|
|
@ -461,7 +461,7 @@ public:
|
|||
if (outputDevice->error.isNotEmpty())
|
||||
{
|
||||
error = outputDevice->error;
|
||||
outputDevice = 0;
|
||||
outputDevice = nullptr;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -472,7 +472,7 @@ public:
|
|||
bufferSize))
|
||||
{
|
||||
error = outputDevice->error;
|
||||
outputDevice = 0;
|
||||
outputDevice = nullptr;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -486,7 +486,7 @@ public:
|
|||
if (inputDevice->error.isNotEmpty())
|
||||
{
|
||||
error = inputDevice->error;
|
||||
inputDevice = 0;
|
||||
inputDevice = nullptr;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -497,28 +497,28 @@ public:
|
|||
bufferSize))
|
||||
{
|
||||
error = inputDevice->error;
|
||||
inputDevice = 0;
|
||||
inputDevice = nullptr;
|
||||
return;
|
||||
}
|
||||
|
||||
inputLatency = inputDevice->latency;
|
||||
}
|
||||
|
||||
if (outputDevice == 0 && inputDevice == 0)
|
||||
if (outputDevice == nullptr && inputDevice == nullptr)
|
||||
{
|
||||
error = "no channels";
|
||||
return;
|
||||
}
|
||||
|
||||
if (outputDevice != 0 && inputDevice != 0)
|
||||
if (outputDevice != nullptr && inputDevice != nullptr)
|
||||
{
|
||||
snd_pcm_link (outputDevice->handle, inputDevice->handle);
|
||||
}
|
||||
|
||||
if (inputDevice != 0 && failed (snd_pcm_prepare (inputDevice->handle)))
|
||||
if (inputDevice != nullptr && failed (snd_pcm_prepare (inputDevice->handle)))
|
||||
return;
|
||||
|
||||
if (outputDevice != 0 && failed (snd_pcm_prepare (outputDevice->handle)))
|
||||
if (outputDevice != nullptr && failed (snd_pcm_prepare (outputDevice->handle)))
|
||||
return;
|
||||
|
||||
startThread (9);
|
||||
|
|
@ -541,8 +541,8 @@ public:
|
|||
{
|
||||
stopThread (6000);
|
||||
|
||||
inputDevice = 0;
|
||||
outputDevice = 0;
|
||||
inputDevice = nullptr;
|
||||
outputDevice = nullptr;
|
||||
|
||||
inputChannelBuffer.setSize (1, 1);
|
||||
outputChannelBuffer.setSize (1, 1);
|
||||
|
|
@ -550,7 +550,7 @@ public:
|
|||
numCallbacks = 0;
|
||||
}
|
||||
|
||||
void setCallback (AudioIODeviceCallback* const newCallback) throw()
|
||||
void setCallback (AudioIODeviceCallback* const newCallback) noexcept
|
||||
{
|
||||
const ScopedLock sl (callbackLock);
|
||||
callback = newCallback;
|
||||
|
|
@ -560,7 +560,7 @@ public:
|
|||
{
|
||||
while (! threadShouldExit())
|
||||
{
|
||||
if (inputDevice != 0)
|
||||
if (inputDevice != nullptr)
|
||||
{
|
||||
if (! inputDevice->readFromInputDevice (inputChannelBuffer, bufferSize))
|
||||
{
|
||||
|
|
@ -576,7 +576,7 @@ public:
|
|||
const ScopedLock sl (callbackLock);
|
||||
++numCallbacks;
|
||||
|
||||
if (callback != 0)
|
||||
if (callback != nullptr)
|
||||
{
|
||||
callback->audioDeviceIOCallback ((const float**) inputChannelDataForCallback.getRawDataPointer(),
|
||||
inputChannelDataForCallback.size(),
|
||||
|
|
@ -591,7 +591,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
if (outputDevice != 0)
|
||||
if (outputDevice != nullptr)
|
||||
{
|
||||
failed (snd_pcm_wait (outputDevice->handle, 2000));
|
||||
|
||||
|
|
@ -609,12 +609,12 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
int getBitDepth() const throw()
|
||||
int getBitDepth() const noexcept
|
||||
{
|
||||
if (outputDevice != 0)
|
||||
if (outputDevice != nullptr)
|
||||
return outputDevice->bitDepth;
|
||||
|
||||
if (inputDevice != 0)
|
||||
if (inputDevice != nullptr)
|
||||
return inputDevice->bitDepth;
|
||||
|
||||
return 16;
|
||||
|
|
@ -775,14 +775,14 @@ public:
|
|||
void start (AudioIODeviceCallback* callback)
|
||||
{
|
||||
if (! isOpen_)
|
||||
callback = 0;
|
||||
callback = nullptr;
|
||||
|
||||
if (callback != 0)
|
||||
if (callback != nullptr)
|
||||
callback->audioDeviceAboutToStart (this);
|
||||
|
||||
internal.setCallback (callback);
|
||||
|
||||
isStarted = (callback != 0);
|
||||
isStarted = (callback != nullptr);
|
||||
}
|
||||
|
||||
void stop()
|
||||
|
|
@ -791,7 +791,7 @@ public:
|
|||
|
||||
start (0);
|
||||
|
||||
if (oldCallback != 0)
|
||||
if (oldCallback != nullptr)
|
||||
oldCallback->audioDeviceStopped();
|
||||
}
|
||||
|
||||
|
|
@ -866,8 +866,8 @@ public:
|
|||
snd_device_name_free_hint (hints);
|
||||
}
|
||||
*/
|
||||
snd_ctl_t* handle = 0;
|
||||
snd_ctl_card_info_t* info = 0;
|
||||
snd_ctl_t* handle = nullptr;
|
||||
snd_ctl_card_info_t* info = nullptr;
|
||||
snd_ctl_card_info_alloca (&info);
|
||||
|
||||
int cardNum = -1;
|
||||
|
|
@ -950,7 +950,7 @@ public:
|
|||
jassert (hasScanned); // need to call scanForDevices() before doing this
|
||||
|
||||
ALSAAudioIODevice* d = dynamic_cast <ALSAAudioIODevice*> (device);
|
||||
if (d == 0)
|
||||
if (d == nullptr)
|
||||
return -1;
|
||||
|
||||
return asInput ? inputIds.indexOf (d->inputId)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue