
12
roAudioPlayer
An audio player is used to play back audio files (using the generic ifMediaTransport Interface). If the
message port is set, the object will send events of type roAudioEvent. All object calls are asynchronous.
That is, audio playback is handled in another thread from the script. The script may continue to run while
audio is playing.
NOTE:
• Typically filenames must start with a “/” (e.g. “/mymusic.mp3”).
• Currently only .mp3 files supported
Interfaces:
• ifSetMessagePort
rotVOID SetPort(rotOBJECT)
• ifMediaTransport
See roVideoPlayer for docs
• ifAudioControl
rotBOOL SetAudioOutput(rotINT32 audio_output)
rotBOOL SetAudioMode(rotINT32 audio_mode)
rotBOOL MapStereoOutput(rotINT32 mapping)
rotBOOL SetVolume(rotINT32 volume)
rotBOOL SetChannelVolumes(roINT32 channel_mask, roINT32 volume)
Before changing the audio output when a video file is playing or has played, a call to video.Stop()
is needed.
audio_ouput values:
0 - Analog audio
1 - USB audio
2 - SPDIF audio, stereo PCM
3 - SPDIF audio, raw AC3
4 - analog audio with SPDIF mirroring raw AC3
SetAudioOutput is not currently supported on the HD2000. The HD2000 implements 4, analog
audio with SPDIF mirroring raw AC3.
audio_mode values
(Options 0 and 1 only apply to video files; 2 applies to all audio sources)
0 - AC3 Surround
1 - AC3 mixed down to stereo
2 - No audio
SetAudioMode is not currently supported on the HD2000.
mapping values
(used to select which analog output if audio_output set to 0)
0 - Stereo audio is mapped AUDIO-3
1 - Stereo audio is mapped to AUDIO-2
2 - Stereo audio is mapped to AUDIO-1
Commenti su questo manuale