Here are the examples of the csharp api System.Collections.Generic.IEnumerable.WhereHasAudio() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
1 Examples
19
Source : GrabbedMediaExtensions.cs
with GNU Lesser General Public License v3.0
from dotnettools
with GNU Lesser General Public License v3.0
from dotnettools
public static GrabbedMedia GetHighestQualityAudio(
this IEnumerable<GrabbedMedia> grabbed)
{
GrabbedMedia result = null;
var highestBitRate = -1;
foreach (var media in grabbed.WhereHasAudio())
{
var bitrate = media.GetBitRate();
if (highestBitRate >= 0 && (!bitrate.HasValue || bitrate.Value <= highestBitRate))
continue;
highestBitRate = bitrate ?? 0;
result = media;
}
return result;
}