Rename the active product, Go module, binaries, configuration, protocols and documentation to Piik while retaining the TV mascot and existing media/room behavior. Use one current private contract without old-name aliases. Preserve SQLite authority and copy compatible local settings once; other settings start fresh. Git-message cleanup and the infrastructure name cutover are coordinated with this phase, with original history and deployment data archived externally. Validated locally with Web and Go checks, Windows capture compilation, matched Client/Server builds, packaged Client control handshake and history-rewrite integrity checks. Skip duplicate hosted CI for this owner-authorized local release. [skip ci]
34 lines
1.1 KiB
C++
34 lines
1.1 KiB
C++
#pragma once
|
|
|
|
#include <windows.h>
|
|
|
|
#include <cstdint>
|
|
#include <functional>
|
|
|
|
namespace piik::capture {
|
|
|
|
constexpr UINT32 kAudioSampleRate = 48'000;
|
|
constexpr UINT16 kAudioChannels = 2;
|
|
constexpr UINT16 kAudioBytesPerSample = 2;
|
|
constexpr UINT32 kAudioFramesPerChunk = 960;
|
|
constexpr DWORD kAudioBytesPerChunk =
|
|
kAudioFramesPerChunk * kAudioChannels * kAudioBytesPerSample;
|
|
constexpr UINT64 kAudioChunkDuration100ns = 200'000;
|
|
|
|
using PCMWriter =
|
|
std::function<HRESULT(UINT64 timestamp100ns, const BYTE* data, DWORD size)>;
|
|
using ReadyWriter = std::function<HRESULT()>;
|
|
using StopProbe = std::function<bool()>;
|
|
|
|
bool ProcessAudioAvailable();
|
|
bool SystemAudioAvailable();
|
|
HRESULT CaptureProcessAudio(DWORD pid, UINT64 expected_creation_time,
|
|
HANDLE stop_event, const StopProbe& stop_probe,
|
|
const ReadyWriter& ready_writer,
|
|
const PCMWriter& writer);
|
|
HRESULT CaptureSystemAudio(HANDLE stop_event, const StopProbe& stop_probe,
|
|
const ReadyWriter& ready_writer,
|
|
const PCMWriter& writer);
|
|
|
|
} // namespace piik::capture
|