📄 rmaausvc.pas
字号:
* The caller calls this to pause the audio device. If bFlush is
* TRUE, any buffers in the audio device will be flushed; otherwise,
* the buffers are played.
}
function Pause: HRESULT; stdcall;
{***********************************************************************
* Method:
* IRMAAudioDevice::Write
* Purpose:
* The caller calls this to write an audio buffer.
}
function Write(pAudioData: RMAAudioData): HRESULT; stdcall;
{***********************************************************************
* Method:
* IRMAAudioDevice::InitVolume
* Purpose:
* The caller calls this to inform the audio stream of the client's
* volume range. The audio stream maps the client's volume range
* into the audio device volume range.
* NOTE: This function returns TRUE if volume is supported by this
* audio device.
}
function InitVolume(uMinVolume, uMaxVolume: UINT16): BOOL; stdcall;
{***********************************************************************
* Method:
* IRMAAudioDevice::SetVolume
* Purpose:
* The caller calls this to set the audio device volume level.
}
function SetVolume(uVolume: UINT16): HRESULT; stdcall;
{***********************************************************************
* Method:
* IRMAAudioDevice::GetVolume
* Purpose:
* The caller calls this to get the audio device volume level.
}
function GetVolume: UINT16; stdcall;
{***********************************************************************
* Method:
* IRMAAudioDevice::Reset
* Purpose:
* The caller calls this to reset the audio device.
}
function Reset: HRESULT; stdcall;
{***********************************************************************
* Method:
* IRMAAudioDevice::Drain
* Purpose:
* The caller calls this to drain the audio device.
}
function Drain: HRESULT; stdcall;
{***********************************************************************
* Method:
* IRMAAudioDevice::CheckFormat
* Purpose:
* The caller calls this to check the input format with the
* audio device format.
}
function CheckFormat(pAudioFormat: RMAAudioFormat): HRESULT; stdcall;
{***********************************************************************
* Method:
* IRMAAudioDevice::GetCurrentAudioTime
* Purpose:
* The caller calls this to get current system audio time.
}
function GetCurrentAudioTime(out ulCurrentTime: ULONG32): HRESULT; stdcall;
end;
{$EXTERNALSYM IRMAAudioDevice}
(***************************************************************************
*
* Interface:
*
* IRMAAudioDeviceManager
*
* Purpose:
*
* Allows the default audio device to be replaced.
*
* IID_IRMAAudioDeviceManager:
*
* {0000070A-0901-11d1-8B06-00A024406D59}
*
*)
const
IID_IRMAAudioDeviceManager: TGUID = '{0000070A-0901-11d1-8B06-00A024406D59}';
{$EXTERNALSYM IID_IRMAAudioDeviceManager}
type
IRMAAudioDeviceManager = interface (IUnknown)
['{0000070A-0901-11d1-8B06-00A024406D59}']
{*********************************************************************
* Method:
* IRMAAudioDeviceManager::Replace
* Purpose:
* This is used to replace the default implementation of the audio
* device by the given audio device interface.
}
function Replace(pAudioDevice: IRMAAudioDevice): HRESULT; stdcall;
{*********************************************************************
* Method:
* IRMAAudioDeviceManager::Remove
* Purpose:
* This is used to remove the audio device given to the manager in
* the earlier call to Replace.
}
function Remove(pAudioDevice: IRMAAudioDevice): HRESULT; stdcall;
{***********************************************************************
* Method:
* IRMAAudioDeviceManager::AddFinalHook
* Purpose:
* One last chance to modify data being written to the audio device.
* This hook allows the user to change the audio format that
* is to be written to the audio device. This can be done in call
* to OnInit() in IRMAAudioHook.
}
function SetFinalHook(pHook: IRMAAudioHook): HRESULT; stdcall;
{***********************************************************************
* Method:
* IRMAAudioDeviceManager::RemoveFinalHook
* Purpose:
* Remove final hook
}
function RemoveFinalHook(pHook: IRMAAudioHook): HRESULT; stdcall;
{***********************************************************************
* Method:
* IRMAAudioDeviceManager::GetAudioFormat
* Purpose:
* Returns the audio format in which the audio device is opened.
* This function will fill in the pre-allocated RMAAudioFormat
* structure passed in.
}
function GetAudioFormat(var pAudioFormat: RMAAudioFormat): HRESULT; stdcall;
end;
{$EXTERNALSYM IRMAAudioDeviceManager}
(***************************************************************************
*
* Interface:
*
* IRMAAudioCrossFade
*
* Purpose:
*
* This interface can be used to cross-fade two audio streams. It is exposed
* by IRMAAudioPlayer
*
* IID_IRMAAudioCrossFade:
*
* {0000070B-0901-11d1-8B06-00A024406D59}
*
*)
const
IID_IRMAAudioCrossFade: TGUID = '{0000070B-0901-11d1-8B06-00A024406D59}';
{$EXTERNALSYM IID_IRMAAudioCrossFade}
type
IRMAAudioCrossFade = interface (IUnknown)
['{0000070B-0901-11d1-8B06-00A024406D59}']
{***********************************************************************
* Method:
* IRMAAudioCrossFade::CrossFade
* Purpose:
* Cross-fade two audio streams.
* pStreamFrom - Stream to be cross faded from
* pStreamTo - Stream to be cross faded to
* ulFromCrossFadeStartTime- "From" Stream time when cross fade is
* to be started
* ulToCrossFadeStartTime - "To" Stream time when cross fade is to
* be started
* ulCrossFadeDuration - Duration over which cross-fade needs
* to be done
*
}
function CrossFade(pStreamFrom, pStreamTo: IRMAAudioStream; ulFromCrossFadeStartTime,
ulToCrossFadeStartTime, ulCrossFadeDuration: UINT32): HRESULT; stdcall;
end;
{$EXTERNALSYM IRMAAudioCrossFade}
(***************************************************************************
*
* Interface:
*
* IRMAAudioStream2
*
* Purpose:
*
* This interface contains some last-minute added audio stream functions
*
* IID_IRMAAudioStream2:
*
* {0000070C-0901-11d1-8B06-00A024406D59}
*
*)
const
IID_IRMAAudioStream2: TGUID = '{0000070C-0901-11d1-8B06-00A024406D59}';
{$EXTERNALSYM IID_IRMAAudioStream2}
type
IRMAAudioStream2 = interface (IUnknown)
['{0000070C-0901-11d1-8B06-00A024406D59}']
{***********************************************************************
* Method:
* IRMAAudioStream2::RemoveDryNotification
* Purpose:
* Use this to remove itself from the notification response object
* during the stream switching.
}
function RemoveDryNotification(pNotification: IRMADryNotification): HRESULT; stdcall;
{***********************************************************************
* Method:
* IRMAAudioStream2::GetAudioFormat
* Purpose:
* Returns the input audio format of the data written by the
* renderer. This function will fill in the pre-allocated
* RMAAudioFormat structure passed in.
}
function GetAudioFormat(var pAudioFormat: RMAAudioFormat): HRESULT; stdcall;
end;
{$EXTERNALSYM IRMAAudioStream2}
(***************************************************************************
*
* Interface:
*
* IRMAAudioPushdown
*
* Purpose:
*
* This interface can be used to setup the audio pushdown time.
*
* IID_IRMAAudioPushdown:
*
* {0000070D-0901-11d1-8B06-00A024406D59}
*
*)
const
IID_IRMAAudioPushdown: TGUID = '{0000070D-0901-11d1-8B06-00A024406D59}';
{$EXTERNALSYM IID_IRMAAudioPushdown}
type
IRMAAudioPushdown = interface (IUnknown)
['{0000070D-0901-11d1-8B06-00A024406D59}']
{***********************************************************************
* Method:
* IRMAAudioPushdown::SetAudioPushdown
* Purpose:
* Use this to set the minimum audio pushdown value in ms.
* This is the amount of audio data that is being written
* to the audio device before starting playback.
}
function SetAudioPushdown(ulAudioPushdown: UINT32): HRESULT; stdcall;
end;
{$EXTERNALSYM IRMAAudioPushdown}
(***************************************************************************
*
* Interface:
*
* IRMAAudioHookManager
*
* Purpose:
*
* This interface can be used to add a hook at the audio device layer.
*
* IID_IRMAAudioHookManager:
*
* {0000070E-0901-11d1-8B06-00A024406D59}
*
*)
const
IID_IRMAAudioHookManager: TGUID = '{0000070E-0901-11d1-8B06-00A024406D59}';
{$EXTERNALSYM IID_IRMAAudioHookManager}
type
IRMAAudioHookManager = interface (IUnknown)
['{0000070E-0901-11d1-8B06-00A024406D59}']
{***********************************************************************
* Method:
* IRMAAudioHookManager::AddHook
* Purpose:
* Use this to add a hook
}
function AddHook(pHook: IRMAAudioHook): HRESULT; stdcall;
{***********************************************************************
* Method:
* IRMAAudioHookManager::RemoveHook
* Purpose:
* Use this to remove a hook
}
function RemoveHook(pHook: IRMAAudioHook): HRESULT; stdcall;
end;
{$EXTERNALSYM IRMAAudioHookManager}
implementation
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -