Sounds: Japanese-house sound set in the app, layout demo removed
Eleven sounds for events that carry news (ready, unready, everyone ready, join, leave, kick, new video, others' chat, idle warning, connection lost/back); none for what the video already says. New voices: koto (Karplus-Strong, bendable), furin chime, rin bowl, bamboo, hyoshigi, shoji slide, in the Yo scale on D. Played by SynthSfx at the Settings volume with per-sound switches and previews. The debug layout mock is gone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d8fd464e33
commit
fce392e425
19 files changed
+546
-6306
No files matched your search
@@ -7,6 +7,7 @@ import 'package:sync_relay_core/core.dart';
|
||||
import 'package:sync_relay_server/server.dart';
|
||||
import 'package:hive_ce/hive.dart';
|
||||
import 'package:watch_together/src/session/session_coordinator.dart';
|
||||
import 'package:watch_together/src/sfx/sfx.dart';
|
||||
import 'package:watch_together/src/state/session_state.dart';
|
||||
import 'package:watch_together/src/sync/sync_client.dart';
|
||||
|
||||
@@ -214,7 +215,8 @@ void main() {
|
||||
MediaKit.ensureInitialized();
|
||||
final server = SyncServer(const AppConfig(port: 0, secret: 'toast', name: 'toast'));
|
||||
await server.start();
|
||||
final coord = SessionCoordinator();
|
||||
final sounds = _RecordingSfx();
|
||||
final coord = SessionCoordinator(sfx: sounds);
|
||||
final friend = SyncClient();
|
||||
try {
|
||||
await coord.connect(ConnectParams(
|
||||
@@ -227,6 +229,12 @@ void main() {
|
||||
final toasts = coord.toasts.peek();
|
||||
expect(toasts.firstWhere((t) => t.text == 'Bob Jr joined').actor, 'Bob Jr');
|
||||
expect(toasts.firstWhere((t) => t.text == 'Bob Jr: hi there').actor, 'Bob Jr');
|
||||
// Others' chat makes a sound, your own does not.
|
||||
expect(sounds.kinds.where((k) => k == SfxKind.chat), hasLength(1));
|
||||
coord.sendChat('mine');
|
||||
await _poll(() => coord.toasts.peek().any((t) => t.text == 'Bob: mine'), 'own chat');
|
||||
expect(sounds.kinds.where((k) => k == SfxKind.chat), hasLength(1));
|
||||
expect(sounds.kinds, contains(SfxKind.join));
|
||||
} finally {
|
||||
await friend.dispose();
|
||||
await coord.dispose();
|
||||
@@ -235,3 +243,9 @@ void main() {
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
class _RecordingSfx implements SfxService {
|
||||
final kinds = <SfxKind>[];
|
||||
@override
|
||||
Future<void> play(SfxCue cue) async => kinds.add(cue.kind);
|
||||
}
|
||||
Reference in new issue
Block a user