Fixes an issue where file playing could happen at a lower sampling frequency than the file.
Details: The mixer looks at all the participants desired frequency and concludes the highest desired mixing frequency. This is the frequency that the mixer will mix at. Participants that are always mixed are in a separate list and the function concluding the highest desired mixing frequency did not look at that list and therefore always conclude that the lowest mixing frequency is sufficient. Review URL: http://webrtc-codereview.appspot.com/277003 git-svn-id: http://webrtc.googlecode.com/svn/trunk@915 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
eb4ef17bbd
commit
2f32b5c8a7
@ -625,9 +625,30 @@ WebRtc_Word32 AudioConferenceMixerImpl::SetMinimumMixingFrequency(
|
||||
// Check all AudioFrames that are to be mixed. The highest sampling frequency
|
||||
// found is the lowest that can be used without losing information.
|
||||
WebRtc_Word32 AudioConferenceMixerImpl::GetLowestMixingFrequency()
|
||||
{
|
||||
const int participantListFrequency =
|
||||
GetLowestMixingFrequencyFromList(_participantList);
|
||||
const int anonymousListFrequency =
|
||||
GetLowestMixingFrequencyFromList(_additionalParticipantList);
|
||||
const int highestFreq =
|
||||
(participantListFrequency > anonymousListFrequency) ?
|
||||
participantListFrequency : anonymousListFrequency;
|
||||
// Check if the user specified a lowest mixing frequency.
|
||||
if(_minimumMixingFreq != kLowestPossible)
|
||||
{
|
||||
if(_minimumMixingFreq > highestFreq)
|
||||
{
|
||||
return _minimumMixingFreq;
|
||||
}
|
||||
}
|
||||
return highestFreq;
|
||||
}
|
||||
|
||||
WebRtc_Word32 AudioConferenceMixerImpl::GetLowestMixingFrequencyFromList(
|
||||
ListWrapper& mixList)
|
||||
{
|
||||
WebRtc_Word32 highestFreq = 8000;
|
||||
ListItem* item = _participantList.First();
|
||||
ListItem* item = mixList.First();
|
||||
while(item)
|
||||
{
|
||||
MixerParticipant* participant =
|
||||
@ -637,16 +658,7 @@ WebRtc_Word32 AudioConferenceMixerImpl::GetLowestMixingFrequency()
|
||||
{
|
||||
highestFreq = neededFrequency;
|
||||
}
|
||||
item = _participantList.Next(item);
|
||||
}
|
||||
|
||||
// Check if the user specified a lowest mixing frequency.
|
||||
if(_minimumMixingFreq != kLowestPossible)
|
||||
{
|
||||
if(_minimumMixingFreq > highestFreq)
|
||||
{
|
||||
return _minimumMixingFreq;
|
||||
}
|
||||
item = mixList.Next(item);
|
||||
}
|
||||
return highestFreq;
|
||||
}
|
||||
|
@ -104,6 +104,7 @@ private:
|
||||
// Return the lowest mixing frequency that can be used without having to
|
||||
// downsample any audio.
|
||||
WebRtc_Word32 GetLowestMixingFrequency();
|
||||
WebRtc_Word32 GetLowestMixingFrequencyFromList(ListWrapper& mixList);
|
||||
|
||||
// Return the AudioFrames that should be mixed anonymously.
|
||||
void GetAdditionalAudio(ListWrapper& additionalFramesList);
|
||||
|
Loading…
x
Reference in New Issue
Block a user