OpenCore  1.0.4
OpenCore Bootloader
Loading...
Searching...
No Matches
BootAudio.c File Reference
#include "BootManagementInternal.h"
#include <Guid/AppleFile.h>
#include <Guid/AppleVariable.h>
#include <Guid/OcVariable.h>
#include <IndustryStandard/AppleCsrConfig.h>
#include <Protocol/AppleBootPolicy.h>
#include <Protocol/AppleKeyMapAggregator.h>
#include <Protocol/AppleBeepGen.h>
#include <Protocol/LoadedImage.h>
#include <Protocol/OcAudio.h>
#include <Protocol/SimpleTextOut.h>
#include <Library/BaseLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/BaseOverflowLib.h>
#include <Library/OcConsoleLib.h>
#include <Library/OcCryptoLib.h>
#include <Library/OcDebugLogLib.h>
#include <Library/DevicePathLib.h>
#include <Library/OcTimerLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/OcAppleKeyMapLib.h>
#include <Library/OcBootManagementLib.h>
#include <Library/OcDevicePathLib.h>
#include <Library/OcFileLib.h>
#include <Library/OcMiscLib.h>
#include <Library/OcRtcLib.h>
#include <Library/OcStringLib.h>
#include <Library/PrintLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/UefiRuntimeServicesTableLib.h>
#include <Library/UefiLib.h>

Go to the source code of this file.

Functions

EFI_STATUS EFIAPI OcPreLocateAudioProtocol (IN OC_PICKER_CONTEXT *Context)
 
EFI_STATUS EFIAPI OcPlayAudioFile (IN OC_PICKER_CONTEXT *Context, IN CONST CHAR8 *BasePath, IN CONST CHAR8 *BaseType, IN BOOLEAN Fallback)
 
EFI_STATUS EFIAPI OcPlayAudioBeep (IN OC_PICKER_CONTEXT *Context, IN UINT32 ToneCount, IN UINT32 ToneLength, IN UINT32 SilenceLength)
 
EFI_STATUS EFIAPI OcPlayAudioEntry (IN OC_PICKER_CONTEXT *Context, IN OC_BOOT_ENTRY *Entry)
 
VOID EFIAPI OcToggleVoiceOver (IN OC_PICKER_CONTEXT *Context, IN CONST CHAR8 *BasePath OPTIONAL, IN CONST CHAR8 *BaseType OPTIONAL)
 

Detailed Description

Copyright (C) 2020, vit9696. All rights reserved.

All rights reserved.

This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php

THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.

Definition in file BootAudio.c.

Function Documentation

◆ OcPlayAudioBeep()

EFI_STATUS EFIAPI OcPlayAudioBeep ( IN OC_PICKER_CONTEXT * Context,
IN UINT32 ToneCount,
IN UINT32 ToneLength,
IN UINT32 SilenceLength )

Generate cycles of beep signals for context with silence afterwards, blocking.

Parameters
[in]ContextPicker context.
[in]ToneCountNumber of signals to produce.
[in]ToneLengthSignal length in milliseconds.
[in]SilenceLengthSilence length in milliseconds.
Return values
EFI_SUCCESSon success or when unnecessary.

Definition at line 155 of file BootAudio.c.

◆ OcPlayAudioEntry()

EFI_STATUS EFIAPI OcPlayAudioEntry ( IN OC_PICKER_CONTEXT * Context,
IN OC_BOOT_ENTRY * Entry )

Play audio entry for context.

Parameters
[in]ContextPicker context.
[in]EntryEntry to play.
Return values
EFI_SUCCESSon success or when unnecessary.

Definition at line 188 of file BootAudio.c.

◆ OcPlayAudioFile()

EFI_STATUS EFIAPI OcPlayAudioFile ( IN OC_PICKER_CONTEXT * Context,
IN CONST CHAR8 * BasePath,
IN CONST CHAR8 * BaseType,
IN BOOLEAN Fallback )

Play audio file for context.

Parameters
[in]ContextPicker context.
[in]BasePathFile base path.
[in]BaseTypeAudio base type.
[in]FallbackTry to fallback to beeps on failure.
Return values
EFI_SUCCESSon success or when unnecessary.

Definition at line 77 of file BootAudio.c.

◆ OcPreLocateAudioProtocol()

EFI_STATUS EFIAPI OcPreLocateAudioProtocol ( IN OC_PICKER_CONTEXT * Context)

Pre-locate audio protocol for picker context, so that boot entry protocol methods can treat this as the definitive audio protocol instance.

Parameters
[in]ContextPicker context.
Return values
EFI_SUCCESSon success or when unnecessary.

Definition at line 53 of file BootAudio.c.

◆ OcToggleVoiceOver()

VOID EFIAPI OcToggleVoiceOver ( IN OC_PICKER_CONTEXT * Context,
IN CONST CHAR8 *BasePath OPTIONAL,
IN CONST CHAR8 *BaseType OPTIONAL )

Toggle VoiceOver support.

Parameters
[in]ContextPicker context.
[in]BasePathFile base path of file to play after enabling VoiceOver.
[in]BaseTypeAudio base type of file to play after enabling VoiceOver.

Definition at line 255 of file BootAudio.c.