mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Fix for the parameter types of Colour::fromRGBAFloat. Change on iOS to avoid enabling an audio input device unless needed.
This commit is contained in:
parent
96c0a756e0
commit
44a050c1aa
4 changed files with 11 additions and 10 deletions
|
|
@ -415,8 +415,11 @@ private:
|
|||
if (audioUnit == 0)
|
||||
return false;
|
||||
|
||||
const UInt32 one = 1;
|
||||
AudioUnitSetProperty (audioUnit, kAudioOutputUnitProperty_EnableIO, kAudioUnitScope_Input, 1, &one, sizeof (one));
|
||||
if (numInputChannels > 0)
|
||||
{
|
||||
const UInt32 one = 1;
|
||||
AudioUnitSetProperty (audioUnit, kAudioOutputUnitProperty_EnableIO, kAudioUnitScope_Input, 1, &one, sizeof (one));
|
||||
}
|
||||
|
||||
AudioChannelLayout layout;
|
||||
layout.mChannelBitmap = 0;
|
||||
|
|
|
|||
|
|
@ -126,9 +126,7 @@ public:
|
|||
int samplesPerBlock = 2048);
|
||||
|
||||
|
||||
/** Writes some samples from an AudioSampleBuffer.
|
||||
|
||||
*/
|
||||
/** Writes some samples from an AudioSampleBuffer. */
|
||||
bool writeFromAudioSampleBuffer (const AudioSampleBuffer& source,
|
||||
int startSample, int numSamples);
|
||||
|
||||
|
|
|
|||
|
|
@ -172,9 +172,9 @@ Colour::Colour (const uint8 red, const uint8 green, const uint8 blue, const floa
|
|||
argb.setARGB (ColourHelpers::floatToUInt8 (alpha), red, green, blue);
|
||||
}
|
||||
|
||||
Colour Colour::fromRGBAFloat (const uint8 red, const uint8 green, const uint8 blue, const float alpha) noexcept
|
||||
Colour Colour::fromRGBAFloat (const float red, const float green, const float blue, const float alpha) noexcept
|
||||
{
|
||||
return Colour (red, green, blue, alpha);
|
||||
return Colour (ColourHelpers::floatToUInt8 (red), ColourHelpers::floatToUInt8 (green), ColourHelpers::floatToUInt8 (blue), alpha);
|
||||
}
|
||||
|
||||
Colour::Colour (const float hue, const float saturation, const float brightness, const float alpha) noexcept
|
||||
|
|
|
|||
|
|
@ -90,9 +90,9 @@ public:
|
|||
float alpha) noexcept;
|
||||
|
||||
/** Creates a colour using 8-bit red, green, blue and float alpha values. */
|
||||
static Colour fromRGBAFloat (uint8 red,
|
||||
uint8 green,
|
||||
uint8 blue,
|
||||
static Colour fromRGBAFloat (float red,
|
||||
float green,
|
||||
float blue,
|
||||
float alpha) noexcept;
|
||||
|
||||
/** Creates a colour using floating point hue, saturation and brightness values, and an 8-bit alpha.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue