Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
SRB2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
STJr
SRB2
Merge requests
!260
SDL Mixer fixes
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
SDL Mixer fixes
sdl_mixer_fixes
into
master
Overview
0
Commits
1
Pipelines
0
Changes
1
Merged
Monster Iestyn
requested to merge
sdl_mixer_fixes
into
master
6 years ago
Overview
0
Commits
1
Pipelines
0
Changes
1
Expand
An attempt at fixing issue
#31 (closed)
, at least for sounds as of writing.
2
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
6b1fa399
1 commit,
6 years ago
1 file
+
3
−
3
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
src/sdl/mixer_sound.c
+
3
−
3
Options
@@ -176,7 +176,7 @@ static Mix_Chunk *ds2chunk(void *stream)
return
NULL
;
// would and/or did wrap, can't store.
break
;
}
sound
=
Z_M
alloc
(
newsamples
<<
2
,
PU_SOUND
,
NULL
);
// samples * frequency shift * bytes per sample * channels
sound
=
m
alloc
(
newsamples
<<
2
);
// samples * frequency shift * bytes per sample * channels
s
=
(
SINT8
*
)
stream
;
d
=
(
INT16
*
)
sound
;
@@ -304,7 +304,7 @@ void *I_GetSfx(sfxinfo_t *sfx)
gme_track_info
(
emu
,
&
info
,
0
);
len
=
(
info
->
play_length
*
441
/
10
)
<<
2
;
mem
=
Z_M
alloc
(
len
,
PU_SOUND
,
NULL
);
mem
=
m
alloc
(
len
);
gme_play
(
emu
,
len
>>
1
,
mem
);
gme_delete
(
emu
);
@@ -376,7 +376,7 @@ void *I_GetSfx(sfxinfo_t *sfx)
gme_track_info
(
emu
,
&
info
,
0
);
len
=
(
info
->
play_length
*
441
/
10
)
<<
2
;
mem
=
Z_M
alloc
(
len
,
PU_SOUND
,
NULL
);
mem
=
m
alloc
(
len
);
gme_play
(
emu
,
len
>>
1
,
mem
);
gme_delete
(
emu
);
Loading