Skip to content

Commit

Permalink
fix: fix issue where sound or music is not muted
Browse files Browse the repository at this point in the history
  • Loading branch information
jamsinclair committed Jun 10, 2023
1 parent a7f11ba commit 82e95eb
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/sdl/sound.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ const sounds: ArrayBuffer[] = [];
const channels: Smp[][] = [];
const tracks: Mod[] = [];
let currentTrack: MOD | null = null;
const main_info = context.info;
const getCurrentTrack = () => tracks[currentTrack] ?? null;

const SAFE_MIN_SAMPLE_RATE = 8000;
Expand Down Expand Up @@ -43,7 +42,7 @@ export function dj_play_sfx(
delay: number,
channel: number
) {
if (main_info.music_no_sound || main_info.no_sound) {
if (context.info.music_no_sound || context.info.no_sound) {
return;
}

Expand Down Expand Up @@ -84,7 +83,7 @@ export function dj_set_nosound(enable: number) {
}

export function dj_start_mod() {
if (main_info.no_sound) {
if (context.info.no_sound) {
return;
}

Expand Down Expand Up @@ -120,7 +119,7 @@ export function dj_ready_mod(mod_type: MOD) {
}

export function dj_set_mod_volume(volume: number) {
if (main_info.no_sound) {
if (context.info.no_sound) {
return;
}

Expand Down

1 comment on commit 82e95eb

@vercel
Copy link

@vercel vercel bot commented on 82e95eb Jun 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.