public interface ConstSoundBuffer extends Const
SoundBuffer
.
It is not recommended to be implemented outside of the JSFML API.Const
Modifier and Type | Method and Description |
---|---|
int |
getChannelCount()
Gets the amount of audio channels in the buffer
(e.g.
|
Time |
getDuration()
Gets the duration of the sound.
|
int |
getSampleCount()
Retrieves the amount of samples stored in the buffer.
|
int |
getSampleRate()
Gets the sound buffer's sample rate in samples per second.
|
short[] |
getSamples()
Retrieves the raw 16-bit audio samples stored in the buffer.
|
void |
saveToFile(Path path)
Attempts to save the sound buffer to a file.
|
void saveToFile(Path path) throws IOException
path
- the path to the file to write.IOException
- in case saving failed.short[] getSamples()
int getSampleCount()
int getSampleRate()
int getChannelCount()
Time getDuration()