From 07ea4edbc2d4dfad38ab094cd39525687776091e Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Mon, 23 Aug 2021 17:51:13 -0700 Subject: [PATCH] Fixes for Mac/iOS Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- Code/Editor/LogFile.cpp | 2 +- Code/Editor/Platform/Mac/main_dummy.cpp | 4 ++-- .../Mac/AzFramework/Process/ProcessWatcher_Mac.cpp | 2 -- Code/Tools/AssetProcessor/Platform/Mac/main_dummy.cpp | 4 ++-- Gems/Atom/RHI/Code/Tests/AllocatorTests.cpp | 1 - Gems/Atom/RHI/Code/Tests/ShaderResourceGroupTests.cpp | 3 +-- .../Source/RHI.Builders/ShaderPlatformInterface.cpp | 4 +--- .../RHI/Metal/Code/Source/RHI/AsyncUploadQueue.cpp | 7 ------- Gems/Atom/RHI/Metal/Code/Source/RHI/BufferPool.cpp | 3 +-- .../Atom/RHI/Metal/Code/Source/RHI/CommandListPool.cpp | 2 +- Gems/Atom/RHI/Metal/Code/Source/RHI/CommandListPool.h | 2 +- .../RHI/Metal/Code/Source/RHI/ImagePoolResolver.cpp | 6 ++---- .../Metal/Code/Source/RHI/NullDescriptorManager.cpp | 3 --- Gems/Atom/RHI/Metal/Code/Source/RHI/QueryPool.cpp | 10 ++++------ Gems/Atom/RHI/Metal/Code/Source/RHI/Scope.cpp | 3 --- .../Metal/Code/Source/RHI/ShaderResourceGroupPool.cpp | 1 - .../RHI/Metal/Code/Source/RHI/StreamingImagePool.cpp | 1 - Gems/Atom/RHI/Metal/Code/Source/RHI/SwapChain.cpp | 3 --- .../Platform/Mac/MicrophoneSystemComponent_Mac.mm | 7 ++++--- .../Platform/iOS/MicrophoneSystemComponent_iOS.mm | 7 ++++--- 20 files changed, 24 insertions(+), 51 deletions(-) diff --git a/Code/Editor/LogFile.cpp b/Code/Editor/LogFile.cpp index 2ebb353915..9692dd264a 100644 --- a/Code/Editor/LogFile.cpp +++ b/Code/Editor/LogFile.cpp @@ -179,7 +179,6 @@ void CLogFile::FormatLineV(const char * format, va_list argList) void CLogFile::AboutSystem() { - char szBuffer[MAX_LOGBUFFER_SIZE]; #if defined(AZ_PLATFORM_WINDOWS) || defined(AZ_PLATFORM_LINUX) ////////////////////////////////////////////////////////////////////// // Write the system informations to the log @@ -190,6 +189,7 @@ void CLogFile::AboutSystem() #endif // defined(AZ_PLATFORM_WINDOWS) || defined(AZ_PLATFORM_LINUX) #if defined(AZ_PLATFORM_WINDOWS) + char szBuffer[MAX_LOGBUFFER_SIZE]; wchar_t szLanguageBufferW[64]; DEVMODE DisplayConfig; OSVERSIONINFO OSVerInfo; diff --git a/Code/Editor/Platform/Mac/main_dummy.cpp b/Code/Editor/Platform/Mac/main_dummy.cpp index fb4a431295..082384db58 100644 --- a/Code/Editor/Platform/Mac/main_dummy.cpp +++ b/Code/Editor/Platform/Mac/main_dummy.cpp @@ -66,8 +66,8 @@ int main(int argc, char* argv[]) processLaunchInfo.m_environmentVariables = &envVars; processLaunchInfo.m_showWindow = true; - AzFramework::ProcessWatcher* processWatcher = AzFramework::ProcessWatcher::LaunchProcess(processLaunchInfo, AzFramework::ProcessCommunicationType::COMMUNICATOR_TYPE_NONE); - + AzFramework::ProcessWatcher::LaunchProcess(processLaunchInfo, AzFramework::ProcessCommunicationType::COMMUNICATOR_TYPE_NONE); + application.Destroy(); return 0; diff --git a/Code/Framework/AzFramework/Platform/Mac/AzFramework/Process/ProcessWatcher_Mac.cpp b/Code/Framework/AzFramework/Platform/Mac/AzFramework/Process/ProcessWatcher_Mac.cpp index 4099443913..1ba9ff3067 100644 --- a/Code/Framework/AzFramework/Platform/Mac/AzFramework/Process/ProcessWatcher_Mac.cpp +++ b/Code/Framework/AzFramework/Platform/Mac/AzFramework/Process/ProcessWatcher_Mac.cpp @@ -205,8 +205,6 @@ namespace AzFramework bool ProcessLauncher::LaunchProcess(const ProcessLaunchInfo& processLaunchInfo, ProcessData& processData) { - bool result = false; - // note that the convention here is that it uses windows-shell style escaping of combined args with spaces in it // (so surrounding with quotes like param="hello world") // this is so that the callers (which could be numerous) do not have to worry about this and sprinkle ifdefs diff --git a/Code/Tools/AssetProcessor/Platform/Mac/main_dummy.cpp b/Code/Tools/AssetProcessor/Platform/Mac/main_dummy.cpp index 12832cc488..cd080f9572 100644 --- a/Code/Tools/AssetProcessor/Platform/Mac/main_dummy.cpp +++ b/Code/Tools/AssetProcessor/Platform/Mac/main_dummy.cpp @@ -66,8 +66,8 @@ int main(int argc, char* argv[]) processLaunchInfo.m_environmentVariables = &envVars; processLaunchInfo.m_showWindow = true; - AzFramework::ProcessWatcher* processWatcher = AzFramework::ProcessWatcher::LaunchProcess(processLaunchInfo, AzFramework::ProcessCommunicationType::COMMUNICATOR_TYPE_NONE); - + AzFramework::ProcessWatcher::LaunchProcess(processLaunchInfo, AzFramework::ProcessCommunicationType::COMMUNICATOR_TYPE_NONE); + application.Destroy(); return 0; diff --git a/Gems/Atom/RHI/Code/Tests/AllocatorTests.cpp b/Gems/Atom/RHI/Code/Tests/AllocatorTests.cpp index fa4c14089f..e43510adb5 100644 --- a/Gems/Atom/RHI/Code/Tests/AllocatorTests.cpp +++ b/Gems/Atom/RHI/Code/Tests/AllocatorTests.cpp @@ -67,7 +67,6 @@ namespace UnitTest AZStd::vector retiredAllocationsCurrent; AZStd::vector retiredAllocationsPrevious; - const size_t AllocationCount = 100; const size_t AllocationSizeRange = descriptor.m_allocationSizeMax - descriptor.m_allocationSizeMin; AZStd::string outputString; diff --git a/Gems/Atom/RHI/Code/Tests/ShaderResourceGroupTests.cpp b/Gems/Atom/RHI/Code/Tests/ShaderResourceGroupTests.cpp index 32d89cd596..83b3b68b25 100644 --- a/Gems/Atom/RHI/Code/Tests/ShaderResourceGroupTests.cpp +++ b/Gems/Atom/RHI/Code/Tests/ShaderResourceGroupTests.cpp @@ -56,8 +56,7 @@ namespace UnitTest const uint32_t BufferConstantCount = 2; const uint32_t BufferReadCount = 2; const uint32_t BufferReadWriteCount = 2; - const uint32_t BindingIndex = 1; - + AZStd::unique_ptr m_factory; AZStd::unique_ptr m_serializeContext; diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI.Builders/ShaderPlatformInterface.cpp b/Gems/Atom/RHI/Metal/Code/Source/RHI.Builders/ShaderPlatformInterface.cpp index b65db2a993..903b25e16f 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI.Builders/ShaderPlatformInterface.cpp +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI.Builders/ShaderPlatformInterface.cpp @@ -252,9 +252,7 @@ namespace AZ // Output file AZStd::string shaderMSLOutputFile = RHI::BuildFileNameWithExtension(shaderSourceFile, tempFolder, "metal"); - - bool outputFileWriteResult = false; - + // Stage profile name parameter const AZStd::string shaderModelVersion = "6_2"; diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI/AsyncUploadQueue.cpp b/Gems/Atom/RHI/Metal/Code/Source/RHI/AsyncUploadQueue.cpp index 2c9eb95ad4..bd163f1419 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI/AsyncUploadQueue.cpp +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI/AsyncUploadQueue.cpp @@ -105,7 +105,6 @@ namespace AZ } Fence* fenceToSignal = nullptr; - uint64_t fenceToSignalValue = 0; size_t byteCount = uploadRequest.m_byteCount; size_t byteOffset = destMemoryView.GetOffset() + uploadRequest.m_byteOffset; uint64_t queueValue = m_uploadFence.Increment(); @@ -183,8 +182,6 @@ namespace AZ { CommandQueue* commandQueue = static_cast(queue); FramePacket* framePacket = BeginFramePacket(commandQueue); - const uint16_t arraySize = image->GetDescriptor().m_arraySize; - const uint16_t imageMipLevels = image->GetDescriptor().m_mipLevels; //[GFX TODO][ATOM-5605] - Cache alignments for all formats at Init const static uint32_t bufferOffsetAlign = [mtlDevice minimumTextureBufferAlignmentForPixelFormat: ConvertPixelFormat(image->GetDescriptor().m_format)]; @@ -212,7 +209,6 @@ namespace AZ if (subresourceLayout.m_size.m_height < subresourceLayout.m_rowCount) { AZ_Error("Metal", false, "AsyncUploadQueue::QueueUpload expects ImageHeight '%d' to be bigger than or equal to the image's RowCount '%d'.", subresourceLayout.m_size.m_height, subresourceLayout.m_rowCount); - RHI::AsyncWorkHandle::Null; } // The final staging size for each CopyTextureRegion command @@ -281,8 +277,6 @@ namespace AZ { const uint8_t* subresourceDataStart = reinterpret_cast(subresourceData.m_data) + depth * subresourceSlicePitch; - MTLTextureDescriptor* mtlTextureDesc = ConvertImageDescriptor(image->GetDescriptor()); - uint32_t startRow = 0; uint32_t destHeight = 0; while (startRow < subresourceLayout.m_rowCount) @@ -468,7 +462,6 @@ namespace AZ MTLBlitOption mtlBlitOption = GetBlitOption(destImage->GetDescriptor().m_format); - id tempTex = destImage->GetMemoryView().GetGpuAddress>(); [blitEncoder copyFromBuffer:framePacket->m_stagingResource sourceOffset:framePacket->m_dataOffset sourceBytesPerRow:stagingRowPitch diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI/BufferPool.cpp b/Gems/Atom/RHI/Metal/Code/Source/RHI/BufferPool.cpp index a1bd9533bc..13f216e098 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI/BufferPool.cpp +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI/BufferPool.cpp @@ -102,8 +102,7 @@ namespace AZ void BufferPool::ShutdownResourceInternal(RHI::Resource& resourceBase) { Buffer& buffer = static_cast(resourceBase); - auto& device = static_cast(GetDevice()); - + if (auto* resolver = GetResolver()) { resolver->OnResourceShutdown(resourceBase); diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI/CommandListPool.cpp b/Gems/Atom/RHI/Metal/Code/Source/RHI/CommandListPool.cpp index 62091b794a..7753968122 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI/CommandListPool.cpp +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI/CommandListPool.cpp @@ -72,7 +72,7 @@ namespace AZ commandListPoolDescriptor.m_collectLatency = descriptor.m_frameCountMax; commandListPool.Init(commandListPoolDescriptor); - m_commandListSubAllocators[queueIdx].SetInitFunction([this, &commandListPool] + m_commandListSubAllocators[queueIdx].SetInitFunction([&commandListPool] (CommandListSubAllocator& subAllocator) { subAllocator.Init(commandListPool); diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI/CommandListPool.h b/Gems/Atom/RHI/Metal/Code/Source/RHI/CommandListPool.h index ca40f3c7aa..0ec5952525 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI/CommandListPool.h +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI/CommandListPool.h @@ -90,7 +90,7 @@ namespace AZ void Collect(); private: - CommandListPool* m_commandListPool = nullptr; + [[maybe_unused]] CommandListPool* m_commandListPool = nullptr; AZStd::vector m_activeLists; AZStd::array m_commandListPools; diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI/ImagePoolResolver.cpp b/Gems/Atom/RHI/Metal/Code/Source/RHI/ImagePoolResolver.cpp index 94dacb2488..d8a0c2e788 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI/ImagePoolResolver.cpp +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI/ImagePoolResolver.cpp @@ -25,11 +25,9 @@ namespace AZ RHI::ResultCode ImagePoolResolver::UpdateImage(const RHI::ImageUpdateRequest& request, size_t& bytesTransferred) { Image* image = static_cast(request.m_image); - auto& device = static_cast(GetDevice()); - + const RHI::ImageSubresourceLayout& sourceSubresourceLayout = request.m_sourceSubresourceLayout; - const RHI::Origin& imageSubresourcePixelOffset = request.m_imageSubresourcePixelOffset; - + const uint32_t stagingRowPitch = sourceSubresourceLayout.m_bytesPerRow; const uint32_t stagingSlicePitch = sourceSubresourceLayout.m_bytesPerImage; const uint32_t stagingSize = stagingSlicePitch * sourceSubresourceLayout.m_size.m_depth; diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI/NullDescriptorManager.cpp b/Gems/Atom/RHI/Metal/Code/Source/RHI/NullDescriptorManager.cpp index e86ba3c2c3..749e47f6b5 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI/NullDescriptorManager.cpp +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI/NullDescriptorManager.cpp @@ -42,8 +42,6 @@ namespace AZ void NullDescriptorManager::Shutdown() { - const Device& device = static_cast(GetDevice()); - m_nullImages.clear(); m_nullBuffer.m_memoryView = {}; m_nullMtlSamplerState = nil; @@ -94,7 +92,6 @@ namespace AZ textureSizeAndAlign.size = memoryRequirements.m_sizeInBytes; const size_t alignedHeapSize = RHI::AlignUp(heapSize, textureSizeAndAlign.align); - const uint32_t bytesPerPixel = RHI::GetFormatSize(m_nullImages[imageIndex].m_imageDescriptor.m_format); if(imageIndex == static_cast(NullDescriptorManager::ImageTypes::TextureBuffer)) { m_nullImages[imageIndex].m_memoryView = device.CreateImagePlaced(m_nullImages[imageIndex].m_imageDescriptor, m_nullDescriptorHeap, alignedHeapSize, textureSizeAndAlign, MTLTextureTypeTextureBuffer); diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI/QueryPool.cpp b/Gems/Atom/RHI/Metal/Code/Source/RHI/QueryPool.cpp index c8f2b89346..1f85d92692 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI/QueryPool.cpp +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI/QueryPool.cpp @@ -26,10 +26,9 @@ namespace AZ RHI::ResultCode QueryPool::InitInternal(RHI::Device& baseDevice, const RHI::QueryPoolDescriptor& descriptor) { auto& device = static_cast(baseDevice); - id mtlDevice = device.GetMtlDevice(); - NSError* error = nil; - + #if AZ_TRAIT_ATOM_METAL_COUNTER_SAMPLING + id mtlDevice = device.GetMtlDevice(); NSArray> * counterSets = [mtlDevice counterSets]; CacheCounterIndices(counterSets); #endif @@ -47,6 +46,7 @@ namespace AZ #if AZ_TRAIT_ATOM_METAL_COUNTER_SAMPLING case RHI::QueryType::Timestamp: { + NSError* error = nil; NSUInteger timeStampCounterIndex = [counterSets indexOfObjectPassingTest:^BOOL(id mtlCounterSet, NSUInteger idx, BOOL *stop) { if ([mtlCounterSet.name isEqualToString:MTLCommonCounterSetTimestamp]) @@ -77,6 +77,7 @@ namespace AZ } case RHI::QueryType::PipelineStatistics: { + NSError* error = nil; NSUInteger statisticCounterIndex = [counterSets indexOfObjectPassingTest:^BOOL(id mtlCounterSet, NSUInteger idx, BOOL *stop) { if ([mtlCounterSet.name isEqualToString:MTLCommonCounterSetStatistic]) @@ -127,9 +128,6 @@ namespace AZ RHI::ResultCode QueryPool::GetResultsInternal(uint32_t startIndex, uint32_t queryCount, uint64_t* results, uint32_t resultsCount, RHI::QueryResultFlagBits flags) { - auto& device = static_cast(GetDevice()); - MTLCommandBufferStatus commandBufferStatus = MTLCommandBufferStatusError; - switch(GetDescriptor().m_type) { case RHI::QueryType::Occlusion: diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI/Scope.cpp b/Gems/Atom/RHI/Metal/Code/Source/RHI/Scope.cpp index d70a4d4e60..7e4d510dfa 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI/Scope.cpp +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI/Scope.cpp @@ -115,12 +115,10 @@ namespace AZ const RHI::ImageScopeAttachmentDescriptor& bindingDescriptor = scopeAttachment->GetDescriptor(); id imageViewMtlTexture = imageView->GetMemoryView().GetGpuAddress>(); - const bool isFullView = imageView->IsFullView(); const bool isClearAction = bindingDescriptor.m_loadStoreAction.m_loadAction == RHI::AttachmentLoadAction::Clear; const bool isClearActionStencil = bindingDescriptor.m_loadStoreAction.m_loadActionStencil == RHI::AttachmentLoadAction::Clear; const bool isLoadAction = bindingDescriptor.m_loadStoreAction.m_loadAction == RHI::AttachmentLoadAction::Load; - const bool isLoadActionStencil = bindingDescriptor.m_loadStoreAction.m_loadActionStencil == RHI::AttachmentLoadAction::Load; const bool isStoreAction = bindingDescriptor.m_loadStoreAction.m_storeAction == RHI::AttachmentStoreAction::Store; const bool isStoreActionStencil = bindingDescriptor.m_loadStoreAction.m_storeActionStencil == RHI::AttachmentStoreAction::Store; @@ -158,7 +156,6 @@ namespace AZ { mtlStoreActionStencil = MTLStoreActionStore; } - const RHI::ImageViewDescriptor& imgViewDescriptor = imageView->GetDescriptor(); const AZStd::vector& usagesAndAccesses = scopeAttachment->GetUsageAndAccess(); for (const RHI::ScopeAttachmentUsageAndAccess& usageAndAccess : usagesAndAccesses) { diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI/ShaderResourceGroupPool.cpp b/Gems/Atom/RHI/Metal/Code/Source/RHI/ShaderResourceGroupPool.cpp index 3862885395..6be5ec7259 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI/ShaderResourceGroupPool.cpp +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI/ShaderResourceGroupPool.cpp @@ -26,7 +26,6 @@ namespace AZ { Device& device = static_cast(deviceBase); m_device = &device; - const RHI::ShaderResourceGroupLayout& layout = *descriptor.m_layout; m_srgLayout = descriptor.m_layout; return RHI::ResultCode::Success; } diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI/StreamingImagePool.cpp b/Gems/Atom/RHI/Metal/Code/Source/RHI/StreamingImagePool.cpp index 03d898bc60..3d90b595e4 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI/StreamingImagePool.cpp +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI/StreamingImagePool.cpp @@ -50,7 +50,6 @@ namespace AZ RHI::ResultCode StreamingImagePool::InitImageInternal(const RHI::StreamingImageInitRequest& request) { Image& image = static_cast(*request.m_image); - auto& device = static_cast(GetDevice()); MemoryView memoryView = GetDevice().CreateImageCommitted(image.GetDescriptor()); if (!memoryView.IsValid()) diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI/SwapChain.cpp b/Gems/Atom/RHI/Metal/Code/Source/RHI/SwapChain.cpp index 0065ea724e..90ba04c3db 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI/SwapChain.cpp +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI/SwapChain.cpp @@ -123,9 +123,6 @@ namespace AZ RHI::ResultCode SwapChain::InitImageInternal(const InitImageRequest& request) { - const RHI::SwapChainDescriptor& descriptor = GetDescriptor(); - Device& device = GetDevice(); - Name name(AZStd::string::format("SwapChainImage_%d", request.m_imageIndex)); Image& image = static_cast(*request.m_image); diff --git a/Gems/Microphone/Code/Source/Platform/Mac/MicrophoneSystemComponent_Mac.mm b/Gems/Microphone/Code/Source/Platform/Mac/MicrophoneSystemComponent_Mac.mm index 1f7cef7b0c..567f2db6b2 100644 --- a/Gems/Microphone/Code/Source/Platform/Mac/MicrophoneSystemComponent_Mac.mm +++ b/Gems/Microphone/Code/Source/Platform/Mac/MicrophoneSystemComponent_Mac.mm @@ -241,13 +241,14 @@ public: AZStd::size_t GetData(void** outputData, AZStd::size_t numFrames, const SAudioInputConfig& targetConfig, bool shouldDeinterleave) override { - bool changeSampleType = (targetConfig.m_sampleType != m_config.m_sampleType); - bool changeSampleRate = (targetConfig.m_sampleRate != m_config.m_sampleRate); - bool changeNumChannels = (targetConfig.m_numChannels != m_config.m_numChannels); #if defined(USE_LIBSAMPLERATE) // pending port of LIBSAMPLERATE to MacOS return {}; #else + bool changeSampleType = (targetConfig.m_sampleType != m_config.m_sampleType); + bool changeSampleRate = (targetConfig.m_sampleRate != m_config.m_sampleRate); + bool changeNumChannels = (targetConfig.m_numChannels != m_config.m_numChannels); + if (changeSampleType || changeNumChannels) { // Without the SRC library, any change is unsupported! diff --git a/Gems/Microphone/Code/Source/Platform/iOS/MicrophoneSystemComponent_iOS.mm b/Gems/Microphone/Code/Source/Platform/iOS/MicrophoneSystemComponent_iOS.mm index fe8580723a..a3d4f9434f 100644 --- a/Gems/Microphone/Code/Source/Platform/iOS/MicrophoneSystemComponent_iOS.mm +++ b/Gems/Microphone/Code/Source/Platform/iOS/MicrophoneSystemComponent_iOS.mm @@ -187,13 +187,14 @@ public: AZStd::size_t GetData(void** outputData, AZStd::size_t numFrames, const SAudioInputConfig& targetConfig, bool shouldDeinterleave) override { - bool changeSampleType = (targetConfig.m_sampleType != m_config.m_sampleType); - bool changeSampleRate = (targetConfig.m_sampleRate != m_config.m_sampleRate); - bool changeNumChannels = (targetConfig.m_numChannels != m_config.m_numChannels); #if defined(USE_LIBSAMPLERATE) // pending port of LIBSAMPLERATE to iOS return {}; #else + bool changeSampleType = (targetConfig.m_sampleType != m_config.m_sampleType); + bool changeSampleRate = (targetConfig.m_sampleRate != m_config.m_sampleRate); + bool changeNumChannels = (targetConfig.m_numChannels != m_config.m_numChannels); + if (changeSampleType || changeNumChannels) { // Without the SRC library, any change is unsupported!