Skip to content

Commit

Permalink
Add Sounds
Browse files Browse the repository at this point in the history
  • Loading branch information
MjKey authored Sep 11, 2024
1 parent 76cb4c6 commit 870dcf9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ class _MainScreenState extends State<MainScreen> {
String _socketUrl = 'https://socket5.donationalerts.ru';
SocketService? _socketService;
String _localIpAddress = '';
final AudioPlayer = AudioPlayer();
final AudioPlayer _audioPlayer = AudioPlayer();
int _httpPort = 8080;
int _wsPort = 4040;
List<int> _processedDonations = [];
Expand Down Expand Up @@ -273,7 +273,7 @@ class _MainScreenState extends State<MainScreen> {

void _incrementCounter() {
setState(() {
.play(AssetSource('pepe.mp3'));
_audioPlayer.play(AssetSource('pepe.mp3'));
_showAuthorInfo();
});
}
Expand Down Expand Up @@ -1574,7 +1574,7 @@ class _MainScreenState extends State<MainScreen> {
final file = _isRandomSoundEnabled
? (_soundFiles..shuffle()).first
: _soundFiles.first;
.play(file.path, isLocal: true);
_audioPlayer.play(file.path as Source);
LogManager.log(Level.INFO, 'Воспроизведение звука: ${file.path}');
}
}
Expand Down

0 comments on commit 870dcf9

Please sign in to comment.