允许与 Steam 音乐播放器直接交互。
请见
features/music_player,了解更多信息。
成员函数
ISteamMusicRemote
的成员函数通过全局访问器函数
SteamMusicRemote()
。
BActivationSuccess
bool BActivationSuccess( bool bValue );
返回: bool
BIsCurrentMusicRemote
bool BIsCurrentMusicRemote();
返回: bool
CurrentEntryDidChange
bool CurrentEntryDidChange();
返回: bool
CurrentEntryIsAvailable
bool CurrentEntryIsAvailable( bool bAvailable );
返回: bool
CurrentEntryWillChange
bool CurrentEntryDidChange();
当前条目。
返回: bool
DeregisterSteamMusicRemote
bool DeregisterSteamMusicRemote();
返回: bool
EnableLooped
code=cpp]bool EnableLooped( bool bValue );
返回: bool
EnablePlaylists
bool EnablePlaylists( bool bValue );
返回: bool
EnablePlayNext
bool EnablePlayNext( bool bValue );
返回: bool
EnablePlayPrevious
bool EnablePlayPrevious( bool bValue );
用户接口功能。
返回: bool
EnableQueue
bool EnableQueue( bool bValue );
返回: bool
EnableShuffled
bool EnableShuffled( bool bValue );
返回: bool
PlaylistDidChange
bool PlaylistDidChange();
返回: bool
PlaylistWillChange
bool PlaylistWillChange();
播放列表。
返回: bool
QueueDidChange
bool QueueDidChange();
返回: bool
QueueWillChange
bool QueueWillChange();
队列。
返回: bool
RegisterSteamMusicRemote
bool RegisterSteamMusicRemote( const char *pchName );
名称 | 类型 | 描述 |
pchName | const char * | |
服务定义。
返回: bool
ResetPlaylistEntries
bool ResetPlaylistEntries();
返回: bool
ResetQueueEntries
bool ResetQueueEntries();
返回: bool
SetCurrentPlaylistEntry
bool SetCurrentPlaylistEntry( int nID );
返回: bool
SetCurrentQueueEntry
bool SetCurrentQueueEntry( int nID );
返回: bool
SetDisplayName
bool SetDisplayName( const char *pchDisplayName );
名称 | 类型 | 描述 |
pchDisplayName | const char * | |
返回: bool
SetPlaylistEntry
bool SetPlaylistEntry( int nID, int nPosition, const char *pchEntryText );
名称 | 类型 | 描述 |
nID | int | |
nPosition | int | |
pchEntryText | const char * | |
返回: bool
SetPNGIcon_64x64
bool SetPNGIcon_64x64( void *pvBuffer, uint32 cbBufferLength );
名称 | 类型 | 描述 |
pvBuffer | void * | |
cbBufferLength | uint32 | |
返回: bool
SetQueueEntry
bool SetQueueEntry( int nID, int nPosition, const char *pchEntryText );
名称 | 类型 | 描述 |
nID | int | |
nPosition | int | |
pchEntryText | const char * | |
返回: bool
UpdateCurrentEntryCoverArt
bool UpdateCurrentEntryCoverArt( void *pvBuffer, uint32 cbBufferLength );
名称 | 类型 | 描述 |
pvBuffer | void * | |
cbBufferLength | uint32 | |
返回: bool
UpdateCurrentEntryElapsedSeconds
bool UpdateCurrentEntryElapsedSeconds( int nValue );
返回: bool
UpdateCurrentEntryText
bool UpdateCurrentEntryText( const char *pchText );
名称 | 类型 | 描述 |
pchText | const char * | |
返回: bool
UpdateLooped
bool UpdateLooped( bool bValue );
返回: bool
UpdatePlaybackStatus
bool UpdatePlaybackStatus( AudioPlayback_Status nStatus );
状态。
返回: bool
UpdateShuffled
bool UpdateShuffled( bool bValue );
返回: bool
UpdateVolume
bool UpdateVolume( float flValue );
返回: bool
回调
以下是可以通过调用
SteamAPI_RunCallbacks 触发的回调。 其中许多将响应
ISteamMusicRemote
的成员函数直接触发。
MusicPlayerRemoteToFront_t
此回调无字段。
MusicPlayerRemoteWillActivate_t
此回调无字段。
MusicPlayerRemoteWillDeactivate_t
此回调无字段。
MusicPlayerSelectsPlaylistEntry_t
MusicPlayerSelectsQueueEntry_t
MusicPlayerWantsLooped_t
MusicPlayerWantsPause_t
此回调无字段。
MusicPlayerWantsPlayingRepeatStatus_t
名称 | 类型 | 描述 |
m_nPlayingRepeatStatus | int | |
MusicPlayerWantsPlayNext_t
此回调无字段。
MusicPlayerWantsPlayPrevious_t
此回调无字段。
MusicPlayerWantsPlay_t
此回调无字段。
MusicPlayerWantsShuffled_t
MusicPlayerWantsVolume_t
名称 | 类型 | 描述 |
m_flNewVolume | float | |
MusicPlayerWillQuit_t
此回调无字段。
常量
以下为定义来与 ISteamMusicRemote 一起使用的常量。
名称 | 类型 | 值 | 描述 |
k_SteamMusicNameMaxLength | int | 255 | |
k_SteamMusicPNGMaxLength | int | 65535 | |
STEAMMUSICREMOTE_INTERFACE_VERSION | const char * | "STEAMMUSICREMOTE_INTERFACE_VERSION001" | |