Add voice recording
Tools > Start Recording / Start Multitrack Recording / Stop Recording record what is heard on the server, our own voice included, into Ogg Opus, and publish client_is_recording. A plain recording mixes everyone down to mono; a multitrack one gives each speaker (by unique id) an uncoupled mono stream of their own under channel mapping family 255, named in the tags after their nickname when the recording started, silent until they first speak, and continuing into name-2.ogg past 255 speakers. Tracks are spooled beside the output and muxed on stop, since the header carries the channel count. The status bar shows a label that stops the recording; the existing recording hotkeys start one straight into the last-used folder. OggOpusFile now shares the new Ogg page writer and Opus header code. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -59,6 +59,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
||||
public final class MainFrame extends JFrame implements ServerTabPane.Listener {
|
||||
|
||||
private final Settings settings;
|
||||
private final RecordingActions recordings;
|
||||
private final Bookmarks bookmarks = Bookmarks.load();
|
||||
private final AwayMessages awayMessages = AwayMessages.load();
|
||||
private final IdentityStore identities;
|
||||
@@ -105,6 +106,7 @@ public final class MainFrame extends JFrame implements ServerTabPane.Listener {
|
||||
public MainFrame(Settings settings) {
|
||||
super("TS3J — TeamSpeak 3 Java Client");
|
||||
this.settings = settings;
|
||||
this.recordings = new RecordingActions(this, settings);
|
||||
this.chatZoom = new TextZoom(settings.chatZoom, z -> {
|
||||
settings.chatZoom = z;
|
||||
settings.save();
|
||||
@@ -164,7 +166,9 @@ public final class MainFrame extends JFrame implements ServerTabPane.Listener {
|
||||
if (selected != null) selected.chat().openFind();
|
||||
}
|
||||
});
|
||||
statusBar = new StatusBar();
|
||||
statusBar = new StatusBar(() -> {
|
||||
if (selected != null) selected.session().stopRecording();
|
||||
});
|
||||
statusBar.setVisible(settings.showStatusBar);
|
||||
add(statusBar, BorderLayout.SOUTH);
|
||||
|
||||
@@ -298,6 +302,21 @@ public final class MainFrame extends JFrame implements ServerTabPane.Listener {
|
||||
showContacts(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isRecording() {
|
||||
return selected != null && selected.session().isRecording();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStartRecording(boolean multitrack) {
|
||||
if (selected != null) recordings.choose(selected.session(), multitrack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStopRecording() {
|
||||
if (selected != null) selected.session().stopRecording();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canViewBanList() {
|
||||
return selected != null && selected.session().canViewBanList();
|
||||
@@ -588,6 +607,10 @@ public final class MainFrame extends JFrame implements ServerTabPane.Listener {
|
||||
return out;
|
||||
}
|
||||
|
||||
RecordingActions recordings() {
|
||||
return recordings;
|
||||
}
|
||||
|
||||
ServerTab selectedTab() {
|
||||
return selected;
|
||||
}
|
||||
@@ -1004,6 +1027,7 @@ public final class MainFrame extends JFrame implements ServerTabPane.Listener {
|
||||
toolbar.refresh(connected, anyConnected, micMuted, deaf, active, away);
|
||||
toolbar.showHostButton(hostButtonOf(selected));
|
||||
menuBar.refresh(connected, anyConnected, micMuted, deaf, active, away, commander);
|
||||
statusBar.showRecording(connected && selected.session().isRecording());
|
||||
updateTray();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user