debian/0000755000000000000000000000000012220646141007164 5ustar debian/rules0000755000000000000000000000037712220336652010256 0ustar #!/usr/bin/make -f #export DH_VERBOSE=1 opusfile_CFLAGS="-I/usr/include/opus" opusfile_LIBS="-lopusfile -logg -lopus -lgnutls -lgnutls-openssl" %: opusfile_CFLAGS=$(opusfile_CFLAGS) opusfile_LIBS=$(opusfile_LIBS) \ dh $@ --parallel --with autoreconf debian/patches/0000755000000000000000000000000012220336652010616 5ustar debian/patches/remove-opus0000644000000000000000000002427512220336652013034 0ustar Index: squishyball/configure.ac =================================================================== --- squishyball.orig/configure.ac 2013-09-24 16:59:44.089360513 +0100 +++ squishyball/configure.ac 2013-09-24 17:04:01.361367598 +0100 @@ -13,7 +13,6 @@ # Checks for libraries. -PKG_CHECK_MODULES([opusfile], [opusfile]) PKG_CHECK_MODULES([vorbisfile], [vorbisfile]) PKG_CHECK_MODULES([FLAC], [flac >= 0.8.0]) PKG_CHECK_MODULES([ao], [ao > 1.0.0]) @@ -26,7 +25,6 @@ AC_HEADER_STDC AC_CHECK_HEADERS([stdlib.h string.h]) AC_CHECK_HEADERS([vorbis/vorbisfile.h]) -AC_CHECK_HEADERS([opus/opusfile.h]) AC_CHECK_HEADERS([ao/ao.h]) AC_CHECK_HEADERS([FLAC/stream_decoder.h]) @@ -76,11 +74,11 @@ esac fi -COMMON_FLAGS="$cflags_save $vorbisfile_CFLAGS $opusfile_CFLAGS $ao_CFLAGS $FLAC_CFLAGS -DUSE_FKEYSF=$USE_FKEYSF" +COMMON_FLAGS="$cflags_save $vorbisfile_CFLAGS $ao_CFLAGS $FLAC_CFLAGS -DUSE_FKEYSF=$USE_FKEYSF" CFLAGS="$CFLAGS -DVERSION='\"$VERSION\"' $COMMON_FLAGS" DEBUG="$DEBUG -DVERSION='\\\"$VERSION\\\"' $COMMON_FLAGS" PROFILE="$PROFILE -DVERSION='\\\"$VERSION\\\"' $COMMON_FLAGS" -LIBS="$LIBS $vorbisfile_LIBS $opusfile_LIBS $ao_LIBS $FLAC_LIBS" +LIBS="$LIBS $vorbisfile_LIBS $ao_LIBS $FLAC_LIBS" AC_SUBST(DEBUG) AC_SUBST(PROFILE) Index: squishyball/loader.c =================================================================== --- squishyball.orig/loader.c 2013-09-24 16:51:16.513346536 +0100 +++ squishyball/loader.c 2013-09-24 17:04:01.365367598 +0100 @@ -31,7 +31,6 @@ #include #include #include -#include #include #include #include "main.h" @@ -116,11 +115,6 @@ memcmp (buf+28, "\x01vorbis", 7) == 0; } -static int opus_id(char *path,unsigned char *buf){ - return memcmp(buf, "OggS", 4) == 0 && - memcmp (buf+28, "OpusHead", 8) == 0; -} - static int sw_id(char *path,unsigned char *buf){ /* if all else fails, look for JM's favorite extension */ return memcmp(path+strlen(path)-3,".sw",3)==0; @@ -1030,157 +1024,7 @@ return NULL; } -/* Opus load support **************************************************************************/ - -int opc_read(void *_stream,unsigned char *_ptr,int _nbytes){ - return fread(_ptr,1,_nbytes,_stream); -} - -int opc_seek(void *_stream,opus_int64 _offset,int _whence){ - return fseek(_stream,_offset,_whence); -} - -opus_int64 opc_tell(void *_stream){ - return ftell(_stream); -} - -int opc_close(void *_stream){ - return 0; -} - -static OpusFileCallbacks opus_callbacks = - { opc_read,opc_seek,opc_tell,opc_close }; - -static pcm_t *opus_load(char *path, FILE *in){ - OggOpusFile *of; - pcm_t *pcm=NULL; - off_t fill=0; - int throttle=0; - int last_section=-1; - int i,j; - - if(fseek(in,0,SEEK_SET)==-1){ - fprintf(stderr,"%s: Failed to seek\n",path); - goto err; - } - - of = op_open_callbacks(in, &opus_callbacks , NULL, 0, NULL); - if(!of){ - fprintf(stderr,"Input does not appear to be an Opus bitstream.\n"); - goto err; - } - - pcm = calloc(1,sizeof(pcm_t)); - pcm->name=strdup(trim_path(path)); - pcm->bits=-32; - pcm->ch=op_channel_count(of,-1); - pcm->rate=48000; - pcm->size=op_pcm_total(of,-1)*pcm->ch*4; - pcm->data=calloc(pcm->size,1); - - - switch(pcm->ch){ - case 1: - pcm->matrix = strdup("M"); - break; - case 2: - pcm->matrix = strdup("L,R"); - break; - case 3: - pcm->matrix = strdup("L,C,R"); - break; - case 4: - pcm->matrix = strdup("L,R,BL,BR"); - break; - case 5: - pcm->matrix = strdup("L,C,R,BL,BR"); - break; - case 6: - pcm->matrix = strdup("L,C,R,BL,BR,LFE"); - break; - case 7: - pcm->matrix = strdup("L,C,R,SL,SR,BC,LFE"); - break; - default: - pcm->matrix = strdup("L,C,R,SL,SR,BL,BR,LFE"); - break; - } - - while(fillsize){ - int current_section; - int i,j; - float pcmout[4096]; - long ret=op_read_float(of,pcmout,4096,¤t_section); - unsigned char *d = pcm->data+fill; - float *s = pcmout; - - if(current_section!=last_section){ - last_section=current_section; - if(op_channel_count(of,-1) != pcm->ch){ - fprintf(stderr,"%s: Chained file changes channel count\n",path); - goto err; - } - } - - if(ret<0){ - fprintf(stderr,"%s: Error while decoding file\n",path); - goto err; - } - if(ret==0){ - fprintf(stderr,"%s: Audio data ended prematurely\n",path); - goto err; - } - - if(sizeof(float)==4){ - /* Assuming IEEE754, which is pedantically incorrect */ - union { - float f; - unsigned char c[4]; - } m; - if(host_is_big_endian()){ - for(i=0;ich;j++){ - m.f=*s++; - d[0] = m.c[3]; - d[1] = m.c[2]; - d[2] = m.c[1]; - d[3] = m.c[0]; - d+=4; - } - } - }else{ - for(i=0;ich;j++){ - m.f=*s++; - d[0] = m.c[0]; - d[1] = m.c[1]; - d[2] = m.c[2]; - d[3] = m.c[3]; - d+=4; - } - } - } - }else{ - fprintf(stderr,"Unhandled case: sizeof(float)!=4\n"); - exit(10); - } - fill += ret*pcm->ch*4; - if (sb_verbose && (throttle&0x3f)==0) - fprintf(stderr,"\rLoading %s: %ld to go... ",pcm->name,(long)(pcm->size-fill)); - throttle++; - } - op_free(of); - - if(sb_verbose) - fprintf(stderr,"\r%s: loaded. \n",path); - return pcm; - err: - op_free(of); - free_pcm(pcm); - return NULL; -} - -#define MAX_ID_LEN 36 +#define MAX_ID_LEN 35 unsigned char buf[MAX_ID_LEN]; /* Define the supported formats here */ @@ -1190,7 +1034,6 @@ {flac_id, flac_load, "flac"}, {oggflac_id, oggflac_load,"oggflac"}, {vorbis_id, vorbis_load, "oggvorbis"}, - {opus_id, opus_load, "oggopus"}, {sw_id, sw_load, "sw"}, {NULL, NULL, NULL} }; Index: squishyball/main.c =================================================================== --- squishyball.orig/main.c 2013-09-24 16:51:16.000000000 +0100 +++ squishyball/main.c 2013-09-24 17:04:14.757367967 +0100 @@ -99,9 +99,9 @@ " to 16-bit for playback on output\n" " devices that do not support 24-bit\n" " playback. Currently only affects\n" - " Vorbis and Opus playback; all other\n" - " files are dithered by default during\n" - " down-conversion.\n" + " Vorbis playback; all other files\n" + " are dithered by default during down-\n" + " conversion.\n" " -e --end-time