{"id":67234,"date":"2026-01-28T15:25:13","date_gmt":"2026-01-28T07:25:13","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/67234.html"},"modified":"2026-01-28T15:25:13","modified_gmt":"2026-01-28T07:25:13","slug":"harmonyos-6%e5%ae%9e%e6%88%98%ef%bc%88%e6%ba%90%e7%a0%81%e8%a7%a3%e6%9e%90%e7%af%87%ef%bc%89%ef%bc%9a%e9%9f%b3%e4%b9%90%e6%92%ad%e6%94%be%e5%99%a8%e7%9a%84%e9%9f%b3%e9%a2%91%e7%84%a6%e7%82%b9%e7%ae%a1","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/67234.html","title":{"rendered":"HarmonyOS 6\u5b9e\u6218\uff08\u6e90\u7801\u89e3\u6790\u7bc7\uff09\uff1a\u97f3\u4e50\u64ad\u653e\u5668\u7684\u97f3\u9891\u7126\u70b9\u7ba1\u7406\uff08\u4e0a\uff09\u2014\u2014AudioSession\u4e0e\u6253\u65ad\u673a\u5236"},"content":{"rendered":"<\/p>\n<h4>HarmonyOS 6\u5b9e\u6218&#xff08;\u6e90\u7801\u89e3\u6790\u7bc7&#xff09;&#xff1a;\u97f3\u4e50\u64ad\u653e\u5668\u7684\u97f3\u9891\u7126\u70b9\u7ba1\u7406&#xff08;\u4e0a&#xff09;\u2014\u2014AudioSession\u4e0e\u6253\u65ad\u673a\u5236<\/h4>\n<ul>\n<li>HarmonyOS 6\u5b9e\u6218&#xff08;\u6e90\u7801\u89e3\u6790\u7bc7&#xff09;&#xff1a;\u97f3\u4e50\u64ad\u653e\u5668\u7684\u97f3\u9891\u7126\u70b9\u7ba1\u7406&#xff08;\u4e0a&#xff09;\u2014\u2014AudioSession\u4e0e\u6253\u65ad\u673a\u5236<\/li>\n<li>\n<ul>\n<li>\u524d\u8a00<\/li>\n<li>\u97f3\u9891\u7126\u70b9\u57fa\u7840<\/li>\n<li>\n<ul>\n<li>\u4ec0\u4e48\u662f\u97f3\u9891\u7126\u70b9<\/li>\n<li>\u97f3\u9891\u6d41\u7c7b\u578b\u7684\u91cd\u8981\u6027<\/li>\n<li>\u7533\u8bf7\u548c\u91ca\u653e\u7126\u70b9<\/li>\n<\/ul>\n<\/li>\n<li>\u97f3\u9891\u6253\u65ad\u673a\u5236\u8be6\u89e3<\/li>\n<li>\n<ul>\n<li>\u6253\u65ad\u7c7b\u578b<\/li>\n<li>\n<ul>\n<li>1. \u5f3a\u5236\u6253\u65ad (INTERRUPT_FORCE)<\/li>\n<li>2. \u5171\u4eab\u6253\u65ad (INTERRUPT_SHARE)<\/li>\n<\/ul>\n<\/li>\n<li>\u6253\u65ad\u63d0\u793a\u7c7b\u578b<\/li>\n<\/ul>\n<\/li>\n<li>\u5b9e\u73b0\u97f3\u9891\u7126\u70b9\u7ba1\u7406<\/li>\n<li>\n<ul>\n<li>\u573a\u666f1&#xff1a;TextReader\u6717\u8bfb\u65f6<\/li>\n<li>\u573a\u666f2&#xff1a;\u6765\u7535\u65f6<\/li>\n<li>\u6b65\u9aa41&#xff1a;\u57fa\u7840\u6253\u65ad\u5904\u7406<\/li>\n<li>\n<ul>\n<li>1. \u6838\u5fc3\u72b6\u6001<\/li>\n<li>2. \u76d1\u542c\u7cfb\u7edf\u6253\u65ad<\/li>\n<li>3. \u5904\u7406\u4e0d\u540c\u4e2d\u65ad\u7c7b\u578b<\/li>\n<li>4. \u7528\u6237\u4e3b\u52a8\u64cd\u4f5c<\/li>\n<\/ul>\n<\/li>\n<li>\u6b65\u9aa42&#xff1a;\u8bbe\u7f6e\u7126\u70b9\u6a21\u5f0f<\/li>\n<li>\u6b65\u9aa43&#xff1a;\u5b9e\u73b0\u9759\u97f3\u64ad\u653e\u6a21\u5f0f<\/li>\n<\/ul>\n<\/li>\n<li>\u603b\u7ed3<\/li>\n<li>\n<ul>\n<li>\u6838\u5fc3\u77e5\u8bc6\u70b9<\/li>\n<li>\u4e0b\u7bc7\u9884\u544a<\/li>\n<\/ul>\n<\/li>\n<li>\u53c2\u8003\u8d44\u6e90<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h2>HarmonyOS 6\u5b9e\u6218&#xff08;\u6e90\u7801\u89e3\u6790\u7bc7&#xff09;&#xff1a;\u97f3\u4e50\u64ad\u653e\u5668\u7684\u97f3\u9891\u7126\u70b9\u7ba1\u7406&#xff08;\u4e0a&#xff09;\u2014\u2014AudioSession\u4e0e\u6253\u65ad\u673a\u5236<\/h2>\n<h3>\u524d\u8a00<\/h3>\n<p>\u5927\u5bb6\u597d&#xff01;\u6211\u662f\u4f60\u4eec\u7684\u8001\u670b\u53cb\u6728\u65af\u4f73&#xff0c;\u662f\u534e\u4e3a\u4e91 HDE \u8ba4\u8bc1\u4e13\u5bb6\u548c OpenTiny \u5f00\u6e90\u793e\u533a\u7684\u5e03\u9053\u5e08\u3002\u5728\u4e0a\u4e00\u7bc7\u5206\u4eab\u4e2d&#xff0c;\u6211\u4eec\u4e3a HarmonyOS \u97f3\u4e50\u64ad\u653e\u5668\u96c6\u6210\u4e86 Speech Kit \u7684 TextReader \u80fd\u529b&#xff0c;\u8ba9\u5e94\u7528\u80fd\u591f\u6e05\u6670\u6d41\u7545\u5730\u6717\u8bfb\u6b4c\u66f2\u4fe1\u606f\u3002<\/p>\n<p>\u7136\u800c&#xff0c;\u5f53\u591a\u4e2a\u58f0\u97f3\u540c\u65f6\u54cd\u8d77\u65f6&#xff0c;\u7f8e\u597d\u7684\u4f53\u9a8c\u4e5f\u53ef\u80fd\u88ab\u6253\u65ad\u2014\u2014\u60f3\u8c61\u4e00\u4e0b&#xff0c;\u6b63\u7528 TextReader \u542c\u7740\u6b4c\u8bcd\u89e3\u8bfb&#xff0c;\u80cc\u666f\u97f3\u4e50\u5374\u4f9d\u7136\u64ad\u653e&#xff1b;\u5f00\u8f66\u65f6&#xff0c;\u7a81\u7136\u6709\u7535\u8bdd\u8fdb\u6765&#xff0c;\u97f3\u4e50\u4e0e\u7535\u8bdd\u94c3\u58f0\u4ea4\u6742\u5728\u4e00\u8d77\u3002 \u8fd9\u4e9b\u58f0\u97f3\u7684\u201c\u51b2\u7a81\u201d&#xff0c;\u4e0d\u4ec5\u5f71\u54cd\u4f7f\u7528\u611f\u53d7&#xff0c;\u66f4\u53ef\u80fd\u8ba9\u6838\u5fc3\u4fe1\u606f\u6df9\u6ca1\u5728\u5608\u6742\u7684\u97f3\u9891\u6d41\u4e2d\u3002<\/p>\n<p>\u4e3a\u4e86\u89e3\u51b3\u8fd9\u7c7b\u95ee\u9898&#xff0c;HarmonyOS \u63d0\u4f9b\u4e86\u5b8c\u5584\u7684\u97f3\u9891\u7ba1\u7406\u673a\u5236\u3002\u7ee7\u4e3a\u5e94\u7528\u88c5\u4e0a\u201c\u8033\u6735\u201d\u548c\u201c\u55d3\u97f3\u201d\u4e4b\u540e&#xff0c;\u672c\u7bc7\u6211\u4eec\u5c06\u805a\u7126\u4e8e\u8d4b\u4e88\u5b83\u667a\u6167\u7684\u201c\u542c\u89c9\u534f\u8c03\u80fd\u529b\u201d\u3002\u6211\u4eec\u5c06\u4e00\u8d77\u63a2\u8ba8\u5982\u4f55\u901a\u8fc7 AudioSession \u7ba1\u7406\u4e0e\u97f3\u9891\u6253\u65ad\u7b56\u7565&#xff0c;\u8ba9\u5e94\u7528\u80fd\u591f\u667a\u80fd\u534f\u8c03\u591a\u4e2a\u97f3\u9891\u6d41\u7684\u5e76\u53d1\u4e0e\u4e2d\u65ad&#xff0c;\u786e\u4fdd\u5728\u4efb\u4f55\u573a\u666f\u4e0b&#xff0c;\u58f0\u97f3\u90fd\u80fd\u6709\u5e8f\u3001\u6e05\u6670\u5730\u4f20\u9012\u3002 <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/01\/20260128072509-6979b9d5aec76.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<h3>\u97f3\u9891\u7126\u70b9\u57fa\u7840<\/h3>\n<h4>\u4ec0\u4e48\u662f\u97f3\u9891\u7126\u70b9<\/h4>\n<p>\u97f3\u9891\u7126\u70b9\u662fHarmonyOS\u97f3\u9891\u7cfb\u7edf\u7684\u6838\u5fc3\u673a\u5236&#xff0c;\u7528\u4e8e\u534f\u8c03\u591a\u4e2a\u5e94\u7528\u6216\u540c\u4e00\u5e94\u7528\u5185\u591a\u4e2a\u97f3\u9891\u6d41\u7684\u64ad\u653e\u3002<\/p>\n<p>\u6838\u5fc3\u539f\u5219&#xff1a;<\/p>\n<ul>\n<li>\u540c\u4e00\u65f6\u523b\u53ea\u6709\u4e00\u4e2a\u97f3\u9891\u6d41\u62e5\u6709\u7126\u70b9<\/li>\n<li>\u62e5\u6709\u7126\u70b9\u7684\u97f3\u9891\u6d41\u53ef\u4ee5\u6b63\u5e38\u64ad\u653e<\/li>\n<li>\u5931\u53bb\u7126\u70b9\u7684\u97f3\u9891\u6d41\u9700\u8981\u6682\u505c\u6216\u964d\u4f4e\u97f3\u91cf<\/li>\n<li>\u7126\u70b9\u53ef\u4ee5\u5728\u4e0d\u540c\u97f3\u9891\u6d41\u4e4b\u95f4\u8f6c\u79fb<\/li>\n<\/ul>\n<h4>\u97f3\u9891\u6d41\u7c7b\u578b\u7684\u91cd\u8981\u6027<\/h4>\n<p>\u5728\u542f\u52a8\u64ad\u653e\u524d&#xff0c;\u5fc5\u987b\u6b63\u786e\u8bbe\u7f6e\u97f3\u9891\u6d41\u7c7b\u578b&#xff08;StreamUsage&#xff09;&#xff0c;\u7cfb\u7edf\u4f1a\u6839\u636e\u6b64\u7c7b\u578b\u5e94\u7528\u4e0d\u540c\u7684\u7126\u70b9\u7b56\u7565&#xff1a;<\/p>\n<p><span class=\"token comment\">\/\/ \u6b63\u786e\u8bbe\u7f6e\u97f3\u9891\u6d41\u7c7b\u578b\u662f\u826f\u597d\u97f3\u9891\u4f53\u9a8c\u7684\u57fa\u7840<\/span><br \/>\n<span class=\"token keyword\">let<\/span> audioStreamInfo<span class=\"token operator\">:<\/span> audio<span class=\"token punctuation\">.<\/span>AudioStreamInfo <span class=\"token operator\">&#061;<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n  samplingRate<span class=\"token operator\">:<\/span> audio<span class=\"token punctuation\">.<\/span>AudioSamplingRate<span class=\"token punctuation\">.<\/span><span class=\"token constant\">SAMPLE_RATE_44100<\/span><span class=\"token punctuation\">,<\/span><br \/>\n  channels<span class=\"token operator\">:<\/span> audio<span class=\"token punctuation\">.<\/span>AudioChannel<span class=\"token punctuation\">.<\/span><span class=\"token constant\">CHANNEL_2<\/span><span class=\"token punctuation\">,<\/span><br \/>\n  sampleFormat<span class=\"token operator\">:<\/span> audio<span class=\"token punctuation\">.<\/span>AudioSampleFormat<span class=\"token punctuation\">.<\/span><span class=\"token constant\">SAMPLE_FORMAT_S16LE<\/span><span class=\"token punctuation\">,<\/span><br \/>\n  <span class=\"token comment\">\/\/ \u5173\u952e&#xff1a;\u6839\u636e\u7528\u9014\u8bbe\u7f6e\u6b63\u786e\u7684\u97f3\u9891\u6d41\u7c7b\u578b<\/span><br \/>\n  usage<span class=\"token operator\">:<\/span> audio<span class=\"token punctuation\">.<\/span>StreamUsage<span class=\"token punctuation\">.<\/span><span class=\"token constant\">STREAM_USAGE_MUSIC<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token comment\">\/\/ \u97f3\u4e50\u7c7b\u578b<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<h4>\u7533\u8bf7\u548c\u91ca\u653e\u7126\u70b9<\/h4>\n<p>\u6839\u636e\u5b98\u65b9\u6587\u6863&#xff0c;\u97f3\u9891\u7126\u70b9\u7684\u7533\u8bf7\u548c\u91ca\u653e\u662f\u81ea\u52a8\u5b8c\u6210\u7684&#xff1a;<\/p>\n<ul>\n<li>\u7533\u8bf7\u7126\u70b9&#xff1a;\u8c03\u7528AudioRenderer.start()\u65f6&#xff0c;\u7cfb\u7edf\u81ea\u52a8\u7533\u8bf7\u7126\u70b9<\/li>\n<li>\u91ca\u653e\u7126\u70b9&#xff1a;\u8c03\u7528AudioRenderer.pause()\/stop()\/release()\u65f6&#xff0c;\u7cfb\u7edf\u81ea\u52a8\u91ca\u653e\u7126\u70b9<\/li>\n<\/ul>\n<h3>\u97f3\u9891\u6253\u65ad\u673a\u5236\u8be6\u89e3<\/h3>\n<p>\u97f3\u9891\u7126\u70b9\u4e89\u593a\u662f\u6307\u591a\u4e2a\u5e94\u7528\u540c\u65f6\u8bf7\u6c42\u97f3\u9891\u64ad\u653e\u6743\u9650\u65f6\u4ea7\u751f\u7684\u51b2\u7a81\u3002\u6bd4\u5982\u540c\u65f6\u64ad\u653e&#xff1a;\u5f53\u97f3\u4e50\u8f6f\u4ef6&#xff09;\u64ad\u653e\u65f6&#xff0c;\u6253\u5f00\u89c6\u9891\u8f6f\u4ef6&#xff0c;\u4e24\u8005\u58f0\u97f3\u91cd\u53e0\u3002\u6216\u8005\u64ad\u653e\u4e2d\u65ad&#xff1a;\u770b\u89c6\u9891\u65f6\u7a81\u7136\u6765\u7535\u8bdd&#xff0c;\u89c6\u9891\u58f0\u97f3\u88ab\u6682\u505c\u6216\u964d\u4f4e\u97f3\u91cf\u3002\u8fd9\u65f6\u5c31\u6d89\u53ca\u5230\u4e86\u97f3\u9891\u6253\u65ad\u673a\u5236\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/01\/20260128072510-6979b9d6a7d20.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<h4>\u6253\u65ad\u7c7b\u578b<\/h4>\n<p>HarmonyOS\u5b9a\u4e49\u4e86\u4e24\u79cd\u6253\u65ad\u7c7b\u578b&#xff0c;\u5904\u7406\u65b9\u5f0f\u6709\u6240\u4e0d\u540c&#xff1a;<\/p>\n<h5>1. \u5f3a\u5236\u6253\u65ad (INTERRUPT_FORCE)<\/h5>\n<p>\u7cfb\u7edf\u5df2\u5f3a\u5236\u6267\u884c\u76f8\u5e94\u64cd\u4f5c&#xff0c;\u5e94\u7528\u53ea\u9700\u66f4\u65b0\u72b6\u6001&#xff1a;<\/p>\n<p><span class=\"token keyword\">if<\/span> <span class=\"token punctuation\">(<\/span>interruptEvent<span class=\"token punctuation\">.<\/span>forceType <span class=\"token operator\">&#061;&#061;&#061;<\/span> audio<span class=\"token punctuation\">.<\/span>InterruptForceType<span class=\"token punctuation\">.<\/span><span class=\"token constant\">INTERRUPT_FORCE<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n  <span class=\"token comment\">\/\/ \u7cfb\u7edf\u5df2\u6267\u884c\u64cd\u4f5c&#xff0c;\u5e94\u7528\u66f4\u65b0UI\u548c\u72b6\u6001\u5373\u53ef<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p>\u5178\u578b\u573a\u666f:<\/p>\n<ul>\n<li>\u6765\u7535&#xff1a;\u97f3\u4e50\u5fc5\u987b\u6682\u505c<\/li>\n<li>\u95f9\u949f&#xff1a;\u97f3\u4e50\u5fc5\u987b\u6682\u505c<\/li>\n<li>\u7cfb\u7edf\u901a\u77e5&#xff1a;\u97f3\u4e50\u53ef\u80fd\u9700\u8981\u964d\u4f4e\u97f3\u91cf<\/li>\n<\/ul>\n<h5>2. \u5171\u4eab\u6253\u65ad (INTERRUPT_SHARE)<\/h5>\n<p>\u5e94\u7528\u9700\u8981\u4e3b\u52a8\u6267\u884c\u64cd\u4f5c&#xff1a;<\/p>\n<p><span class=\"token keyword\">if<\/span> <span class=\"token punctuation\">(<\/span>interruptEvent<span class=\"token punctuation\">.<\/span>forceType <span class=\"token operator\">&#061;&#061;&#061;<\/span> audio<span class=\"token punctuation\">.<\/span>InterruptForceType<span class=\"token punctuation\">.<\/span><span class=\"token constant\">INTERRUPT_SHARE<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n  <span class=\"token comment\">\/\/ \u5e94\u7528\u9700\u8981\u4e3b\u52a8\u6267\u884c\u6062\u590d\u7b49\u64cd\u4f5c<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p>\u5178\u578b\u573a\u666f:<\/p>\n<ul>\n<li>\u5bfc\u822a\u8bed\u97f3&#xff1a;\u97f3\u4e50\u53ef\u4ee5\u9009\u62e9\u964d\u4f4e\u97f3\u91cf\u6216\u6682\u505c<\/li>\n<li>TextReader\u6717\u8bfb&#xff1a;\u97f3\u4e50\u53ef\u4ee5\u9009\u62e9\u6682\u505c\u6216\u9759\u97f3<\/li>\n<\/ul>\n<p>\u5b98\u65b9\u8bf4\u660e&#xff1a;\u9ed8\u8ba4\u7126\u70b9\u7b56\u7565\u4e0b&#xff0c;\u9664INTERRUPT_HINT_RESUME\u5916&#xff0c;\u5176\u4ed6hintType\u5747\u4e3aINTERRUPT_FORCE\u7c7b\u578b\u3002<\/p>\n<h4>\u6253\u65ad\u63d0\u793a\u7c7b\u578b<\/h4>\n<p>\u7cfb\u7edf\u901a\u8fc7\u4e0d\u540c\u7684\u63d0\u793a\u7c7b\u578b\u544a\u77e5\u5e94\u7528\u5982\u4f55\u5904\u7406&#xff1a;<\/p>\n<table>\n<tr>\u63d0\u793a\u7c7b\u578b\u7cfb\u7edf\u64cd\u4f5c\u5e94\u7528\u804c\u8d23<\/tr>\n<tbody>\n<tr>\n<td>INTERRUPT_HINT_PAUSE<\/td>\n<td>\u5df2\u6682\u505c\u97f3\u9891<\/td>\n<td>\u66f4\u65b0UI\u72b6\u6001<\/td>\n<\/tr>\n<tr>\n<td>INTERRUPT_HINT_STOP<\/td>\n<td>\u5df2\u505c\u6b62\u97f3\u9891<\/td>\n<td>\u66f4\u65b0UI\u72b6\u6001<\/td>\n<\/tr>\n<tr>\n<td>INTERRUPT_HINT_DUCK<\/td>\n<td>\u5df2\u964d\u4f4e\u97f3\u91cf<\/td>\n<td>\u53ef\u9009&#xff1a;\u663e\u793a\u97f3\u91cf\u964d\u4f4e\u63d0\u793a<\/td>\n<\/tr>\n<tr>\n<td>INTERRUPT_HINT_UNDUCK<\/td>\n<td>\u5df2\u6062\u590d\u97f3\u91cf<\/td>\n<td>\u53ef\u9009&#xff1a;\u663e\u793a\u97f3\u91cf\u6062\u590d\u63d0\u793a<\/td>\n<\/tr>\n<tr>\n<td>INTERRUPT_HINT_RESUME<\/td>\n<td>\u65e0&#xff08;\u5171\u4eab\u6253\u65ad&#xff09;<\/td>\n<td>\u5fc5\u987b\u4e3b\u52a8\u6062\u590d\u64ad\u653e<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>\u5b9e\u73b0\u97f3\u9891\u7126\u70b9\u7ba1\u7406<\/h3>\n<h4>\u573a\u666f1&#xff1a;TextReader\u6717\u8bfb\u65f6<\/h4>\n<p><span class=\"token comment\">\/\/ \u5f53TextReader\u5f00\u59cb\u6717\u8bfb\u6b4c\u8bcd\u65f6&#xff1a;<\/span><br \/>\n<span class=\"token comment\">\/\/ \u97f3\u4e50\u6536\u5230 INTERRUPT_HINT_PAUSE&#xff08;\u5f3a\u5236\u6253\u65ad&#xff09;<\/span><br \/>\n<span class=\"token comment\">\/\/ \u7cfb\u7edf\u5df2\u6682\u505c\u97f3\u4e50&#xff0c;\u5e94\u7528\u66f4\u65b0UI\u663e\u793a\u6682\u505c\u72b6\u6001<\/span><\/p>\n<p><span class=\"token comment\">\/\/ \u5f53TextReader\u7ed3\u675f\u6717\u8bfb\u65f6&#xff1a;<\/span><br \/>\n<span class=\"token comment\">\/\/ \u97f3\u4e50\u6536\u5230 INTERRUPT_HINT_RESUME&#xff08;\u5171\u4eab\u6253\u65ad&#xff09;<\/span><br \/>\n<span class=\"token comment\">\/\/ \u5e94\u7528\u9700\u8981\u4e3b\u52a8\u8c03\u7528start()\u6062\u590d\u64ad\u653e<\/span><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/01\/20260128072511-6979b9d728ce4.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u7528\u6237\u64cd\u4f5c          \u97f3\u9891\u7126\u70b9\u53d8\u5316                    \u5e94\u7528\u54cd\u5e94<br \/>\n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500<br \/>\n\u64ad\u653e\u97f3\u4e50    \u2192    AudioRenderer \u83b7\u5f97\u7126\u70b9    \u2192    \u97f3\u4e50\u6b63\u5e38\u64ad\u653e<br \/>\n\u70b9\u51fb\u6717\u8bfb    \u2192    TextReader \u8bf7\u6c42\u7126\u70b9       \u2192    \u7cfb\u7edf\u53d1\u9001\u6253\u65ad\u4e8b\u4ef6<br \/>\n            \u2192    AudioRenderer \u5931\u53bb\u7126\u70b9    \u2192    \u97f3\u4e50\u6682\u505c\/\u964d\u4f4e\u97f3\u91cf<br \/>\n            \u2192    TextReader \u83b7\u5f97\u7126\u70b9       \u2192    \u5f00\u59cb\u8bed\u97f3\u6717\u8bfb<br \/>\n\u6717\u8bfb\u7ed3\u675f    \u2192    TextReader \u91ca\u653e\u7126\u70b9       \u2192    \u505c\u6b62\u6717\u8bfb<br \/>\n            \u2192    AudioRenderer \u53ef\u6062\u590d\u7126\u70b9  \u2192    \u97f3\u4e50\u6062\u590d\u64ad\u653e<\/p>\n<h4>\u573a\u666f2&#xff1a;\u6765\u7535\u65f6<\/h4>\n<p><span class=\"token comment\">\/\/ \u6765\u7535\u54cd\u94c3\u65f6&#xff1a;<\/span><br \/>\n<span class=\"token comment\">\/\/ \u97f3\u4e50\u6536\u5230 INTERRUPT_HINT_PAUSE&#xff08;\u5f3a\u5236\u6253\u65ad&#xff09;<\/span><br \/>\n<span class=\"token comment\">\/\/ \u7cfb\u7edf\u5df2\u6682\u505c\u97f3\u4e50&#xff0c;\u5e94\u7528\u66f4\u65b0UI<\/span><\/p>\n<p><span class=\"token comment\">\/\/ \u7535\u8bdd\u7ed3\u675f\u540e&#xff1a;<\/span><br \/>\n<span class=\"token comment\">\/\/ \u97f3\u4e50\u6536\u5230 INTERRUPT_HINT_RESUME&#xff08;\u5171\u4eab\u6253\u65ad&#xff09;<\/span><br \/>\n<span class=\"token comment\">\/\/ \u5e94\u7528\u4e3b\u52a8\u6062\u590d\u64ad\u653e<\/span><\/p>\n<h4>\u6b65\u9aa41&#xff1a;\u57fa\u7840\u6253\u65ad\u5904\u7406<\/h4>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/01\/20260128072511-6979b9d75142a.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u4fee\u6539 AudioRendererController.ets&#xff0c;\u5b9e\u73b0\u5b98\u65b9\u63a8\u8350\u7684\u6253\u65ad\u5904\u7406\u903b\u8f91&#xff1a;\u97f3\u9891\u7126\u70b9\u4e89\u593a\u9700\u8981\u4f18\u96c5\u5904\u7406\u3002\u6838\u5fc3\u662f\u76d1\u542c\u7cfb\u7edf\u4e8b\u4ef6&#xff0c;\u5e76\u533a\u5206\u201c\u7528\u6237\u6682\u505c\u201d\u4e0e\u201c\u7cfb\u7edf\u6253\u65ad\u201d\u3002\u4ee5\u4e0b\u662f\u5b9e\u73b0\u8be5\u903b\u8f91\u7684\u5173\u952e\u90e8\u5206&#xff1a;<\/p>\n<h5>1. \u6838\u5fc3\u72b6\u6001<\/h5>\n<p>\u9996\u5148&#xff0c;\u6211\u4eec\u9700\u8981\u4e00\u4e2a\u72b6\u6001\u6765\u8bb0\u5f55\u6682\u505c\u539f\u56e0&#xff1a;<\/p>\n<p><span class=\"token keyword\">private<\/span> wasPausedByInterrupt<span class=\"token operator\">:<\/span> <span class=\"token builtin\">boolean<\/span> <span class=\"token operator\">&#061;<\/span> <span class=\"token boolean\">false<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token comment\">\/\/ true &#061; \u88ab\u7cfb\u7edf\u6253\u65ad | false &#061; \u7528\u6237\u4e3b\u52a8\u6682\u505c<\/span><\/p>\n<p>\u8fd9\u4e2a\u6807\u8bb0\u51b3\u5b9a\u4e86\u6536\u5230\u6062\u590d\u4fe1\u53f7\u65f6\u662f\u5426\u81ea\u52a8\u91cd\u542f\u64ad\u653e\u3002<\/p>\n<h5>2. \u76d1\u542c\u7cfb\u7edf\u6253\u65ad<\/h5>\n<p>\u63a5\u4e0b\u6765&#xff0c;\u8bbe\u7f6e\u7cfb\u7edf\u97f3\u9891\u4e2d\u65ad\u4e8b\u4ef6\u7684\u76d1\u542c\u5668&#xff1a;<\/p>\n<p><span class=\"token keyword\">this<\/span><span class=\"token punctuation\">.<\/span>audioRenderer<span class=\"token punctuation\">.<\/span><span class=\"token function\">on<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#039;audioInterrupt&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token keyword\">this<\/span><span class=\"token punctuation\">.<\/span>interruptCallback<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>\u5f53\u6709\u5176\u4ed6\u5e94\u7528&#xff08;\u5982\u7535\u8bdd\u3001\u5bfc\u822a&#xff09;\u8bf7\u6c42\u97f3\u9891\u7126\u70b9\u65f6&#xff0c;\u7cfb\u7edf\u4f1a\u901a\u8fc7\u8fd9\u4e2a\u56de\u8c03\u901a\u77e5\u6211\u4eec\u3002<\/p>\n<h5>3. \u5904\u7406\u4e0d\u540c\u4e2d\u65ad\u7c7b\u578b<\/h5>\n<p>\u6700\u91cd\u8981\u7684\u90e8\u5206\u662f\u5904\u7406\u5404\u79cd\u4e2d\u65ad\u60c5\u51b5&#xff0c;\u6211\u5c06\u5176\u5206\u4e3a\u4e09\u7c7b&#xff1a;<\/p>\n<p>\u60c5\u51b5A&#xff1a;\u88ab\u7cfb\u7edf\u6682\u505c\u6216\u505c\u6b62<\/p>\n<p><span class=\"token keyword\">case<\/span> <span class=\"token constant\">INTERRUPT_HINT_PAUSE<\/span><span class=\"token operator\">:<\/span>  <span class=\"token comment\">\/\/ \u5982\u6765\u7535<\/span><br \/>\n  <span class=\"token keyword\">this<\/span><span class=\"token punctuation\">.<\/span>wasPausedByInterrupt <span class=\"token operator\">&#061;<\/span> <span class=\"token boolean\">true<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/ \u6807\u8bb0\u4e3a\u7cfb\u7edf\u6253\u65ad<\/span><br \/>\n  <span class=\"token keyword\">break<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token keyword\">case<\/span> <span class=\"token constant\">INTERRUPT_HINT_STOP<\/span><span class=\"token operator\">:<\/span>   <span class=\"token comment\">\/\/ \u88ab\u66f4\u9ad8\u4f18\u5148\u7ea7\u5e94\u7528\u5360\u7528<\/span><br \/>\n  <span class=\"token keyword\">this<\/span><span class=\"token punctuation\">.<\/span>wasPausedByInterrupt <span class=\"token operator\">&#061;<\/span> <span class=\"token boolean\">false<\/span><span class=\"token punctuation\">;<\/span><br \/>\n  <span class=\"token keyword\">break<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>\u8fd9\u91cc\u53ea\u9700\u66f4\u65b0\u72b6\u6001&#xff0c;\u7cfb\u7edf\u5df2\u5b9e\u9645\u6682\u505c\u4e86\u97f3\u9891\u3002<\/p>\n<p>\u60c5\u51b5B&#xff1a;\u6536\u5230\u6062\u590d\u4fe1\u53f7<\/p>\n<p><span class=\"token keyword\">case<\/span> <span class=\"token constant\">INTERRUPT_HINT_RESUME<\/span><span class=\"token operator\">:<\/span>  <span class=\"token comment\">\/\/ \u7cfb\u7edf\u901a\u77e5\u53ef\u4ee5\u6062\u590d\u4e86<\/span><br \/>\n  <span class=\"token keyword\">if<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token keyword\">this<\/span><span class=\"token punctuation\">.<\/span>wasPausedByInterrupt<span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span>  <span class=\"token comment\">\/\/ \u5982\u679c\u662f\u7cfb\u7edf\u6253\u65ad\u7684<\/span><br \/>\n    <span class=\"token keyword\">await<\/span> <span class=\"token keyword\">this<\/span><span class=\"token punctuation\">.<\/span>audioRenderer<span class=\"token operator\">?.<\/span><span class=\"token function\">start<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/ \u624d\u81ea\u52a8\u6062\u590d\u64ad\u653e<\/span><br \/>\n    <span class=\"token keyword\">this<\/span><span class=\"token punctuation\">.<\/span>wasPausedByInterrupt <span class=\"token operator\">&#061;<\/span> <span class=\"token boolean\">false<\/span><span class=\"token punctuation\">;<\/span><br \/>\n  <span class=\"token punctuation\">}<\/span><br \/>\n  <span class=\"token keyword\">break<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>\u8fd9\u662f\u6700\u5173\u952e\u7684\u903b\u8f91&#xff1a;\u53ea\u6709\u4e4b\u524d\u88ab\u7cfb\u7edf\u6253\u65ad\u7684\u60c5\u51b5\u624d\u81ea\u52a8\u6062\u590d\u3002<\/p>\n<p>\u60c5\u51b5C&#xff1a;\u97f3\u91cf\u4e34\u65f6\u8c03\u6574<\/p>\n<p><span class=\"token keyword\">case<\/span> <span class=\"token constant\">INTERRUPT_HINT_DUCK<\/span><span class=\"token operator\">:<\/span>   <span class=\"token comment\">\/\/ \u97f3\u91cf\u88ab\u964d\u4f4e&#xff08;\u5982\u5bfc\u822a\u64ad\u62a5&#xff09;<\/span><br \/>\n  <span class=\"token comment\">\/\/ \u901a\u5e38\u53ea\u9700UI\u63d0\u793a&#xff0c;\u7cfb\u7edf\u5df2\u5904\u7406\u97f3\u91cf<\/span><br \/>\n  <span class=\"token keyword\">break<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<h5>4. \u7528\u6237\u4e3b\u52a8\u64cd\u4f5c<\/h5>\n<p>\u6700\u540e&#xff0c;\u5f53\u7528\u6237\u81ea\u5df1\u70b9\u51fb\u6682\u505c\u65f6&#xff0c;\u8981\u91cd\u7f6e\u72b6\u6001&#xff1a;<\/p>\n<p><span class=\"token keyword\">public<\/span> <span class=\"token keyword\">async<\/span> <span class=\"token function\">pause<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token operator\">:<\/span> <span class=\"token builtin\">Promise<\/span><span class=\"token operator\">&lt;<\/span><span class=\"token keyword\">void<\/span><span class=\"token operator\">&gt;<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n  <span class=\"token keyword\">await<\/span> <span class=\"token keyword\">this<\/span><span class=\"token punctuation\">.<\/span>audioRenderer<span class=\"token punctuation\">.<\/span><span class=\"token function\">pause<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n  <span class=\"token keyword\">this<\/span><span class=\"token punctuation\">.<\/span>wasPausedByInterrupt <span class=\"token operator\">&#061;<\/span> <span class=\"token boolean\">false<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/ \u6e05\u9664\u81ea\u52a8\u6062\u590d\u6807\u8bb0<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p>\u8fd9\u6837\u786e\u4fdd\u7528\u6237\u624b\u52a8\u6682\u505c\u540e&#xff0c;\u5373\u4f7f\u6536\u5230\u7cfb\u7edf\u6062\u590d\u4fe1\u53f7\u4e5f\u4e0d\u4f1a\u610f\u5916\u64ad\u653e\u3002<\/p>\n<p>\u6574\u4e2a\u903b\u8f91\u7684\u6838\u5fc3\u5c31\u662f \u201c\u8c01\u6682\u505c\u7684&#xff0c;\u8c01\u8d1f\u8d23\u6062\u590d\u201d&#xff1a;<\/p>\n<ul>\n<li>\u7cfb\u7edf\u6682\u505c\u7684 \u2192 \u7cfb\u7edf\u901a\u77e5\u6062\u590d\u65f6\u81ea\u52a8\u64ad\u653e<\/li>\n<li>\u7528\u6237\u6682\u505c\u7684 \u2192 \u4fdd\u6301\u6682\u505c&#xff0c;\u7b49\u5f85\u7528\u6237\u64cd\u4f5c<\/li>\n<\/ul>\n<p>\u8fd9\u6837\u65e2\u4fdd\u8bc1\u4e86\u7535\u8bdd\u6302\u65ad\u540e\u97f3\u4e50\u80fd\u81ea\u52a8\u56de\u6765&#xff0c;\u53c8\u907f\u514d\u4e86\u7528\u6237\u624b\u52a8\u6682\u505c\u540e\u88ab\u610f\u5916\u6253\u6270\u3002<\/p>\n<h4>\u6b65\u9aa42&#xff1a;\u8bbe\u7f6e\u7126\u70b9\u6a21\u5f0f<\/h4>\n<p>\u7126\u70b9\u6a21\u5f0f\u51b3\u5b9a\u4e86\u5e94\u7528\u5185\u591a\u4e2a\u97f3\u9891\u5982\u4f55\u5171\u5b58\u3002<\/p>\n<p>\u7cfb\u7edf\u63d0\u4f9b\u4e24\u79cd\u6a21\u5f0f&#xff1a; SHARE_MODE&#xff08;\u5171\u4eab\u6a21\u5f0f&#xff09;&#xff1a;\u5e94\u7528\u5185\u97f3\u9891\u5171\u7528\u7126\u70b9&#xff0c;\u9002\u5408\u97f3\u4e50\u64ad\u653e\u5668 INDEPENDENT_MODE&#xff08;\u72ec\u7acb\u6a21\u5f0f&#xff09;&#xff1a;\u6bcf\u4e2a\u97f3\u9891\u72ec\u7acb\u7ba1\u7406&#xff0c;\u9002\u5408\u97f3\u89c6\u9891\u7f16\u8f91\u5668<\/p>\n<p>\u8fd9\u91cc\u9009\u62e9SHARE_MODE\u662f\u56e0\u4e3a\u5bf9\u4e8e\u97f3\u4e50\/\u89c6\u9891\u64ad\u653e\u5e94\u7528&#xff0c;\u901a\u5e38\u5e0c\u671b\u5e94\u7528\u5185\u53ea\u6709\u4e00\u4e2a\u58f0\u97f3\u5728\u64ad\u653e\u3002\u5f53\u5f00\u59cb\u64ad\u65b0\u97f3\u9891\u65f6&#xff0c;\u7cfb\u7edf\u4f1a\u81ea\u52a8\u6682\u505c\u4e4b\u524d\u7684\u97f3\u9891&#xff0c;\u907f\u514d\u5185\u90e8\u51b2\u7a81\u3002<\/p>\n<p><span class=\"token keyword\">export<\/span> <span class=\"token keyword\">class<\/span> <span class=\"token class-name\">AudioRendererController<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n  <span class=\"token comment\">\/**<br \/>\n   * \u521d\u59cb\u5316\u97f3\u9891\u6e32\u67d3\u5668<br \/>\n   *\/<\/span><br \/>\n  <span class=\"token keyword\">public<\/span> <span class=\"token keyword\">async<\/span> <span class=\"token function\">initAudioRenderer<\/span><span class=\"token punctuation\">(<\/span>context<span class=\"token operator\">:<\/span> common<span class=\"token punctuation\">.<\/span>UIAbilityContext<span class=\"token punctuation\">)<\/span><span class=\"token operator\">:<\/span> <span class=\"token builtin\">Promise<\/span><span class=\"token operator\">&lt;<\/span><span class=\"token keyword\">void<\/span><span class=\"token operator\">&gt;<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token comment\">\/\/ &#8230; \u521b\u5efaAudioRenderer &#8230;<\/span><\/p>\n<p>    <span class=\"token comment\">\/\/ \u8bbe\u7f6e\u7126\u70b9\u6a21\u5f0f&#xff08;\u9ed8\u8ba4\u662fSHARE_MODE&#xff09;<\/span><br \/>\n    <span class=\"token keyword\">this<\/span><span class=\"token punctuation\">.<\/span><span class=\"token function\">setFocusMode<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>    <span class=\"token comment\">\/\/ \u8bbe\u7f6e\u6253\u65ad\u56de\u8c03<\/span><br \/>\n    <span class=\"token keyword\">this<\/span><span class=\"token punctuation\">.<\/span><span class=\"token function\">setInterruptCallback<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n  <span class=\"token punctuation\">}<\/span><\/p>\n<p>  <span class=\"token comment\">\/**<br \/>\n   * \u8bbe\u7f6e\u7126\u70b9\u6a21\u5f0f<br \/>\n   *\/<\/span><br \/>\n  <span class=\"token keyword\">private<\/span> <span class=\"token function\">setFocusMode<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token operator\">:<\/span> <span class=\"token keyword\">void<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token keyword\">if<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token operator\">!<\/span><span class=\"token keyword\">this<\/span><span class=\"token punctuation\">.<\/span>audioRenderer<span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n      <span class=\"token keyword\">return<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><\/p>\n<p>    <span class=\"token comment\">\/\/ SHARE_MODE: \u540c\u4e00\u5e94\u7528\u5185\u97f3\u9891\u6d41\u5171\u4eab\u7126\u70b9&#xff08;\u9ed8\u8ba4&#xff09;<\/span><br \/>\n    <span class=\"token comment\">\/\/ INDEPENDENT_MODE: \u6bcf\u4e2a\u97f3\u9891\u6d41\u72ec\u7acb\u62e5\u6709\u7126\u70b9<\/span><br \/>\n    <span class=\"token keyword\">this<\/span><span class=\"token punctuation\">.<\/span>audioRenderer<span class=\"token punctuation\">.<\/span><span class=\"token function\">setInterruptMode<\/span><span class=\"token punctuation\">(<\/span>audio<span class=\"token punctuation\">.<\/span>InterruptMode<span class=\"token punctuation\">.<\/span><span class=\"token constant\">SHARE_MODE<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    Logger<span class=\"token punctuation\">.<\/span><span class=\"token function\">info<\/span><span class=\"token punctuation\">(<\/span><span class=\"token constant\">TAG<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;\u8bbe\u7f6e\u7126\u70b9\u6a21\u5f0f\u4e3aSHARE_MODE&#039;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n  <span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<h4>\u6b65\u9aa43&#xff1a;\u5b9e\u73b0\u9759\u97f3\u64ad\u653e\u6a21\u5f0f<\/h4>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/01\/20260128072511-6979b9d7b8f8a.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u9759\u97f3\u6a21\u5f0f\u8ba9\u97f3\u9891\u201c\u53ea\u64ad\u4e0d\u4e89\u201d&#xff0c;\u5b9e\u73b0\u65e0\u5e72\u6270\u7684\u80cc\u666f\u64ad\u653e\u3002<\/p>\n<p>\u8fd9\u4e2a\u529f\u80fd\u5f88\u6709\u8da3&#xff1a;<\/p>\n<ul>\n<li>\n<p>\u5f00\u542f\u65f6&#xff1a;\u4f60\u7684\u97f3\u9891\u4f1a\u9759\u97f3\u64ad\u653e&#xff0c;\u4f46\u4e0d\u4e89\u593a\u97f3\u9891\u7126\u70b9<\/p>\n<\/li>\n<li>\n<p>\u6548\u679c&#xff1a;\u5176\u4ed6\u5e94\u7528&#xff08;\u5982\u5bfc\u822a\u3001\u901a\u8bdd&#xff09;\u53ef\u4ee5\u6b63\u5e38\u64ad\u653e\u58f0\u97f3&#xff0c;\u4e0d\u53d7\u5f71\u54cd<\/p>\n<\/li>\n<li>\n<p>\u7528\u9014&#xff1a;\u9002\u5408\u540e\u53f0\u7f13\u51b2\u3001\u65e0\u58f0\u9884\u89c8\u3001\u6216\u9700\u8981\u540c\u65f6\u542c\u5176\u4ed6\u97f3\u9891\u7684\u573a\u666f<\/p>\n<\/li>\n<\/ul>\n<p>\u7b80\u5355\u8bf4&#xff0c;\u5c31\u50cf\u201c\u9759\u97f3\u770b\u7535\u89c6\u201d\u2014\u2014\u753b\u9762\u5728\u64ad&#xff0c;\u4f46\u4e0d\u59a8\u788d\u4f60\u542c\u522b\u4eba\u8bf4\u8bdd\u3002<\/p>\n<p><span class=\"token keyword\">export<\/span> <span class=\"token keyword\">class<\/span> <span class=\"token class-name\">AudioRendererController<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n  <span class=\"token comment\">\/**<br \/>\n   * \u8bbe\u7f6e\u9759\u97f3\u5e76\u53d1\u64ad\u653e\u6a21\u5f0f<br \/>\n   * &#064;param enabled true: \u9759\u97f3\u64ad\u653e&#xff0c;\u4e0d\u5f71\u54cd\u5176\u4ed6\u97f3\u9891&#xff1b;false: \u6b63\u5e38\u6a21\u5f0f<br \/>\n   *\/<\/span><br \/>\n  <span class=\"token keyword\">public<\/span> <span class=\"token keyword\">async<\/span> <span class=\"token function\">setSilentModeAndMixWithOthers<\/span><span class=\"token punctuation\">(<\/span>enabled<span class=\"token operator\">:<\/span> <span class=\"token builtin\">boolean<\/span><span class=\"token punctuation\">)<\/span><span class=\"token operator\">:<\/span> <span class=\"token builtin\">Promise<\/span><span class=\"token operator\">&lt;<\/span><span class=\"token keyword\">void<\/span><span class=\"token operator\">&gt;<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token keyword\">if<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token operator\">!<\/span><span class=\"token keyword\">this<\/span><span class=\"token punctuation\">.<\/span>audioRenderer<span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n      <span class=\"token keyword\">return<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><\/p>\n<p>    <span class=\"token keyword\">try<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n      <span class=\"token comment\">\/\/ \u8bbe\u7f6e\u9759\u97f3\u5e76\u53d1\u64ad\u653e\u6a21\u5f0f<\/span><br \/>\n      <span class=\"token keyword\">this<\/span><span class=\"token punctuation\">.<\/span>audioRenderer<span class=\"token punctuation\">.<\/span><span class=\"token function\">setSilentModeAndMixWithOthers<\/span><span class=\"token punctuation\">(<\/span>enabled<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>      <span class=\"token keyword\">if<\/span> <span class=\"token punctuation\">(<\/span>enabled<span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n        Logger<span class=\"token punctuation\">.<\/span><span class=\"token function\">info<\/span><span class=\"token punctuation\">(<\/span><span class=\"token constant\">TAG<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;\u542f\u7528\u9759\u97f3\u5e76\u53d1\u64ad\u653e\u6a21\u5f0f&#039;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token comment\">\/\/ \u6b64\u65f6\u97f3\u4e50\u9759\u97f3\u64ad\u653e&#xff0c;\u4f46\u4e0d\u5f71\u54cd\u5176\u4ed6\u97f3\u9891\u6d41\u83b7\u5f97\u7126\u70b9<\/span><br \/>\n        <span class=\"token comment\">\/\/ \u9002\u5408\u573a\u666f&#xff1a;\u80cc\u666f\u97f3\u4e50\u3001\u7f13\u51b2\u52a0\u8f7d\u65f6<\/span><br \/>\n      <span class=\"token punctuation\">}<\/span> <span class=\"token keyword\">else<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n        Logger<span class=\"token punctuation\">.<\/span><span class=\"token function\">info<\/span><span class=\"token punctuation\">(<\/span><span class=\"token constant\">TAG<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;\u5173\u95ed\u9759\u97f3\u5e76\u53d1\u64ad\u653e\u6a21\u5f0f&#039;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token comment\">\/\/ \u6062\u590d\u6b63\u5e38\u64ad\u653e\u6a21\u5f0f<\/span><br \/>\n      <span class=\"token punctuation\">}<\/span><\/p>\n<p>      <span class=\"token comment\">\/\/ \u4fdd\u5b58\u8bbe\u7f6e<\/span><br \/>\n      AppStorage<span class=\"token punctuation\">.<\/span><span class=\"token function\">setOrCreate<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#039;isSilentMode&#039;<\/span><span class=\"token punctuation\">,<\/span> enabled<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>    <span class=\"token punctuation\">}<\/span> <span class=\"token keyword\">catch<\/span> <span class=\"token punctuation\">(<\/span>err<span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n      Logger<span class=\"token punctuation\">.<\/span><span class=\"token function\">error<\/span><span class=\"token punctuation\">(<\/span><span class=\"token constant\">TAG<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token template-string\"><span class=\"token template-punctuation string\">&#096;<\/span><span class=\"token string\">\u8bbe\u7f6e\u9759\u97f3\u6a21\u5f0f\u5931\u8d25: <\/span><span class=\"token interpolation\"><span class=\"token interpolation-punctuation punctuation\">${<\/span><span class=\"token constant\">JSON<\/span><span class=\"token punctuation\">.<\/span><span class=\"token function\">stringify<\/span><span class=\"token punctuation\">(<\/span>err<span class=\"token punctuation\">)<\/span><span class=\"token interpolation-punctuation punctuation\">}<\/span><\/span><span class=\"token template-punctuation string\">&#096;<\/span><\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><br \/>\n  <span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<h3>\u603b\u7ed3<\/h3>\n<p>\u901a\u8fc7\u672c\u6587\u7684\u5b66\u4e60&#xff0c;\u6211\u4eec\u638c\u63e1\u4e86&#xff1a;<\/p>\n<h4>\u6838\u5fc3\u77e5\u8bc6\u70b9<\/h4>\n<li>\u97f3\u9891\u7126\u70b9\u673a\u5236&#xff1a;\u7cfb\u7edf\u5982\u4f55\u534f\u8c03\u591a\u4e2a\u97f3\u9891\u6d41<\/li>\n<li>\u6253\u65ad\u7c7b\u578b\u533a\u5206&#xff1a;\u5f3a\u5236\u6253\u65ad vs \u5171\u4eab\u6253\u65ad<\/li>\n<li>\u6b63\u786e\u7684\u4e8b\u4ef6\u5904\u7406&#xff1a;\u5927\u591a\u6570\u60c5\u51b5\u7cfb\u7edf\u5df2\u5904\u7406&#xff0c;\u5e94\u7528\u53ea\u9700\u66f4\u65b0\u72b6\u6001<\/li>\n<li>\u97f3\u9891\u6d41\u7c7b\u578b\u7684\u91cd\u8981\u6027&#xff1a;\u6b63\u786e\u8bbe\u7f6eStreamUsage\u662f\u826f\u597d\u4f53\u9a8c\u7684\u57fa\u7840<\/li>\n<h4>\u4e0b\u7bc7\u9884\u544a<\/h4>\n<p>\u5728\u4e0b\u4e00\u7bc7\u4e2d&#xff0c;\u6211\u4eec\u5c06\u6df1\u5165\u63a2\u8ba8&#xff1a;<\/p>\n<ul>\n<li>AudioSession\u7684\u9ad8\u7ea7\u914d\u7f6e<\/li>\n<li>\u591a\u97f3\u9891\u6d41\u5e76\u53d1\u63a7\u5236<\/li>\n<li>\u6027\u80fd\u4f18\u5316\u7b56\u7565<\/li>\n<li>\u590d\u6742\u573a\u666f\u4e0b\u7684\u7126\u70b9\u7ba1\u7406<\/li>\n<\/ul>\n<p>\u97f3\u9891\u7126\u70b9\u7ba1\u7406\u662f\u4e13\u4e1a\u97f3\u9891\u5e94\u7528\u7684\u57fa\u7840\u3002\u901a\u8fc7\u7406\u89e3\u7cfb\u7edf\u534f\u8c03\u673a\u5236\u3001\u6b63\u786e\u5904\u7406\u6253\u65ad\u4e8b\u4ef6\u3001\u533a\u5206\u7528\u6237\u4e0e\u7cfb\u7edf\u64cd\u4f5c&#xff0c;\u4f60\u7684\u5e94\u7528\u80fd\u591f\u4f18\u96c5\u5e94\u5bf9\u5404\u7c7b\u64ad\u653e\u51b2\u7a81&#xff0c;\u4e3a\u7528\u6237\u63d0\u4f9b\u6d41\u7545\u65e0\u7f1d\u7684\u97f3\u9891\u4f53\u9a8c\u3002<\/p>\n<p>\u638c\u63e1\u4e86\u8fd9\u4e9b\u6838\u5fc3\u80fd\u529b\u540e&#xff0c;\u4f60\u7684\u64ad\u653e\u5668\u5df2\u7ecf\u5177\u5907\u4e86\u5e94\u5bf9\u65e5\u5e38\u573a\u666f\u7684\u7a33\u5065\u6027\u3002\u800c\u5728\u8fdb\u9636\u7bc7\u4e2d&#xff0c;\u6211\u4eec\u5c06\u63a2\u8ba8\u66f4\u7cbe\u7ec6\u7684\u97f3\u9891\u4f1a\u8bdd\u7ba1\u7406\u3001\u591a\u6d41\u5e76\u53d1\u7684\u590d\u6742\u63a7\u5236\u4ee5\u53ca\u6027\u80fd\u4f18\u5316\u7b56\u7565&#xff0c;\u5e2e\u52a9\u6784\u5efa\u771f\u6b63\u4e13\u4e1a\u7ea7\u7684\u97f3\u9891\u5e94\u7528\u3002<\/p>\n<hr \/>\n<h3>\u53c2\u8003\u8d44\u6e90<\/h3>\n<ul>\n<li>\u97f3\u9891\u7126\u70b9\u4ecb\u7ecd<\/li>\n<li>\u97f3\u9891\u6d41\u7c7b\u578b\u8be6\u89e3<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>HarmonyOS 6\u5b9e\u6218&#xff08;\u6e90\u7801\u89e3\u6790\u7bc7&#xff09;&#xff1a;\u97f3\u4e50\u64ad\u653e\u5668\u7684\u97f3\u9891\u7126\u70b9\u7ba1\u7406&#xff08;\u4e0a&#xff09;\u2014\u2014AudioSession\u4e0e\u6253\u65ad\u673a\u5236HarmonyOS 6\u5b9e\u6218&#xff08;\u6e90\u7801\u89e3\u6790\u7bc7&#xff09;&#xff1a;\u97f3\u4e50\u64ad\u653e\u5668\u7684\u97f3\u9891\u7126\u70b9\u7ba1\u7406&#xff08;\u4e0a&#xff09;\u2014\u2014AudioSession\u4e0e\u6253\u65ad\u673a\u5236\u524d\u8a00\u97f3\u9891\u7126\u70b9\u57fa\u7840\u4ec0\u4e48\u662f\u97f3\u9891\u7126\u70b9\u97f3\u9891\u6d41\u7c7b\u578b\u7684\u91cd\u8981\u6027\u7533\u8bf7\u548c\u91ca\u653e\u7126\u70b9\u97f3\u9891\u6253\u65ad\u673a\u5236\u8be6\u89e3\u6253\u65ad\u7c7b\u578b1. \u5f3a\u5236\u6253\u65ad (INTERRUP<\/p>\n","protected":false},"author":2,"featured_media":67229,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[280,67,214],"topic":[],"class_list":["post-67234","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-harmonyos","tag-67","tag-214"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>HarmonyOS 6\u5b9e\u6218\uff08\u6e90\u7801\u89e3\u6790\u7bc7\uff09\uff1a\u97f3\u4e50\u64ad\u653e\u5668\u7684\u97f3\u9891\u7126\u70b9\u7ba1\u7406\uff08\u4e0a\uff09\u2014\u2014AudioSession\u4e0e\u6253\u65ad\u673a\u5236 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/67234.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"HarmonyOS 6\u5b9e\u6218\uff08\u6e90\u7801\u89e3\u6790\u7bc7\uff09\uff1a\u97f3\u4e50\u64ad\u653e\u5668\u7684\u97f3\u9891\u7126\u70b9\u7ba1\u7406\uff08\u4e0a\uff09\u2014\u2014AudioSession\u4e0e\u6253\u65ad\u673a\u5236 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"HarmonyOS 6\u5b9e\u6218&#xff08;\u6e90\u7801\u89e3\u6790\u7bc7&#xff09;&#xff1a;\u97f3\u4e50\u64ad\u653e\u5668\u7684\u97f3\u9891\u7126\u70b9\u7ba1\u7406&#xff08;\u4e0a&#xff09;\u2014\u2014AudioSession\u4e0e\u6253\u65ad\u673a\u5236HarmonyOS 6\u5b9e\u6218&#xff08;\u6e90\u7801\u89e3\u6790\u7bc7&#xff09;&#xff1a;\u97f3\u4e50\u64ad\u653e\u5668\u7684\u97f3\u9891\u7126\u70b9\u7ba1\u7406&#xff08;\u4e0a&#xff09;\u2014\u2014AudioSession\u4e0e\u6253\u65ad\u673a\u5236\u524d\u8a00\u97f3\u9891\u7126\u70b9\u57fa\u7840\u4ec0\u4e48\u662f\u97f3\u9891\u7126\u70b9\u97f3\u9891\u6d41\u7c7b\u578b\u7684\u91cd\u8981\u6027\u7533\u8bf7\u548c\u91ca\u653e\u7126\u70b9\u97f3\u9891\u6253\u65ad\u673a\u5236\u8be6\u89e3\u6253\u65ad\u7c7b\u578b1. \u5f3a\u5236\u6253\u65ad (INTERRUP\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/67234.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-01-28T07:25:13+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/01\/20260128072509-6979b9d5aec76.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/67234.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/67234.html\",\"name\":\"HarmonyOS 6\u5b9e\u6218\uff08\u6e90\u7801\u89e3\u6790\u7bc7\uff09\uff1a\u97f3\u4e50\u64ad\u653e\u5668\u7684\u97f3\u9891\u7126\u70b9\u7ba1\u7406\uff08\u4e0a\uff09\u2014\u2014AudioSession\u4e0e\u6253\u65ad\u673a\u5236 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-01-28T07:25:13+00:00\",\"dateModified\":\"2026-01-28T07:25:13+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/67234.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/67234.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/67234.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"HarmonyOS 6\u5b9e\u6218\uff08\u6e90\u7801\u89e3\u6790\u7bc7\uff09\uff1a\u97f3\u4e50\u64ad\u653e\u5668\u7684\u97f3\u9891\u7126\u70b9\u7ba1\u7406\uff08\u4e0a\uff09\u2014\u2014AudioSession\u4e0e\u6253\u65ad\u673a\u5236\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"HarmonyOS 6\u5b9e\u6218\uff08\u6e90\u7801\u89e3\u6790\u7bc7\uff09\uff1a\u97f3\u4e50\u64ad\u653e\u5668\u7684\u97f3\u9891\u7126\u70b9\u7ba1\u7406\uff08\u4e0a\uff09\u2014\u2014AudioSession\u4e0e\u6253\u65ad\u673a\u5236 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/67234.html","og_locale":"zh_CN","og_type":"article","og_title":"HarmonyOS 6\u5b9e\u6218\uff08\u6e90\u7801\u89e3\u6790\u7bc7\uff09\uff1a\u97f3\u4e50\u64ad\u653e\u5668\u7684\u97f3\u9891\u7126\u70b9\u7ba1\u7406\uff08\u4e0a\uff09\u2014\u2014AudioSession\u4e0e\u6253\u65ad\u673a\u5236 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"HarmonyOS 6\u5b9e\u6218&#xff08;\u6e90\u7801\u89e3\u6790\u7bc7&#xff09;&#xff1a;\u97f3\u4e50\u64ad\u653e\u5668\u7684\u97f3\u9891\u7126\u70b9\u7ba1\u7406&#xff08;\u4e0a&#xff09;\u2014\u2014AudioSession\u4e0e\u6253\u65ad\u673a\u5236HarmonyOS 6\u5b9e\u6218&#xff08;\u6e90\u7801\u89e3\u6790\u7bc7&#xff09;&#xff1a;\u97f3\u4e50\u64ad\u653e\u5668\u7684\u97f3\u9891\u7126\u70b9\u7ba1\u7406&#xff08;\u4e0a&#xff09;\u2014\u2014AudioSession\u4e0e\u6253\u65ad\u673a\u5236\u524d\u8a00\u97f3\u9891\u7126\u70b9\u57fa\u7840\u4ec0\u4e48\u662f\u97f3\u9891\u7126\u70b9\u97f3\u9891\u6d41\u7c7b\u578b\u7684\u91cd\u8981\u6027\u7533\u8bf7\u548c\u91ca\u653e\u7126\u70b9\u97f3\u9891\u6253\u65ad\u673a\u5236\u8be6\u89e3\u6253\u65ad\u7c7b\u578b1. \u5f3a\u5236\u6253\u65ad (INTERRUP","og_url":"https:\/\/www.wsisp.com\/helps\/67234.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-01-28T07:25:13+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/01\/20260128072509-6979b9d5aec76.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/67234.html","url":"https:\/\/www.wsisp.com\/helps\/67234.html","name":"HarmonyOS 6\u5b9e\u6218\uff08\u6e90\u7801\u89e3\u6790\u7bc7\uff09\uff1a\u97f3\u4e50\u64ad\u653e\u5668\u7684\u97f3\u9891\u7126\u70b9\u7ba1\u7406\uff08\u4e0a\uff09\u2014\u2014AudioSession\u4e0e\u6253\u65ad\u673a\u5236 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-01-28T07:25:13+00:00","dateModified":"2026-01-28T07:25:13+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/67234.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/67234.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/67234.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"HarmonyOS 6\u5b9e\u6218\uff08\u6e90\u7801\u89e3\u6790\u7bc7\uff09\uff1a\u97f3\u4e50\u64ad\u653e\u5668\u7684\u97f3\u9891\u7126\u70b9\u7ba1\u7406\uff08\u4e0a\uff09\u2014\u2014AudioSession\u4e0e\u6253\u65ad\u673a\u5236"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/67234","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=67234"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/67234\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/67229"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=67234"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=67234"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=67234"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=67234"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}