File tree Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Original file line number Diff line number Diff line change 11/* DreamShell ##version##
22
33 utils.c - app utils
4- Copyright (C) 2022-2024 SWAT
4+ Copyright (C) 2022-2025 SWAT
55 Copyright (C) 2024-2025 Maniac Vera
66
77*/
1212#include <img/copy.h>
1313#include "app_utils.h"
1414#include "audio/wav.h"
15+ #include "settings.h"
1516
1617static uint8 * romdisk_data [3 ] = {NULL , NULL , NULL };
1718static const char * mount_points [] = {"/presets_cd" , "/presets_sd" , "/presets_ide" };
@@ -701,6 +702,11 @@ void PlayCDDATrack(const char *file, int loop)
701702 return ;
702703 }
703704 ds_printf ("DS_OK: Start playing: %s\n" , file );
705+
706+ int volume = GetVolumeFromSettings ();
707+ if (volume >= 0 ) {
708+ wav_volume (wav_hnd , volume );
709+ }
704710 wav_play (wav_hnd );
705711 }
706712}
@@ -724,7 +730,7 @@ int MountPresetsRomdisk(int device_type)
724730 return -1 ;
725731 }
726732
727- if (fs_romdisk_mount (mount_points [device_type ], romdisk_data [device_type ], 1 ) < 0 )
733+ if (fs_romdisk_mount (mount_points [device_type ], romdisk_data [device_type ], 0 ) < 0 )
728734 {
729735 ds_printf ("DS_ERROR: Failed to mount romdisk %s\n" , mount_points [device_type ]);
730736 free (romdisk_data [device_type ]);
Original file line number Diff line number Diff line change 11/* DreamShell ##version##
22
33 utils.c - ISO Loader app utils
4- Copyright (C) 2022-2024 SWAT
4+ Copyright (C) 2022-2025 SWAT
55
66*/
77
88#include "ds.h"
99#include "isoldr.h"
1010#include "app_utils.h"
1111#include "audio/wav.h"
12+ #include "settings.h"
1213
1314/* Trim begin/end spaces and copy into output buffer */
1415void trim_spaces (char * input , char * output , int size ) {
@@ -228,6 +229,11 @@ void PlayCDDATrack(const char *file, int loop) {
228229 return ;
229230 }
230231 ds_printf ("DS_OK: Start playing: %s\n" , file );
232+
233+ int volume = GetVolumeFromSettings ();
234+ if (volume >= 0 ) {
235+ wav_volume (wav_hnd , volume );
236+ }
231237 wav_play (wav_hnd );
232238 }
233239}
@@ -251,7 +257,7 @@ int mountPresetsRomdisk(int device_type) {
251257 return -1 ;
252258 }
253259
254- if (fs_romdisk_mount (mount_points [device_type ], romdisk_data [device_type ], 1 ) < 0 ) {
260+ if (fs_romdisk_mount (mount_points [device_type ], romdisk_data [device_type ], 0 ) < 0 ) {
255261 ds_printf ("DS_ERROR: Failed to mount romdisk %s\n" , mount_points [device_type ]);
256262 free (romdisk_data [device_type ]);
257263 romdisk_data [device_type ] = NULL ;
You can’t perform that action at this time.
0 commit comments