human: 如何处理七牛云的实时音视频QNRemoteAudioTrack

gpt: [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Linux >QNRemoteAudioTrack

#  QNRemoteAudioTrack

最近更新时间: 2022-03-28 23:06:54

音频远端 Track 类

Hierarchy

  * [QNTrack](https://developer.qiniu.com/rtc/11212/QNRemoteAudioTrack-Linux/11222/QNTrack-Linux)
    * [QNLocalTrack](https://developer.qiniu.com/rtc/11212/QNRemoteAudioTrack-Linux/11208/QNLocalTrack-Linux)
      * [QNLocalVideoTrack](https://developer.qiniu.com/rtc/11212/QNRemoteAudioTrack-Linux/11209/QNLocalVideoTrack-Linux)
        * [QNCameraVideoTrack](https://developer.qiniu.com/rtc/11212/QNRemoteAudioTrack-Linux/11198/QNCameraVideoTrack-Linux)
        * [QNCustomVideoTrack](https://developer.qiniu.com/rtc/11212/QNRemoteAudioTrack-Linux/11205/QNCustomVideoTrack-Linux)
      * [QNLocalAudioTrack](https://developer.qiniu.com/rtc/11212/QNRemoteAudioTrack-Linux/11207/QNLocalAudioTrack-Linux)
        * [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/11212/QNRemoteAudioTrack-Linux/11210/QNMicrophoneAudioTrack-Linux)
        * [QNCustomAudioTrack](https://developer.qiniu.com/rtc/11212/QNRemoteAudioTrack-Linux/11203/QNCustomAudioTrack-Linux)
    * [QNRemoteTrack](https://developer.qiniu.com/rtc/11212/QNRemoteAudioTrack-Linux/11213/QNRemoteTrack-Linux)
      * [QNRemoteVideoTrack](https://developer.qiniu.com/rtc/11212/QNRemoteAudioTrack-Linux/11215/QNRemoteVideoTrack-Linux)
      * QNRemoteAudioTrack 

Index

Core Methods

  * GetTrackID
  * GetUserID
  * GetTag
  * IsAudio
  * IsVideo
  * IsMuted
  * SetTrackInfoChangedListener
  * IsSubscribed
  * SetAudioFrameListener
  * SetVolume
  * GetVolumeLevel

Core Methods

GetTrackID

  * virtual const std::string& GetTrackID() = 0
  * 获取 TrackID

Returns string

GetUserID

  * virtual const std::string& GetUserID() = 0
  * 获取 UserID

Returns string

GetTag

  * virtual const std::string& GetTag() = 0
  * 获取 Tag

Returns string

IsAudio

  * virtual bool IsAudio() = 0
  * 是否为音频 track

Returns bool

IsVideo

  * virtual bool IsVideo() = 0
  * 是否为视频 track

Returns bool

IsMuted

  * virtual bool IsMuted() = 0
  * 是否 muted

Returns bool

SetTrackInfoChangedListener

  * virtual void SetTrackInfoChangedListener([QNTrackInfoChangedListener](https://developer.qiniu.com/rtc/11212/QNRemoteAudioTrack-Linux/11223/QNTrackInfoChangedListener-Linux)* listener) = 0
  * 设置当前轨道信息变化监听器

Parameters

    * listener: [QNTrackInfoChangedListener](https://developer.qiniu.com/rtc/11212/QNRemoteAudioTrack-Linux/11223/QNTrackInfoChangedListener-Linux)

轨道信息变化监听器

IsSubscribed

  * virtual bool IsSubscribed() = 0;
  * 该 Track 是否被订阅

Returns bool

SetAudioFrameListener

  * virtual void SetAudioFrameListener([QNAudioFrameListener](https://developer.qiniu.com/rtc/11212/QNRemoteAudioTrack-Linux/11189/QNAudioFrameListener-Linux)* listener) = 0
  * 设置是音频数据监听

Parameters

    * listener: [QNAudioFrameListener](https://developer.qiniu.com/rtc/11212/QNRemoteAudioTrack-Linux/11189/QNAudioFrameListener-Linux)

音频数据监听接口

SetVolume

  * virtual void SetVolume(double volume) = 0
  * 设置远端音频音量（不改变系统设备的音量）

Parameters

    * volume: double 

音量大小，[1.0-10.0], 默认为 1.0

GetVolumeLevel

  * virtual float GetVolumeLevel() = 0
  * 获取音频播放音量

Returns float

以上内容是否对您有帮助？