缩小音频队列大小
authorhcj <1224667075@qq.com>
Tue, 28 Oct 2025 07:28:37 +0000 (15:28 +0800)
committerhcj <1224667075@qq.com>
Tue, 28 Oct 2025 07:28:37 +0000 (15:28 +0800)
code/sdk/zhihui/ai/media/ai_media_service_ext.cpp

index 0371623..0901102 100644 (file)
@@ -50,7 +50,7 @@ const int32_t NUMBER_BASE = 10;
 const int32_t CHANNEL_COUNT = 2;
 const int32_t SAMPLERATE_16000 = 16000;
 const uint32_t AI_VOICE_BUFFER_SIZE = 0x800;  // 2KB buffer for AI voice
-const uint32_t AI_VOICE_QUEUE_SIZE = 64;      // 队列大小
+const uint32_t AI_VOICE_QUEUE_SIZE = 32;      // 队列大小
 
 // OGG封装相关常量
 const uint32_t MILLSECOND_TO_SECOND = 1000;
@@ -1006,13 +1006,6 @@ static void AIVoiceInputThreadFunc(void *data)
                     context->dataCallback(context->dataBuffer, readSize, context->callbackUserData);
                 }
             }
-            
-            // Write audio data to output stream (echo back)
-            // int32_t writeRet = AudioStreamOutStreamWrite(context->dataBuffer, readSize);
-            // if (readSize != 0) {
-            //     MEDIA_ERR_LOG("Failed to write audio data to output stream, ret=%d", readSize);
-            // }
-            
         } 
       
         LOS_Msleep(10);