diff --git a/src/audio/audio.c b/src/audio/audio.c index 1fd4389a7..1855a57d9 100644 --- a/src/audio/audio.c +++ b/src/audio/audio.c @@ -725,6 +725,7 @@ static void *audio_sender_thread(void *arg) audio_frame2 *uncompressed = buffer_new; audio_frame2 *compressed = NULL; while((compressed = audio_codec_compress(s->audio_coder, uncompressed))) { + //TODO to be dynamic as a function of the selected codec, now only accepting mulaw without checking errors audio_tx_send_mulaw(s->tx_session, s->audio_network_device, compressed); uncompressed = NULL; } diff --git a/src/transmit.c b/src/transmit.c index 75ec3f2d0..a5607df37 100644 --- a/src/transmit.c +++ b/src/transmit.c @@ -791,7 +791,7 @@ void audio_tx_send_mulaw(struct tx* tx, struct rtp *rtp_session, audio_frame2 * // 8000 Hz, 1 channel is the ITU-T G.711 standard // More channels or Hz goes to DynRTP-Type97 -//TODO CHECK ACTUAL CHCOUNT //buffer->ch_count = 1; +//TODO CHECK ACTUAL CHCOUNT IN ORDER TO PROPERLY CREATE PAYLOAD TYPE if (buffer->ch_count == 1 && buffer->sample_rate == 8000) { pt = PT_ITU_T_G711_PCMU; } else { @@ -827,7 +827,7 @@ void audio_tx_send_mulaw(struct tx* tx, struct rtp *rtp_session, audio_frame2 * // Interleave the samples for (int ch_sample = 0 ; ch_sample < samples_per_packet ; ch_sample++){ for (int ch = 0 ; ch < buffer->ch_count ; ch++) { - //TODO if(buffer->data[ch]!=NULL){ + //TODO to be checked prepiously -> if(buffer->data[ch]!=NULL){ memcpy(curr_sample, (char *)(buffer->data[ch] + ch_sample), sizeof(uint8_t)); curr_sample += sizeof(uint8_t); data_remainig--;