Skip to content

New Features - #7

Open
ZeroCreeper wants to merge 2 commits into
Killers0992:masterfrom
ZeroCreeper:TimeSpanImprove
Open

New Features#7
ZeroCreeper wants to merge 2 commits into
Killers0992:masterfrom
ZeroCreeper:TimeSpanImprove

Conversation

@ZeroCreeper

Copy link
Copy Markdown
  1. PlaybackMode enum — merged loop + destroyOnEnd into PlayOnce / Loop / NeverStop
  2. Loop control refactored — moved from Pool coroutine into AudioClipPlayback; Pool no longer touches playback logic
  3. AddLiveStream parameter alignednameclipName (consistent with AddClip)
  4. Stream duration/positionDuration / Position properties via ffprobe
  5. OnClipEnd event — fires when a clip is removed from ClipsById
  6. ReadyForDestroy mechanism — gracefully stops Loop clips without the Pool directly modifying them
  7. Pool coroutineyield return null instead of WaitForSeconds(0.1f)
  8. RemoveAllClips fixed — added .ToArray() to avoid collection modification during enumeration
  9. Ffmpeg.cs fixed — temp directory used for extraction; exe search path corrected
  10. GetDuration() fixed — changed from sync blocking to async Task + ReadToEndAsync()

Stream playback now supports Duration / Position tracking
OnClipEnd event (fired when a clip is removed)
ReadyForDestroy mechanism for gracefully stopping looping clips
Refactoring
loop + destroyOnEnd merged into a PlaybackMode enum (PlayOnce / Loop / NeverStop)
Loop control moved from Pool coroutine into AudioClipPlayback internally; Pool no longer manages playback logic
AddLiveStream parameter name → clipName (aligned with AddClip)
Pool coroutine changed to yield return null for faster response
Bug Fixes
Ffmpeg.cs: extracted directory was deleted instead of the temp folder, causing exe loss
GetDuration() was blocking thread pool synchronously
RemoveAllClips() was missing Dispose() on clips
Pool coroutine could hang indefinitely with certain Loop configurations
Breaking Changes
AddClip / AddLiveStream parameters changed from (loop, destroyOnEnd) → (playbackMode)
… paused stream path to prevent repeating the last frame's audio data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant