Documentation
¶
Index ¶
- func BeginSyncOutput()
- func CopyToClipboard(text string)
- func EndSyncOutput()
- func GetTermSize() (cols, rows int, err error)
- func StartCameraStream(ctx context.Context) (<-chan CameraFrame, error)
- func StartMicrophoneStream(ctx context.Context, sampleRate, channels int) (<-chan []int16, error)
- type CameraFrame
- type Speaker
- type Terminal
- type TerminalFrame
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BeginSyncOutput ¶
func BeginSyncOutput()
BeginSyncOutput enables synchronized output mode (OSC 2026) on terminals that support it.
func CopyToClipboard ¶
func CopyToClipboard(text string)
CopyToClipboard copies text via OSC-52 and falls back to common OS clipboard helpers.
func GetTermSize ¶
GetTermSize queries the current terminal size in character cells using stdout.
func StartCameraStream ¶
func StartCameraStream(ctx context.Context) (<-chan CameraFrame, error)
StartCameraStream starts camera capture using gocam and returns a frame channel. Frames are center-cropped to CIF aspect and resized to 352x288 before being sent to consumers.
Types ¶
type CameraFrame ¶
CameraFrame is the raw RGB frame type produced by the camera backend.
type Speaker ¶
type Speaker struct {
// contains filtered or unexported fields
}
Speaker handles audio playback via malgo.
func StartSpeaker ¶
func StartSpeaker(sampleRate, channels, frameSamples int, speakerIn <-chan []int16, stopCh <-chan struct{}, onStop func()) (*Speaker, error)
StartSpeaker initializes a playback device that consumes PCM frames from speakerIn. stopCh is observed to output silence when the session stops, and onStop is invoked when the underlying device stops unexpectedly.
type Terminal ¶
type Terminal struct {
// contains filtered or unexported fields
}
Terminal represents a running terminal output device.
func StartTerminal ¶
func StartTerminal(frameIn <-chan *TerminalFrame, stopCh <-chan struct{}, onStop func()) (*Terminal, error)
StartTerminal launches a goroutine that consumes frames from frameIn and renders them until stopCh is closed or the frame channel closes.
type TerminalFrame ¶
type TerminalFrame struct {
Data string
}
TerminalFrame carries a fully prepared ANSI payload that the terminal driver should print verbatim.