Ahruman wrote:
I should probably mention that 1.71 is intended to have JavaScript classes for dealing with one-shot sounds and music. But not positionally.
I got a little wish list. You know christmas and so...
- Hyperradio should only be active IN_FLIGHT. This gives other OXPs enough room to play some mission-music, ambience station sounds,... That means we need a method to stop running songs (like on docking)
- The Hyperradio needs a switch ON/OFF method (with a ~1sec fade-in/out) to give other OXPs enough room
- Play, Pause, Resume, Stop, Rewind, Loop, LoopCount, Fading and Crossfade methods
- Check method if a specified song is playing
- Method to get additional infos (like length, artist, remaining time,...)
- Method to set song-specific volume
- Streaming for bigger files
- HUD integration with a small icon (like the scoop) if installed
Example:
player.Sound(missionVariables.hyperradio_song, play, fadein, fadeout, loop, volume);
or player.Sound(missionVariables.hyperradio_song, play, 2, 0, 5, 60);
or player.Sound(missionVariables.hyperradio_song, stop, 0, 3, 0, 72);
or player.Sound("example.ogg", isPlaying, lengthtotal, lengthplayed, lengthremaining);
player.Music(missionVariables.hyperradio_song, play, fadein, fadeout, loop, volume);
or player.Music(missionVariables.hyperradio_song, play, 2, 0, 5, 60);
or player.Music(missionVariables.hyperradio_song, stop, 0, 3, 0, 72);
or player.Music("example.ogg", isPlaying, lengthtotal, lengthplayed, lengthremaining);
And perfect would be:
- Playlist (maybe 5 songs) as overlay on the HUD (like commsLog, but on the side) after pressing a specified key and the player can choose the next song (maybe by pressing specified keys). This overlay could also be used as a communication terminal for other purposes (like commsChatter, job offers,...).
As I said - just a little wish list