Skip to content

Commit 6c75e7a

Browse files
committed
Changed default sample rate to 48kHz due to it being better dividable
1 parent 1a65165 commit 6c75e7a

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/main/java/net/raphimc/noteblocktool/audio/soundsystem/impl/BassSoundSystem.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ private BassSoundSystem(final int maxSounds) {
6868
if (((version >> 16) & 0xFFFF) != BassLibrary.BASSVERSION) {
6969
throw new RuntimeException("BASS version is not correct");
7070
}
71-
if (!BassLibrary.INSTANCE.BASS_Init(-1, 44100, 0, 0, null)) {
71+
if (!BassLibrary.INSTANCE.BASS_Init(-1, 48000, 0, 0, null)) {
7272
this.checkError("Could not open device");
7373
}
7474
final BassLibrary.BASS_DEVICEINFO.ByReference deviceInfo = new BassLibrary.BASS_DEVICEINFO.ByReference();

src/main/java/net/raphimc/noteblocktool/audio/soundsystem/impl/JavaxSoundSystem.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
public class JavaxSoundSystem extends SoundSystem {
3434

35-
private static final AudioFormat FORMAT = new AudioFormat(44100, 16, 2, true, false);
35+
private static final AudioFormat FORMAT = new AudioFormat(48000, 16, 2, true, false);
3636

3737
protected final Map<String, int[]> sounds;
3838
protected final List<SoundInstance> playingSounds = new ArrayList<>();

src/main/java/net/raphimc/noteblocktool/frames/ExportFrame.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public class ExportFrame extends JFrame {
6161
private final JLabel soundSystemLabel = new JLabel("Sound System:");
6262
private final JComboBox<String> soundSystem = new JComboBox<>(new String[]{"OpenAL (better sound quality)", "Javax (parallel capable, normalized)"});
6363
private final JLabel sampleRateLabel = new JLabel("Sample Rate:");
64-
private final JSpinner sampleRate = new JSpinner(new SpinnerNumberModel(44_100, 8_000, 192_000, 1_000));
64+
private final JSpinner sampleRate = new JSpinner(new SpinnerNumberModel(48000, 8000, 192000, 8000));
6565
private final JLabel bitDepthLabel = new JLabel("PCM Bit Depth:");
6666
private final JComboBox<String> bitDepth = new JComboBox<>(new String[]{"PCM 8", "PCM 16", "PCM 32"});
6767
private final JLabel channelsLabel = new JLabel("Channels:");

0 commit comments

Comments
 (0)