mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-02-26 17:31:27 -05:00
improve sound compatibility for linux
This commit is contained in:
parent
a00930aa9e
commit
072401386e
@ -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…
x
Reference in New Issue
Block a user