updatePrefetchMapForAudio_() {
    const prefetchLimit = this.config_.segmentPrefetchLimit;
    const prefetchLanguages = this.config_.prefetchAudioLanguages;
    const LanguageUtils = shaka.util.LanguageUtils;

    for (const variant of this.manifest_.variants) {
      if (!variant.audio) {
        continue;
      }

      if (this.audioPrefetchMap_.has(variant.audio)) {
        // if we already have a segment prefetch,
        // update it's prefetch limit and if the new limit isn't positive,
        // remove the segment prefetch from our prefetch map.
        const prefetch = this.audioPrefetchMap_.get(variant.audio);
        prefetch.resetLimit(prefetchLimit);
        if (!(prefetchLimit > 0) ||
            !prefetchLanguages.some(
                (lang) => LanguageUtils.areLanguageCompatible(
                    variant.audio.language, lang))
        ) {
          const type = /** @type {!shaka.util.ManifestParserUtils.ContentType}*/
            (variant.audio.type);
          const mediaState = this.mediaStates_.get(type);
          const currentSegmentPrefetch = mediaState &&
              mediaState.segmentPrefetch;
          // if this prefetch isn't the current one, we want to clear it
          if (prefetch !== currentSegmentPrefetch) {
            prefetch.clearAll();
          }
          this.audioPrefetchMap_.delete(variant.audio);
        }
        continue;
      }

      // don't try to create a new segment prefetch if the limit isn't positive.
      if (prefetchLimit <= 0) {
        continue;
      }

      // only create a segment prefetch if its language is configured
      // to be prefetched
      if (!prefetchLanguages.some(
          (lang) => LanguageUtils.areLanguageCompatible(
              variant.audio.language, lang))) {
        continue;
      }

      // use the helper to create a segment prefetch to ensure that existing
      // objects are reused.
      const segmentPrefetch = this.createSegmentPrefetch_(variant.audio);

      // if a segment prefetch wasn't created, skip the rest
      if (!segmentPrefetch) {
        continue;
      }

      if (!variant.audio.segmentIndex) {
        variant.audio.createSegmentIndex();
      }

      this.audioPrefetchMap_.set(variant.audio, segmentPrefetch);
    }
  }
Populates the prefetch map depending on the configuration
@private