1
0
mirror of https://github.com/RPCS3/soundtouch.git synced 2024-11-09 20:33:03 +01:00

Bugfix: Added a check against zero processing samples into rate transposing routines

This commit is contained in:
oparviai 2009-10-31 14:37:24 +00:00
parent 6c1867263c
commit df36315991
2 changed files with 11 additions and 4 deletions

View File

@ -18,7 +18,7 @@
</head>
<body class="normal">
<hr>
<h1>SoundTouch audio processing library v1.4.1
<h1>SoundTouch audio processing library v1.4.1pre
</h1>
<p class="normal">SoundTouch library Copyright (c) Olli
Parviainen 2002-2009 </p>
@ -695,9 +695,12 @@ SoundTouch v1.3.1: </p>
<li>Stanislav Brabec</li>
<li>Christian Budde</li>
<li>Brian Cameron</li>
<li>Jason Champion</li>
<li>Patrick Colis</li>
<li>Justin Frankel</li>
<li>Jason Garland</li>
<li>Takashi Iwai</li>
<li>Paulo Pizarro</li>
<li>John Sheehy</li>
</ul>
<p >Moral greetings to all other contributors and users also!</p>

View File

@ -248,9 +248,9 @@ void RateTransposer::downsample(const SAMPLETYPE *src, uint nSamples)
// If the parameter 'uRate' value is larger than 'SCALE', first apply the
// anti-alias filter to remove high frequencies (prevent them from folding
// over the lover frequencies), then transpose. */
// over the lover frequencies), then transpose.
// Add the new samples to the end of the storeBuffer */
// Add the new samples to the end of the storeBuffer
storeBuffer.putSamples(src, nSamples);
// Anti-alias filter the samples to prevent folding and output the filtered
@ -262,6 +262,8 @@ void RateTransposer::downsample(const SAMPLETYPE *src, uint nSamples)
count = pAAFilter->evaluate(tempBuffer.ptrEnd(sizeTemp),
storeBuffer.ptrBegin(), sizeTemp, (uint)numChannels);
if (count == 0) return;
// Remove the filtered samples from 'storeBuffer'
storeBuffer.receiveSamples(count);
@ -398,6 +400,8 @@ uint RateTransposerInteger::transposeMono(SAMPLETYPE *dest, const SAMPLETYPE *sr
unsigned int i, used;
LONG_SAMPLETYPE temp, vol1;
if (nSamples == 0) return 0; // no samples, no work
used = 0;
i = 0;