Skip to content

Commit

Permalink
Merge pull request #60 from m5evt/master
Browse files Browse the repository at this point in the history
p1 audio fix
  • Loading branch information
g0orx authored Apr 28, 2020
2 parents ed8c9d2 + 5d6e8ad commit a3112a9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 3 additions & 5 deletions protocol1.c
Original file line number Diff line number Diff line change
Expand Up @@ -911,10 +911,8 @@ static void process_ozy_input_buffer(char *buffer) {
}
#endif

// No longer used, all packets sent to radio are through full protocol1_iq_samples or
// protocol1_eer_iq_samples
// Send rx audio back to radio
void protocol1_audio_samples(RECEIVER *rx,short left_audio_sample,short right_audio_sample) {
return;
if(!isTransmitting(radio)) {
// if(rx->mixed_audio==0) {
rx->mixed_left_audio=left_audio_sample;
Expand Down Expand Up @@ -1361,15 +1359,15 @@ void ozy_send_buffer() {
output_buffer[C2]|=0x02;
}

if ((radio->model=HERMES_LITE) && (radio->enable_pa)) {
if ((radio->discovered->device==DEVICE_HERMES_LITE2) && (radio->enable_pa)) {
output_buffer[C2]|=0x2C;
}
else {
if(radio->filter_board==APOLLO) {
output_buffer[C2]|=0x2C;
}
}
if(((radio->filter_board==APOLLO) || (radio->model=HERMES_LITE)) && radio->tune) {
if(((radio->filter_board==APOLLO) || (radio->discovered->device==DEVICE_HERMES_LITE2)) && radio->tune) {
output_buffer[C2]|=0x10;
}

Expand Down
4 changes: 3 additions & 1 deletion receiver.c
Original file line number Diff line number Diff line change
Expand Up @@ -988,7 +988,9 @@ static void process_rx_buffer(RECEIVER *rx) {
}
switch(radio->discovered->protocol) {
case PROTOCOL_1:
//protocol1_audio_samples(rx,left_audio_sample,right_audio_sample);
if(radio->discovered->device!=DEVICE_HERMES_LITE2) {
protocol1_audio_samples(rx,left_audio_sample,right_audio_sample);
}
break;
case PROTOCOL_2:
protocol2_audio_samples(rx,left_audio_sample,right_audio_sample);
Expand Down

0 comments on commit a3112a9

Please sign in to comment.