jjdh API

dh.javax.sound
Class BufferStrategy.BufferUncompressed

java.lang.Object
  extended by dh.javax.sound.BufferStrategy.BufferUncompressed
All Implemented Interfaces:
BufferStrategy
Enclosing interface:
BufferStrategy

public static class BufferStrategy.BufferUncompressed
extends Object
implements BufferStrategy

Will store the uncompressed audio.

Positive: Needs extremly little cpu Time and don't depend on the speed of the underlying input stream.

Negative: Needs very much memory.

This approch should be used for very often used and little sound files (for example rifle fire).


Nested Class Summary
 
Nested classes/interfaces inherited from interface dh.javax.sound.BufferStrategy
BufferStrategy.BufferCompressed, BufferStrategy.BufferUncompressed, BufferStrategy.OldBufferUncompressed, BufferStrategy.Stream
 
Field Summary
private  AudioFormat audioFormat
           
private  ByteBuffer byteBuffer
           
private  long samples
           
 
Constructor Summary
BufferStrategy.BufferUncompressed(AudioInput ai)
           
 
Method Summary
 AudioInputStream getAudioInputStream()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

audioFormat

private final AudioFormat audioFormat

samples

private final long samples

byteBuffer

private final ByteBuffer byteBuffer
Constructor Detail

BufferStrategy.BufferUncompressed

public BufferStrategy.BufferUncompressed(AudioInput ai)
Method Detail

getAudioInputStream

public AudioInputStream getAudioInputStream()
Specified by:
getAudioInputStream in interface BufferStrategy

jjdh API

Copyright © 2006 Jonas Jacobi and Dennis Heidsiek. All Rights Reserved.