Skip to content

Commit 731fc92

Browse files
Merge pull request #8 from chrisgleissner/copilot/fix-d3fb7c61-ae70-4baa-9ecc-60ea032e3fea
Introduce configurable rendering delay for smoother video streaming
2 parents 2f00db6 + 2707b07 commit 731fc92

File tree

9 files changed

+1254
-72
lines changed

9 files changed

+1254
-72
lines changed

.github/copilot-instructions.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@ The C64 Ultimate device streams video and audio data over network connections. K
252252
4. **Plugin logic goes in modular source files** - Use focused modules in src/
253253
5. **Use C64U_LOG_*() macros** for logging (defined in c64u-logging.h)
254254
6. **Verify all files end with newline** - Critical for macOS builds
255+
7. **DO NOT create markdown documentation files during development** - Keep workspace clean, document in existing files only
255256

256257
### Common Plugin Tasks:
257258
- **Add new source type:** Implement in plugin-main.c, register with OBS

CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,14 @@ if(ENABLE_QT)
3535
)
3636
endif()
3737

38-
target_sources(${CMAKE_PROJECT_NAME} PRIVATE
38+
target_sources(${CMAKE_PROJECT_NAME} PRIVATE
3939
src/plugin-main.c
4040
src/c64u-network.c
4141
src/c64u-protocol.c
4242
src/c64u-video.c
4343
src/c64u-audio.c
4444
src/c64u-source.c
45+
src/c64u-record.c
4546
)
4647

4748
set_target_properties_plugin(${CMAKE_PROJECT_NAME} PROPERTIES OUTPUT_NAME ${_name})

src/c64u-audio.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include "c64u-types.h"
66
#include "c64u-protocol.h"
77
#include "c64u-network.h"
8+
#include "c64u-record.h" // For recording functions
89

910
// Audio thread function
1011
void *audio_thread_func(void *data)
@@ -94,6 +95,12 @@ void *audio_thread_func(void *data)
9495
audio_frame.samples_per_sec = 48000; // Will be adjusted for PAL/NTSC
9596
audio_frame.timestamp = os_gettime_ns();
9697

98+
// Record audio data if recording is enabled
99+
if (context->record_video) {
100+
record_audio_data(context, (const uint8_t *)audio_data,
101+
192 * 2 * 2); // 192 stereo samples * 2 bytes per sample
102+
}
103+
97104
obs_source_output_audio(context->source, &audio_frame);
98105
}
99106

0 commit comments

Comments
 (0)