| @@ -23,10 +23,10 @@ | |||
| ============================================================================== | |||
| */ | |||
| class IPhoneAudioIODevice : public AudioIODevice | |||
| class iOSAudioIODevice : public AudioIODevice | |||
| { | |||
| public: | |||
| IPhoneAudioIODevice (const String& deviceName) | |||
| iOSAudioIODevice (const String& deviceName) | |||
| : AudioIODevice (deviceName, "Audio"), | |||
| actualBufferSize (0), | |||
| isRunning (false), | |||
| @@ -43,7 +43,7 @@ public: | |||
| updateDeviceInfo(); | |||
| } | |||
| ~IPhoneAudioIODevice() | |||
| ~iOSAudioIODevice() | |||
| { | |||
| getSessionHolder().activeDevices.removeFirstMatchingValue (this); | |||
| close(); | |||
| @@ -362,13 +362,13 @@ private: | |||
| static void interruptionListenerCallback (void* client, UInt32 interruptionType) | |||
| { | |||
| const Array <IPhoneAudioIODevice*>& activeDevices = static_cast <AudioSessionHolder*> (client)->activeDevices; | |||
| const Array <iOSAudioIODevice*>& activeDevices = static_cast <AudioSessionHolder*> (client)->activeDevices; | |||
| for (int i = activeDevices.size(); --i >= 0;) | |||
| activeDevices.getUnchecked(i)->interruptionListener (interruptionType); | |||
| } | |||
| Array <IPhoneAudioIODevice*> activeDevices; | |||
| Array <iOSAudioIODevice*> activeDevices; | |||
| }; | |||
| static AudioSessionHolder& getSessionHolder() | |||
| @@ -401,12 +401,12 @@ private: | |||
| static OSStatus processStatic (void* client, AudioUnitRenderActionFlags* flags, const AudioTimeStamp* time, | |||
| UInt32 /*busNumber*/, UInt32 numFrames, AudioBufferList* data) | |||
| { | |||
| return static_cast <IPhoneAudioIODevice*> (client)->process (flags, time, numFrames, data); | |||
| return static_cast <iOSAudioIODevice*> (client)->process (flags, time, numFrames, data); | |||
| } | |||
| static void routingChangedStatic (void* client, AudioSessionPropertyID, UInt32 /*inDataSize*/, const void* propertyValue) | |||
| { | |||
| static_cast <IPhoneAudioIODevice*> (client)->routingChanged (propertyValue); | |||
| static_cast <iOSAudioIODevice*> (client)->routingChanged (propertyValue); | |||
| } | |||
| //================================================================================================== | |||
| @@ -495,17 +495,15 @@ private: | |||
| } | |||
| } | |||
| JUCE_DECLARE_NON_COPYABLE (IPhoneAudioIODevice); | |||
| JUCE_DECLARE_NON_COPYABLE (iOSAudioIODevice); | |||
| }; | |||
| //============================================================================== | |||
| class IPhoneAudioIODeviceType : public AudioIODeviceType | |||
| class iOSAudioIODeviceType : public AudioIODeviceType | |||
| { | |||
| public: | |||
| //============================================================================== | |||
| IPhoneAudioIODeviceType() | |||
| : AudioIODeviceType ("iPhone Audio") | |||
| iOSAudioIODeviceType() : AudioIODeviceType ("iOS Audio") | |||
| { | |||
| } | |||
| @@ -513,7 +511,7 @@ public: | |||
| StringArray getDeviceNames (bool wantInputNames) const | |||
| { | |||
| return StringArray ("iPhone Audio"); | |||
| return StringArray ("iOS Audio"); | |||
| } | |||
| int getDefaultDeviceIndex (bool forInput) const | |||
| @@ -532,18 +530,18 @@ public: | |||
| const String& inputDeviceName) | |||
| { | |||
| if (outputDeviceName.isNotEmpty() || inputDeviceName.isNotEmpty()) | |||
| return new IPhoneAudioIODevice (outputDeviceName.isNotEmpty() ? outputDeviceName | |||
| : inputDeviceName); | |||
| return new iOSAudioIODevice (outputDeviceName.isNotEmpty() ? outputDeviceName | |||
| : inputDeviceName); | |||
| return nullptr; | |||
| } | |||
| private: | |||
| JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (IPhoneAudioIODeviceType); | |||
| JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (iOSAudioIODeviceType); | |||
| }; | |||
| //============================================================================== | |||
| AudioIODeviceType* AudioIODeviceType::createAudioIODeviceType_iOSAudio() | |||
| { | |||
| return new IPhoneAudioIODeviceType(); | |||
| return new iOSAudioIODeviceType(); | |||
| } | |||
| @@ -191,7 +191,7 @@ private: | |||
| #endif | |||
| #if JUCE_PPC || JUCE_IOS | |||
| // None of these atomics are available for PPC or for iPhoneOS 3.1 or earlier!! | |||
| // None of these atomics are available for PPC or for iOS 3.1 or earlier!! | |||
| template <typename Type> static Type OSAtomicAdd64Barrier (Type b, JUCE_MAC_ATOMICS_VOLATILE Type* a) noexcept { jassertfalse; return *a += b; } | |||
| template <typename Type> static Type OSAtomicIncrement64Barrier (JUCE_MAC_ATOMICS_VOLATILE Type* a) noexcept { jassertfalse; return ++*a; } | |||
| template <typename Type> static Type OSAtomicDecrement64Barrier (JUCE_MAC_ATOMICS_VOLATILE Type* a) noexcept { jassertfalse; return --*a; } | |||
| @@ -275,13 +275,12 @@ String File::getVersion() const | |||
| //============================================================================== | |||
| File File::getLinkedTarget() const | |||
| { | |||
| #if JUCE_IOS || (defined (MAC_OS_X_VERSION_10_5) && MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5) | |||
| #if JUCE_IOS || (defined (MAC_OS_X_VERSION_10_5) && MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5) | |||
| NSString* dest = [[NSFileManager defaultManager] destinationOfSymbolicLinkAtPath: juceStringToNS (getFullPathName()) error: nil]; | |||
| #else | |||
| #else | |||
| // (the cast here avoids a deprecation warning) | |||
| NSString* dest = [((id) [NSFileManager defaultManager]) pathContentOfSymbolicLinkAtPath: juceStringToNS (getFullPathName())]; | |||
| #endif | |||
| #endif | |||
| if (dest != nil) | |||
| return File (nsStringToJuce (dest)); | |||
| @@ -295,9 +294,9 @@ bool File::moveToTrash() const | |||
| if (! exists()) | |||
| return true; | |||
| #if JUCE_IOS | |||
| return deleteFile(); //xxx is there a trashcan on the iPhone? | |||
| #else | |||
| #if JUCE_IOS | |||
| return deleteFile(); //xxx is there a trashcan on the iOS? | |||
| #else | |||
| JUCE_AUTORELEASEPOOL | |||
| NSString* p = juceStringToNS (getFullPathName()); | |||
| @@ -308,7 +307,7 @@ bool File::moveToTrash() const | |||
| destination: nsEmptyString() | |||
| files: [NSArray arrayWithObject: [p lastPathComponent]] | |||
| tag: nil ]; | |||
| #endif | |||
| #endif | |||
| } | |||
| //============================================================================== | |||
| @@ -34,7 +34,7 @@ bool Process::isForegroundProcess() | |||
| #if JUCE_MAC | |||
| return [NSApp isActive]; | |||
| #else | |||
| return true; // xxx change this if more than one app is ever possible on the iPhone! | |||
| return true; // xxx change this if more than one app is ever possible on iOS! | |||
| #endif | |||
| } | |||
| @@ -32,7 +32,7 @@ void MessageManager::runDispatchLoop() | |||
| void MessageManager::stopDispatchLoop() | |||
| { | |||
| [[[UIApplication sharedApplication] delegate] applicationWillTerminate: [UIApplication sharedApplication]]; | |||
| exit (0); // iPhone apps get no mercy.. | |||
| exit (0); // iOS apps get no mercy.. | |||
| } | |||
| bool MessageManager::runDispatchLoopUntil (int millisecondsToRunFor) | |||
| @@ -486,7 +486,7 @@ void CoreGraphicsContext::drawImage (const Image& sourceImage, const AffineTrans | |||
| CGContextDrawImage (context, imageRect, image); | |||
| } | |||
| CGImageRelease (image); // (This causes a memory bug in iPhone sim 3.0 - try upgrading to a later version if you hit this) | |||
| CGImageRelease (image); // (This causes a memory bug in iOS sim 3.0 - try upgrading to a later version if you hit this) | |||
| CGContextRestoreGState (context); | |||
| } | |||
| @@ -224,13 +224,13 @@ int JUCE_CALLTYPE NativeMessageBox::showYesNoCancelBox (AlertWindow::AlertIconTy | |||
| //============================================================================== | |||
| bool DragAndDropContainer::performExternalDragDropOfFiles (const StringArray& files, const bool canMoveFiles) | |||
| { | |||
| jassertfalse; // no such thing on the iphone! | |||
| jassertfalse; // no such thing on iOS! | |||
| return false; | |||
| } | |||
| bool DragAndDropContainer::performExternalDragDropOfText (const String& text) | |||
| { | |||
| jassertfalse; // no such thing on the iphone! | |||
| jassertfalse; // no such thing on iOS! | |||
| return false; | |||
| } | |||