diff --git a/util/RTCContext.cpp b/util/RTCContext.cpp index 4b8d615..ff2d3cb 100644 --- a/util/RTCContext.cpp +++ b/util/RTCContext.cpp @@ -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) {