Skip to content

Releases

SampAudioStream v2.4.0

Choose a tag to compare

@github-actions github-actions released this 23 Nov 02:32
  • Channel and Track Descriptions:
    • New SA_SetAudioStreamChannelDescription / SA_GetAudioStreamChannelDescription give a channel a free-text description, and SA_SetAudioStreamChannelQueueDescription / SA_GetAudioStreamChannelQueueDescription do the same for each queue entry. Text is cleaned of control characters and cut to 256 UTF-8 bytes.
    • An entry's description belongs to the entry: it follows moves, shuffles, removals of other entries, queue loops and playlist mode, and SA_GetAudioStreamChannelTrackDescription returns the description of the track that is playing.
    • Persistent channels save both descriptions (description_hex / pawn_description_hex); files from older versions load with empty descriptions.
  • Idle Channel Suspension:
    • New SA_SetAudioStreamChannelIdleSuspend / SA_GetAudioStreamChannelIdleSuspend: after a grace time with no joined listener, a channel stops and frees its transcoder slot, and the next listener resumes it at the same track (library files at the same second; online tracks from the beginning, since seeking them means downloading everything before that point). Scripts see the new SA_STATE_SUSPENDED state.
    • While suspended, skipping moves the saved position without starting playback; positioned channels are never suspended.
    • Persistent channels save the option and the saved second; after a restart they come back suspended instead of playing to nobody.
  • Fresher Next-Track Links:
    • Channels now prepare the next track about 60 seconds before the current one ends instead of as soon as it starts, and a cached media link older than 3 minutes is resolved again, so the next track rarely starts with an expired link (a rejected link used to cost about 10 seconds of silence while it was resolved again).
  • Rename a Queue Entry (SA_SetAudioStreamChannelQueueLabel):
    • Changes an entry's label (the name scripts show in lists) without touching its URL, position or description; persistent channels save it. The original label is remembered and comes back when the label is set to "" (read it with SA_GetAudioStreamChannelQueueLabel(..., original = true)).
    • Entries added without a label, such as pasted links, take the real track title in the background a few seconds after being added (live radios excluded), so lists stop showing raw links; the new OnAudioStreamChannelLabelChange callback tells scripts when that happens so open menus can refresh.
    • SA_ReplaceAudioStreamChannelQueue takes an optional keep_label to keep the name the entry was showing (custom or original).
    • The listeners' on-screen stream text shows the entry label for finite tracks, and renaming the playing entry updates it right away.
  • Replace a Queue Entry (SA_ReplaceAudioStreamChannelQueue):
    • Replaces an entry in place with a new URL and label without removing and re-adding it; its description is cleared unless keep_description = true. Replacing the entry that is playing starts the new track at once in its place, and on a suspended channel the saved track becomes the new one.
  • Join Without the Password (ignore_password):
    • SA_JoinAudioStreamChannel takes an optional bool:ignore_password (default false), so scripts can let a channel's creator or admins join a password-protected channel without the password. Existing calls are unchanged.
  • Demo Filterscript Updated to 2.4.0 (FS_SampAudioStream_Demo.pwn):
    • Channel menu > Channel Description and queue item > Edit Description set and show both descriptions, queue lists show each item's description, and listeners get the track description when a track starts (SA_GetAudioStreamChannelTrackDescription).
    • Channel menu > Toggle Idle Suspension turns idle suspension on or off and shows whether the channel is suspended.
    • The channel creator and RCON admins join password-protected channels without typing the password (SA_JoinAudioStreamChannel with ignore_password = true).
    • Queue item > Replace With URL / Query replaces the item in place (SA_ReplaceAudioStreamChannelQueue), Replace Keeping the Name keeps its name (keep_label), and Rename Item sets its label (SA_SetAudioStreamChannelQueueLabel) showing the current and original names (blank restores the original).
    • OnAudioStreamChannelLabelChange logs when an item added without a name gets its real title.

SampAudioStream v2.3.1

Choose a tag to compare

@github-actions github-actions released this 22 Nov 06:23
  • Attach With Range in One Update:
    • SA_AttachAudioStreamChannelToPlayer and SA_AttachAudioStreamChannelToVehicle take an optional Float:distance. A value above 0.0 sets the hearing range together with the attachment, so listeners get one re-dispatch instead of the two caused by SA_SetAudioStreamChannelPos followed by an attach (which could make the SA-MP client play two streams at once). 0.0 keeps the current range; non-finite values are rejected.
  • Vehicle Attachments Follow World and Interior:
    • Streams and channels attached with SA_AttachAudioStreamToVehicle / SA_AttachAudioStreamChannelToVehicle now follow the vehicle's virtual world (and interior on open.mp; SA-MP 0.3.7 has no GetVehicleInterior), so a sound car moved into another world is no longer heard by players in the original world at the same coordinates. Player attachments already tracked world and interior.
  • HTTP Port List (network.http_port):
    • network.http_port is now a list of TCP ports, single ports and ascending ranges separated by commas, tried in order (default "7778-7785", e.g. "7778-7780,7785,7792"). The first free port is used immediately; when every port is busy, as happens right after a quick server restart, the list is retried every 250 ms for up to 3 s before falling back to an OS-assigned port with a warning.
    • Legacy integers keep working (7778 is a one-port list, 0 the default list); invalid lists fall back to the default.
    • A busy fixed port no longer fails initialization; it follows the same retry and fallback.
  • English System Error Messages:
    • Socket and file errors in the log are described in English (for example address already in use (10048)) instead of the localized text Windows returns.
  • Range Groups:
    • New SA_SetAudioStreamChannelGroup / SA_GetAudioStreamChannelGroup put a channel in a range group (1..31), and SA_SetPlayerAudioStreamGroupMuted / SA_IsPlayerAudioStreamGroupMuted let a player stop hearing that group through range while joined channels keep playing, so scripts can offer separate "hear boomboxes" and "hear car speakers" options instead of muting everything. The group is saved with persistent channels.
  • Titles Without File Extensions:
    • Music library tracks, folder playlist imports and direct audio file links now use the file name without its audio extension as title and queue label (Artist - Song.mp3 shows as Artist - Song), which also reaches OnAudioStreamReady, OnAudioStreamChannelTrackStart and the on-screen stream text. The library:// references keep the full file name.
  • Demo Filterscript Updated to 2.3.1 (FS_SampAudioStream_Demo.pwn):
    • Attaching a channel to your vehicle or to yourself asks for the radius and passes it in the attach call (SA_AttachAudioStreamChannelToVehicle / SA_AttachAudioStreamChannelToPlayer with distance).
    • Library track lists, the track menu and queue labels show names without the audio extension.
    • New range group demos: Channel > Spatial > Set Range Group (SA_SetAudioStreamChannelGroup / SA_GetAudioStreamChannelGroup) and main menu > Mute a Range Group (SA_SetPlayerAudioStreamGroupMuted / SA_IsPlayerAudioStreamGroupMuted).
  • No Restart When Joining or Leaving a Channel Inside Its Range:
    • Joining (SA_JoinAudioStreamChannel) or leaving (SA_LeaveAudioStreamChannel) a positioned channel while standing inside its range no longer restarts the audio: the client already plays the same stream, so the plugin only moves the player between the channel and range tiers and fires OnPlayerAudioStreamSourceChange. Typical case: getting in or out of a car whose speakers are on.

SampAudioStream v2.3.0

Choose a tag to compare

@github-actions github-actions released this 21 Nov 20:56
  • Sound Effects Folder (audio.sound_dir) & SA_PlayAudioStreamSoundForPlayer:
    • New audio.sound_dir folder ("scriptfiles/SampAudioStream/sound", created on startup) for short sound effects such as alerts, notifications, jingles and gameplay sounds, kept apart from the music library (a startup warning is logged when it overlaps audio.music_dir).
    • New SA_PlayAudioStreamSoundForPlayer(playerid, sound[], posX, posY, posZ, distance, usepos) serves .mp3, .ogg and .wav files up to 5 MB as-is from memory through the new /f/<code> route (no transcoder, immediate start), plays them above every other source (SA_SOURCE_SOUND) and then resumes what the player was hearing: channels and radios continue live and interrupted transcoded personal streams resume where they were cut.
  • Playlist Continues After Out-of-List Tracks:
    • In channel playlist mode, a track started with SA_PlayChannelAudioStream (such as a live radio played over the list) now continues into the playlist when it ends, is skipped or fails, starting after the item that was playing before it (or from the first item); previously the channel stopped. LOOP_TRACK repeats the out-of-list track and LOOP_QUEUE wraps past the last item.
  • Large Channel Queues:
    • New SA_FindAudioStreamChannelQueue(channelid, item[], start_index) finds a URL in a channel queue inside the plugin and returns its index (or -1), so scripts can check or highlight queued tracks with one call instead of reading every entry.
    • Playlist imports allow more time for big lists (60s up to 200 items plus 10s per further 100 items, 140s at the 1000-item maximum).
  • Lower Prefetch Memory:
    • performance.max_prefetch_mb now defaults to 8 (was 16): a typical YouTube track still downloads whole, while the worst case for many simultaneous large files is halved.
    • Local music library files no longer load up to max_prefetch_mb into RAM; they are read from disk through a fixed buffer of at most 1 MB.
  • Demo Filterscript Updated to 2.2.0/2.3.0 Features (FS_SampAudioStream_Demo.pwn):
    • Added a Music Library menu (refresh, folders, tracks, private/global/channel playback and whole-folder import via library://), channel playlist mode (toggle, highlighted current item, play any item), a sound effect player, an on-screen stream text toggle (stream_text), a persistent/temporary step in channel creation and the SA_SOURCE_SOUND label.
    • Fixed the dialog range check that ignored the live radio text, global live text and queue item dialogs.
    • The channel queue, library folder and library track lists are paged (only the visible page is read), queued tracks are marked through SA_FindAudioStreamChannelQueue, whole-folder imports request up to 1000 items.
    • Compiles without warnings: the large dialog buffers are static (estimated stack use drops from about 26 KB to 10 KB, inside the default 16 KB) and <open.mp> is included directly when available, falling back to <a_samp> on legacy SA-MP toolchains.

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.

SampAudioStream v2.1.0

Choose a tag to compare

@github-actions github-actions released this 19 Nov 21:45
  • Live Internet Radio Text & Script Overrides (73 SA_* Natives, 19 Callbacks):
    • Added periodic ICY StreamTitle polling (audio.live_title_poll_seconds, default 30s, 0 to disable or 10..300s, capped at 2 concurrent 64 KB probes) for direct Shoutcast/Icecast radio streams (including extension mounts like .mp3), while permanently skipping finite files (Content-Length), HLS playlists, and yt-dlp extractors.
    • Added OnAudioStreamLiveTitleChange(playerid, streamid, const title[]) and OnAudioStreamChannelLiveTitleChange(channelid, const title[]), plus SA_GetAudioStreamLiveTitle, SA_SetAudioStreamLiveTitle, SA_GetAudioStreamChannelLiveTitle, and SA_SetAudioStreamChannelLiveTitle to read, filter, or customize outgoing HUD radio text separately from channel names and track metadata without re-firing callbacks.
  • Queue Display Labels, Item Moving & One-Time Shuffle:
    • Added optional label[] support to SA_QueueChannelAudioStream and SA_InsertAudioStreamChannelQueue plus automatic entry-title labeling for SA_QueueChannelAudioStreamPlaylist, persisted across restarts/loops and readable with SA_GetAudioStreamChannelQueueLabel.
    • Added SA_ShuffleAudioStreamChannelQueue(channelid) and SA_MoveAudioStreamChannelQueue(channelid, from_index, to_index) (preserving raw UTF-8/Pawn labels losslessly and pre-resolving queue index 0 when changed).
  • Audio Normalization, Client No-Connect Feedback & Playlist Error Clarity:
    • Added optional sliding-RMS AGC loudness normalization (audio.normalize_volume, default false) with peak limiting for server-transcoded/proxied streams and channels.
    • Added OnPlayerAudioStreamNoConnect handling/notifications and improved OnAudioStreamChannelPlaylistQueued error reporting when queues or concurrent transcoder limits block playback.
  • Interactive Demo Filterscript Enhancements (FS_SampAudioStream_Demo.pwn):
    • Added live radio text announcements (Now playing...), live text inspection/editing dialogs, queue item action submenu (Move to Top, Move Up, Move Down, Remove), listener majority skip voting (Vote to Skip Track), and per-channel in-memory previous track history (Previous Track).

SampAudioStream v2.0.0

Choose a tag to compare

@github-actions github-actions released this 19 Nov 12:59
  • Breaking API & Storage Standardization (AudioStream Naming + scriptfiles/SampAudioStream/):
    • Standardized all Pawn natives and callbacks to consistent AudioStream / ChannelAudioStream naming (SA_SetAudioStreamVolume, SA_SearchAudioStream, SA_CancelAudioStreamSearch, SA_CreateAudioStreamChannel, SA_DestroyAudioStreamChannel, SA_PlayChannelAudioStream, SA_QueueChannelAudioStream, SA_SkipChannelAudioStream, SA_StopChannelAudioStream, SA_PauseChannelAudioStream, SA_SetChannelAudioStreamVolume, SA_JoinAudioStreamChannel, SA_LeaveAudioStreamChannel, SA_IsPlayerInAudioStreamChannel, SA_GetPlayerAudioStreamChannel, SA_GetPlayerAudioStreamID, SA_GetAudioStreamInfo, OnAudioStreamSearchResults, and OnAudioStreamSearchResultItem).
    • Uses scriptfiles/SampAudioStream/ as the default runtime directory for binaries, extractor caches, configuration, and persisted channels.
    • Added background Deno v2.9.8 provisioning (extractor.js_runtime: "auto" / "deno" / "quickjs") making Deno the preferred JS challenge runtime with quickjs-ng as automatic fallback, plus single automatic extractor re-resolution and debug diagnostics on HTTP 403/410 media errors.
  • Complete Synchronized Channel Management:
    • Added optional creator tracking (creator_playerid, storing creator name at creation time + SA_SetAudioStreamChannelCreator), channel passwords (SA_SetAudioStreamChannelPass, SA_CheckAudioStreamChannelPass, password check in SA_JoinAudioStreamChannel), channel destruction policies (SA_CHANNEL_DESTROY_MANUAL, SA_CHANNEL_DESTROY_ON_DISCONNECT, SA_CHANNEL_DESTROY_ON_TIMEOUT whose countdown resets/stays paused whenever the creator is online; SA_SetAudioStreamChannelDestroy, SA_GetAudioStreamChannelDestroy, OnAudioStreamChannelDestroyed), and full introspection/queue natives (SA_GetAudioStreamChannelCount, SA_GetAudioStreamChannelID, SA_GetAudioStreamChannelInfo, SA_GetAudioStreamChannelTrack, SA_GetAudioStreamChannelQueue, SA_ClearAudioStreamChannelQueue).
    • Added channel track lifecycle callbacks (OnAudioStreamChannelTrackStart, OnAudioStreamChannelQueueEnd, OnAudioStreamChannelError) and persistence restore callback (OnAudioStreamChannelRestored).
    • Added configurable channel and queue capacity limits (channels.max_channels, channels.max_queue_per_channel).
    • Added spatial 3D channel positioning and entity attachment (SA_SetAudioStreamChannelPos, SA_ClearAudioStreamChannelPos, SA_AttachAudioStreamChannelToPlayer, SA_AttachAudioStreamChannelToVehicle), with attached sources playing without distance attenuation.
    • Added channel queue editing (SA_InsertAudioStreamChannelQueue, SA_RemoveAudioStreamChannelQueue) and loop modes (SA_SetAudioStreamChannelLoop, SA_GetAudioStreamChannelLoop supporting OFF/TRACK/QUEUE).
    • Added channel elapsed playback query (SA_GetAudioStreamChannelElapsed), indexed listener lookup (SA_GetAudioStreamChannelListener), and channel renaming (SA_SetAudioStreamChannelName).
    • Added atomic JSON channel persistence across restarts and GMX (channels.persist_channels, channels.channel_restore_grace_seconds).
  • Dynamic Range, Position, Search & Encoding Control:
    • Added SA_SetPlayerAudioStreamDistance, SA_SetAudioStreamDistance, SA_SetPlayerAudioStreamPos, and SA_SetAudioStreamPos with immediate spatial listener evaluation and MP3-frame-aligned playback resumption (?resume=) for transcoded streams (avoiding mid-frame glitches), plus clean parameter re-dispatch for passthrough streams.
    • Enhanced SA_AttachAudioStreamToPlayer and SA_AttachAudioStreamToVehicle to immediately fetch the target entity's current position (plus worldid/interiorid for players), enforce usepos = true automatically, and refresh active playback/listeners even when started with usepos = false.
    • Added bidirectional cp1252 ↔ UTF-8 text conversion for channel names, URLs/queries, queue items, and track metadata, plus error reporting (error_code, error_message[], and SA_ERR_SEARCH_FAILED) in OnAudioStreamSearchResults.
  • Processing Callback & Per-Call Direct-File Transcoding:
    • Added OnAudioStreamProcessing(playerid, streamid, const url[], bool:from_cache) alongside the bool:notify_processing = true parameter on SA_PlayAudioStreamForPlayer, SA_PlayAudioStream, and the PlayAudioStreamForPlayer hook.
    • Added bool:process_direct_audio_files = false to SA_PlayAudioStreamForPlayer, SA_PlayAudioStream, and PlayAudioStreamForPlayer so direct music file links (.mp3, .ogg, .wav, .flac, .aac, .m4a, .opus) can be selectively transcoded for full pause, volume, distance, and OnAudioStreamFinished support while keeping live radio streams and .pls/.m3u playlists in zero-slot passthrough.
  • Automatic Direct HTTP/HTTPS Passthrough, Cache Pruning & Lifecycle Reliability:
    • Enabled automatic passthrough detection for https:// native direct-audio URLs and probed audio/* radios (preserving SourceType::DirectAudio across MetadataCache hits) while always transcoding platform URLs, .m3u8 (HLS) playlists, and .m4a/.opus containers.
    • Added automatic age-based yt-dlp-cache/youtube-sigfuncs pruning (extractor.yt_dlp_cache_max_age_days, default 7 days, 0 = off, plus internal 64 MB cap protecting < 1h files) at startup and asynchronously during idle maintenance ticks, keeping challenge-solver scripts and other subdirs untouched.
    • Added automatic creator reconnection & rename tracking across OnPlayerConnect, SetPlayerName (AMX hook on SA-MP; PlayerChangeEventHandler on open.mp), and disconnect snapshot so SA_CHANNEL_DESTROY_ON_TIMEOUT resets/pauses reliably when returning; dispatched OnAudioStreamChannelDestroyed asynchronously on the next tick; enforced creator requirement for automatic channel destroy policies; grouped startup extractor/public-IP readiness logs with the banner (<= 1.5s); and packaged both .pwn and compiled -d0 .amx demo filterscripts under filterscripts/.
    • Fixed Pawn INVALID_PLAYER_ID callback mapping (-1 -> 65535 across all callbacks including global streams and channel errors) and fixed HttpStreamingServer::Stop() partial-bind cleanup hangs when an explicit port is already in use.
    • Added available_at respect (non-blocking Tick() deferral + watchdog exclusion) alongside OnAudioStreamWaiting(playerid, streamid, wait_ms) and OnAudioStreamChannelTrackWaiting(channelid, wait_ms) callbacks to notify scripts when platform playback waits for media availability.
    • Renamed the plugin/component binaries and Pawn include to SampAudioStream.dll / SampAudioStream.so and SampAudioStream.inc.
    • Added automatic YouTube anti-bot cookie fallback (scriptfiles/SampAudioStream/cookies.txt + browser discovery controlled by extractor.cookies_from_browser, Firefox-first then Chromium family) and SA_ERR_AUTH_REQUIRED (10), with step-by-step instructions in docs/youtube-cookies.md.
  • Extended Stream Controls, Channel Persistence, Seeking & Diagnostics (66 SA_* Natives, 16 Callbacks):
    • Standardized diagnostics and queue-item naming (SA_RemoveAudioStreamChannelQueue, SA_InsertAudioStreamChannelQueue, SA_IsAudioStreamExtractorReady, SA_GetAudioStreamHttpPort).
    • Added per-player muting (SA_SetPlayerAudioStreamMuted, SA_IsPlayerAudioStreamMuted), active source inspection and change notifications (SA_GetPlayerAudioStreamSource, OnPlayerAudioStreamSourceChange), global/personal stream pause (SA_PauseAudioStream), active stream listing/metrics (SA_GetAudioStreamCount, SA_GetAudioStreamID, SA_GetAudioStreamOwner, SA_GetAudioStreamElapsed, SA_GetAudioStreamURL, SA_GetAudioStreamStats), channel playlist importing (SA_QueueChannelAudioStreamPlaylist, OnAudioStreamChannelPlaylistQueued), and transcoded track seeking (SA_SeekAudioStream, SA_SeekChannelAudioStream).