This commit is contained in:
wangjiyu 2025-04-16 11:05:29 +08:00
parent a98aa02dce
commit c668b06ef8
1 changed files with 1 additions and 1 deletions

View File

@ -321,7 +321,7 @@ void RTCContext::onAudioProcess(const char* roomId, const char* peerId,
// 3. 创建共享内存
std::cout << "[3] 创建共享内存..." << std::endl;
char shm_name[32];
snprintf(shm_name, sizeof(shm_name), "./audio_shm_%d", getpid());
snprintf(shm_name, sizeof(shm_name), "/audio_shm_%d", getpid());
int fd = shm_open(shm_name, O_CREAT | O_RDWR, 0666);
if (fd == -1) {