| @@ -77,8 +77,8 @@ public: | |||||
| numClientInputChannels (0), numDeviceInputChannels (0), numDeviceInputChannelsAvailable (2), | numClientInputChannels (0), numDeviceInputChannels (0), numDeviceInputChannelsAvailable (2), | ||||
| numClientOutputChannels (0), numDeviceOutputChannels (0), | numClientOutputChannels (0), numDeviceOutputChannels (0), | ||||
| actualBufferSize (0), isRunning (false), | actualBufferSize (0), isRunning (false), | ||||
| outputChannelBuffer (1, 1), | |||||
| inputChannelBuffer (1, 1) | |||||
| inputChannelBuffer (1, 1), | |||||
| outputChannelBuffer (1, 1) | |||||
| { | { | ||||
| JNIEnv* env = getEnv(); | JNIEnv* env = getEnv(); | ||||
| sampleRate = env->CallStaticIntMethod (AudioTrack, AudioTrack.getNativeOutputSampleRate, MODE_STREAM); | sampleRate = env->CallStaticIntMethod (AudioTrack, AudioTrack.getNativeOutputSampleRate, MODE_STREAM); | ||||
| @@ -234,6 +234,7 @@ bool Process::openDocument (const String& fileName, const String& parameters) | |||||
| { | { | ||||
| const LocalRef<jstring> t (javaString (fileName)); | const LocalRef<jstring> t (javaString (fileName)); | ||||
| android.activity.callVoidMethod (JuceAppActivity.launchURL, t.get()); | android.activity.callVoidMethod (JuceAppActivity.launchURL, t.get()); | ||||
| return true; | |||||
| } | } | ||||
| void File::revealToUser() const | void File::revealToUser() const | ||||
| @@ -28,5 +28,5 @@ | |||||
| void Logger::outputDebugString (const String& text) | void Logger::outputDebugString (const String& text) | ||||
| { | { | ||||
| __android_log_print (ANDROID_LOG_INFO, "JUCE", text.toUTF8()); | |||||
| __android_log_print (ANDROID_LOG_INFO, "JUCE", "%s", text.toUTF8().getAddress()); | |||||
| } | } | ||||
| @@ -126,7 +126,7 @@ static void findIPAddresses (int sock, Array<IPAddress>& result) | |||||
| cfg.ifc_buf += IFNAMSIZ + cfg.ifc_req->ifr_addr.sa_len; | cfg.ifc_buf += IFNAMSIZ + cfg.ifc_req->ifr_addr.sa_len; | ||||
| } | } | ||||
| #else | #else | ||||
| for (int i = 0; i < cfg.ifc_len / sizeof (struct ifreq); ++i) | |||||
| for (size_t i = 0; i < cfg.ifc_len / sizeof (struct ifreq); ++i) | |||||
| { | { | ||||
| const ifreq& item = cfg.ifc_req[i]; | const ifreq& item = cfg.ifc_req[i]; | ||||
| @@ -65,10 +65,15 @@ struct CurrentThreadHolder : public ReferenceCountedObject | |||||
| static char currentThreadHolderLock [sizeof (SpinLock)]; // (statically initialised to zeros). | static char currentThreadHolderLock [sizeof (SpinLock)]; // (statically initialised to zeros). | ||||
| static SpinLock* castToSpinLockWithoutAliasingWarning (void* s) | |||||
| { | |||||
| return static_cast<SpinLock*> (s); | |||||
| } | |||||
| static CurrentThreadHolder::Ptr getCurrentThreadHolder() | static CurrentThreadHolder::Ptr getCurrentThreadHolder() | ||||
| { | { | ||||
| static CurrentThreadHolder::Ptr currentThreadHolder; | static CurrentThreadHolder::Ptr currentThreadHolder; | ||||
| SpinLock::ScopedLockType lock (*reinterpret_cast <SpinLock*> (currentThreadHolderLock)); | |||||
| SpinLock::ScopedLockType lock (*castToSpinLockWithoutAliasingWarning (currentThreadHolderLock)); | |||||
| if (currentThreadHolder == nullptr) | if (currentThreadHolder == nullptr) | ||||
| currentThreadHolder = new CurrentThreadHolder(); | currentThreadHolder = new CurrentThreadHolder(); | ||||
| @@ -697,7 +697,6 @@ JUCE_JNI_CALLBACK (JUCE_ANDROID_ACTIVITY_CLASSNAME, setScreenSize, void, (JNIEnv | |||||
| jint screenWidth, jint screenHeight, | jint screenWidth, jint screenHeight, | ||||
| jint dpi)) | jint dpi)) | ||||
| { | { | ||||
| const bool isSystemInitialised = android.screenWidth != 0; | |||||
| android.screenWidth = screenWidth; | android.screenWidth = screenWidth; | ||||
| android.screenHeight = screenHeight; | android.screenHeight = screenHeight; | ||||
| android.dpi = dpi; | android.dpi = dpi; | ||||
| @@ -193,8 +193,8 @@ private: | |||||
| class ColourSelector::HueSelectorComp : public Component | class ColourSelector::HueSelectorComp : public Component | ||||
| { | { | ||||
| public: | public: | ||||
| HueSelectorComp (ColourSelector& cs, float& hue, float& sat, float& val, const int edgeSize) | |||||
| : owner (cs), h (hue), s (sat), v (val), edge (edgeSize) | |||||
| HueSelectorComp (ColourSelector& cs, float& hue, const int edgeSize) | |||||
| : owner (cs), h (hue), edge (edgeSize) | |||||
| { | { | ||||
| addAndMakeVisible (&marker); | addAndMakeVisible (&marker); | ||||
| } | } | ||||
| @@ -236,8 +236,6 @@ public: | |||||
| private: | private: | ||||
| ColourSelector& owner; | ColourSelector& owner; | ||||
| float& h; | float& h; | ||||
| float& s; | |||||
| float& v; | |||||
| HueSelectorMarker marker; | HueSelectorMarker marker; | ||||
| const int edge; | const int edge; | ||||
| @@ -332,7 +330,7 @@ ColourSelector::ColourSelector (const int sectionsToShow, const int edge, const | |||||
| if ((flags & showColourspace) != 0) | if ((flags & showColourspace) != 0) | ||||
| { | { | ||||
| addAndMakeVisible (colourSpace = new ColourSpaceView (*this, h, s, v, gapAroundColourSpaceComponent)); | addAndMakeVisible (colourSpace = new ColourSpaceView (*this, h, s, v, gapAroundColourSpaceComponent)); | ||||
| addAndMakeVisible (hueSelector = new HueSelectorComp (*this, h, s, v, gapAroundColourSpaceComponent)); | |||||
| addAndMakeVisible (hueSelector = new HueSelectorComp (*this, h, gapAroundColourSpaceComponent)); | |||||
| } | } | ||||
| update(); | update(); | ||||