Skip to content

Commit

Permalink
Remove the audio only in debug mode
Browse files Browse the repository at this point in the history
  • Loading branch information
imaNNeo committed Nov 11, 2024
1 parent cbe1c8d commit 0da75f8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/audio_helper.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'package:flutter/foundation.dart';
import 'package:flutter_soloud/flutter_soloud.dart';

class AudioHelper {
Expand All @@ -15,7 +16,9 @@ class AudioHelper {
_backgroundSource = await _soLoud.loadAsset('assets/audio/background.mp3');
_scoreSource = await _soLoud.loadAsset('assets/audio/score.mp3');

_soLoud.setGlobalVolume(0.0);
if (kDebugMode) {
_soLoud.setGlobalVolume(0.0);
}
}

void playBackgroundAudio() async {
Expand Down

0 comments on commit 0da75f8

Please sign in to comment.