jjdh API

dh.javax.sound
Class BufferStrategy.BufferCompressed

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

public static class BufferStrategy.BufferCompressed
extends Object
implements BufferStrategy

Will store the compressed audio.

Positive: Don't depend on the speed of the underlying input stream.

Negative: Needs much more memory as streaming, but needs still cpu Time to decode the audio

This approch should be used for often used and not too big sound files.


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 basicFormat
           
private  ByteBuffer byteBuffer
           
private  AudioFormat rawFormat
           
private  long samples
           
 
Constructor Summary
BufferStrategy.BufferCompressed(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

basicFormat

private final AudioFormat basicFormat

rawFormat

private final AudioFormat rawFormat

samples

private final long samples

byteBuffer

private final ByteBuffer byteBuffer
Constructor Detail

BufferStrategy.BufferCompressed

public BufferStrategy.BufferCompressed(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.