Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libSDL
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PocketInsanity
libSDL
Commits
7fcd8b75
Commit
7fcd8b75
authored
Sep 19, 2010
by
Sam Lantinga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed crashing loading 48KHz audio, contributed by Terry Welsh
parent
200c3c74
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
106 additions
and
102 deletions
+106
-102
SDL_audiotypecvt.c
src/audio/SDL_audiotypecvt.c
+100
-100
sdlgenaudiocvt.pl
src/audio/sdlgenaudiocvt.pl
+6
-2
No files found.
src/audio/SDL_audiotypecvt.c
View file @
7fcd8b75
This diff is collapsed.
Click to expand it.
src/audio/sdlgenaudiocvt.pl
View file @
7fcd8b75
...
...
@@ -38,7 +38,7 @@ sub outputHeader {
/* DO NOT EDIT! This file is generated by sdlgenaudiocvt.pl */
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-20
09
Sam Lantinga
Copyright (C) 1997-20
10
Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
...
...
@@ -400,15 +400,19 @@ ${sym}(SDL_AudioCVT * cvt, SDL_AudioFormat format)
register int eps = 0;
EOF
my
$endcomparison
=
'!='
;
# Upsampling (growing the buffer) needs to work backwards, since we
# overwrite the buffer as we go.
if
(
$upsample
)
{
$endcomparison
=
'>'
;
# dst > target
print
<<EOF;
$fctype *dst = (($fctype *) (cvt->buf + dstsize)) - $channels;
const $fctype *src = (($fctype *) (cvt->buf + cvt->len_cvt)) - $channels;
const $fctype *target = ((const $fctype *) cvt->buf) - $channels;
EOF
}
else
{
$endcomparison
=
'<'
;
# dst < target
print
<<EOF;
$fctype *dst = ($fctype *) cvt->buf;
const $fctype *src = ($fctype *) cvt->buf;
...
...
@@ -432,7 +436,7 @@ EOF
}
print
<<EOF;
while (dst
!=
target) {
while (dst
$endcomparison
target) {
EOF
if
(
$upsample
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment