Changeset 4152:3e89cc389e23 in roaraudio
- Timestamp:
- 08/12/10 22:02:40 (14 years ago)
- Branch:
- default
- Phase:
- public
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
Makefile.inc
r4070 r4152 16 16 # libroardsp: 17 17 LIBROARDSP_V = $(COMMON_SOVERSION) 18 DSP_CODECLIBS = $(lib_celt) $(lib_ speex) $(lib_speexdsp)18 DSP_CODECLIBS = $(lib_celt) $(lib_celt0) $(lib_speex) $(lib_speexdsp) 19 19 DSP_AUXLIBS = $(lib_samplerate) 20 20 LIBROARDSP_NS = $(DSP_CODECLIBS) $(DSP_AUXLIBS) $(LIBROAR) $(lib_m) -
include/roaraudio/audio.h
r4000 r4152 323 323 #define ROAR_SPEEX_MODE_UWB 3 324 324 325 #ifdef ROAR_HAVE_CELT_VERSION_0_7_1 326 #define ROAR_CELT_MAGIC "RoarCELT1" 327 #else 325 328 #define ROAR_CELT_MAGIC "RoarCELT0" 329 #endif 330 326 331 #define ROAR_CELT_MAGIC_LEN 9 327 332 -
libroardsp/transcode_celt.c
r3811 r4152 31 31 #define _SIZE_LEN 2 32 32 33 #ifdef ROAR_HAVE_CELT_VERSION_0_7_1 34 typedef celt_int16 celt_int16_t; 35 #endif 36 33 37 int roar_xcoder_celt_init (struct roar_xcoder * state) { 34 38 struct roar_xcoder_celt * self = roar_mm_malloc(sizeof(struct roar_xcoder_celt)); … … 58 62 } 59 63 64 #ifdef ROAR_HAVE_CELT_VERSION_0_7_1 65 self->mode = celt_mode_create(info->rate, self->frame_size, NULL); 66 #else 60 67 self->mode = celt_mode_create(info->rate, info->channels, self->frame_size, NULL); 68 #endif 61 69 62 70 if ( self->mode == NULL ) { … … 67 75 68 76 if (state->encode) { 77 #ifdef ROAR_HAVE_CELT_VERSION_0_7_1 78 self->encoder = celt_encoder_create(self->mode, info->channels, NULL); 79 #else 69 80 self->encoder = celt_encoder_create(self->mode); 81 #endif 70 82 if ( self->encoder == NULL ) { 71 83 roar_xcoder_celt_uninit(state); … … 73 85 } 74 86 } else { 87 #ifdef ROAR_HAVE_CELT_VERSION_0_7_1 88 self->decoder = celt_decoder_create(self->mode, info->channels, NULL); 89 #else 75 90 self->decoder = celt_decoder_create(self->mode); 91 #endif 76 92 if ( self->decoder == NULL ) { 77 93 roar_xcoder_celt_uninit(state); -
roard/Makefile
r4004 r4152 19 19 LDFLAGS = -g -rdynamic -L../lib/ $(LDPATH) 20 20 DRVLIBS = $(lib_esd) $(lib_ossaudio) $(lib_ao) $(lib_shout) $(lib_sndio) $(lib_rsound) $(lib_portaudio) $(lib_pablio) $(lib_asound) $(lib_winmm) $(lib_pulse_simple) 21 CODECLIBS = $(lib_vorbisfile) $(lib_vorbisenc) $(lib_vorbis) $(lib_celt) $(lib_fishsound) $(lib_speex) $(lib_speexdsp) 21 CODEC_CELT= $(lib_celt) $(lib_celt0) 22 CODECLIBS = $(lib_vorbisfile) $(lib_vorbisenc) $(lib_vorbis) $(lib_fishsound) $(lib_speex) $(lib_speexdsp) $(CODEC_CELT) 22 23 CONTLIBS = $(lib_oggz) $(lib_sndfile) $(lib_ogg) $(lib_raum) 23 24 OWNLIBS = $(LIBROAREIO) $(LIBROARLIGHT) $(LIBROARMIDI) $(LIBROARDSP) $(LIBROAR) -
roard/codecfilter_celt.c
r3811 r4152 26 26 #include "roard.h" 27 27 #ifdef ROAR_HAVE_LIBCELT 28 29 #ifdef ROAR_HAVE_CELT_VERSION_0_7_1 30 typedef celt_int16 celt_int16_t; 31 #endif 28 32 29 33 int cf_celt_open(CODECFILTER_USERDATA_T * inst, int codec, … … 81 85 return -1; 82 86 } 83 87 88 #ifdef ROAR_HAVE_CELT_VERSION_0_7_1 89 self->mode = celt_mode_create(s->info.rate, self->frame_size, NULL); 90 #else 84 91 self->mode = celt_mode_create(s->info.rate, s->info.channels, self->frame_size, NULL); 92 #endif 85 93 86 94 if ( !self->mode ) { … … 90 98 91 99 if ( s->dir == ROAR_DIR_PLAY ) { 100 #ifdef ROAR_HAVE_CELT_VERSION_0_7_1 101 self->decoder = celt_decoder_create(self->mode, s->info.channels, NULL); 102 #else 92 103 self->decoder = celt_decoder_create(self->mode); 104 #endif 93 105 } else if ( s->dir == ROAR_DIR_MONITOR || s->dir == ROAR_DIR_OUTPUT ) { 106 #ifdef ROAR_HAVE_CELT_VERSION_0_7_1 107 self->encoder = celt_encoder_create(self->mode, s->info.channels, NULL); 108 #else 94 109 self->encoder = celt_encoder_create(self->mode); 110 #endif 95 111 } else if ( s->dir == ROAR_DIR_BIDIR ) { 112 #ifdef ROAR_HAVE_CELT_VERSION_0_7_1 113 self->decoder = celt_decoder_create(self->mode, s->info.channels, NULL); 114 self->encoder = celt_encoder_create(self->mode, s->info.channels, NULL); 115 #else 96 116 self->decoder = celt_decoder_create(self->mode); 97 117 self->encoder = celt_encoder_create(self->mode); 118 #endif 98 119 } else { 99 120 celt_mode_destroy(self->mode);
Note: See TracChangeset
for help on using the changeset viewer.