1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00
This commit is contained in:
jules 2007-07-06 12:06:12 +00:00
parent 5e540c3a6a
commit 7ee377a45d
3 changed files with 12 additions and 8 deletions

View file

@ -161,7 +161,7 @@ void Synthesiser::renderNextBlock (AudioSampleBuffer& outputBuffer,
MidiBuffer::Iterator midiIterator (midiData);
midiIterator.setNextSamplePosition (startSample);
MidiMessage m (0x90, 0.0);
MidiMessage m (0xf4, 0.0);
while (numSamples > 0)
{

View file

@ -311,6 +311,8 @@ public:
*/
int indexOf (const ElementType elementToLookFor) const throw()
{
int result = -1;
lock.enter();
const ElementType* e = this->elements;
@ -318,15 +320,15 @@ public:
{
if (elementToLookFor == *e)
{
lock.exit();
return (int)(e - this->elements);
result = (int) (e - this->elements);
break;
}
++e;
}
lock.exit();
return -1;
return result;
}
/** Returns true if the array contains at least one occurrence of an object.
@ -830,7 +832,7 @@ public:
@param howManyToRemove how many elements to remove from the end of the array
@see remove, removeValue, removeRange
*/
void removeLast (int howManyToRemove = 1) throw()
void removeLast (const int howManyToRemove = 1) throw()
{
lock.enter();
numUsed = jmax (0, numUsed - howManyToRemove);

View file

@ -183,6 +183,8 @@ public:
*/
int indexOf (const ObjectClass* const objectToLookFor) const throw()
{
int result = -1;
lock.enter();
ObjectClass* const* e = this->elements;
@ -190,15 +192,15 @@ public:
{
if (objectToLookFor == *e)
{
lock.exit();
return (int) (e - this->elements);
result = (int) (e - this->elements);
break;
}
++e;
}
lock.exit();
return -1;
return result;
}
/** Returns true if the array contains a specified object.