Changeset 1223:29f5a58d63ce in roaraudio
- Timestamp:
- 02/25/09 00:44:19 (15 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- roard
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
roard/codecfilter.c
r1199 r1223 29 29 struct roar_codecfilter g_codecfilter[] = { 30 30 {-1, "null", "null codec filter", NULL, ROAR_CODECFILTER_NONE, 31 NULL, NULL, NULL, NULL, NULL, NULL, NULL },31 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}, 32 32 33 33 /* … … 38 38 */ 39 39 {ROAR_CODEC_RIFF_WAVE, "RIFF/WAVE", "RIFF/WAVE", NULL, ROAR_CODECFILTER_READ|ROAR_CODECFILTER_WRITE, 40 cf_wave_open, cf_wave_close, NULL, cf_wave_write, cf_wave_read, NULL, NULL },40 cf_wave_open, cf_wave_close, NULL, cf_wave_write, cf_wave_read, NULL, NULL, NULL}, 41 41 //#endif 42 42 … … 54 54 NULL, 55 55 #endif 56 cf_alaw_read, NULL, cf_alaw_delay },56 cf_alaw_read, NULL, cf_alaw_delay, NULL}, 57 57 #endif 58 58 … … 70 70 NULL, 71 71 #endif 72 cf_mulaw_read, NULL, cf_alaw_delay },72 cf_mulaw_read, NULL, cf_alaw_delay, NULL}, 73 73 #endif 74 74 … … 77 77 {ROAR_CODEC_OGG_GENERAL, "cmd", "ogg123", 78 78 ROAR_HAVE_BIN_OGG123 " -q -d raw -f - -", ROAR_CODECFILTER_READ, 79 cf_cmd_open, NULL, NULL, NULL, NULL, NULL, codecfilter_delay_fulldyn },79 cf_cmd_open, NULL, NULL, NULL, NULL, NULL, codecfilter_delay_fulldyn, NULL}, 80 80 #endif 81 81 #endif … … 88 88 ROAR_CODECFILTER_READ, 89 89 #endif 90 cf_vorbis_open, cf_vorbis_close, NULL, cf_vorbis_write, cf_vorbis_read, NULL, codecfilter_delay_fulldyn },90 cf_vorbis_open, cf_vorbis_close, NULL, cf_vorbis_write, cf_vorbis_read, NULL, codecfilter_delay_fulldyn, NULL}, 91 91 #else 92 92 #ifndef ROAR_WITHOUT_CF_CMD … … 94 94 {ROAR_CODEC_OGG_VORBIS, "cmd", "ogg123", 95 95 ROAR_HAVE_BIN_OGG123 " -q -d raw -f - -", ROAR_CODECFILTER_READ, 96 cf_cmd_open, NULL, NULL, NULL, NULL, NULL, codecfilter_delay_fulldyn },96 cf_cmd_open, NULL, NULL, NULL, NULL, NULL, codecfilter_delay_fulldyn, NULL}, 97 97 #endif 98 98 #endif … … 102 102 {ROAR_CODEC_OGG_SPEEX, "fishsound", "libfishsound Xiph Codec library", 103 103 NULL, ROAR_CODECFILTER_READ, 104 cf_fishsound_open, cf_fishsound_close, NULL, NULL, cf_fishsound_read, NULL, codecfilter_delay_fulldyn },104 cf_fishsound_open, cf_fishsound_close, NULL, NULL, cf_fishsound_read, NULL, codecfilter_delay_fulldyn, NULL}, 105 105 106 106 {ROAR_CODEC_OGG_FLAC, "fishsound", "libfishsound Xiph Codec library", 107 107 NULL, ROAR_CODECFILTER_READ, 108 cf_fishsound_open, cf_fishsound_close, NULL, NULL, cf_fishsound_read, NULL, codecfilter_delay_fulldyn },108 cf_fishsound_open, cf_fishsound_close, NULL, NULL, cf_fishsound_read, NULL, codecfilter_delay_fulldyn, NULL}, 109 109 #endif 110 110 … … 113 113 {ROAR_CODEC_MIDI_FILE, "MIDIFILE", "timidity MIDI synth", 114 114 ROAR_HAVE_BIN_TIMIDITY " -Or1sl -s %R -o - -", ROAR_CODECFILTER_READ, 115 cf_cmd_open, NULL, NULL, NULL, NULL, NULL, codecfilter_delay_fulldyn },115 cf_cmd_open, NULL, NULL, NULL, NULL, NULL, codecfilter_delay_fulldyn, NULL}, 116 116 #endif 117 117 #endif … … 119 119 #ifdef ROAR_HAVE_LIBCELT 120 120 {ROAR_CODEC_ROAR_CELT, "RoarCELT", "RoarAudio CELT", NULL, ROAR_CODECFILTER_READ|ROAR_CODECFILTER_WRITE, 121 cf_celt_open, cf_celt_close, NULL, cf_celt_write, cf_celt_read, NULL, cf_celt_delay },121 cf_celt_open, cf_celt_close, NULL, cf_celt_write, cf_celt_read, NULL, cf_celt_delay, NULL}, 122 122 #endif 123 123 124 124 #ifdef ROAR_HAVE_LIBSPEEX 125 125 {ROAR_CODEC_ROAR_SPEEX, "RoarSpeex", "RoarAudio Speex", NULL, ROAR_CODECFILTER_READ|ROAR_CODECFILTER_WRITE, 126 cf_speex_open, cf_speex_close, NULL, cf_speex_write, cf_speex_read, NULL, NULL },126 cf_speex_open, cf_speex_close, NULL, cf_speex_write, cf_speex_read, NULL, NULL, NULL}, 127 127 #endif 128 128 … … 138 138 #endif 139 139 ROAR_CODECFILTER_READ, 140 cf_cmd_open, NULL, NULL, NULL, NULL, NULL, codecfilter_delay_fulldyn },141 #endif 142 #endif 143 144 {-1, NULL, NULL, NULL, ROAR_CODECFILTER_NONE, NULL, NULL, NULL, NULL, NULL, NULL, NULL } // end of list140 cf_cmd_open, NULL, NULL, NULL, NULL, NULL, codecfilter_delay_fulldyn, NULL}, 141 #endif 142 #endif 143 144 {-1, NULL, NULL, NULL, ROAR_CODECFILTER_NONE, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} // end of list 145 145 }; 146 146 -
roard/include/codecfilter.h
r1144 r1223 51 51 int (*flush)(CODECFILTER_USERDATA_T inst); 52 52 int (*delay)(CODECFILTER_USERDATA_T inst, uint_least32_t * delay); 53 int (*ctl )(CODECFILTER_USERDATA_T inst, int cmd, void * data); 53 54 }; 54 55 -
roard/include/streams.h
r1142 r1223 84 84 int streams_get_flag (int id, int flag); 85 85 86 int sreams_calc_delay (int id); 86 int streams_calc_delay (int id); 87 88 int streams_ctl (int id, int cmd, void * data); 87 89 88 90 int stream_add_buffer (int id, struct roar_buffer * buf); -
roard/req.c
r1162 r1223 482 482 } 483 483 484 if ( s reams_calc_delay(mes->stream) == -1 ) {484 if ( streams_calc_delay(mes->stream) == -1 ) { 485 485 ROAR_WARN("req_on_get_stream_para(*): can not calc delay for stream %i", mes->stream); 486 486 } -
roard/streams.c
r1171 r1223 337 337 } 338 338 339 int s reams_calc_delay (int id) {339 int streams_calc_delay (int id) { 340 340 struct roar_stream_server * ss; 341 341 struct roar_stream * s; … … 354 354 if ( ss->vio.ctl != NULL ) { 355 355 if ( roar_vio_ctl(&(ss->vio), ROAR_VIO_CTL_GET_DELAY, t) != -1 ) { // *t is in byte 356 ROAR_DBG("s reams_calc_delay(id=%i): VIO delay in byte: %i", id, *t);356 ROAR_DBG("streams_calc_delay(id=%i): VIO delay in byte: %i", id, *t); 357 357 tmp = *t; 358 358 tmp *= 1000000; // musec per sec 359 359 tmp /= s->info.rate * s->info.channels * (s->info.bits/8); 360 ROAR_DBG("s reams_calc_delay(id=%i): VIO delay in musec: %i", id, tmp);360 ROAR_DBG("streams_calc_delay(id=%i): VIO delay in musec: %i", id, tmp); 361 361 362 362 d += tmp; … … 364 364 } 365 365 366 ROAR_DBG("s reams_calc_delay(id=%i): delay in musec: %i", id, d);366 ROAR_DBG("streams_calc_delay(id=%i): delay in musec: %i", id, d); 367 367 368 368 ss->delay = d;
Note: See TracChangeset
for help on using the changeset viewer.