Skip to content

Commit

Permalink
improve sound compatibility for linux
Browse files Browse the repository at this point in the history
  • Loading branch information
woodser committed Oct 14, 2024
1 parent 6b3e9fe commit 7ccd546
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/src/main/java/haveno/core/trade/HavenoUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -575,14 +575,14 @@ private static void playAudioFile(String fileName) {
// 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
);

Expand Down

0 comments on commit 7ccd546

Please sign in to comment.