diff --git a/Source/OptionsView.cpp b/Source/OptionsView.cpp index acb82f4eb..069f04339 100644 --- a/Source/OptionsView.cpp +++ b/Source/OptionsView.cpp @@ -117,9 +117,10 @@ OptionsView::OptionsView(SonobusAudioProcessor& proc, std::functionaddItem(name, i+1); diff --git a/Source/PeersContainerView.cpp b/Source/PeersContainerView.cpp index 18f670509..4cf0ff3d1 100644 --- a/Source/PeersContainerView.cpp +++ b/Source/PeersContainerView.cpp @@ -526,35 +526,19 @@ PeerViewInfo * PeersContainerView::createPeerViewInfo() pvf->changeAllFormatButton->addListener(this); pvf->changeAllFormatButton->setLookAndFeel(&pvf->smallLnf); - + // initially don't add any choices to the send format choice buttons here + // the choices will later be added as soon as a peer sends us their supported codecs pvf->formatChoiceButton = std::make_unique(); pvf->formatChoiceButton->setTitle(TRANS("Send Quality")); pvf->formatChoiceButton->addChoiceListener(this); - int numformats = processor.getNumberAudioCodecFormats(); - for (int i=0; i < numformats; ++i) { - SonobusAudioProcessor::AudioCodecFormatInfo finfo; - processor.getAudioCodeFormatInfo(i, finfo); - auto name = finfo.name; - if (finfo.codec == SonobusAudioProcessor::AudioCodecFormatCodec::CodecOpus && finfo.bitrate < 96000) { - name += String(" (*)"); - } - pvf->formatChoiceButton->addItem(name, i); - } - pvf->formatChoiceButton->addItem("(*) " + TRANS("not recommended"), -2, true, true); + pvf->remoteSendFormatChoiceButton = std::make_unique(); + pvf->remoteSendFormatChoiceButton->addChoiceListener(this); + pvf->remoteSendFormatChoiceButton->setTitle(TRANS("Preferred Receive Quality")); pvf->staticFormatChoiceLabel = std::make_unique