Skip to content
Snippets Groups Projects
Commit 6cd4e2cd authored by Gregory Maxwell's avatar Gregory Maxwell
Browse files

Fix dump_modes for the api change and move it into a subdirectory

with a trivial makefile.
parent ff4000d7
No related branches found
No related tags found
No related merge requests found
......@@ -30,4 +30,4 @@ tools/celtdec
tools/celtenc
celt.pc
libcelt.spec
libcelt/dump_modes
libcelt/dump_modes/dump_modes
CFLAGS=-O2 -Wall -Wextra -DHAVE_CONFIG_H
INCLUDES=-I../ -I../../
all: dump_modes
dump_modes:
$(CC) $(CFLAGS) $(INCLUDES) -DCUSTOM_MODES dump_modes.c ../modes.c ../cwrs.c ../rate.c ../entenc.c ../entdec.c ../mathops.c ../mdct.c ../kiss_fft.c -o dump_modes -lm
clean:
rm -f dump_modes
......@@ -299,9 +299,9 @@ int main(int argc, char **argv)
int i, nb;
FILE *file;
CELTMode **m;
if (argc%2 != 1)
if (argc%2 != 1 || argc<3)
{
fprintf (stderr, "must have a multiple of 2 arguments\n");
fprintf (stderr, "Usage: %s rate frame_size [rate frame_size] [rate frame_size]...\n",argv[0]);
return 1;
}
nb = (argc-1)/2;
......@@ -311,7 +311,7 @@ int main(int argc, char **argv)
int Fs, frame;
Fs = atoi(argv[2*i+1]);
frame = atoi(argv[2*i+2]);
m[i] = celt_mode_create(Fs, frame, NULL);
m[i] = opus_custom_mode_create(Fs, frame, NULL);
if (m[i]==NULL)
{
fprintf(stderr,"Error creating mode with Fs=%s, frame_size=%s\n",
......@@ -323,7 +323,7 @@ int main(int argc, char **argv)
dump_modes(file, m, nb);
fclose(file);
for (i=0;i<nb;i++)
celt_mode_destroy(m[i]);
opus_custom_mode_destroy(m[i]);
free(m);
return 0;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment