⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 s2bits

📁 这是LPC-10压缩算法的源代码,愿共享之.也希望能赐与MELP方面的算法源码.
💻
字号:
#! /bin/sh# # Convert a sound file (either the Sun byte order for 16 bit samples,# with a suffix of .spd, or the Linux byte order, with a suffix of# .dsp), to a .bits file (my own made-up suffix for the output of# lpcsim when using the -ob option for the output file).# if test $# -ne 1 -a $# -ne 2then	echo "Usage: `basename $0` 16-bit-audio-file [ lpcsim-exec ]" 1>&2	exit 1fiINPUT_SOUND=$1ARCH=`arch`LPCSIM_EXEC=lpcsimif test $# -eq 2then	LPCSIM_EXEC=$2ficase $ARCH insun4)	;;i486)	;;*)	echo "Unknown machine architecture: $ARCH" 1>&2	echo "Expecting one of: sun4 i486" 1>&2	exit 1	;;esacTEMP_FILE=if test `basename $INPUT_SOUND` != `basename $INPUT_SOUND .dsp`then	LPCSIM_OUTPUT=`basename $INPUT_SOUND .dsp`.bits	case $ARCH in	sun4)		TEMP_FILE=$INPUT_SOUND-$$		echo "Converting .dsp input file to temporary .spd file $TEMP_FILE..."		dd conv=swab < $INPUT_SOUND > $TEMP_FILE		LPCSIM_INPUT=$TEMP_FILE		;;	i486)		LPCSIM_INPUT=$INPUT_SOUND		;;	esacelif test `basename $INPUT_SOUND` != `basename $INPUT_SOUND .spd`then	LPCSIM_OUTPUT=`basename $INPUT_SOUND .spd`.bits	case $ARCH in	sun4)		LPCSIM_INPUT=$INPUT_SOUND		;;	i486)		TEMP_FILE=$INPUT_SOUND-$$		echo "Converting .spd input file to temporary .dsp file $TEMP_FILE..."		dd conv=swab < $INPUT_SOUND > $TEMP_FILE		LPCSIM_INPUT=$TEMP_FILE		;;	esacelse	echo "Missing or unknown file suffix" 1>&2	echo "Expecting one of: .dsp .spd" 1>&2	exit 1fiecho "Running the command:"echo "$LPCSIM_EXEC -is $LPCSIM_INPUT -ob $LPCSIM_OUTPUT"$LPCSIM_EXEC -is $LPCSIM_INPUT -ob $LPCSIM_OUTPUTif test x$TEMP_FILE != xthen	echo "Deleting temporary file $TEMP_FILE."	rm -f $TEMP_FILEfi

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -