Skip to content

SampAudioStream v2.2.0

Choose a tag to compare

@github-actions github-actions released this 21 Nov 04:21
  • Cleaner On-Screen Text & Preserved Apostrophes:
    • Single-player and global sessions no longer emit an HTTP icy-name: header (preventing duplicated station/title text in the client); synchronized channels continue sending icy-name: as the channel name.
    • Inline StreamTitle preserves apostrophes (' is no longer stripped; only \r, \n, \0, and '; sequences are sanitized) and formats live radio stream updates as "<song> - <station>" when a station name is available and not already included.
  • Short Endpoint URLs (/s/ & /c/):
    • Replaced legacy 32-hex /stream/<token> and /channel/ch_<token> routes with compact 10-character alphanumeric CSPRNG codes under /s/<code> (with optional /<version> when options update and ?resume=<offset>) and /c/<code>.
  • Channel Playlist Mode:
    • Added non-destructive channel playlist mode (SA_SetAudioStreamChannelPlaylist, SA_IsAudioStreamChannelPlaylist, SA_GetAudioStreamChannelQueuePos, SA_PlayAudioStreamChannelQueue) with persisted mode/position, loop-aware wraparound, pre-resolution of the next track, and support for out-of-list SA_PlayChannelAudioStream(url) overrides without mutating the list.
  • Local Music Library (audio.music_dir & library://):
    • Added on-demand scanning of 1-level subfolders and loose root files in audio.music_dir ("scriptfiles/SampAudioStream/music", configurable), exposed via SA_RefreshAudioLibrary, SA_GetAudioLibraryFolderCount, SA_GetAudioLibraryFolder, and SA_GetAudioLibraryTrack, and playable/importable across all stream and channel natives using library://<folder>/<file>, library:///<file>, library://<folder>, or library:// with strict path containment and transcoded finite playback.
  • Direct File Titles & Optional On-Screen Stream Text (bool:stream_text = true):
    • Direct audio files now report their file name (from the URL path) as the track title instead of "Direct Audio Stream"; live radios with a file-like link still switch to their icy-name when available.
    • SA_PlayAudioStreamForPlayer, SA_PlayAudioStream and hooked PlayAudioStreamForPlayer gained a trailing bool:stream_text = true parameter; false hides the on-screen stream text for server-processed playback (useful for short sound effects).
  • Live Radio Station Names (icy-name):
    • Direct live radios now report the station's icy-name as the track title (instead of "Direct Audio Stream" / "Radio Stream") once it is known from the link probe or the first ICY poll.
  • Per-Channel Persistence:
    • SA_CreateAudioStreamChannel gained a trailing bool:persistent = true parameter. Persistent channels are saved and restored as before; non-persistent channels live only in memory, are never written to disk, and are destroyed on GMX. The global channels.persist_channels option was removed (old config files keep loading; the key is ignored).
  • Single-Track Playlist Link Handling:
    • Playlist-only YouTube links passed to single-track playback (SA_PlayAudioStreamForPlayer, SA_PlayAudioStream, hooked PlayAudioStreamForPlayer, channel tracks) now resolve only their first entry instead of extracting the whole playlist.
  • Automatic HTTP Connection Limits (network.max_http_connections removed):
    • The total number of simultaneous HTTP audio connections is now derived from the server's player slots (player slots × 2 + 64, minimum 128, up to 2064), read from maxplayers (SA-MP server.cfg) or max_players (open.mp config.json). Existing config files that still contain network.max_http_connections keep loading without warnings; the key is simply ignored.
    • On Linux, the plugin now raises the process open file descriptor soft limit (RLIMIT_NOFILE) by itself, only up to what the connection limit needs, and warns only when the system hard limit is too low.
    • The startup listening log now shows the computed limit and player slots, and the total connection limit warning no longer points to a config key.