diff --git a/Include/Library/OcBootManagementLib.h b/Include/Library/OcBootManagementLib.h index 8202ff66..f0e69bb7 100755 --- a/Include/Library/OcBootManagementLib.h +++ b/Include/Library/OcBootManagementLib.h @@ -1169,15 +1169,13 @@ OcPlayAudioBeep ( @param[in] Context Picker context. @param[in] Entry Entry to play. - @param[in] Number Entry index number. @retval EFI_SUCCESS on success or when unnecessary. **/ EFI_STATUS OcPlayAudioEntry ( IN OC_PICKER_CONTEXT *Context, - IN OC_BOOT_ENTRY *Entry, - IN UINT32 Number + IN OC_BOOT_ENTRY *Entry ); /** diff --git a/Library/OcBootManagementLib/BootAudio.c b/Library/OcBootManagementLib/BootAudio.c index 56706416..b8b505d1 100644 --- a/Library/OcBootManagementLib/BootAudio.c +++ b/Library/OcBootManagementLib/BootAudio.c @@ -172,11 +172,10 @@ OcPlayAudioBeep ( EFI_STATUS OcPlayAudioEntry ( IN OC_PICKER_CONTEXT *Context, - IN OC_BOOT_ENTRY *Entry, - IN UINT32 Number + IN OC_BOOT_ENTRY *Entry ) { - OcPlayAudioFile (Context, OcVoiceOverAudioFileIndexBase + Number, FALSE); + OcPlayAudioFile (Context, OcVoiceOverAudioFileIndexBase + Entry->EntryIndex, FALSE); if (Entry->Type == OC_BOOT_APPLE_OS) { OcPlayAudioFile (Context, OcVoiceOverAudioFilemacOS, FALSE); diff --git a/Library/OcBootManagementLib/OcBootManagementLib.c b/Library/OcBootManagementLib/OcBootManagementLib.c index 0c69f1dc..5565704e 100644 --- a/Library/OcBootManagementLib/OcBootManagementLib.c +++ b/Library/OcBootManagementLib/OcBootManagementLib.c @@ -203,7 +203,7 @@ OcShowSimpleBootMenu ( if (!PlayedOnce && BootContext->PickerContext->PickerAudioAssist) { OcPlayAudioFile (BootContext->PickerContext, OcVoiceOverAudioFileChooseOS, FALSE); for (Index = 0; Index < Count; ++Index) { - OcPlayAudioEntry (BootContext->PickerContext, BootEntries[Index], BootEntries[Index]->EntryIndex); + OcPlayAudioEntry (BootContext->PickerContext, BootEntries[Index]); if (TimeOutSeconds > 0 && BootContext->DefaultEntry->EntryIndex - 1 == Index) { OcPlayAudioFile (BootContext->PickerContext, OcVoiceOverAudioFileDefault, FALSE); } @@ -230,7 +230,7 @@ OcShowSimpleBootMenu ( if (PlayChosen && KeyIndex == OC_INPUT_TIMEOUT) { OcPlayAudioFile (BootContext->PickerContext, OcVoiceOverAudioFileSelected, FALSE); - OcPlayAudioEntry (BootContext->PickerContext, BootEntries[ChosenEntry], BootEntries[Index]->EntryIndex); + OcPlayAudioEntry (BootContext->PickerContext, BootEntries[ChosenEntry]); PlayChosen = FALSE; continue; } else if (KeyIndex == OC_INPUT_TIMEOUT) { @@ -641,7 +641,7 @@ OcRunBootPicker ( if (Context->PickerCommand == OcPickerShowPicker) { OcPlayAudioFile (Context, OcVoiceOverAudioFileSelected, FALSE); OcPlayAudioFile (Context, OcVoiceOverAudioFileDefault, FALSE); - OcPlayAudioEntry (Context, Chosen, Chosen->EntryIndex); + OcPlayAudioEntry (Context, Chosen); } Status = OcSetDefaultBootEntry (Context, Chosen); DEBUG ((DEBUG_INFO, "OCB: Setting default - %r\n", Status)); @@ -663,7 +663,7 @@ OcRunBootPicker ( // Voice chosen information. // OcPlayAudioFile (Context, OcVoiceOverAudioFileLoading, FALSE); - Status = OcPlayAudioEntry (Context, Chosen, Chosen->EntryIndex); + Status = OcPlayAudioEntry (Context, Chosen); if (EFI_ERROR (Status)) { OcPlayAudioBeep ( Context,