mirror of
https://github.com/boldsuck/haveno.git
synced 2025-01-07 00:30:08 +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
|
// get original format
|
||||||
AudioFormat baseFormat = audioInputStream.getFormat();
|
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 targetFormat = new AudioFormat(
|
||||||
AudioFormat.Encoding.PCM_SIGNED,
|
AudioFormat.Encoding.PCM_SIGNED,
|
||||||
baseFormat.getSampleRate(),
|
44100.0f,
|
||||||
16, // 16-bit instead of 32-bit float
|
16, // 16-bit instead of 32-bit float
|
||||||
baseFormat.getChannels(),
|
baseFormat.getChannels(),
|
||||||
baseFormat.getChannels() * 2, // Frame size: 2 bytes per channel (16-bit)
|
baseFormat.getChannels() * 2, // Frame size: 2 bytes per channel (16-bit)
|
||||||
baseFormat.getSampleRate(),
|
44100.0f,
|
||||||
false // Little-endian
|
false // Little-endian
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue