// 调试音频数据
function debugAudioData(audioHex) {
  console.log('=== 音频数据调试 ===');
  console.log('音频数据长度:', audioHex.length);
  console.log('音频数据前100个字符:', audioHex.substring(0, 100));
  console.log('音频数据后100个字符:', audioHex.substring(audioHex.length - 100));
  
  // 检查是否有重复模式
  const halfLength = Math.floor(audioHex.length / 2);
  const firstHalf = audioHex.substring(0, halfLength);
  const secondHalf = audioHex.substring(halfLength);
  
  if (firstHalf === secondHalf) {
    console.log('⚠️ 警告：音频数据可能是重复的！');
  } else {
    console.log('✅ 音频数据没有重复');
  }
}

// 如果在浏览器环境中运行
if (typeof window !== 'undefined') {
  window.debugAudioData = debugAudioData;
  console.log('音频调试函数已挂载到 window.debugAudioData');
}

export { debugAudioData }; 