1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Normalised some divider comments

This commit is contained in:
jules 2016-02-20 09:45:43 +00:00
parent c64fcd72e9
commit b5907fa90d
56 changed files with 233 additions and 233 deletions

View file

@ -49,7 +49,7 @@ public:
{
}
//==========================================================================
//==============================================================================
/** Reset to a new sample rate and ramp length. */
void reset (double sampleRate, double rampLengthInSeconds) noexcept
{
@ -59,7 +59,7 @@ public:
countdown = 0;
}
//==========================================================================
//==============================================================================
/** Set a new target value. */
void setValue (FloatType newValue) noexcept
{
@ -75,7 +75,7 @@ public:
}
}
//==========================================================================
//==============================================================================
/** Compute the next value. */
FloatType getNextValue() noexcept
{
@ -88,7 +88,7 @@ public:
}
private:
//==========================================================================
//==============================================================================
FloatType currentValue, target, step;
int countdown, stepsToTarget;
};

View file

@ -27,7 +27,7 @@
#include "../juce_core/juce_core.h"
//=============================================================================
//==============================================================================
namespace juce
{

View file

@ -331,7 +331,7 @@ public:
}
private:
//==========================================================================
//==============================================================================
void expectContainsRPN (const MidiBuffer& midiBuffer,
int channel,
int parameterNumber,
@ -343,7 +343,7 @@ private:
expectContainsRPN (midiBuffer, expected);
}
//==========================================================================
//==============================================================================
void expectContainsRPN (const MidiBuffer& midiBuffer, MidiRPNMessage expected)
{
MidiBuffer::Iterator iter (midiBuffer);

View file

@ -26,7 +26,7 @@
#define JUCE_MIDIRPNDETECTOR_H_INCLUDED
//==========================================================================
//==============================================================================
/** Represents a MIDI RPN (registered parameter number) or NRPN (non-registered
parameter number) message.
*/
@ -77,7 +77,7 @@ public:
*/
void reset() noexcept;
//==========================================================================
//==============================================================================
/** Takes the next in a stream of incoming MIDI CC messages and returns true
if it forms the last of a sequence that makes an RPN or NPRN.
@ -91,7 +91,7 @@ public:
MidiRPNMessage& result) noexcept;
private:
//==========================================================================
//==============================================================================
struct ChannelState
{
ChannelState() noexcept;
@ -104,7 +104,7 @@ private:
bool isNRPN;
};
//==========================================================================
//==============================================================================
ChannelState states[16];
JUCE_LEAK_DETECTOR (MidiRPNDetector)
@ -120,11 +120,11 @@ private:
class JUCE_API MidiRPNGenerator
{
public:
//==========================================================================
//==============================================================================
/** Generates a MIDI sequence representing the given RPN or NRPN message. */
static MidiBuffer generate (MidiRPNMessage message);
//==========================================================================
//==============================================================================
/** Generates a MIDI sequence representing an RPN or NRPN message with the
given parameters.

View file

@ -1968,7 +1968,7 @@ public:
}
private:
//==========================================================================
//==============================================================================
/* This mock class is used for unit testing whether the methods of
MPEInstrument are called correctly.
*/
@ -2066,7 +2066,7 @@ private:
ScopedPointer<MPENote> lastNoteFinished;
private:
//======================================================================
//==============================================================================
void noteAdded (MPENote) override { noteAddedCallCounter++; }
void notePressureChanged (MPENote) override { notePressureChangedCallCounter++; }
@ -2081,7 +2081,7 @@ private:
}
};
//==========================================================================
//==============================================================================
template <int initial7BitPressure, int initial14BitPitchbend, int initial7BitTimbre>
class CustomInitialValuesTest : public MPEInstrument
{
@ -2101,7 +2101,7 @@ private:
}
};
//==========================================================================
//==============================================================================
void expectNote (MPENote noteToTest,
int noteOnVelocity7Bit,
int pressure7Bit,
@ -2133,7 +2133,7 @@ private:
expect (std::fabs (expected - actual) < maxAbsoluteError);
}
//==========================================================================
//==============================================================================
MPEZoneLayout testLayout;
};

View file

@ -68,7 +68,7 @@ public:
/** Destructor. */
virtual ~MPEInstrument();
//==========================================================================
//==============================================================================
/** Returns the current zone layout of the instrument.
This happens by value, to enforce thread-safety and class invariants.
@ -98,7 +98,7 @@ public:
*/
bool isMasterChannel (int midiChannel) const noexcept;
//==========================================================================
//==============================================================================
/** The MPE note tracking mode. In case there is more than one note playing
simultaneously on the same MIDI channel, this determines which of these
notes will be modulated by an incoming MPE message on that channel
@ -123,7 +123,7 @@ public:
/** Set the MPE tracking mode for the timbre dimension. */
void setTimbreTrackingMode (TrackingMode modeToUse);
//==========================================================================
//==============================================================================
/** Process a MIDI message and trigger the appropriate method calls
(noteOn, noteOff etc.)
@ -132,7 +132,7 @@ public:
*/
virtual void processNextMidiEvent (const MidiMessage& message);
//==========================================================================
//==============================================================================
/** Request a note-on on the given channel, with the given initial note
number and velocity.
If the message arrives on a valid note channel, this will create a
@ -187,7 +187,7 @@ public:
*/
void releaseAllNotes();
//==========================================================================
//==============================================================================
/** Returns the number of MPE notes currently played by the
instrument.
*/
@ -221,7 +221,7 @@ public:
*/
MPENote getMostRecentNoteOtherThan (MPENote otherThanThisNote) const noexcept;
//==========================================================================
//==============================================================================
/** Derive from this class to be informed about any changes in the expressive
MIDI notes played by this instrument.
@ -275,14 +275,14 @@ public:
virtual void noteReleased (MPENote finishedNote) = 0;
};
//==========================================================================
//==============================================================================
/** Adds a listener. */
void addListener (Listener* listenerToAdd) noexcept;
/** Removes a listener. */
void removeListener (Listener* listenerToRemove) noexcept;
//==========================================================================
//==============================================================================
/** Puts the instrument into legacy mode.
As a side effect, this will discard all currently playing notes,
and call noteReleased for all of them.
@ -321,7 +321,7 @@ public:
void setLegacyModePitchbendRange (int pitchbendRange);
protected:
//==========================================================================
//==============================================================================
/** This method defines what initial pitchbend value should be used for newly
triggered notes. The default is to use the last pitchbend value
that has been received on the same MIDI channel (or no pitchbend
@ -351,7 +351,7 @@ protected:
MPEValue midiNoteOnVelocity) const;
private:
//==========================================================================
//==============================================================================
CriticalSection lock;
Array<MPENote> notes;
MPEZoneLayout zoneLayout;

View file

@ -162,7 +162,7 @@ public:
}
private:
//==========================================================================
//==============================================================================
void testMidiBuffer (MidiBuffer& buffer, const uint8* expectedBytes, int expectedBytesSize)
{
uint8 actualBytes[128] = { 0 };
@ -171,7 +171,7 @@ private:
expectEquals (std::memcmp (actualBytes, expectedBytes, (std::size_t) expectedBytesSize), 0);
}
//==========================================================================
//==============================================================================
void extractRawBinaryData (const MidiBuffer& midiBuffer, const uint8* bufferToCopyTo, std::size_t maxBytes)
{
std::size_t pos = 0;

View file

@ -103,7 +103,7 @@ class MPENoteTests : public UnitTest
public:
MPENoteTests() : UnitTest ("MPENote class") {}
//==========================================================================
//==============================================================================
void runTest() override
{
beginTest ("getFrequencyInHertz");
@ -116,7 +116,7 @@ public:
}
private:
//==========================================================================
//==============================================================================
void expectEqualsWithinOneCent (double frequencyInHertzActual,
double frequencyInHertzExpected)
{

View file

@ -39,7 +39,7 @@
*/
struct JUCE_API MPENote
{
//==========================================================================
//==============================================================================
enum KeyState
{
off = 0,
@ -48,7 +48,7 @@ struct JUCE_API MPENote
keyDownAndSustained = 3
};
//==========================================================================
//==============================================================================
/** Constructor.
@param midiChannel The MIDI channel of the note, between 2 and 16.
@ -88,7 +88,7 @@ struct JUCE_API MPENote
/** Checks whether the MPE note is valid. */
bool isValid() const noexcept;
//==========================================================================
//==============================================================================
// Invariants that define the note.
/** A unique ID. Useful to distinguish the note from other simultaneously
@ -107,7 +107,7 @@ struct JUCE_API MPENote
*/
uint8 initialNote;
//==========================================================================
//==============================================================================
// The five dimensions of continuous expressive control
/** The velocity ("strike") of the note-on.
@ -146,7 +146,7 @@ struct JUCE_API MPENote
*/
MPEValue noteOffVelocity;
//==========================================================================
//==============================================================================
/** Current effective pitchbend of the note in units of semitones, relative
to initialNote. You should use this to compute the actual effective pitch
of the note. This value is computed and set by an MPEInstrument to the
@ -163,7 +163,7 @@ struct JUCE_API MPENote
*/
KeyState keyState;
//==========================================================================
//==============================================================================
/** Returns the current frequency of the note in Hertz. This is the a sum of
the initialNote and the totalPitchbendInSemitones, converted to Hertz.
*/

View file

@ -55,7 +55,7 @@
class JUCE_API MPESynthesiser : public MPESynthesiserBase
{
public:
//==========================================================================
//==============================================================================
/** Constructor.
You'll need to add some voices before it'll make any sound.
@ -75,7 +75,7 @@ public:
/** Destructor. */
~MPESynthesiser();
//==========================================================================
//==============================================================================
/** Deletes all voices. */
void clearVoices();
@ -116,7 +116,7 @@ public:
*/
virtual void turnOffAllVoices (bool allowTailOff);
//==========================================================================
//==============================================================================
/** If set to true, then the synth will try to take over an existing voice if
it runs out and needs to play another note.
@ -128,7 +128,7 @@ public:
/** Returns true if note-stealing is enabled. */
bool isVoiceStealingEnabled() const noexcept { return shouldStealVoices; }
//==========================================================================
//==============================================================================
/** Tells the synthesiser what the sample rate is for the audio it's being used to render.
This overrides the implementation in MPESynthesiserBase, to additionally
@ -137,7 +137,7 @@ public:
*/
void setCurrentPlaybackSampleRate (double newRate) override;
//==========================================================================
//==============================================================================
/** Handle incoming MIDI events.
This method will be called automatically according to the MIDI data passed
@ -238,7 +238,7 @@ protected:
*/
virtual void noteKeyStateChanged (MPENote changedNote) override;
//==========================================================================
//==============================================================================
/** This will simply call renderNextBlock for each currently active
voice and fill the buffer with the sum.
Override this method if you need to do more work to render your audio.
@ -255,7 +255,7 @@ protected:
int startSample,
int numSamples) override;
//==========================================================================
//==============================================================================
/** Searches through the voices to find one that's not currently playing, and
which can play the given MPE note.
@ -298,11 +298,11 @@ protected:
*/
void stopVoice (MPESynthesiserVoice* voice, MPENote noteToStop, bool allowTailOff);
//==========================================================================
//==============================================================================
OwnedArray<MPESynthesiserVoice> voices;
private:
//==========================================================================
//==============================================================================
bool shouldStealVoices;
CriticalSection voicesLock;

View file

@ -47,7 +47,7 @@
struct JUCE_API MPESynthesiserBase : public MPEInstrument::Listener
{
public:
//==========================================================================
//==============================================================================
/** Constructor. */
MPESynthesiserBase();
@ -61,7 +61,7 @@ public:
*/
MPESynthesiserBase (MPEInstrument* instrument);
//==========================================================================
//==============================================================================
/** Returns the synthesiser's internal MPE zone layout.
This happens by value, to enforce thread-safety and class invariants.
*/
@ -73,7 +73,7 @@ public:
*/
void setZoneLayout (MPEZoneLayout newLayout);
//==========================================================================
//==============================================================================
/** Tells the synthesiser what the sample rate is for the audio it's being
used to render.
*/
@ -84,7 +84,7 @@ public:
*/
double getSampleRate() const noexcept { return sampleRate; }
//==========================================================================
//==============================================================================
/** Creates the next block of audio output.
Call this to make sound. This will chop up the AudioBuffer into subBlock
@ -99,7 +99,7 @@ public:
int startSample,
int numSamples);
//==========================================================================
//==============================================================================
/** Handle incoming MIDI events (called from renderNextBlock).
The default implementation provided here simply forwards everything
@ -113,7 +113,7 @@ public:
*/
virtual void handleMidiEvent (const MidiMessage&);
//==========================================================================
//==============================================================================
/** Sets a minimum limit on the size to which audio sub-blocks will be divided when rendering.
When rendering, the audio blocks that are passed into renderNextBlock() will be split up
@ -130,7 +130,7 @@ public:
*/
void setMinimumRenderingSubdivisionSize (int numSamples) noexcept;
//==========================================================================
//==============================================================================
/** Puts the synthesiser into legacy mode.
@param pitchbendRange The note pitchbend range in semitones to use when in legacy mode.
@ -160,7 +160,7 @@ public:
void setLegacyModePitchbendRange (int pitchbendRange);
protected:
//==========================================================================
//==============================================================================
/** Implement this method to render your audio inside.
@see renderNextBlock
*/
@ -176,14 +176,14 @@ protected:
int /*numSamples*/) {}
protected:
//==========================================================================
//==============================================================================
/** @internal */
ScopedPointer<MPEInstrument> instrument;
/** @internal */
CriticalSection renderAudioLock;
private:
//==========================================================================
//==============================================================================
double sampleRate;
int minimumSubBlockSize;

View file

@ -37,7 +37,7 @@
class JUCE_API MPESynthesiserVoice
{
public:
//========================================================================
//==============================================================================
/** Constructor. */
MPESynthesiserVoice();
@ -160,7 +160,7 @@ public:
bool wasStartedBefore (const MPESynthesiserVoice& other) const noexcept;
protected:
//==========================================================================
//==============================================================================
/** Resets the state of this voice after a sound has finished playing.
The subclass must call this when it finishes playing a note and becomes available
@ -175,12 +175,12 @@ protected:
*/
void clearCurrentNote() noexcept;
//==========================================================================
//==============================================================================
double currentSampleRate;
MPENote currentlyPlayingNote;
private:
//==========================================================================
//==============================================================================
friend class MPESynthesiser;
uint32 noteStartTime;

View file

@ -144,7 +144,7 @@ public:
}
private:
//==========================================================================
//==============================================================================
void expectValuesConsistent (MPEValue value,
int expectedValueAs7BitInt,
int expectedValueAs14BitInt,
@ -157,7 +157,7 @@ private:
expectFloatWithinRelativeError (value.asUnsignedFloat(), expectedValueAsUnsignedFloat, 0.0001f);
}
//==========================================================================
//==============================================================================
void expectFloatWithinRelativeError (float actualValue, float expectedValue, float maxRelativeError)
{
const float maxAbsoluteError = jmax (1.0f, std::fabs (expectedValue)) * maxRelativeError;

View file

@ -37,7 +37,7 @@
class JUCE_API MPEValue
{
public:
//==========================================================================
//==============================================================================
/** Default constructor. Constructs an MPEValue corresponding
to the centre value.
*/
@ -87,7 +87,7 @@ public:
bool operator!= (const MPEValue& other) const noexcept;
private:
//==========================================================================
//==============================================================================
MPEValue (int normalisedValue);
int normalisedValue;
};

View file

@ -144,7 +144,7 @@ bool MPEZone::truncateToFit (MPEZone other) noexcept
return true;
}
//==========================================================================
//==============================================================================
bool MPEZone::operator== (const MPEZone& other) const noexcept
{
return masterChannel == other.masterChannel
@ -284,7 +284,7 @@ public:
}
private:
//==========================================================================
//==============================================================================
void testOverlapsWith (int masterChannelFirst, int numNoteChannelsFirst,
int masterChannelSecond, int numNoteChannelsSecond,
bool expectedRetVal)
@ -296,7 +296,7 @@ private:
expect (second.overlapsWith (first) == expectedRetVal);
}
//==========================================================================
//==============================================================================
void testTruncateToFit (int masterChannelFirst, int numNoteChannelsFirst,
int masterChannelSecond, int numNoteChannelsSecond,
bool expectedRetVal,

View file

@ -127,7 +127,7 @@ struct JUCE_API MPEZone
bool operator!= (const MPEZone& other) const noexcept;
private:
//==========================================================================
//==============================================================================
int masterChannel;
int numNoteChannels;
int perNotePitchbendRange;

View file

@ -125,7 +125,7 @@ public:
*/
MPEZone* getZoneByNoteChannel (int midiChannel) const noexcept;
//==========================================================================
//==============================================================================
/** Listener class. Derive from this class to allow your class to be
notified about changes to the zone layout.
*/
@ -142,7 +142,7 @@ public:
virtual void zoneLayoutChanged (const MPEZoneLayout& layout) = 0;
};
//==========================================================================
//==============================================================================
/** Adds a listener. */
void addListener (Listener* const listenerToAdd) noexcept;
@ -150,7 +150,7 @@ public:
void removeListener (Listener* const listenerToRemove) noexcept;
private:
//==========================================================================
//==============================================================================
Array<MPEZone> zones;
MidiRPNDetector rpnDetector;
ListenerList<Listener> listeners;

View file

@ -29,7 +29,7 @@
#include "../juce_audio_basics/juce_audio_basics.h"
#include "../juce_audio_formats/juce_audio_formats.h"
//=============================================================================
//==============================================================================
/** Config: JUCE_ASIO
Enables ASIO audio devices (MS Windows only).
Turning this on means that you'll need to have the Steinberg ASIO SDK installed
@ -90,7 +90,7 @@
#endif
#endif
//=============================================================================
//==============================================================================
/** Config: JUCE_USE_CDREADER
Enables the AudioCDReader class (on supported platforms).
*/
@ -105,7 +105,7 @@
#define JUCE_USE_CDBURNER 0
#endif
//=============================================================================
//==============================================================================
namespace juce
{

View file

@ -368,7 +368,7 @@ public:
int minBufferSizeOut, minBufferSizeIn;
private:
//==================================================================================================
//==============================================================================
CriticalSection callbackLock;
AudioIODeviceCallback* callback;
jint sampleRate;

View file

@ -220,7 +220,7 @@ public:
}
private:
//==================================================================================================
//==============================================================================
CriticalSection callbackLock;
AudioIODeviceCallback* callback;
int actualBufferSize, sampleRate;
@ -242,7 +242,7 @@ private:
defaultBufferSizeIsMultipleOfNative = 1
};
//==================================================================================================
//==============================================================================
static String audioManagerGetProperty (const String& property)
{
const LocalRef<jstring> jProperty (javaString (property));
@ -281,7 +281,7 @@ private:
return androidHasSystemFeature ("android.hardware.audio.low_latency");
}
//==================================================================================================
//==============================================================================
AudioIODeviceCallback* setCallback (AudioIODeviceCallback* const newCallback)
{
const ScopedLock sl (callbackLock);
@ -331,7 +331,7 @@ private:
DBG ("Unable to set audio thread priority: priority is still " << priority);
}
//==================================================================================================
//==============================================================================
struct Engine
{
Engine()
@ -400,7 +400,7 @@ private:
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Engine)
};
//==================================================================================================
//==============================================================================
struct BufferList
{
BufferList (const int numChannels_, const int numBuffers_, const int numSamples_)
@ -444,7 +444,7 @@ private:
WaitableEvent dataArrived;
};
//==================================================================================================
//==============================================================================
struct Player
{
Player (int numChannels, int sampleRate, Engine& engine, int playerNumBuffers, int playerBufferSize)
@ -559,7 +559,7 @@ private:
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Player)
};
//==================================================================================================
//==============================================================================
struct Recorder
{
Recorder (int numChannels, int sampleRate, Engine& engine, const int numBuffers, const int numSamples)

View file

@ -26,7 +26,7 @@ class iOSAudioIODevice;
static const char* const iOSAudioDeviceName = "iOS Audio";
//==================================================================================================
//==============================================================================
struct AudioSessionHolder
{
AudioSessionHolder();
@ -76,7 +76,7 @@ bool getNotificationValueForKey (NSNotification* notification, NSString* key, NS
} // juce namespace
//==================================================================================================
//==============================================================================
@interface iOSAudioSessionNative : NSObject
{
@private
@ -180,7 +180,7 @@ bool getNotificationValueForKey (NSNotification* notification, NSString* key, NS
@end
//==================================================================================================
//==============================================================================
namespace juce {
#ifndef JUCE_IOS_AUDIO_LOGGING
@ -205,7 +205,7 @@ static void logNSError (NSError* e)
#define JUCE_NSERROR_CHECK(X) { NSError* error = nil; X; logNSError (error); }
//==================================================================================================
//==============================================================================
class iOSAudioIODevice : public AudioIODevice
{
public:
@ -473,7 +473,7 @@ public:
}
private:
//==================================================================================================
//==============================================================================
SharedResourcePointer<AudioSessionHolder> sessionHolder;
CriticalSection callbackLock;
NSTimeInterval sampleRate = 0;
@ -509,7 +509,7 @@ private:
}
}
//==================================================================================================
//==============================================================================
OSStatus process (AudioUnitRenderActionFlags* flags, const AudioTimeStamp* time,
const UInt32 numFrames, AudioBufferList* data)
{
@ -611,7 +611,7 @@ private:
updateSampleRateAndAudioInput();
}
//==================================================================================================
//==============================================================================
static OSStatus processStatic (void* client, AudioUnitRenderActionFlags* flags, const AudioTimeStamp* time,
UInt32 /*busNumber*/, UInt32 numFrames, AudioBufferList* data)
{
@ -619,7 +619,7 @@ private:
return static_cast<iOSAudioIODevice*> (client)->process (flags, time, numFrames, data);
}
//==================================================================================================
//==============================================================================
void resetFormat (const int numChannels) noexcept
{
zerostruct (format);
@ -743,7 +743,7 @@ AudioIODeviceType* AudioIODeviceType::createAudioIODeviceType_iOSAudio()
return new iOSAudioIODeviceType();
}
//==================================================================================================
//==============================================================================
AudioSessionHolder::AudioSessionHolder() { nativeSession = [[iOSAudioSessionNative alloc] init: this]; }
AudioSessionHolder::~AudioSessionHolder() { [nativeSession release]; }

View file

@ -27,7 +27,7 @@
#include "../juce_audio_basics/juce_audio_basics.h"
//=============================================================================
//==============================================================================
/** Config: JUCE_USE_FLAC
Enables the FLAC audio codec classes (available on all platforms).
If your app doesn't need to read FLAC files, you might want to disable this to
@ -81,7 +81,7 @@
#define JUCE_USE_WINDOWS_MEDIA_FORMAT 0
#endif
//=============================================================================
//==============================================================================
namespace juce
{

View file

@ -29,7 +29,7 @@
#include "../juce_audio_basics/juce_audio_basics.h"
//=============================================================================
//==============================================================================
/** Config: JUCE_PLUGINHOST_VST
Enables the VST audio plugin hosting classes. This requires the Steinberg VST SDK to be
installed on your machine.
@ -67,8 +67,8 @@
#define JUCE_SUPPORT_CARBON 1
#endif
//=============================================================================
//=============================================================================
//==============================================================================
//==============================================================================
namespace juce
{

View file

@ -112,7 +112,7 @@ public:
*/
void getChannelAsPath (Path& result, const Range<float>* levels, int numLevels, int nextSample);
//==========================================================================
//==============================================================================
/** @internal */
void paint (Graphics&) override;

View file

@ -30,7 +30,7 @@
#include "../juce_audio_formats/juce_audio_formats.h"
#include "../juce_audio_processors/juce_audio_processors.h"
//=============================================================================
//==============================================================================
namespace juce
{

View file

@ -64,7 +64,7 @@ struct AndroidBluetoothMidiInterface
return retval;
}
//==========================================================================
//==============================================================================
static bool pairBluetoothMidiDevice (const String& bluetoothAddress)
{
JNIEnv* env = getEnv();
@ -90,7 +90,7 @@ struct AndroidBluetoothMidiInterface
javaString (bluetoothAddress).get());
}
//==========================================================================
//==============================================================================
static String getHumanReadableStringForBluetoothAddress (const String& address)
{
JNIEnv* env = getEnv();
@ -111,7 +111,7 @@ struct AndroidBluetoothMidiInterface
return juceString (string);
}
//==========================================================================
//==============================================================================
static bool isBluetoothDevicePaired (const String& address)
{
JNIEnv* env = getEnv();
@ -166,7 +166,7 @@ class AndroidBluetoothMidiDevicesListBox : public ListBox,
private Timer
{
public:
//==========================================================================
//==============================================================================
AndroidBluetoothMidiDevicesListBox()
: timerPeriodInMs (1000)
{
@ -184,7 +184,7 @@ public:
}
private:
//==========================================================================
//==============================================================================
typedef AndroidBluetoothMidiDevice::ConnectionStatus DeviceStatus;
int getNumRows() override
@ -226,7 +226,7 @@ private:
}
}
//==========================================================================
//==============================================================================
static Colour getDeviceNameFontColour (DeviceStatus deviceStatus) noexcept
{
if (deviceStatus == AndroidBluetoothMidiDevice::offline)
@ -261,7 +261,7 @@ private:
return "Status unknown";
}
//==========================================================================
//==============================================================================
void listBoxItemClicked (int row, const MouseEvent&) override
{
const AndroidBluetoothMidiDevice& device = devices.getReference (row);
@ -278,7 +278,7 @@ private:
updateDeviceList();
}
//==========================================================================
//==============================================================================
struct PairDeviceThread : public Thread,
private AsyncUpdater
{
@ -310,7 +310,7 @@ private:
Component::SafePointer<AndroidBluetoothMidiDevicesListBox> owner;
};
//==========================================================================
//==============================================================================
void disconnectedDeviceClicked (int row)
{
stopTimer();
@ -332,7 +332,7 @@ private:
AndroidBluetoothMidiInterface::unpairBluetoothMidiDevice (device.bluetoothAddress);
}
//==========================================================================
//==============================================================================
void updateDeviceList()
{
StringArray bluetoothAddresses = AndroidBluetoothMidiInterface::getBluetoothMidiDevicesNearby();

View file

@ -25,7 +25,7 @@
#ifndef JUCE_BOX2D_H_INCLUDED
#define JUCE_BOX2D_H_INCLUDED
//=============================================================================
//==============================================================================
#include "../juce_graphics/juce_graphics.h"
#include "box2d/Box2D.h"

View file

@ -25,7 +25,7 @@
#ifndef JUCE_BOX2DRENDERER_H_INCLUDED
#define JUCE_BOX2DRENDERER_H_INCLUDED
//=============================================================================
//==============================================================================
/** A simple implementation of the b2Draw class, used to draw a Box2D world.
To use it, simply create an instance of this class in your paint() method,

View file

@ -41,7 +41,7 @@
#include "system/juce_TargetPlatform.h"
//=============================================================================
//==============================================================================
/** Config: JUCE_FORCE_DEBUG
Normally, JUCE_DEBUG is set to 1 or 0 based on compiler and project settings,
@ -51,7 +51,7 @@
//#define JUCE_FORCE_DEBUG 0
#endif
//=============================================================================
//==============================================================================
/** Config: JUCE_LOG_ASSERTIONS
If this flag is enabled, the jassert and jassertfalse macros will always use Logger::writeToLog()
@ -71,7 +71,7 @@
#endif
#endif
//=============================================================================
//==============================================================================
/** Config: JUCE_CHECK_MEMORY_LEAKS
Enables a memory-leak check for certain objects when the app terminates. See the LeakedObjectDetector
@ -81,7 +81,7 @@
#define JUCE_CHECK_MEMORY_LEAKS 1
#endif
//=============================================================================
//==============================================================================
/** Config: JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES
In a Visual C++ build, this can be used to stop the required system libs being
@ -130,8 +130,8 @@
#define JUCE_STRING_UTF_TYPE 8
#endif
//=============================================================================
//=============================================================================
//==============================================================================
//==============================================================================
#if JUCE_CORE_INCLUDE_NATIVE_HEADERS
#include "native/juce_BasicNativeHeaders.h"

View file

@ -39,7 +39,7 @@ template <typename FloatType>
class StatisticsAccumulator
{
public:
//==========================================================================
//==============================================================================
/** Constructs a new StatisticsAccumulator. */
StatisticsAccumulator() noexcept
: count (0),
@ -47,7 +47,7 @@ public:
maximum (-std::numeric_limits<FloatType>::infinity())
{}
//==========================================================================
//==============================================================================
/** Add a new value to the accumulator.
This will update all running statistics accordingly.
*/
@ -68,7 +68,7 @@ public:
*/
void reset() noexcept { *this = StatisticsAccumulator<FloatType>(); }
//==========================================================================
//==============================================================================
/** Returns the average (arithmetic mean) of all previously added values.
If no values have been added yet, this will return zero.
*/
@ -118,7 +118,7 @@ public:
}
private:
//==========================================================================
//==============================================================================
struct KahanSum
{
KahanSum() noexcept : sum(), error() {}
@ -135,7 +135,7 @@ private:
FloatType sum, error;
};
//==========================================================================
//==============================================================================
size_t count;
KahanSum sum, sumSquares;
FloatType minimum, maximum;

View file

@ -435,7 +435,7 @@ Result File::createDirectoryInternal (const String& fileName) const
return getResultForReturnValue (mkdir (fileName.toUTF8(), 0777));
}
//=====================================================================
//==============================================================================
int64 juce_fileSetPosition (void* handle, int64 pos)
{
if (handle != 0 && lseek (getFD (handle), pos, SEEK_SET) == pos)

View file

@ -440,7 +440,7 @@ Result ZipFile::uncompressEntry (const int index,
}
//=============================================================================
//==============================================================================
class ZipFile::Builder::Item
{
public:
@ -555,7 +555,7 @@ private:
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Item)
};
//=============================================================================
//==============================================================================
ZipFile::Builder::Builder() {}
ZipFile::Builder::~Builder() {}

View file

@ -25,7 +25,7 @@
#ifndef JUCE_CRYPTOGRAPHY_H_INCLUDED
#define JUCE_CRYPTOGRAPHY_H_INCLUDED
//=============================================================================
//==============================================================================
#include "../juce_core/juce_core.h"
namespace juce

View file

@ -25,7 +25,7 @@
#ifndef JUCE_DATA_STRUCTURES_H_INCLUDED
#define JUCE_DATA_STRUCTURES_H_INCLUDED
//=============================================================================
//==============================================================================
#include "../juce_events/juce_events.h"
namespace juce

View file

@ -25,7 +25,7 @@
#ifndef JUCE_EVENTS_H_INCLUDED
#define JUCE_EVENTS_H_INCLUDED
//=============================================================================
//==============================================================================
#include "../juce_core/juce_core.h"
namespace juce

View file

@ -28,7 +28,7 @@
#include "../juce_core/juce_core.h"
#include "../juce_events/juce_events.h"
//=============================================================================
//==============================================================================
/** Config: JUCE_USE_COREIMAGE_LOADER
On OSX, enabling this flag means that the CoreImage codecs will be used to load
@ -60,7 +60,7 @@
#define USE_COREGRAPHICS_RENDERING 1
#endif
//=============================================================================
//==============================================================================
namespace juce
{

View file

@ -190,7 +190,7 @@ namespace DirectWriteTypeLayout
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (CustomDirectWriteTextRenderer)
};
//==================================================================================================
//==============================================================================
static float getFontHeightToEmSizeFactor (IDWriteFont& dwFont)
{
ComSmartPtr<IDWriteFontFace> dwFontFace;

View file

@ -132,7 +132,7 @@ private:
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Direct2DFactories)
};
//==================================================================================================
//==============================================================================
class WindowsDirectWriteTypeface : public Typeface
{
public:

View file

@ -28,7 +28,7 @@
#include "../juce_graphics/juce_graphics.h"
#include "../juce_data_structures/juce_data_structures.h"
//=============================================================================
//==============================================================================
/** Config: JUCE_ENABLE_REPAINT_DEBUGGING
If this option is turned on, each area of the screen that gets repainted will
flash in a random colour, so that you can see exactly which bits of your
@ -80,7 +80,7 @@
#define JUCE_USE_XCURSOR 1
#endif
//=============================================================================
//==============================================================================
namespace juce
{

View file

@ -88,7 +88,7 @@ namespace ComponentBuilderHelpers
}
}
//=============================================================================
//==============================================================================
const Identifier ComponentBuilder::idProperty ("id");
ComponentBuilder::ComponentBuilder()

View file

@ -167,7 +167,7 @@ public:
/** Registers handlers for various standard juce components. */
void registerStandardComponentTypes();
//=============================================================================
//==============================================================================
/** This class is used when references to images need to be stored in ValueTrees.
An instance of an ImageProvider provides a mechanism for converting an Image to/from
@ -213,7 +213,7 @@ public:
/** Returns the current image provider that this builder is using, or nullptr if none has been set. */
ImageProvider* getImageProvider() const noexcept;
//=============================================================================
//==============================================================================
/** Updates the children of a parent component by updating them from the children of
a given ValueTree.
*/
@ -225,7 +225,7 @@ public:
static const Identifier idProperty;
private:
//=============================================================================
//==============================================================================
OwnedArray<TypeHandler> types;
ScopedPointer<Component> component;
ImageProvider* imageProvider;

View file

@ -2497,7 +2497,7 @@ public:
return currentScaleFactor;
}
//===============================================================================
//==============================================================================
void addOpenGLRepaintListener (Component* dummy)
{
if (dummy != nullptr)

View file

@ -28,7 +28,7 @@
#include "../juce_gui_basics/juce_gui_basics.h"
//=============================================================================
//==============================================================================
/** Config: JUCE_WEB_BROWSER
This lets you disable the WebBrowserComponent class (Mac and Windows).
If you're not using any embedded web-pages, turning this off may reduce your code size.
@ -47,7 +47,7 @@
#endif
#endif
//=============================================================================
//==============================================================================
namespace juce
{

View file

@ -81,7 +81,7 @@
#define JUCE_OPENGL3 1
#endif
//=============================================================================
//==============================================================================
/** This macro is a helper for use in GLSL shader code which needs to compile on both OpenGL 2.1 and OpenGL 3.0.
It's mandatory in OpenGL 3.0 to specify the GLSL version.
*/
@ -95,7 +95,7 @@
#define JUCE_GLSL_VERSION ""
#endif
//=============================================================================
//==============================================================================
#if JUCE_OPENGL_ES || defined (DOXYGEN)
/** This macro is a helper for use in GLSL shader code which needs to compile on both GLES and desktop GL.
Since it's mandatory in GLES to mark a variable with a precision, but the keywords don't exist in normal GLSL,
@ -120,7 +120,7 @@
#define JUCE_LOWP
#endif
//=============================================================================
//==============================================================================
namespace juce
{

View file

@ -29,7 +29,7 @@
#include "../juce_events/juce_events.h"
//=============================================================================
//==============================================================================
namespace juce
{

View file

@ -24,14 +24,14 @@
namespace
{
//==========================================================================
//==============================================================================
template <typename CharPointerType>
class OSCPatternMatcherImpl
{
typedef CharPointerType CharPtr;
public:
//==========================================================================
//==============================================================================
static bool match (CharPtr pattern, CharPtr patternEnd, CharPtr target, CharPtr targetEnd)
{
if (pattern == patternEnd)
@ -50,13 +50,13 @@ namespace
}
private:
//==========================================================================
//==============================================================================
static bool matchTerminator (CharPtr target, CharPtr targetEnd)
{
return target == targetEnd;
}
//==========================================================================
//==============================================================================
static bool matchChar (juce_wchar c, CharPtr pattern, CharPtr patternEnd, CharPtr target, CharPtr targetEnd)
{
if (target == targetEnd || c != target.getAndAdvance())
@ -65,7 +65,7 @@ namespace
return match (pattern, patternEnd, target, targetEnd);
}
//==========================================================================
//==============================================================================
static bool matchAnyChar (CharPtr pattern, CharPtr patternEnd, CharPtr target, CharPtr targetEnd)
{
if (target == targetEnd)
@ -74,7 +74,7 @@ namespace
return match (pattern, patternEnd, ++target, targetEnd);
}
//==========================================================================
//==============================================================================
static bool matchAnyOrNoChars (CharPtr pattern, CharPtr patternEnd, CharPtr target, CharPtr targetEnd)
{
if (target == targetEnd)
@ -86,7 +86,7 @@ namespace
return matchAnyOrNoChars (pattern, patternEnd, ++target, targetEnd);
}
//==========================================================================
//==============================================================================
static bool matchInsideStringSet (CharPtr pattern, CharPtr patternEnd, CharPtr target, CharPtr targetEnd)
{
if (pattern == patternEnd)
@ -123,7 +123,7 @@ namespace
return false;
}
//==========================================================================
//==============================================================================
static bool matchStringSet (const StringArray& set, CharPtr pattern,
CharPtr patternEnd, CharPtr target, CharPtr targetEnd)
{
@ -138,7 +138,7 @@ namespace
return false;
}
//==========================================================================
//==============================================================================
static bool matchInsideCharSet (CharPtr pattern, CharPtr patternEnd,
CharPtr target, CharPtr targetEnd)
{
@ -180,7 +180,7 @@ namespace
return false;
}
//==========================================================================
//==============================================================================
static bool matchCharSet (const Array<juce_wchar>& set, bool setIsNegated,
CharPtr pattern, CharPtr patternEnd, CharPtr target, CharPtr targetEnd)
{
@ -194,7 +194,7 @@ namespace
: matchCharSetNotNegated (set, pattern, patternEnd, target, targetEnd);
}
//==========================================================================
//==============================================================================
static bool matchCharSetNegated (const Array<juce_wchar>& set, CharPtr pattern,
CharPtr patternEnd, CharPtr target, CharPtr targetEnd)
{
@ -205,7 +205,7 @@ namespace
return match (pattern, patternEnd, target + 1, targetEnd);
}
//==========================================================================
//==============================================================================
static bool matchCharSetNotNegated (const Array<juce_wchar>& set, CharPtr pattern,
CharPtr patternEnd, CharPtr target, CharPtr targetEnd)
{
@ -217,7 +217,7 @@ namespace
return false;
}
//==========================================================================
//==============================================================================
static bool addCharRangeToSet (Array<juce_wchar>& set, CharPtr pattern,
CharPtr /*patternEnd*/, CharPtr target, CharPtr targetEnd)
{

View file

@ -45,7 +45,7 @@
class JUCE_API OSCAddress
{
public:
//==========================================================================
//==============================================================================
/** Constructs a new OSCAddress from a String.
@throw OSCFormatError if the string is not a valid OSC address.
*/
@ -95,7 +95,7 @@ private:
class JUCE_API OSCAddressPattern
{
public:
//==========================================================================
//==============================================================================
/** Constructs a new OSCAddressPattern from a String.
@throw OSCFormatError if the string is not a valid OSC address pattern.
*/
@ -140,7 +140,7 @@ public:
private:
//==========================================================================
//==============================================================================
StringArray oscSymbols;
String asString;
bool wasInitialisedWithWildcards;

View file

@ -63,7 +63,7 @@ public:
class Element
{
public:
//==========================================================================
//==============================================================================
/** Constructs an OSCBundle Element from an OSCMessage. */
Element (OSCMessage message);
@ -93,7 +93,7 @@ public:
const OSCBundle& getBundle() const;
private:
//==========================================================================
//==============================================================================
ScopedPointer<OSCMessage> message;
ScopedPointer<OSCBundle> bundle;
};

View file

@ -159,7 +159,7 @@ private:
};
//==================================================================================
//==============================================================================
#if JUCE_COMPILER_SUPPORTS_VARIADIC_TEMPLATES && JUCE_COMPILER_SUPPORTS_MOVE_SEMANTICS
template <typename Arg1, typename... Args>
OSCMessage::OSCMessage (const OSCAddressPattern& ap, Arg1&& arg1, Args&&... args)

View file

@ -24,7 +24,7 @@
namespace
{
//==========================================================================
//==============================================================================
/** Allows a block of data to be accessed as a stream of OSC data.
The memory is shared and will be neither copied nor owned by the OSCInputStream.
@ -47,7 +47,7 @@ namespace
: input (sourceData, sourceDataSize, false)
{}
//======================================================================
//==============================================================================
/** Returns a pointer to the source data block from which this stream is reading. */
const void* getData() const noexcept { return input.getData(); }
@ -66,7 +66,7 @@ namespace
/** Returns true if the stream has no more data to read. */
bool isExhausted() { return input.isExhausted(); }
//======================================================================
//==============================================================================
int32 readInt32()
{
if (input.getNumBytesRemaining() < 4)
@ -145,7 +145,7 @@ namespace
return OSCAddressPattern (readString());
}
//======================================================================
//==============================================================================
OSCTypeList readTypeTagString()
{
OSCTypeList typeList;
@ -178,7 +178,7 @@ namespace
return typeList;
}
//==========================================================================
//==============================================================================
OSCArgument readArgument (OSCType type)
{
switch (type)
@ -195,7 +195,7 @@ namespace
}
}
//======================================================================
//==============================================================================
OSCMessage readMessage()
{
OSCAddressPattern ap = readAddressPattern();
@ -209,7 +209,7 @@ namespace
return msg;
}
//======================================================================
//==============================================================================
OSCBundle readBundle()
{
if (input.getNumBytesRemaining() < 16)
@ -226,7 +226,7 @@ namespace
return bundle;
}
//======================================================================
//==============================================================================
OSCBundle::Element readElement()
{
if (input.getNumBytesRemaining() < 4)
@ -240,7 +240,7 @@ namespace
return readElementWithKnownSize (elementSize);
}
//======================================================================
//==============================================================================
OSCBundle::Element readElementWithKnownSize (size_t elementSize)
{
if ((uint64) input.getNumBytesRemaining() < elementSize)
@ -257,7 +257,7 @@ namespace
private:
MemoryInputStream input;
//======================================================================
//==============================================================================
void readPaddingZeros (size_t bytesRead)
{
size_t numZeros = ~(bytesRead - 1) & 0x03;
@ -312,7 +312,7 @@ struct OSCReceiver::Pimpl : private Thread,
disconnect();
}
//==========================================================================
//==============================================================================
bool connectToPort (int portNum)
{
if (! disconnect())
@ -340,7 +340,7 @@ struct OSCReceiver::Pimpl : private Thread,
return true;
}
//==========================================================================
//==============================================================================
void addListener (Listener<MessageLoopCallback>* listenerToAdd)
{
listeners.add (listenerToAdd);
@ -383,7 +383,7 @@ struct OSCReceiver::Pimpl : private Thread,
removeListenerWithAddress (listenerToRemove, realtimeListenersWithAddress);
}
//==========================================================================
//==============================================================================
struct CallbackMessage : public Message
{
CallbackMessage (OSCBundle::Element oscElement) : content (oscElement) {}
@ -392,7 +392,7 @@ struct OSCReceiver::Pimpl : private Thread,
OSCBundle::Element content;
};
//==========================================================================
//==============================================================================
void handleBuffer (const char* data, size_t dataSize)
{
OSCInputStream inStream (data, dataSize);
@ -420,14 +420,14 @@ struct OSCReceiver::Pimpl : private Thread,
}
}
//==========================================================================
//==============================================================================
void registerFormatErrorHandler (OSCReceiver::FormatErrorHandler handler)
{
formatErrorHandler = handler;
}
private:
//==========================================================================
//==============================================================================
void run() override
{
while (! threadShouldExit())
@ -446,7 +446,7 @@ private:
}
}
//==========================================================================
//==============================================================================
template <typename ListenerType>
void addListenerWithAddress (ListenerType* listenerToAdd,
OSCAddress address,
@ -459,7 +459,7 @@ private:
array.add (std::make_pair (address, listenerToAdd));
}
//==========================================================================
//==============================================================================
template <typename ListenerType>
void removeListenerWithAddress (ListenerType* listenerToRemove,
Array<std::pair<OSCAddress, ListenerType*> >& array)
@ -478,7 +478,7 @@ private:
}
}
//==========================================================================
//==============================================================================
void handleMessage (const Message& msg) override
{
if (const CallbackMessage* callbackMessage = dynamic_cast<const CallbackMessage*> (&msg))
@ -492,7 +492,7 @@ private:
}
}
//==========================================================================
//==============================================================================
void callListeners (const OSCBundle::Element& content)
{
typedef OSCReceiver::Listener<OSCReceiver::MessageLoopCallback> Listener;
@ -513,7 +513,7 @@ private:
realtimeListeners.call (&Listener::oscBundleReceived, content.getBundle());
}
//==========================================================================
//==============================================================================
void callListenersWithAddress (const OSCMessage& message)
{
typedef OSCReceiver::ListenerWithOSCAddress<OSCReceiver::MessageLoopCallback> Listener;
@ -542,7 +542,7 @@ private:
}
}
//==========================================================================
//==============================================================================
ListenerList<OSCReceiver::Listener<OSCReceiver::MessageLoopCallback> > listeners;
ListenerList<OSCReceiver::Listener<OSCReceiver::RealtimeCallback> > realtimeListeners;

View file

@ -37,14 +37,14 @@
class JUCE_API OSCReceiver
{
public:
//==========================================================================
//==============================================================================
/** Constructs a new OSCReceiver. */
OSCReceiver();
/** Destructor. */
~OSCReceiver();
//==========================================================================
//==============================================================================
/** Connects to the specified UDP port using a datagram socket,
and starts listening to OSC packets arriving on this port.
@ -52,14 +52,14 @@ public:
*/
bool connect (int portNumber);
//==========================================================================
//==============================================================================
/** Disconnects from the currently used UDP port.
@returns true if the disconnection was successful; false otherwise.
*/
bool disconnect();
//==========================================================================
//==============================================================================
/** Use this struct as the template parameter for Listener and
ListenerWithOSCAddress to receive incoming OSC data on the message thread.
This should be used by OSC callbacks that are not realtime-critical, but
@ -79,7 +79,7 @@ public:
*/
struct JUCE_API RealtimeCallback {};
//==========================================================================
//==============================================================================
/** A class for receiving OSC data from an OSCReceiver.
The template argument CallbackType determines how the callback will be called
@ -109,7 +109,7 @@ public:
virtual void oscBundleReceived (const OSCBundle& /*bundle*/) {}
};
//==========================================================================
//==============================================================================
/** A class for receiving only those OSC messages from an OSCReceiver that match a
given OSC address.
@ -143,7 +143,7 @@ public:
virtual void oscMessageReceived (const OSCMessage& message) = 0;
};
//==========================================================================
//==============================================================================
/** Adds a listener that listens to OSC messages and bundles.
This listener will be called on the application's message loop.
*/
@ -203,7 +203,7 @@ public:
void registerFormatErrorHandler (FormatErrorHandler handler);
private:
//==========================================================================
//==============================================================================
struct Pimpl;
friend struct Pimpl;
friend struct ContainerDeletePolicy<Pimpl>;

View file

@ -43,7 +43,7 @@ namespace
/** Returns the number of bytes of data that have been written to the stream. */
size_t getDataSize() const noexcept { return output.getDataSize(); }
//==========================================================================
//==============================================================================
bool writeInt32 (int32 value)
{
return output.writeIntBigEndian (value);
@ -126,7 +126,7 @@ namespace
}
}
//==========================================================================
//==============================================================================
bool writeMessage (const OSCMessage& msg)
{
if (! writeAddressPattern (msg.getAddressPattern()))
@ -162,7 +162,7 @@ namespace
return true;
}
//==========================================================================
//==============================================================================
bool writeBundleElement (const OSCBundle::Element& element)
{
const int64 startPos = output.getPosition();
@ -204,7 +204,7 @@ struct OSCSender::Pimpl
Pimpl() noexcept : targetPortNumber (0) {}
~Pimpl() noexcept { disconnect(); }
//==========================================================================
//==============================================================================
bool connect (const String& newTargetHost, int newTargetPort)
{
if (! disconnect())
@ -227,7 +227,7 @@ struct OSCSender::Pimpl
return true;
}
//==========================================================================
//==============================================================================
bool send (const OSCMessage& message, const String& hostName, int portNumber)
{
OSCOutputStream outStream;
@ -246,7 +246,7 @@ struct OSCSender::Pimpl
bool send (const OSCBundle& bundle) { return send (bundle, targetHostName, targetPortNumber); }
private:
//==========================================================================
//==============================================================================
bool sendOutputStream (OSCOutputStream& outStream, const String& hostName, int portNumber)
{
if (socket != nullptr)
@ -265,7 +265,7 @@ private:
return false;
}
//==========================================================================
//==============================================================================
ScopedPointer<DatagramSocket> socket;
String targetHostName;
int targetPortNumber;

View file

@ -36,14 +36,14 @@
class JUCE_API OSCSender
{
public:
//==========================================================================
//==============================================================================
/** Constructs a new OSCSender. */
OSCSender();
/** Destructor. */
~OSCSender();
//==========================================================================
//==============================================================================
/** Connects to a datagram socket and prepares the socket for sending OSC
packets to the specified target.
@ -60,7 +60,7 @@ public:
*/
bool connect (const String& targetHostName, int targetPortNumber);
//==========================================================================
//==============================================================================
/** Disconnects from the currently used UDP port.
@returns true if the disconnection was successful; false otherwise.
@ -68,7 +68,7 @@ public:
*/
bool disconnect();
//==========================================================================
//==============================================================================
/** Sends an OSC message to the target.
@param message The OSC message to send.
@returns true if the operation was successful.
@ -127,7 +127,7 @@ public:
#endif
private:
//==========================================================================
//==============================================================================
struct Pimpl;
friend struct Pimpl;
friend struct ContainerDeletePolicy<Pimpl>;
@ -137,7 +137,7 @@ private:
};
//==========================================================================
//==============================================================================
#if JUCE_COMPILER_SUPPORTS_VARIADIC_TEMPLATES && JUCE_COMPILER_SUPPORTS_MOVE_SEMANTICS
template <typename... Args>
bool OSCSender::send (const OSCAddressPattern& address, Args&&... args)

View file

@ -36,7 +36,7 @@
own compatible web-server back-end.
*/
//=============================================================================
//==============================================================================
#include "../juce_cryptography/juce_cryptography.h"
#include "../juce_data_structures/juce_data_structures.h"

View file

@ -25,10 +25,10 @@
#ifndef JUCE_VIDEO_H_INCLUDED
#define JUCE_VIDEO_H_INCLUDED
//=============================================================================
//==============================================================================
#include "../juce_gui_extra/juce_gui_extra.h"
//=============================================================================
//==============================================================================
/** Config: JUCE_DIRECTSHOW
Enables DirectShow media-streaming architecture (MS Windows only).
*/
@ -69,7 +69,7 @@
#undef JUCE_USE_CAMERA
#endif
//=============================================================================
//==============================================================================
namespace juce
{

View file

@ -30,7 +30,7 @@ namespace DirectShowHelpers
return SUCCEEDED (graph.CoCreateInstance (CLSID_FilterGraph));
}
//======================================================================
//==============================================================================
class VideoRenderer
{
public:
@ -47,7 +47,7 @@ namespace DirectShowHelpers
virtual HRESULT getVideoSize (long& videoWidth, long& videoHeight) = 0;
};
//======================================================================
//==============================================================================
class VMR7 : public VideoRenderer
{
public:
@ -107,7 +107,7 @@ namespace DirectShowHelpers
};
//======================================================================
//==============================================================================
#if JUCE_MEDIAFOUNDATION
class EVR : public VideoRenderer
{
@ -171,7 +171,7 @@ namespace DirectShowHelpers
}
//======================================================================
//==============================================================================
class DirectShowComponent::DirectShowContext : public AsyncUpdater
{
public:
@ -206,7 +206,7 @@ public:
CoUninitialize();
}
//======================================================================
//==============================================================================
void updateWindowPosition (const Rectangle<int>& newBounds)
{
nativeWindow->setWindowPosition (newBounds);
@ -217,7 +217,7 @@ public:
nativeWindow->showWindow (shouldBeVisible);
}
//======================================================================
//==============================================================================
void repaint()
{
if (hasVideo)
@ -236,7 +236,7 @@ public:
videoRenderer->displayModeChanged();
}
//======================================================================
//==============================================================================
void peerChanged()
{
deleteNativeWindow();
@ -288,7 +288,7 @@ public:
triggerAsyncUpdate();
}
//======================================================================
//==============================================================================
bool loadFile (const String& fileOrURLPath)
{
jassert (state == uninitializedState);
@ -432,7 +432,7 @@ public:
}
}
//======================================================================
//==============================================================================
void run()
{
mediaControl->Run();
@ -451,7 +451,7 @@ public:
state = pausedState;
}
//======================================================================
//==============================================================================
bool isInitialised() const noexcept { return state != uninitializedState; }
bool isRunning() const noexcept { return state == runningState; }
bool isPaused() const noexcept { return state == pausedState; }
@ -460,7 +460,7 @@ public:
int getVideoWidth() const noexcept { return (int) videoWidth; }
int getVideoHeight() const noexcept { return (int) videoHeight; }
//======================================================================
//==============================================================================
double getDuration() const
{
REFTIME duration;
@ -475,7 +475,7 @@ public:
return seconds;
}
//======================================================================
//==============================================================================
void setSpeed (const float newSpeed) { mediaPosition->put_Rate (newSpeed); }
void setPosition (const double seconds) { mediaPosition->put_CurrentPosition (seconds); }
void setVolume (const float newVolume) { basicAudio->put_Volume (convertToDShowVolume (newVolume)); }
@ -497,7 +497,7 @@ public:
}
private:
//======================================================================
//==============================================================================
enum { graphEventID = WM_APP + 0x43f0 };
DirectShowComponent& component;
@ -523,7 +523,7 @@ private:
bool needToUpdateViewport, needToRecreateNativeWindow;
//======================================================================
//==============================================================================
class NativeWindowClass : private DeletedAtShutdown
{
public:
@ -585,7 +585,7 @@ private:
JUCE_DECLARE_NON_COPYABLE (NativeWindowClass)
};
//======================================================================
//==============================================================================
class NativeWindow
{
public:
@ -646,7 +646,7 @@ private:
ScopedPointer<NativeWindow> nativeWindow;
//======================================================================
//==============================================================================
bool createNativeWindow()
{
jassert (nativeWindow == nullptr);
@ -727,7 +727,7 @@ private:
juce_ImplementSingleton_SingleThreaded (DirectShowComponent::DirectShowContext::NativeWindowClass)
//======================================================================
//==============================================================================
class DirectShowComponent::DirectShowComponentWatcher : public ComponentMovementWatcher
{
public:
@ -762,7 +762,7 @@ private:
};
//======================================================================
//==============================================================================
DirectShowComponent::DirectShowComponent (VideoRendererType type)
: videoLoaded (false),
looping (false)
@ -811,7 +811,7 @@ void DirectShowComponent::paint (Graphics& g)
g.fillAll (Colours::grey);
}
//======================================================================
//==============================================================================
bool DirectShowComponent::loadMovie (const String& fileOrURLPath)
{
closeMovie();
@ -846,7 +846,7 @@ void DirectShowComponent::closeMovie()
videoPath.clear();
}
//======================================================================
//==============================================================================
File DirectShowComponent::getCurrentMoviePath() const { return videoPath; }
bool DirectShowComponent::isMovieOpen() const { return videoLoaded; }
double DirectShowComponent::getMovieDuration() const { return videoLoaded ? context->getDuration() : 0.0; }
@ -859,7 +859,7 @@ void DirectShowComponent::getMovieNormalSize (int &width, int &height) const
height = context->getVideoHeight();
}
//======================================================================
//==============================================================================
void DirectShowComponent::setBoundsWithCorrectAspectRatio (const Rectangle<int>& spaceToFitWithin,
RectanglePlacement placement)
{
@ -874,7 +874,7 @@ void DirectShowComponent::setBoundsWithCorrectAspectRatio (const Rectangle<int>&
setBounds (spaceToFitWithin);
}
//======================================================================
//==============================================================================
void DirectShowComponent::play()
{
if (videoLoaded)