Skip to content

Commit 9ea6542

Browse files
committed
Apply editorial changes
1 parent d746341 commit 9ea6542

File tree

1 file changed

+15
-22
lines changed

1 file changed

+15
-22
lines changed

src/syscall_sdl.c

Lines changed: 15 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,11 @@
1717

1818
#include "state.h"
1919

20-
/*
21-
* Only the DSITMBK sound effect in DOOM1.WAD uses sample rate 22050
22-
* nonetheless, since we are playing single-player rather than multiplayer,
23-
* sticking with 11025 is acceptable.
20+
/* The DSITMBK sound effect in DOOM1.WAD uses a sample rate of 22050, but since
21+
* the game is played in single-player mode, it is acceptable to stick with
22+
* 11025.
2423
*
25-
* In Quake, most sound effects with sample rate 11025
24+
* In Quake, most sound effects have a sample rate of 11025.
2625
*/
2726
#define SAMPLE_RATE 11025
2827

@@ -357,12 +356,11 @@ void syscall_submit_queue(riscv_t *rv)
357356
* 3. This notice may not be removed or altered from any source distribution.
358357
*/
359358

360-
/*
361-
* This is a straightforward MUS to MIDI converter made for programs
362-
* like DOOM that use MIDI to store sound.
359+
/* This is a simple MUS to MIDI converter designed for programs such as DOOM
360+
* that utilize MIDI for sound storage.
363361
*
364-
* Sfx_handler can handle Quake's sound effects because they are all in WAV
365-
* format.
362+
* The sfx_handler can also manage Quake's sound effects since they are all in
363+
* WAV format.
366364
*/
367365

368366
typedef PACKED(struct {
@@ -627,8 +625,7 @@ static void *music_handler(void *arg)
627625
return NULL;
628626
}
629627

630-
/*
631-
* multiplied by 8 because sfx->volume's max is 15
628+
/* multiplied by 8 because sfx->volume's max is 15
632629
* further setting volume via syscall_set_music_volume
633630
*/
634631
Mix_VolumeMusic(music->volume * 8);
@@ -651,11 +648,9 @@ static void play_sfx(riscv_t *rv)
651648
sfxinfo_t sfxinfo;
652649
memory_read(s->mem, (uint8_t *) &sfxinfo, sfxinfo_addr, sizeof(sfxinfo_t));
653650

654-
/*
655-
* data and size in application must be placed at
656-
* first two fields in structure so that it makes emulator
657-
* compatible to any applications when accessing different sfxinfo_t
658-
* from applications
651+
/* The data and size in the application must be positioned in the first two
652+
* fields of the structure. This ensures emulator compatibility with
653+
* various applications when accessing different sfxinfo_t instances.
659654
*/
660655
uint32_t sfx_data_offset = *((uint32_t *) &sfxinfo);
661656
uint32_t sfx_data_size = *(uint32_t *) ((uint32_t *) &sfxinfo + 1);
@@ -683,11 +678,9 @@ static void play_music(riscv_t *rv)
683678
memory_read(s->mem, (uint8_t *) &musicinfo, musicinfo_addr,
684679
sizeof(musicinfo_t));
685680

686-
/*
687-
* data and size in application must be placed at
688-
* first two fields in structure so that it makes emulator
689-
* compatible to any applications when accessing different sfxinfo_t
690-
* from applications
681+
/* The data and size in the application must be positioned in the first two
682+
* fields of the structure. This ensures emulator compatibility with
683+
* various applications when accessing different sfxinfo_t instances.
691684
*/
692685
uint32_t music_data_offset = *((uint32_t *) &musicinfo);
693686
uint32_t music_data_size = *(uint32_t *) ((uint32_t *) &musicinfo + 1);

0 commit comments

Comments
 (0)