The Difference Between “Selected” and “Current” tracks

In HD DVD, there are two ways to figure out which subtitle or audio track the user has chosen. The selectedAudioTrackNumber (and selectedAudioLanguageCode / selectedAudioLanguageCodeExtension) properties refer to the track (language) that the user has selected, but they may or may not represent the currently-playing track / language. The currentAudioTrackNumber (etc.) refer to the track that is actually playing right now. The same goes for subtitle tracks.

The different sets of properties are basically used to ensure the user gets the language they prefer if it is available, but if not then the script code can always check what the fallback value was to display the appropriate UI. For example, assume you have a main feature with the following audio tracks:

  1. English
  2. Spanish
  3. German
  4. Japanese

And also assume you have a documentary with the following audio tracks:

  1. English
  2. Japanese

If the user is listening in English, it is easy. The selected and current tracks are always 1, and the language code is EN (I won't go into extensions here). Now if the user is listening to the feature in Japanese, both the selected and current tracks are 4, and the language code is JA. Now the user jumps to the documentary, but track 4 no longer exists. Using the selection algorithm (section 4.3.19.4.2 of the spec) the system searches for another Japanese track and finds it in track number 2. So the selected track is still 4 (so that when jumping back to the main feature, the right track is selected) but the current track is 2. Both selected and current language is still JA.

Now if the user is listening to the feature in German (track 3), we have a bit of a problem. Switching to the documentary, there is neither a track number 3 nor a DE-language track, so we select the lowest available instead (English). Now the selected track / language is 3 / DE, but the current track / language is 1 / EN. But when they switch back to the feature, they get their native German back again.