Skip to content

SNPCMPlayer

Ju Liaoyuan edited this page Dec 20, 2022 · 1 revision

SNPCMPlayer Protocol Reference

  Conforms to NSObject
  Declared in SNPCMPlayer.h

Tasks

  provider property required method

– startPlay required method

– stopPlay required method

– getPCMFormat required method

– setVolume: required method

– volume required method

– destroy required method

Properties

provider

PCM 提供方

@property (nonatomic, weak) id<SNPCMPlayerProvider> provider

Discussion

PCM 提供方

Declared In

  • SNPCMPlayer.h

Instance Methods

destroy

销毁播放器,再次使用时需要重新初始化

- (void)destroy

Discussion

销毁播放器,再次使用时需要重新初始化

Declared In

  • SNPCMPlayer.h

getPCMFormat

通过该接口,可以获取当前房间内的PCM数据格式

- (SNPCMFormat *)getPCMFormat

Discussion

通过该接口,可以获取当前房间内的PCM数据格式

Declared In

  • SNPCMPlayer.h

setVolume:

设置播放音量,默认 30

- (void)setVolume:(int)*volume*

Discussion

设置播放音量,默认 30

Declared In

  • SNPCMPlayer.h

startPlay

开始播放

- (void)startPlay

Discussion

开始播放

Declared In

  • SNPCMPlayer.h

stopPlay

停止播放

- (void)stopPlay

Discussion

停止播放

Declared In

  • SNPCMPlayer.h

volume

获取播放音量

- (int)volume

Discussion

获取播放音量

Declared In

  • SNPCMPlayer.h
Clone this wiki locally