Revision 71887484
Added by Leszek Koltunski almost 8 years ago
src/main/java/org/distorted/library/EffectQueueFragment.java | ||
---|---|---|
24 | 24 |
mBuf= new float[4*mMax[INDEX]]; |
25 | 25 |
} |
26 | 26 |
} |
27 |
|
|
28 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
29 |
// Only max Byte.MAX_VALUE concurrent effects per bitmap. |
|
30 |
// If you want more, change type of the mNumEffects, mIDIndex and mFreeIndexes variables to shorts. |
|
31 |
|
|
32 |
static boolean setMax(int m) |
|
33 |
{ |
|
34 |
if( (mCreated==false && !Distorted.isInitialized()) || m<=mMax[INDEX] ) |
|
35 |
{ |
|
36 |
if( m<0 ) m = 0; |
|
37 |
else if( m>Byte.MAX_VALUE ) m = Byte.MAX_VALUE; |
|
38 |
|
|
39 |
mMax[INDEX] = m; |
|
40 |
return true; |
|
41 |
} |
|
42 |
|
|
43 |
return false; |
|
44 |
} |
|
45 |
|
|
46 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
47 |
|
|
48 |
static int getMax() |
|
49 |
{ |
|
50 |
return mMax[INDEX]; |
|
51 |
} |
|
52 | 27 |
|
53 | 28 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
54 | 29 |
|
Also available in: Unified diff
abstract setMax and getMax to EffectQueue.