test program for get hash

pull/36/head
David 2020-07-26 08:03:15 +09:30
parent 653d86b713
commit 5f2b056fc2
4 changed files with 28 additions and 5 deletions

View File

@ -101,6 +101,9 @@ target_link_libraries(nnet2f32 lpcnetfreedv m)
add_executable(sw2packedulaw sw2packedulaw.c)
target_link_libraries(sw2packedulaw lpcnetfreedv m)
add_executable(thash thash.c)
target_link_libraries(thash lpcnetfreedv m)
install(TARGETS lpcnet_enc lpcnet_dec
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)

View File

@ -274,8 +274,3 @@ void lpcnet_synthesize(LPCNetState *lpcnet, short *output, float *features, int
start = 0;
}
static char git_hash[] = GIT_HASH;
char *lpcnet_get_hash(void) {
return git_hash;
}

View File

@ -80,3 +80,9 @@ void lpcnet_dec(LPCNetFreeDV *lf, char *frame, short* pcm)
int lpcnet_samples_per_frame(LPCNetFreeDV *lf) { return FRAME_SIZE*lf->q->dec; }
int lpcnet_bits_per_frame(LPCNetFreeDV *lf) { return lf->q->bits_per_frame; }
static char git_hash[] = GIT_HASH;
char *lpcnet_get_hash(void) {
return git_hash;
}

19
src/thash.c 100644
View File

@ -0,0 +1,19 @@
/*---------------------------------------------------------------------------*\
FILE........: thash.c
AUTHOR......: David Rowe
DATE CREATED: July 2020
Simple test program for LPCNet API get hash function
\*---------------------------------------------------------------------------*/
#include <stdio.h>
#include "lpcnet_freedv.h"
int main(void) {
printf("%s\n", lpcnet_get_hash());
return 0;
}