mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Fix some compiler warnings
This commit is contained in:
parent
0f307122d9
commit
82f1fd57a4
23 changed files with 88 additions and 101 deletions
|
|
@ -412,6 +412,7 @@ public:
|
|||
readerSource->setLooping (loopState.getValue());
|
||||
|
||||
init();
|
||||
resized();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
@ -461,7 +462,15 @@ public:
|
|||
|
||||
audioSourcePlayer.setSource (currentDemo.get());
|
||||
|
||||
initParameters();
|
||||
auto& parameters = currentDemo->getParameters();
|
||||
|
||||
parametersComponent.reset();
|
||||
|
||||
if (! parameters.empty())
|
||||
{
|
||||
parametersComponent = std::make_unique<DemoParametersComponent> (parameters);
|
||||
addAndMakeVisible (parametersComponent.get());
|
||||
}
|
||||
}
|
||||
|
||||
void play()
|
||||
|
|
@ -485,21 +494,6 @@ public:
|
|||
|
||||
AudioThumbnailComponent& getThumbnailComponent() { return header.thumbnailComp; }
|
||||
|
||||
void initParameters()
|
||||
{
|
||||
auto& parameters = currentDemo->getParameters();
|
||||
|
||||
parametersComponent.reset();
|
||||
|
||||
if (parameters.size() > 0)
|
||||
{
|
||||
parametersComponent.reset (new DemoParametersComponent (parameters));
|
||||
addAndMakeVisible (parametersComponent.get());
|
||||
}
|
||||
|
||||
resized();
|
||||
}
|
||||
|
||||
private:
|
||||
//==============================================================================
|
||||
class AudioPlayerHeader : public Component,
|
||||
|
|
|
|||
|
|
@ -412,6 +412,7 @@ public:
|
|||
readerSource->setLooping (loopState.getValue());
|
||||
|
||||
init();
|
||||
resized();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
@ -461,7 +462,15 @@ public:
|
|||
|
||||
audioSourcePlayer.setSource (currentDemo.get());
|
||||
|
||||
initParameters();
|
||||
auto& parameters = currentDemo->getParameters();
|
||||
|
||||
parametersComponent.reset();
|
||||
|
||||
if (! parameters.empty())
|
||||
{
|
||||
parametersComponent = std::make_unique<DemoParametersComponent> (parameters);
|
||||
addAndMakeVisible (parametersComponent.get());
|
||||
}
|
||||
}
|
||||
|
||||
void play()
|
||||
|
|
@ -485,21 +494,6 @@ public:
|
|||
|
||||
AudioThumbnailComponent& getThumbnailComponent() { return header.thumbnailComp; }
|
||||
|
||||
void initParameters()
|
||||
{
|
||||
auto& parameters = currentDemo->getParameters();
|
||||
|
||||
parametersComponent.reset();
|
||||
|
||||
if (parameters.size() > 0)
|
||||
{
|
||||
parametersComponent.reset (new DemoParametersComponent (parameters));
|
||||
addAndMakeVisible (parametersComponent.get());
|
||||
}
|
||||
|
||||
resized();
|
||||
}
|
||||
|
||||
private:
|
||||
//==============================================================================
|
||||
class AudioPlayerHeader : public Component,
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ public:
|
|||
addAndMakeVisible (fileChooser);
|
||||
fileChooser.addListener (this);
|
||||
|
||||
lookAndFeelChanged();
|
||||
updateLookAndFeel();
|
||||
|
||||
setSize (500, 500);
|
||||
}
|
||||
|
|
@ -121,7 +121,7 @@ private:
|
|||
editor->loadContent (fileChooser.getCurrentFile().loadFileAsString());
|
||||
}
|
||||
|
||||
void lookAndFeelChanged() override
|
||||
void updateLookAndFeel()
|
||||
{
|
||||
if (auto* v4 = dynamic_cast<LookAndFeel_V4*> (&LookAndFeel::getDefaultLookAndFeel()))
|
||||
{
|
||||
|
|
@ -135,6 +135,11 @@ private:
|
|||
}
|
||||
}
|
||||
|
||||
void lookAndFeelChanged() override
|
||||
{
|
||||
updateLookAndFeel();
|
||||
}
|
||||
|
||||
CodeEditorComponent::ColourScheme getDarkCodeEditorColourScheme()
|
||||
{
|
||||
struct Type
|
||||
|
|
|
|||
|
|
@ -1044,12 +1044,12 @@ private:
|
|||
|
||||
addAndMakeVisible (textureLabel);
|
||||
textureLabel.attachToComponent (&textureBox, true);
|
||||
|
||||
lookAndFeelChanged();
|
||||
}
|
||||
|
||||
void initialise()
|
||||
{
|
||||
lookAndFeelChanged();
|
||||
|
||||
showBackgroundToggle.setToggleState (false, sendNotification);
|
||||
textureBox.setSelectedItemIndex (0);
|
||||
presetBox .setSelectedItemIndex (0);
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ public:
|
|||
DemoSliderPropertyComponent (const String& propertyName)
|
||||
: SliderPropertyComponent (propertyName, 0.0, 100.0, 0.001)
|
||||
{
|
||||
setValue (Random::getSystemRandom().nextDouble() * 42.0);
|
||||
slider.setValue (Random::getSystemRandom().nextDouble() * 42.0);
|
||||
}
|
||||
|
||||
void setValue (double newValue) override
|
||||
|
|
|
|||
|
|
@ -298,9 +298,6 @@ private:
|
|||
}
|
||||
};
|
||||
|
||||
constexpr const char* HostAudioProcessorImpl::innerStateTag;
|
||||
constexpr const char* HostAudioProcessorImpl::editorStyleTag;
|
||||
|
||||
//==============================================================================
|
||||
constexpr auto margin = 10;
|
||||
|
||||
|
|
|
|||
|
|
@ -155,13 +155,9 @@ public:
|
|||
pointer_sized_int handleVstPluginCanDo (int32, pointer_sized_int, void* ptr, float) override
|
||||
{
|
||||
if (auto* str = static_cast<const char*> (ptr))
|
||||
{
|
||||
if (strcmp (str, "hasCockosEmbeddedUI") == 0)
|
||||
return 0xbeef0000;
|
||||
|
||||
if (strcmp (str, "hasCockosExtensions") == 0)
|
||||
return 0xbeef0000;
|
||||
}
|
||||
for (auto* key : { "hasCockosEmbeddedUI", "hasCockosExtensions" })
|
||||
if (strcmp (str, key) == 0)
|
||||
return (pointer_sized_int) 0xbeef0000;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ public:
|
|||
.withAlpha (0.5f)
|
||||
.withBrightness (0.7f);
|
||||
|
||||
componentMovedOrResized (containerComponent, true, true);
|
||||
updateParentSize (comp);
|
||||
|
||||
x = Random::getSystemRandom().nextFloat() * parentWidth;
|
||||
y = Random::getSystemRandom().nextFloat() * parentHeight;
|
||||
|
|
@ -117,7 +117,7 @@ public:
|
|||
}
|
||||
|
||||
private:
|
||||
void componentMovedOrResized (Component& comp, bool, bool) override
|
||||
void updateParentSize (Component& comp)
|
||||
{
|
||||
const ScopedLock lock (drawing);
|
||||
|
||||
|
|
@ -125,6 +125,11 @@ private:
|
|||
parentHeight = (float) comp.getHeight() - size;
|
||||
}
|
||||
|
||||
void componentMovedOrResized (Component& comp, bool, bool) override
|
||||
{
|
||||
updateParentSize (comp);
|
||||
}
|
||||
|
||||
float x = 0.0f, y = 0.0f,
|
||||
size = Random::getSystemRandom().nextFloat() * 30.0f + 30.0f,
|
||||
dx = 0.0f, dy = 0.0f,
|
||||
|
|
|
|||
|
|
@ -412,6 +412,7 @@ public:
|
|||
readerSource->setLooping (loopState.getValue());
|
||||
|
||||
init();
|
||||
resized();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
@ -461,7 +462,15 @@ public:
|
|||
|
||||
audioSourcePlayer.setSource (currentDemo.get());
|
||||
|
||||
initParameters();
|
||||
auto& parameters = currentDemo->getParameters();
|
||||
|
||||
parametersComponent.reset();
|
||||
|
||||
if (! parameters.empty())
|
||||
{
|
||||
parametersComponent = std::make_unique<DemoParametersComponent> (parameters);
|
||||
addAndMakeVisible (parametersComponent.get());
|
||||
}
|
||||
}
|
||||
|
||||
void play()
|
||||
|
|
@ -485,21 +494,6 @@ public:
|
|||
|
||||
AudioThumbnailComponent& getThumbnailComponent() { return header.thumbnailComp; }
|
||||
|
||||
void initParameters()
|
||||
{
|
||||
auto& parameters = currentDemo->getParameters();
|
||||
|
||||
parametersComponent.reset();
|
||||
|
||||
if (parameters.size() > 0)
|
||||
{
|
||||
parametersComponent.reset (new DemoParametersComponent (parameters));
|
||||
addAndMakeVisible (parametersComponent.get());
|
||||
}
|
||||
|
||||
resized();
|
||||
}
|
||||
|
||||
private:
|
||||
//==============================================================================
|
||||
class AudioPlayerHeader : public Component,
|
||||
|
|
|
|||
|
|
@ -660,7 +660,7 @@ struct iOSAudioIODevice::Pimpl : public AsyncUpdater
|
|||
result.setIsRecording (hostIsRecording);
|
||||
result.setIsLooping (hostIsCycling);
|
||||
result.setLoopPoints (LoopPoints { hostCycleStartBeat, hostCycleEndBeat });
|
||||
result.setTimeInSeconds (*result.getTimeInSamples() / impl.sampleRate);
|
||||
result.setTimeInSeconds ((double) *result.getTimeInSamples() / impl.sampleRate);
|
||||
|
||||
Float64 hostBeat = 0;
|
||||
Float64 hostTempo = 0;
|
||||
|
|
@ -707,7 +707,7 @@ struct iOSAudioIODevice::Pimpl : public AsyncUpdater
|
|||
{
|
||||
if (interAppAudioConnected)
|
||||
{
|
||||
if (UIImage* hostUIImage = AudioOutputUnitGetHostIcon (audioUnit, size))
|
||||
if (UIImage* hostUIImage = AudioOutputUnitGetHostIcon (audioUnit, (float) size))
|
||||
return juce_createImageFromUIImage (hostUIImage);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1257,7 +1257,7 @@ namespace AAXClasses
|
|||
}());
|
||||
}
|
||||
|
||||
const auto offset = timeCodeIfAvailable.has_value() ? timeCodeIfAvailable->offset : int64_t{};
|
||||
const auto offset = timeCodeIfAvailable.has_value() ? (double) timeCodeIfAvailable->offset : 0.0;
|
||||
const auto effectiveRate = info.getFrameRate().hasValue() ? info.getFrameRate()->getEffectiveRate() : 0.0;
|
||||
info.setEditOriginTime (makeOptional (effectiveRate != 0.0 ? offset / effectiveRate : offset));
|
||||
|
||||
|
|
|
|||
|
|
@ -245,23 +245,25 @@ public:
|
|||
//==============================================================================
|
||||
bool BusCountWritable ([[maybe_unused]] AudioUnitScope scope) override
|
||||
{
|
||||
#ifdef JucePlugin_PreferredChannelConfigurations
|
||||
#ifdef JucePlugin_PreferredChannelConfigurations
|
||||
return false;
|
||||
#else
|
||||
#else
|
||||
bool isInput;
|
||||
|
||||
if (scopeToDirection (scope, isInput) != noErr)
|
||||
return false;
|
||||
|
||||
#if JucePlugin_IsMidiEffect
|
||||
#if JucePlugin_IsMidiEffect
|
||||
return false;
|
||||
#elif JucePlugin_IsSynth
|
||||
#else
|
||||
#if JucePlugin_IsSynth
|
||||
if (isInput) return false;
|
||||
#endif
|
||||
|
||||
const int busCount = AudioUnitHelpers::getBusCount (*juceFilter, isInput);
|
||||
return (juceFilter->canAddBus (isInput) || (busCount > 0 && juceFilter->canRemoveBus (isInput)));
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
OSStatus SetBusCount (AudioUnitScope scope, UInt32 count) override
|
||||
|
|
@ -1197,7 +1199,7 @@ public:
|
|||
const auto setTimeInSamples = [&] (auto timeInSamples)
|
||||
{
|
||||
info.setTimeInSamples ((int64) (timeInSamples + 0.5));
|
||||
info.setTimeInSeconds (*info.getTimeInSamples() / audioUnit.getSampleRate());
|
||||
info.setTimeInSeconds ((double) (*info.getTimeInSamples()) / audioUnit.getSampleRate());
|
||||
};
|
||||
|
||||
if (audioUnit.CallHostTransportState (&playing,
|
||||
|
|
|
|||
|
|
@ -675,7 +675,7 @@ public:
|
|||
{
|
||||
if (! auValueStrings.isEmpty())
|
||||
{
|
||||
auto index = roundToInt (jlimit (0.0f, 1.0f, value) * (auValueStrings.size() - 1));
|
||||
auto index = roundToInt (jlimit (0.0f, 1.0f, value) * (float) (auValueStrings.size() - 1));
|
||||
return auValueStrings[index];
|
||||
}
|
||||
|
||||
|
|
@ -714,7 +714,7 @@ public:
|
|||
auto index = auValueStrings.indexOf (text);
|
||||
|
||||
if (index != -1)
|
||||
return ((float) index) / (auValueStrings.size() - 1);
|
||||
return ((float) index) / (float) (auValueStrings.size() - 1);
|
||||
}
|
||||
|
||||
if (valuesHaveStrings)
|
||||
|
|
@ -2299,8 +2299,8 @@ private:
|
|||
setIfNotNull (outCurrentMeasureDownBeat, getFromPlayHead (&AudioPlayHead::PositionInfo::getPpqPositionOfLastBarStart).orFallback (0.0));
|
||||
|
||||
const auto signature = getFromPlayHead (&AudioPlayHead::PositionInfo::getTimeSignature).orFallback (AudioPlayHead::TimeSignature{});
|
||||
setIfNotNull (outTimeSig_Numerator, (UInt32) signature.numerator);
|
||||
setIfNotNull (outTimeSig_Denominator, (UInt32) signature.denominator);
|
||||
setIfNotNull (outTimeSig_Numerator, (Float32) signature.numerator);
|
||||
setIfNotNull (outTimeSig_Denominator, (UInt32) signature.denominator);
|
||||
|
||||
return noErr;
|
||||
}
|
||||
|
|
@ -2312,7 +2312,7 @@ private:
|
|||
const auto nowPlaying = getFromPlayHead (&AudioPlayHead::PositionInfo::getIsPlaying);
|
||||
setIfNotNull (outIsPlaying, nowPlaying);
|
||||
setIfNotNull (outTransportStateChanged, std::exchange (wasPlaying, nowPlaying) != nowPlaying);
|
||||
setIfNotNull (outCurrentSampleInTimeLine, getFromPlayHead (&AudioPlayHead::PositionInfo::getTimeInSamples).orFallback (0));
|
||||
setIfNotNull (outCurrentSampleInTimeLine, (double) getFromPlayHead (&AudioPlayHead::PositionInfo::getTimeInSamples).orFallback (0));
|
||||
setIfNotNull (outIsCycling, getFromPlayHead (&AudioPlayHead::PositionInfo::getIsLooping));
|
||||
|
||||
const auto loopPoints = getFromPlayHead (&AudioPlayHead::PositionInfo::getLoopPoints).orFallback (AudioPlayHead::LoopPoints{});
|
||||
|
|
|
|||
|
|
@ -311,7 +311,7 @@ public:
|
|||
}
|
||||
|
||||
highResTimerFrequency = (timebase.denom * (uint64) 1000000000) / timebase.numer;
|
||||
highResTimerToMillisecRatio = hiResCounterNumerator / (double) hiResCounterDenominator;
|
||||
highResTimerToMillisecRatio = (double) hiResCounterNumerator / (double) hiResCounterDenominator;
|
||||
}
|
||||
|
||||
uint32 millisecondsSinceStartup() const noexcept
|
||||
|
|
@ -321,7 +321,7 @@ public:
|
|||
|
||||
double getMillisecondCounterHiRes() const noexcept
|
||||
{
|
||||
return mach_absolute_time() * highResTimerToMillisecRatio;
|
||||
return (double) mach_absolute_time() * highResTimerToMillisecRatio;
|
||||
}
|
||||
|
||||
int64 highResTimerFrequency;
|
||||
|
|
|
|||
|
|
@ -323,7 +323,7 @@ void CoreGraphicsContext::clipToImageAlpha (const Image& sourceImage, const Affi
|
|||
auto image = detail::ImagePtr { CoreGraphicsPixelData::createImage (singleChannelImage, greyColourSpace.get()) };
|
||||
|
||||
flip();
|
||||
auto t = AffineTransform::verticalFlip (sourceImage.getHeight()).followedBy (transform);
|
||||
auto t = AffineTransform::verticalFlip ((float) sourceImage.getHeight()).followedBy (transform);
|
||||
applyTransform (t);
|
||||
|
||||
auto r = convertToCGRect (sourceImage.getBounds());
|
||||
|
|
@ -531,7 +531,7 @@ void CoreGraphicsContext::drawImage (const Image& sourceImage, const AffineTrans
|
|||
CGContextSetAlpha (context.get(), state->fillType.getOpacity());
|
||||
|
||||
flip();
|
||||
applyTransform (AffineTransform::verticalFlip (ih).followedBy (transform));
|
||||
applyTransform (AffineTransform::verticalFlip ((float) ih).followedBy (transform));
|
||||
auto imageRect = CGRectMake (0, 0, iw, ih);
|
||||
|
||||
if (fillEntireClipAsTiles)
|
||||
|
|
@ -912,7 +912,7 @@ CGContextRef juce_getImageContext (const Image& image)
|
|||
Image retval (Image::ARGB, (int) CGImageGetWidth (image), (int) CGImageGetHeight (image), true);
|
||||
CGContextRef ctx = juce_getImageContext (retval);
|
||||
|
||||
CGContextDrawImage (ctx, CGRectMake (0.0f, 0.0f, CGImageGetWidth (image), CGImageGetHeight (image)), image);
|
||||
CGContextDrawImage (ctx, CGRectMake (0.0f, 0.0f, (CGFloat) CGImageGetWidth (image), (CGFloat) CGImageGetHeight (image)), image);
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -310,7 +310,7 @@ private:
|
|||
|
||||
if (alignedSize > size)
|
||||
{
|
||||
size = std::max (alignedSize, alignTo ((size_t) (size * growthFactor), pagesize));
|
||||
size = std::max (alignedSize, alignTo ((size_t) ((float) size * growthFactor), pagesize));
|
||||
allocation = std::make_unique<AllocationWrapper> (pagesize, size);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1039,8 +1039,8 @@ public:
|
|||
if (! clip.isEmpty())
|
||||
{
|
||||
Image temp (component.isOpaque() ? Image::RGB : Image::ARGB,
|
||||
roundToInt (clipW * displayScale),
|
||||
roundToInt (clipH * displayScale),
|
||||
roundToInt ((float) clipW * displayScale),
|
||||
roundToInt ((float) clipH * displayScale),
|
||||
! component.isOpaque());
|
||||
|
||||
{
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ public:
|
|||
if (auto* popoverController = getViewController().popoverPresentationController)
|
||||
{
|
||||
popoverController.sourceView = peer->view;
|
||||
popoverController.sourceRect = CGRectMake (0.f, getHeight() - 10.f, getWidth(), 10.f);
|
||||
popoverController.sourceRect = CGRectMake (0.0f, (float) getHeight() - 10.0f, (float) getWidth(), 10.0f);
|
||||
popoverController.canOverlapSourceViewRect = YES;
|
||||
popoverController.delegate = popoverDelegate.get();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1929,11 +1929,11 @@ void UIViewComponentPeer::updateScreenBounds()
|
|||
{
|
||||
// this will re-centre the window, but leave its size unchanged
|
||||
|
||||
auto centreRelX = oldArea.getCentreX() / (float) oldDesktop.getWidth();
|
||||
auto centreRelY = oldArea.getCentreY() / (float) oldDesktop.getHeight();
|
||||
auto centreRelX = (float) oldArea.getCentreX() / (float) oldDesktop.getWidth();
|
||||
auto centreRelY = (float) oldArea.getCentreY() / (float) oldDesktop.getHeight();
|
||||
|
||||
auto x = ((int) (newDesktop.getWidth() * centreRelX)) - (oldArea.getWidth() / 2);
|
||||
auto y = ((int) (newDesktop.getHeight() * centreRelY)) - (oldArea.getHeight() / 2);
|
||||
auto x = ((int) ((float) newDesktop.getWidth() * centreRelX)) - (oldArea.getWidth() / 2);
|
||||
auto y = ((int) ((float) newDesktop.getHeight() * centreRelY)) - (oldArea.getHeight() / 2);
|
||||
|
||||
component.setBounds (oldArea.withPosition (x, y));
|
||||
}
|
||||
|
|
@ -2232,7 +2232,7 @@ void UIViewComponentPeer::drawRectWithContext (CGContextRef cg, CGRect)
|
|||
CGContextClearRect (cg, CGContextGetClipBoundingBox (cg));
|
||||
|
||||
CGContextConcatCTM (cg, CGAffineTransformMake (1, 0, 0, -1, 0, getComponent().getHeight()));
|
||||
CoreGraphicsContext g (cg, getComponent().getHeight());
|
||||
CoreGraphicsContext g (cg, (float) getComponent().getHeight());
|
||||
|
||||
insideDrawRect = true;
|
||||
handlePaint (g);
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@ struct PushNotificationsDelegateDetails
|
|||
notification.applicationIconBadgeNumber = n.badgeNumber;
|
||||
|
||||
auto triggerTime = Time::getCurrentTime() + RelativeTime (n.triggerIntervalSec);
|
||||
notification.fireDate = [NSDate dateWithTimeIntervalSince1970: triggerTime.toMilliseconds() / 1000.];
|
||||
notification.fireDate = [NSDate dateWithTimeIntervalSince1970: (double) triggerTime.toMilliseconds() / 1000.0];
|
||||
notification.userInfo = varObjectToNSDictionary (n.properties);
|
||||
|
||||
auto soundToPlayString = n.soundToPlay.toString (true);
|
||||
|
|
|
|||
|
|
@ -43,14 +43,14 @@ namespace PushNotificationsDelegateDetailsOsx
|
|||
notification.userInfo = varObjectToNSDictionary (n.properties);
|
||||
|
||||
auto triggerTime = Time::getCurrentTime() + RelativeTime (n.triggerIntervalSec);
|
||||
notification.deliveryDate = [NSDate dateWithTimeIntervalSince1970: triggerTime.toMilliseconds() / 1000.];
|
||||
notification.deliveryDate = [NSDate dateWithTimeIntervalSince1970: (double) triggerTime.toMilliseconds() / 1000.0];
|
||||
|
||||
if (n.repeat && n.triggerIntervalSec >= 60)
|
||||
{
|
||||
auto dateComponents = [[NSDateComponents alloc] init];
|
||||
auto intervalSec = NSInteger (n.triggerIntervalSec);
|
||||
dateComponents.second = intervalSec;
|
||||
dateComponents.nanosecond = NSInteger ((n.triggerIntervalSec - intervalSec) * 1000000000);
|
||||
dateComponents.nanosecond = NSInteger ((n.triggerIntervalSec - (double) intervalSec) * 1000000000);
|
||||
|
||||
notification.deliveryRepeatInterval = dateComponents;
|
||||
|
||||
|
|
@ -143,7 +143,7 @@ namespace PushNotificationsDelegateDetailsOsx
|
|||
|
||||
if (n.deliveryRepeatInterval != nil)
|
||||
{
|
||||
notif.triggerIntervalSec = n.deliveryRepeatInterval.second + (n.deliveryRepeatInterval.nanosecond / 1000000000.);
|
||||
notif.triggerIntervalSec = (double) n.deliveryRepeatInterval.second + ((double) n.deliveryRepeatInterval.nanosecond / 1000000000.0);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -836,7 +836,7 @@ private:
|
|||
break;
|
||||
case kCGImagePropertyOrientationRight:
|
||||
CGContextRotateCTM (context, 90 * MathConstants<CGFloat>::pi / 180);
|
||||
CGContextScaleCTM (context, targetSize.height / origHeight, -targetSize.width / origWidth);
|
||||
CGContextScaleCTM (context, targetSize.height / (CGFloat) origHeight, -targetSize.width / (CGFloat) origWidth);
|
||||
break;
|
||||
case kCGImagePropertyOrientationDown:
|
||||
CGContextTranslateCTM (context, targetSize.width, 0.0);
|
||||
|
|
@ -844,7 +844,7 @@ private:
|
|||
break;
|
||||
case kCGImagePropertyOrientationLeft:
|
||||
CGContextRotateCTM (context, -90 * MathConstants<CGFloat>::pi / 180);
|
||||
CGContextScaleCTM (context, targetSize.height / origHeight, -targetSize.width / origWidth);
|
||||
CGContextScaleCTM (context, targetSize.height / (CGFloat) origHeight, -targetSize.width / (CGFloat) origWidth);
|
||||
CGContextTranslateCTM (context, -targetSize.width, -targetSize.height);
|
||||
break;
|
||||
case kCGImagePropertyOrientationUpMirrored:
|
||||
|
|
|
|||
|
|
@ -592,7 +592,7 @@ private:
|
|||
if (useNativeControls)
|
||||
return std::make_unique<WrappedPlayerView>();
|
||||
|
||||
return std::make_unique<WrappedPlayerLayer> ();
|
||||
return std::make_unique<WrappedPlayerLayer>();
|
||||
}();
|
||||
}
|
||||
|
||||
|
|
@ -650,7 +650,7 @@ private:
|
|||
class WrappedPlayerLayer : public WrappedPlayer
|
||||
{
|
||||
public:
|
||||
WrappedPlayerLayer () { [view.get() setLayer: playerLayer.get()]; }
|
||||
WrappedPlayerLayer() { [view.get() setLayer: playerLayer.get()]; }
|
||||
NSView* getView() const override { return view.get(); }
|
||||
AVPlayer* getPlayer() const override { return [playerLayer.get() player]; }
|
||||
void setPlayer (AVPlayer* player) override { [playerLayer.get() setPlayer: player]; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue