mirror of https://github.com/ericonr/sndio.git
Clear resamp state array with memset. From miko@.
This commit is contained in:
parent
6443e1dee1
commit
471495bd21
|
@ -14,6 +14,7 @@
|
||||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
#include <string.h>
|
||||||
#include "dsp.h"
|
#include "dsp.h"
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
|
|
||||||
|
@ -403,7 +404,7 @@ void
|
||||||
resamp_init(struct resamp *p, unsigned int iblksz,
|
resamp_init(struct resamp *p, unsigned int iblksz,
|
||||||
unsigned int oblksz, int nch)
|
unsigned int oblksz, int nch)
|
||||||
{
|
{
|
||||||
unsigned int i, g;
|
unsigned int g;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* reduce iblksz/oblksz fraction
|
* reduce iblksz/oblksz fraction
|
||||||
|
@ -425,8 +426,7 @@ resamp_init(struct resamp *p, unsigned int iblksz,
|
||||||
p->diff = 0;
|
p->diff = 0;
|
||||||
p->nch = nch;
|
p->nch = nch;
|
||||||
p->ctx_start = 0;
|
p->ctx_start = 0;
|
||||||
for (i = 0; i < NCHAN_MAX * RESAMP_NCTX; i++)
|
memset(p->ctx, 0, sizeof(p->ctx));
|
||||||
p->ctx[i] = 0;
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
if (log_level >= 3) {
|
if (log_level >= 3) {
|
||||||
log_puts("resamp: ");
|
log_puts("resamp: ");
|
||||||
|
|
|
@ -268,14 +268,11 @@ void
|
||||||
resamp_init(struct resamp *p, unsigned int iblksz,
|
resamp_init(struct resamp *p, unsigned int iblksz,
|
||||||
unsigned int oblksz, int nch)
|
unsigned int oblksz, int nch)
|
||||||
{
|
{
|
||||||
unsigned int i;
|
|
||||||
|
|
||||||
p->iblksz = iblksz;
|
p->iblksz = iblksz;
|
||||||
p->oblksz = oblksz;
|
p->oblksz = oblksz;
|
||||||
p->nch = nch;
|
p->nch = nch;
|
||||||
p->ctx_start = 0;
|
p->ctx_start = 0;
|
||||||
for (i = 0; i < NCHAN_MAX * RESAMP_NCTX; i++)
|
memset(p->ctx, 0, sizeof(p->ctx));
|
||||||
p->ctx[i] = 0;
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
if (log_level >= 3) {
|
if (log_level >= 3) {
|
||||||
log_puts("resamp: ");
|
log_puts("resamp: ");
|
||||||
|
|
Loading…
Reference in New Issue