Mercurial > hg > ristipolku
comparison game/SoundManager.java @ 110:3551b61b3c0b
Increase buffer size a bit.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 03 Mar 2011 23:26:12 +0200 |
parents | dd896bc7352b |
children | 4c0dec72e2f0 |
comparison
equal
deleted
inserted
replaced
109:84935674c1c9 | 110:3551b61b3c0b |
---|---|
243 } | 243 } |
244 | 244 |
245 | 245 |
246 // use a short, 100ms (1/10th sec) buffer for filters that | 246 // use a short, 100ms (1/10th sec) buffer for filters that |
247 // change in real-time | 247 // change in real-time |
248 int bufferSize = playbackFormat.getFrameSize() * Math.round(playbackFormat.getSampleRate() / 20); | 248 int bufferSize = playbackFormat.getFrameSize() * Math.round(playbackFormat.getSampleRate() / 10); |
249 | 249 |
250 // create, open, and start the line | 250 // create, open, and start the line |
251 SourceDataLine line; | 251 SourceDataLine line; |
252 DataLine.Info lineInfo = new DataLine.Info(SourceDataLine.class, playbackFormat); | 252 DataLine.Info lineInfo = new DataLine.Info(SourceDataLine.class, playbackFormat); |
253 | 253 |