Permalink
Browse files

Fixed stupid loop bug in Mixer

  • Loading branch information...
finnkuusisto committed Feb 29, 2012
1 parent 121d5d6 commit dd87ccd1ff84edf0617d596c6fb7392d6861ce41
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/kuusisto/tinysound/internal/Mixer.java
@@ -117,7 +117,7 @@ public synchronized int read(byte[] data, int offset, int length) {
}
int numRead = 0;
boolean bytesRead = true; //terminate early if out of bytes
- for (int i = offset; i < length && bytesRead; i += 4) {
+ for (int i = offset; i < (length + offset) && bytesRead; i += 4) {
//first assume we are done
bytesRead = false;
//need to track value across audio sources

0 comments on commit dd87ccd

Please sign in to comment.