mirror of
https://github.com/boldsuck/haveno.git
synced 2024-12-22 12:09:22 +00:00
improve sound compatibility for linux
This commit is contained in:
parent
a00930aa9e
commit
072401386e
1 changed files with 3 additions and 3 deletions
|
@ -575,14 +575,14 @@ public class HavenoUtils {
|
|||
// get original format
|
||||
AudioFormat baseFormat = audioInputStream.getFormat();
|
||||
|
||||
// set target format: PCM_SIGNED, 16-bit
|
||||
// set target format: PCM_SIGNED, 16-bit, 44100 Hz
|
||||
AudioFormat targetFormat = new AudioFormat(
|
||||
AudioFormat.Encoding.PCM_SIGNED,
|
||||
baseFormat.getSampleRate(),
|
||||
44100.0f,
|
||||
16, // 16-bit instead of 32-bit float
|
||||
baseFormat.getChannels(),
|
||||
baseFormat.getChannels() * 2, // Frame size: 2 bytes per channel (16-bit)
|
||||
baseFormat.getSampleRate(),
|
||||
44100.0f,
|
||||
false // Little-endian
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in a new issue