Commit 473432ed authored by jm's avatar jm
Browse files

Patch by Jim Crichton to compute delay properly in TI sample files.


git-svn-id: http://svn.xiph.org/trunk/speex@11580 0101bb08-14d6-0310-b084-bc0e0c8e3800
parent 388413f7
......@@ -184,22 +184,23 @@ void main()
tmp=1; /* Lowest */
speex_encoder_ctl(st, SPEEX_SET_COMPLEXITY, &tmp);
speex_mode_query(&speex_nb_mode, SPEEX_MODE_FRAME_SIZE, &tmp);
fprintf (stderr, "frame size: %d\n", tmp);
skip_group_delay = tmp / 4; /* algorithmic delay */
speex_encoder_ctl(st, SPEEX_GET_LOOKAHEAD, &skip_group_delay);
speex_decoder_ctl(dec, SPEEX_GET_LOOKAHEAD, &tmp);
skip_group_delay += tmp;
fprintf (stderr, "decoder lookahead = %d\n", skip_group_delay);
#ifdef DECODE_ONLY
bitsFile = "c:\\speextrunktest\\samples\\malebitsin.dat";
fbits = fopen(bitsFile, "rb");
#else
bitsFile = "c:\\speextrunktest\\samples\\malebits.dat";
bitsFile = "c:\\speextrunktest\\samples\\malebits5x.dat";
fbits = fopen(bitsFile, "wb");
#endif
#if !defined(DECODE_ONLY) || defined(CHECK_RESULT)
inFile = "c:\\speextrunktest\\samples\\male.snd";
fin = fopen(inFile, "rb");
#endif
outFile = "c:\\speextrunktest\\samples\\maleout.snd";
outFile = "c:\\speextrunktest\\samples\\maleout5x.snd";
fout = fopen(outFile, "wb+");
speex_bits_init(&bits);
......
......@@ -146,22 +146,23 @@ void main()
tmp=1; /* Lowest */
speex_encoder_ctl(st, SPEEX_SET_COMPLEXITY, &tmp);
speex_mode_query(&speex_nb_mode, SPEEX_MODE_FRAME_SIZE, &tmp);
fprintf (stderr, "frame size: %d\n", tmp);
skip_group_delay = tmp / 4; /* 5ms algorithmic delay */
speex_encoder_ctl(st, SPEEX_GET_LOOKAHEAD, &skip_group_delay);
speex_decoder_ctl(dec, SPEEX_GET_LOOKAHEAD, &tmp);
skip_group_delay += tmp;
fprintf (stderr, "decoder lookahead = %d\n", skip_group_delay);
#ifdef DECODE_ONLY
bitsFile = "c:\\speextrunktest\\samples\\malebitsin.dat";
fbits = fopen(bitsFile, "rb");
#else
bitsFile = "c:\\speextrunktest\\samples\\malebits.dat";
bitsFile = "c:\\speextrunktest\\samples\\malebits6x.dat";
fbits = fopen(bitsFile, "wb");
#endif
#if !defined(DECODE_ONLY) || defined(CHECK_RESULT)
inFile = "c:\\speextrunktest\\samples\\male.snd";
fin = fopen(inFile, "rb");
#endif
outFile = "c:\\speextrunktest\\samples\\maleout.snd";
outFile = "c:\\speextrunktest\\samples\\maleout6x.snd";
fout = fopen(outFile, "wb+");
speex_bits_init(&bits);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment