Skip to content

Commit

Permalink
Fix repeated frame length
Browse files Browse the repository at this point in the history
  • Loading branch information
kantooon committed Dec 3, 2017
1 parent 1a0f0e3 commit 6e0a2bb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,19 @@ Possible applications:
- robotics
- sattelite radio communications
- point to point private radio systems
- radio communications repeater
- portable VHF-UHF SDR transceiver


Features
---

- Transmit and receive analog voice, digital voice, text messages, digital video, IP protocol.
- Analog and digital mode repeater - full duplex mode, no mixed mode repeater
- VOIP connection between two or more stations operating in simplex or semi-duplex mode
- Direct VOIP talk-around
- Radio forwarding over VOIP - forward analog or digital radio to VOIP connection and viceversa
- TLS session encryption
- Transmit and receive analog voice, digital voice, text messages, digital video, IP protocol.
- Mixed operation mode: transmit one mode and receive another
- Digital voice codecs: Codec2 700 bit/s, Codec2 1400 bit/s, Opus 9600 bit/s
- Narrow band digital voice mode with the [Codec2](http://rowetel.com/codec2.html) audio codec
Expand Down
7 changes: 5 additions & 2 deletions gr/gr_modem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@ void gr_modem::synchronize(int v_size, std::vector<unsigned char> *data)
if((_modem_type_rx != gr_modem_types::ModemTypeBPSK1000)
&& (_current_frame_type == FrameTypeVoice))
{
frame_length++;
frame_length++; // reserved data
}
else
{
Expand All @@ -640,7 +640,10 @@ void gr_modem::synchronize(int v_size, std::vector<unsigned char> *data)
if(_repeater && (_current_frame_type == gr_modem::FrameTypeVoice))
{
unsigned char *repeated_frame = new unsigned char[frame_length];
memcpy(repeated_frame,frame_data,frame_length);
if(_modem_type_rx == gr_modem_types::ModemTypeBPSK1000)
memcpy(repeated_frame, frame_data, _frame_length);
else
memcpy(repeated_frame, frame_data+1, _frame_length); // take into account reserved data
processAudioData(repeated_frame, frame_length); // TODO: clean up
}
processReceivedData(frame_data, _current_frame_type);
Expand Down

0 comments on commit 6e0a2bb

Please sign in to comment.