⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rmaausvc.pas

📁 Delphi源码REAlRMSDK.rar
💻 PAS
📖 第 1 页 / 共 3 页
字号:
    }

    function AddPreMixHook(pHook: IRMAAudioHook; bDisableWrite: BOOL): HRESULT; stdcall;

    {***********************************************************************
    *  Method:
    *      IRMAAudioStream::RemovePreMixHook
    *  Purpose:
    *		Use this to remove an already added "hook".
    }

    function RemovePreMixHook(pHook: IRMAAudioHook): HRESULT; stdcall;

    {***********************************************************************
    *  Method:
    *      IRMAAudioStream::AddDryNotification
    *  Purpose:
    *	    Use this to add a notification response object to get
    *	    notifications when audio stream is running dry.
    }

    function AddDryNotification(pNotification: IRMADryNotification): HRESULT; stdcall;

    {***********************************************************************
    *  Method:
    *      IRMAAudioStream::GetStreamInfo
    *  Purpose:
    *		Use this to get information specific to this audio stream.
    }

    function GetStreamInfo: IRMAValues; stdcall;

    {***********************************************************************
    *  Method:
    *      IRMAAudioStream::GetAudioVolume
    *  Purpose:
    *		Get the audio stream's volume interface. This volume controls
    *		the volume level for this audio stream.
    }

    function GetAudioVolume: IRMAVolume; stdcall;

  end;
  {$EXTERNALSYM IRMAAudioStream}

(***************************************************************************
 *
 *  Interface:
 *
 *  IRMAAudioStreamInfoResponse
 *
 *  Purpose:
 *
 *  Clients must implement this interface when interested in receiving
 *  notification of the total number of streams associated with this
 *  audio player.
 *
 *  IID_IRMAAudioStreamInfoResponse:
 *
 *  {00000706-0901-11d1-8B06-00A024406D59}
 *
 *)

const
  IID_IRMAAudioStreamInfoResponse: TGUID = '{00000706-0901-11d1-8B06-00A024406D59}';
  {$EXTERNALSYM IID_IRMAAudioStreamInfoResponse}

type
  IRMAAudioStreamInfoResponse = interface (IUnknown)
  ['{00000706-0901-11d1-8B06-00A024406D59}']

    {***********************************************************************
     *  Method:
     *      IRMAAudioStreamInfoResponse::OnStream
     *  Purpose:
     *	    The client implements this to get notification of streams
     *	    associated with this player. Use
     *	    AudioPlayer::SetStreamInfoResponse() to register your
     *	    implementation with the AudioPlayer. Once player has been
     *	    initialized, it will call OnStream() multiple times to pass all
     *	    the streams. Since a stream can be added mid-presentation,
     *	    IRMAAudioStreamInfoResponse object should be written to handle
     *	    OnStream() in the midst of the presentation as well.
     }

    function OnStream(pAudioStream: IRMAAudioStream): HRESULT; stdcall;

  end;
  {$EXTERNALSYM IRMAAudioStreamInfoResponse}

//***************************************************************************
//
//  Interface:
//
//  IRMAAudioPlayer
//
//  Purpose:
//
//  This interface provides access to the Audio Player services. Use this
//  interface to create audio streams, "hook" post-mixed audio data, and to
//  control volume levels.
//
//  IID_IRMAAudioPlayer:
//
//  {00000700-0901-11d1-8B06-00A024406D59}
//
//

const
  IID_IRMAAudioPlayer: TGUID = '{00000700-0901-11d1-8B06-00A024406D59}';
  {$EXTERNALSYM IID_IRMAAudioPlayer}

type
  IRMAAudioPlayer = interface (IUnknown)
  ['{00000700-0901-11d1-8B06-00A024406D59}']

    {************************************************************************
    *  Method:
    *      IRMAAudioPlayer::CreateAudioStream
    *  Purpose:
    *		Call this to create an audio stream.
    *}

    function CreateAudioStream(out pAudioStream: IRMAAudioStream): HRESULT; stdcall;

    {************************************************************************
    *  Method:
    *      IRMAAudioPlayer::AddPostMixHook
    *  Purpose:
    *		Call this to hook audio data after all audio streams in this
    *		have been mixed.
    *}

    function AddPostMixHook(pHook: IRMAAudioHook; bDisableWrite, bFinal: BOOL): HRESULT; stdcall;

    {************************************************************************
    *  Method:
    *      IRMAAudioPlayer::RemovePostMixHook
    *  Purpose:
    *		Call this to remove an already added post hook.
    *}

    function RemovePostMixHook(pHook: IRMAAudioHook): HRESULT; stdcall;

    {************************************************************************
    *  Method:
    *      IRMAAudioPlayer::GetAudioStreamCount
    *  Purpose:
    *		Get the number of audio streams currently active in the
    *		audio player. Since streams can be added mid-presentation
    *		this function may return different values on different calls.
    *		If the user needs to know about all the streams as they get
    *		get added to the player, IRMAAudioStreamInfoResponse should
    *		be implemented and passed in SetStreamInfoResponse.
    *}

    function GetAudioStreamCount: UINT16; stdcall;

    {************************************************************************
    *  Method:
    *      IRMAAudioPlayer::GetAudioStream
    *  Purpose:
    *		Get an audio stream at position given.
    *}

    function GetAudioStream(uIndex: UINT16): IRMAAudioStream; stdcall;

    {************************************************************************
    *  Method:
    *      IRMAAudioPlayer::SetStreamInfoResponse
    *  Purpose:
    *		Set a stream info response interface. A client must implement
    *		an IRMAAudioStreamInfoResponse and then call this method with
    *		the IRMAAudioStreamInfoResponse as the parameter. The audio
    *		player will call IRMAAudioStreamInfoResponse::OnStreamsReady
    *		with the total number of audio streams associated with this
    *		audio player.
    }

    function SetStreamInfoResponse(pResponse: IRMAAudioStreamInfoResponse): HRESULT; stdcall;

    {***********************************************************************
    *  Method:
    *      IRMAAudioPlayer::RemoveStreamInfoResponse
    *  Purpose:
    *		Remove stream info response that was added earlier
    }

    function RemoveStreamInfoResponse(pResponse: IRMAAudioStreamInfoResponse): HRESULT; stdcall;

    {***********************************************************************
    *  Method:
    *      IRMAAudioPlayer::GetAudioVolume
    *  Purpose:
    *		Get the audio player's volume interface. This volume controls
    *		the volume level of all the mixed audio streams for this
    *		audio player.
    }

    function GetAudioVolume: IRMAVolume; stdcall;

    {***********************************************************************
    *  Method:
    *      IRMAAudioPlayer::GetDeviceVolume
    *  Purpose:
    *		Get the audio device volume interface. This volume controls
    *		the audio device volume levels.
    }

    function GetDeviceVolume: IRMAVolume; stdcall;

  end;
  {$EXTERNALSYM IRMAAudioPlayer}

//**************************************************************************
//
//  Interface:
//
//  IRMAAudioPlayerResponse
//
//  Purpose:
//
//  This interface provides access to the Audio Player Response. Use this
//  to receive audio player playback notifications. Your implementation of
//  OnTimeSync() is called with the current audio playback time (millisecs).
//  This interface is currently to be used ONLY by the RMA engine internally.
//
//  IID_IRMAAudioPlayerResponse:
//
//  {00000701-0901-11d1-8B06-00A024406D59}
//
//

const
  IID_IRMAAudioPlayerResponse: TGUID = '{00000701-0901-11d1-8B06-00A024406D59}';
  {$EXTERNALSYM IID_IRMAAudioPlayerResponse}

type
  IRMAAudioPlayerResponse = interface (IUnknown)
  ['{00000701-0901-11d1-8B06-00A024406D59}']

    //**********************************************************************
    //  Method:
    //      IRMAAudioPlayerResponse::OnTimeSync
    //  Purpose:
    //	    This method is called with the current audio playback time.
    //

    function OnTimeSync(ulTimeEnd: ULONG32): HRESULT; stdcall;

  end;
  {$EXTERNALSYM IRMAAudioPlayerResponse}

(***************************************************************************
 *
 *  Interface:
 *	IRMAAudioDeviceResponse
 *
 *  Purpose:
 *
 *	Object that exports audio device Response API
 *	This interface is currently to be used ONLY by the RMA engine
 *	internally.
 *
 *  IID_IRMAAudioDeviceResponse:
 *
 *  {00000704-0901-11d1-8B06-00A024406D59}
 *
 *)

const
  IID_IRMAAudioDeviceResponse: TGUID = '{00000704-0901-11d1-8B06-00A024406D59}';
  {$EXTERNALSYM IID_IRMAAudioDeviceResponse}

type
  IRMAAudioDeviceResponse = interface (IUnknown)
  ['{00000704-0901-11d1-8B06-00A024406D59}']

    {***********************************************************************
     *  Method:
     *      IRMAAudioDeviceResponse::OnTimeSync
     *  Purpose:
     *      Notification interface provided by users of the IRMAAudioDevice
     *      interface. This method is called by the IRMAAudioDevice when
     *      audio playback occurs.
     }

    function OnTimeSync(ulTimeEnd: ULONG32): HRESULT; stdcall;

  end;
  {$EXTERNALSYM IRMAAudioDeviceResponse}

(***************************************************************************
 *
 *  Interface:
 *
 *	IRMAAudioDevice
 *
 *  Purpose:
 *
 *	Object that exports audio device API
 *	This interface is currently to be used ONLY by the RMA engine
 *	internally.
 *
 *  IID_IRMAAudioDevice:
 *
 *	{00000703-0901-11d1-8B06-00A024406D59}
 *
 *)

const
  IID_IRMAAudioDevice: TGUID = '{00000703-0901-11d1-8B06-00A024406D59}';
  {$EXTERNALSYM IID_IRMAAudioDevice}

type
  IRMAAudioDevice = interface (IUnknown)
  ['{00000703-0901-11d1-8B06-00A024406D59}']

    {***********************************************************************
    *  Method:
    *	    IRMAAudioDevice::Open
    *  Purpose:
    *	    The caller calls this to open the audio device using the audio
    *	    format given.
    }

    function Open(pAudioFormat: RMAAudioFormat; pStreamResponse: IRMAAudioDeviceResponse): HRESULT; stdcall;

    {***********************************************************************
    *  Method:
    *      IRMAAudioDevice::Close
    *  Purpose:
    *		The caller calls this to close the audio device.
    }

    function Close(bFlush: BOOL): HRESULT; stdcall;

    {***********************************************************************
    *  Method:
    *	    IRMAAudioDevice::Resume
    *  Purpose:
    *	    The caller calls this to start or resume audio playback.
    }

    function Resume: HRESULT; stdcall;

    {***********************************************************************
    *  Method:
    *	    IRMAAudioDevice::Pause
    *  Purpose:

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -