Browse Source

Fix for xcode linker warnings when using the static lib. Tweaks to iPhone audio and StretchableLayoutManager.

tags/2021-05-28
Julian Storer 15 years ago
parent
commit
942999ea31
8 changed files with 35 additions and 17 deletions
  1. +4
    -2
      Builds/MacOSX/Juce.xcodeproj/project.pbxproj
  2. +4
    -2
      Builds/iPhone/Juce.xcodeproj/project.pbxproj
  3. +11
    -1
      extras/Jucer (experimental)/Source/Project/jucer_ProjectExport_XCode.h
  4. +7
    -5
      juce_amalgamated.cpp
  5. +1
    -1
      juce_amalgamated.h
  6. +1
    -1
      src/core/juce_StandardHeader.h
  7. +4
    -4
      src/gui/components/layout/juce_StretchableLayoutManager.cpp
  8. +3
    -1
      src/native/mac/juce_iphone_Audio.cpp

+ 4
- 2
Builds/MacOSX/Juce.xcodeproj/project.pbxproj View File

@@ -1820,7 +1820,8 @@
GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES;
GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES;
GCC_MODEL_TUNING = G5;
GCC_INLINES_ARE_PRIVATE_EXTERN = YES;
GCC_INLINES_ARE_PRIVATE_EXTERN = NO;
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
ZERO_LINK = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
PRODUCT_NAME = "jucedebug"; }; name = Debug; };
@@ -1834,7 +1835,8 @@
GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES;
GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES;
GCC_MODEL_TUNING = G5;
GCC_INLINES_ARE_PRIVATE_EXTERN = YES;
GCC_INLINES_ARE_PRIVATE_EXTERN = NO;
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
ZERO_LINK = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
PRODUCT_NAME = "juce"; }; name = Release; };


+ 4
- 2
Builds/iPhone/Juce.xcodeproj/project.pbxproj View File

@@ -1820,7 +1820,8 @@
GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES;
GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES;
GCC_MODEL_TUNING = G5;
GCC_INLINES_ARE_PRIVATE_EXTERN = YES;
GCC_INLINES_ARE_PRIVATE_EXTERN = NO;
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
ZERO_LINK = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
PRODUCT_NAME = "jucedebug"; }; name = Debug; };
@@ -1834,7 +1835,8 @@
GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES;
GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES;
GCC_MODEL_TUNING = G5;
GCC_INLINES_ARE_PRIVATE_EXTERN = YES;
GCC_INLINES_ARE_PRIVATE_EXTERN = NO;
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
ZERO_LINK = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
PRODUCT_NAME = "juce"; }; name = Release; };


+ 11
- 1
extras/Jucer (experimental)/Source/Project/jucer_ProjectExport_XCode.h View File

@@ -494,7 +494,17 @@ private:
s.add ("GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES");
s.add ("GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES");
s.add ("GCC_MODEL_TUNING = G5");
s.add ("GCC_INLINES_ARE_PRIVATE_EXTERN = YES");
if (project.isLibrary() || project.getJuceLinkageMode() == Project::useLinkedJuce)
{
s.add ("GCC_INLINES_ARE_PRIVATE_EXTERN = NO");
s.add ("GCC_SYMBOLS_PRIVATE_EXTERN = NO");
}
else
{
s.add ("GCC_INLINES_ARE_PRIVATE_EXTERN = YES");
}
s.add ("ZERO_LINK = NO");
s.add ("DEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\"");
s.add ("PRODUCT_NAME = \"" + config.getTargetBinaryName().toString() + "\"");


+ 7
- 5
juce_amalgamated.cpp View File

@@ -62478,8 +62478,8 @@ int StretchableLayoutManager::fitComponentsIntoSpace (const int startIndex,
layout->currentSize = sizeToRealSize (layout->minSize, totalSize);

totalMinimums += layout->currentSize;
totalIdealSize += sizeToRealSize (layout->preferredSize, availableSpace);
}
totalIdealSize += sizeToRealSize (layout->preferredSize, totalSize);
}

if (totalIdealSize <= 0)
totalIdealSize = 1.0;
@@ -62497,7 +62497,7 @@ int StretchableLayoutManager::fitComponentsIntoSpace (const int startIndex,
{
ItemLayoutProperties* const layout = items.getUnchecked (i);

double sizeWanted = sizeToRealSize (layout->preferredSize, availableSpace);
double sizeWanted = sizeToRealSize (layout->preferredSize, totalSize);

const int bestSize = jlimit (layout->currentSize,
jmax (layout->currentSize,
@@ -62513,7 +62513,7 @@ int StretchableLayoutManager::fitComponentsIntoSpace (const int startIndex,
{
ItemLayoutProperties* const layout = items.getUnchecked (i);

double sizeWanted = sizeToRealSize (layout->preferredSize, availableSpace);
double sizeWanted = sizeToRealSize (layout->preferredSize, totalSize);

int bestSize = jlimit (layout->currentSize,
jmax (layout->currentSize, sizeToRealSize (layout->maxSize, totalSize)),
@@ -267658,7 +267658,9 @@ public:

AudioSessionSetActive (true);

UInt32 audioCategory = kAudioSessionCategory_PlayAndRecord;
UInt32 audioCategory = audioInputIsAvailable ? kAudioSessionCategory_PlayAndRecord
: kAudioSessionCategory_MediaPlayback;

AudioSessionSetProperty (kAudioSessionProperty_AudioCategory, sizeof (audioCategory), &audioCategory);
AudioSessionAddPropertyListener (kAudioSessionProperty_AudioRouteChange, propertyChangedStatic, this);



+ 1
- 1
juce_amalgamated.h View File

@@ -64,7 +64,7 @@
*/
#define JUCE_MAJOR_VERSION 1
#define JUCE_MINOR_VERSION 52
#define JUCE_BUILDNUMBER 35
#define JUCE_BUILDNUMBER 36

/** Current Juce version number.



+ 1
- 1
src/core/juce_StandardHeader.h View File

@@ -33,7 +33,7 @@
*/
#define JUCE_MAJOR_VERSION 1
#define JUCE_MINOR_VERSION 52
#define JUCE_BUILDNUMBER 35
#define JUCE_BUILDNUMBER 36
/** Current Juce version number.


+ 4
- 4
src/gui/components/layout/juce_StretchableLayoutManager.cpp View File

@@ -251,8 +251,8 @@ int StretchableLayoutManager::fitComponentsIntoSpace (const int startIndex,
layout->currentSize = sizeToRealSize (layout->minSize, totalSize);
totalMinimums += layout->currentSize;
totalIdealSize += sizeToRealSize (layout->preferredSize, availableSpace);
}
totalIdealSize += sizeToRealSize (layout->preferredSize, totalSize);
}
if (totalIdealSize <= 0)
totalIdealSize = 1.0;
@@ -270,7 +270,7 @@ int StretchableLayoutManager::fitComponentsIntoSpace (const int startIndex,
{
ItemLayoutProperties* const layout = items.getUnchecked (i);
double sizeWanted = sizeToRealSize (layout->preferredSize, availableSpace);
double sizeWanted = sizeToRealSize (layout->preferredSize, totalSize);
const int bestSize = jlimit (layout->currentSize,
jmax (layout->currentSize,
@@ -286,7 +286,7 @@ int StretchableLayoutManager::fitComponentsIntoSpace (const int startIndex,
{
ItemLayoutProperties* const layout = items.getUnchecked (i);
double sizeWanted = sizeToRealSize (layout->preferredSize, availableSpace);
double sizeWanted = sizeToRealSize (layout->preferredSize, totalSize);
int bestSize = jlimit (layout->currentSize,
jmax (layout->currentSize, sizeToRealSize (layout->maxSize, totalSize)),


+ 3
- 1
src/native/mac/juce_iphone_Audio.cpp View File

@@ -122,7 +122,9 @@ public:
AudioSessionSetActive (true);
UInt32 audioCategory = kAudioSessionCategory_PlayAndRecord;
UInt32 audioCategory = audioInputIsAvailable ? kAudioSessionCategory_PlayAndRecord
: kAudioSessionCategory_MediaPlayback;
AudioSessionSetProperty (kAudioSessionProperty_AudioCategory, sizeof (audioCategory), &audioCategory);
AudioSessionAddPropertyListener (kAudioSessionProperty_AudioRouteChange, propertyChangedStatic, this);


Loading…
Cancel
Save