v0.33.0 62a09f5

audio_output.go RawHistoryFolder

1// Package port defines application-layer interfaces for external capabilities.
2// This file defines the Audio Output port for CEF audio streaming on Linux.
3package port
4
5import "context"
6
7// AudioStreamFormat represents the audio stream format configuration.
8// This is a value object that describes how audio data should be streamed.
9type AudioStreamFormat struct {
10	// SampleRate is the audio sample rate in Hz (e.g., 48000, 44100).
11	SampleRate int
12	// ChannelCount is the number of audio channels (e.g., 1 for mono, 2 for stereo).
13	ChannelCount int
14	// FramesPerBuffer is the number of frames per buffer (e.g., 512, 1024).
15	FramesPerBuffer int
16}
17
18// AudioOutputStream represents an active audio output stream.
19// Implementations handle the low-level audio playback.
20type AudioOutputStream interface {
21	// Write sends callback-owned audio samples to the output device.
22	// Samples are provided as [channel][frame]float32 matching CEF's planar
23	// format. Implementations must not retain the slices and must be safe to
24	// call concurrently with Close; audio callbacks must not block.
25	Write(samples [][]float32) error
26	// Close releases the audio stream and associated resources.
27	Close() error
28}
29
30// AudioOutputFactory creates audio output streams.
31// This is the primary interface for the audio output port.
32type AudioOutputFactory interface {
33	// NewStream creates a new audio output stream with the given format.
34	NewStream(ctx context.Context, format AudioStreamFormat) (AudioOutputStream, error)
35}

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 8

Tags 42

↑↓ moveenter openesc close