Tài liệu Steamworks
ISteamMusicRemote Interface
Cho phép tương tác trực tiếp với trình phát nhạc Steam.

Xem features/music_player để biết thêm thông tin.

Hàm con

Hàm con (member function) cho ISteamMusicRemote được gọi qua hàm accessor dạng global SteamMusicRemote().

BActivationSuccess

bool BActivationSuccess( bool bValue );
TênLoạiMô tả
bValuebool



Trả về: bool

BIsCurrentMusicRemote

bool BIsCurrentMusicRemote();


Trả về: bool

CurrentEntryDidChange

bool CurrentEntryDidChange();


Trả về: bool

CurrentEntryIsAvailable

bool CurrentEntryIsAvailable( bool bAvailable );
TênLoạiMô tả
bAvailablebool



Trả về: bool

CurrentEntryWillChange

bool CurrentEntryWillChange();
Entry hiện tại

Trả về: bool

DeregisterSteamMusicRemote

bool DeregisterSteamMusicRemote();


Trả về: bool

EnableLooped

bool EnableLooped( bool bValue );
TênLoạiMô tả
bValuebool



Trả về: bool

EnablePlaylists

bool EnablePlaylists( bool bValue );
TênLoạiMô tả
bValuebool



Trả về: bool

EnablePlayNext

bool EnablePlayNext( bool bValue );
TênLoạiMô tả
bValuebool



Trả về: bool

EnablePlayPrevious

bool EnablePlayPrevious( bool bValue );
TênLoạiMô tả
bValuebool

Tính năng cho giao diện người dùng

Trả về: bool

EnableQueue

bool EnableQueue( bool bValue );
TênLoạiMô tả
bValuebool



Trả về: bool

EnableShuffled

bool EnableShuffled( bool bValue );
TênLoạiMô tả
bValuebool



Trả về: bool

PlaylistDidChange

bool PlaylistDidChange();


Trả về: bool

PlaylistWillChange

bool PlaylistWillChange();
Danh sách phát

Trả về: bool

QueueDidChange

bool QueueDidChange();


Trả về: bool

QueueWillChange

bool QueueWillChange();
Hàng đợi

Trả về: bool

RegisterSteamMusicRemote

bool RegisterSteamMusicRemote( const char *pchName );
TênLoạiMô tả
pchNameconst char *

Định nghĩa dịch vụ (service)

Trả về: bool

ResetPlaylistEntries

bool ResetPlaylistEntries();


Trả về: bool

ResetQueueEntries

bool ResetQueueEntries();


Trả về: bool

SetCurrentPlaylistEntry

bool SetCurrentPlaylistEntry( int nID );
TênLoạiMô tả
nIDint



Trả về: bool

SetCurrentQueueEntry

bool SetCurrentQueueEntry( int nID );
TênLoạiMô tả
nIDint



Trả về: bool

SetDisplayName

bool SetDisplayName( const char *pchDisplayName );
TênLoạiMô tả
pchDisplayNameconst char *



Trả về: bool

SetPlaylistEntry

bool SetPlaylistEntry( int nID, int nPosition, const char *pchEntryText );
TênLoạiMô tả
nIDint
nPositionint
pchEntryTextconst char *



Trả về: bool

SetPNGIcon_64x64

bool SetPNGIcon_64x64( void *pvBuffer, uint32 cbBufferLength );
TênLoạiMô tả
pvBuffervoid *
cbBufferLengthuint32



Trả về: bool

SetQueueEntry

bool SetQueueEntry( int nID, int nPosition, const char *pchEntryText );
TênLoạiMô tả
nIDint
nPositionint
pchEntryTextconst char *



Trả về: bool

UpdateCurrentEntryCoverArt

bool UpdateCurrentEntryCoverArt( void *pvBuffer, uint32 cbBufferLength );
TênLoạiMô tả
pvBuffervoid *
cbBufferLengthuint32



Trả về: bool

UpdateCurrentEntryElapsedSeconds

bool UpdateCurrentEntryElapsedSeconds( int nValue );
TênLoạiMô tả
nValueint



Trả về: bool

UpdateCurrentEntryText

bool UpdateCurrentEntryText( const char *pchText );
TênLoạiMô tả
pchTextconst char *



Trả về: bool

UpdateLooped

bool UpdateLooped( bool bValue );
TênLoạiMô tả
bValuebool



Trả về: bool

UpdatePlaybackStatus

bool UpdatePlaybackStatus( AudioPlayback_Status nStatus );
TênLoạiMô tả
nStatusAudioPlayback_Status

Trạng thái

Trả về: bool

UpdateShuffled

bool UpdateShuffled( bool bValue );
TênLoạiMô tả
bValuebool



Trả về: bool

UpdateVolume

bool UpdateVolume( float flValue );
TênLoạiMô tả
flValuefloat



Trả về: bool

Callback

Đây là các callback có thể kích hoạt bằng cách gọi SteamAPI_RunCallbacks. Rất nhiều trong số này sẽ được kích hoạt trực tiếp để phản hồi lại hàm con của ISteamMusicRemote.

MusicPlayerRemoteToFront_t



Callback này không có trường nào.

MusicPlayerRemoteWillActivate_t



Callback này không có trường nào.

MusicPlayerRemoteWillDeactivate_t



Callback này không có trường nào.

MusicPlayerSelectsPlaylistEntry_t



TênLoạiMô tả
nIDint

MusicPlayerSelectsQueueEntry_t



TênLoạiMô tả
nIDint

MusicPlayerWantsLooped_t



TênLoạiMô tả
m_bLoopedbool

MusicPlayerWantsPause_t



Callback này không có trường nào.

MusicPlayerWantsPlayingRepeatStatus_t



TênLoạiMô tả
m_nPlayingRepeatStatusint

MusicPlayerWantsPlayNext_t



Callback này không có trường nào.

MusicPlayerWantsPlayPrevious_t



Callback này không có trường nào.

MusicPlayerWantsPlay_t



Callback này không có trường nào.

MusicPlayerWantsShuffled_t



TênLoạiMô tả
m_bShuffledbool

MusicPlayerWantsVolume_t



TênLoạiMô tả
m_flNewVolumefloat

MusicPlayerWillQuit_t



Callback này không có trường nào.

Constant

Đây là các hằng số được định nghĩa để dùng với ISteamMusicRemote.

TênLoạiGiá trịMô tả
k_SteamMusicNameMaxLengthint255
k_SteamMusicPNGMaxLengthint65535
STEAMMUSICREMOTE_INTERFACE_VERSIONconst char *"STEAMMUSICREMOTE_INTERFACE_VERSION001"