找回密码
 立即注册

使用微信账号登录

只需一步,快速开始

查看: 5895|回复: 8

[QCC3系列] qcc3034的系统自带提示音可以不混音吗?

[复制链接]
连续签到天数:1天
签到总天数:75天
签到总奖励:2866金币
发表于 2021-7-20 20:46:52 | 显示全部楼层 |阅读模式
积分商城 - 让您的金币更有价值!||官方Q群 - 让您的沟通更加及时!
连续签到天数:1天
签到总天数:981天
签到总奖励:16663金币
发表于 2021-7-21 08:59:03 | 显示全部楼层
可以,要改代码,在Lib层
积分商城 - 让您的金币更有价值!||官方Q群 - 让您的沟通更加及时!
回复 支持 反对

使用道具 举报

连续签到天数:1天
签到总天数:1007天
签到总奖励:16800金币
发表于 2021-7-21 10:59:09 | 显示全部楼层
可以的
积分商城 - 让您的金币更有价值!||官方Q群 - 让您的沟通更加及时!
回复 支持 反对

使用道具 举报

连续签到天数:1天
签到总天数:75天
签到总奖励:2866金币
 楼主| 发表于 2021-7-21 14:26:37 | 显示全部楼层
zhaopeng2511 发表于 2021-7-21 08:59
可以,要改代码,在Lib层

老大,有方法吗?
积分商城 - 让您的金币更有价值!||官方Q群 - 让您的沟通更加及时!
回复 支持 反对

使用道具 举报

连续签到天数:1天
签到总天数:75天
签到总奖励:2866金币
 楼主| 发表于 2021-7-21 14:26:49 | 显示全部楼层

老大,有方法吗?
积分商城 - 让您的金币更有价值!||官方Q群 - 让您的沟通更加及时!
回复 支持 反对

使用道具 举报

连续签到天数:1天
签到总天数:75天
签到总奖励:2866金币
 楼主| 发表于 2021-7-22 00:28:06 | 显示全部楼层
已解决,参考AudioPromptPlay的方法,方法这里公布下。
修改AudioPlayTone函数实现。具体参考代码,代码实际来源于AudioPromptPlay函数,因为AudioPromptPlay是可以直接实现不混音输出。
  1. void AudioPlayTone ( const ringtone_note * tone , bool can_queue ,  int16 tone_volume , AudioPluginFeatures features, Task app_task )
  2. {
  3.     if (!IsAudioBusy() || can_queue)
  4.     {
  5.         Task plugin = audioGetControlPlugin();

  6.         MAKE_AUDIO_MESSAGE( AUDIO_PLUGIN_PLAY_TONE_MSG, message ) ;

  7.         message->tone        = tone;
  8.         message->can_queue   = can_queue ;
  9.         message->tone_volume = tone_volume  ;
  10.         message->features    = features ;

  11.         if(plugin)
  12.         {
  13.             #if 0
  14.             PRINT(("AUDIO: play tone, plugin = %p \n",(void*)plugin));
  15.             MessageSendConditionallyOnTask ( plugin, AUDIO_PLUGIN_PLAY_TONE_MSG, message, AudioBusyPtr() ) ;
  16.             #else
  17.                 PRINT(("AUD play -Audio Prompt disconnect audio\n"));
  18.                 /*if we have a plugin connected, then perform the disconnect*/
  19.                 MessageSendConditionallyOnTask ( plugin, AUDIO_PLUGIN_DISCONNECT_MSG , 0 , AudioBusyPtr() ) ;
  20.                 MessageSendConditionallyOnTask ( plugin , AUDIO_PLUGIN_PLAY_TONE_MSG , message , AudioBusyPtr() ) ;

  21.                 /* Queue message to reconnect plugin */
  22.                 {
  23.                     MAKE_AUDIO_MESSAGE( AUDIO_PLUGIN_CONNECT_MSG, connect_message ) ;
  24.                     *connect_message = AUDIO->message;
  25.                     MessageSendConditionallyOnTask ( plugin, AUDIO_PLUGIN_CONNECT_MSG , connect_message , AudioBusyPtr() ) ;
  26.                 }

  27.                 /*  Start the reconnected plugin with all audio groups muted.
  28.                     When the application receives the following AUDIO_REFRESH_VOLUME message it should
  29.                     restore the the correct mute status for all the groups using AudioSetSoftMute().
  30.                     If, for example, the mic was muted in the audio plugin before the audio prompt was played,
  31.                     this ensures the mic remains muted until the application has chance to update the mute status.
  32.                 */
  33.                 {
  34.                     MAKE_AUDIO_MESSAGE( AUDIO_PLUGIN_SET_SOFT_MUTE_MSG, soft_mute_message ) ;
  35.                     soft_mute_message->mute_states = AUDIO_MUTE_ENABLE_ALL;
  36.                     soft_mute_message->unused = 0;
  37.                     MessageSendConditionallyOnTask ( plugin, AUDIO_PLUGIN_SET_SOFT_MUTE_MSG , soft_mute_message , AudioBusyPtr() ) ;
  38.                 }

  39.                 /* Request that the app refreshes the volume and mute status after reconnect */
  40.                 {
  41.                     PRINT(("AUD:Vol refresh\n"));
  42.                     MessageSendConditionallyOnTask(app_task, AUDIO_REFRESH_VOLUME, NULL, AudioBusyPtr());
  43.                 }

  44.                 if ( NULL != AUDIO->relay_plugin)
  45.                 {
  46.                     MAKE_AUDIO_MESSAGE( AUDIO_PLUGIN_START_FORWARDING_MSG, start_forwarding_message ) ;

  47.                     start_forwarding_message->forwarding_sink = AUDIO->forwarding_sink ;
  48.                     start_forwarding_message->content_protection = AUDIO->content_protection ;
  49.                     start_forwarding_message->output_plugin = AUDIO->output_plugin;

  50.                     MessageSendConditionallyOnTask ( AUDIO->relay_plugin, AUDIO_PLUGIN_START_FORWARDING_MSG, start_forwarding_message , AudioBusyPtr()) ;
  51.                 }
  52.             #endif
  53.         }
  54.         else
  55.         {
  56.             PRINT(("AUDIO: play tone, no plugin \n"));
  57.             /* Forward message to the Voice Prompts plugin as the DSP is required for multi-channel tones */
  58.             MessageSendConditionallyOnTask( (TaskData*)&csr_voice_prompts_plugin, AUDIO_PLUGIN_PLAY_TONE_MSG, message, AudioBusyPtr() ) ;
  59.         }
  60.     }
  61.     else
  62.     {
  63.         PRINT(("AUDIO: discard tone \n"));
  64.     }
  65. }
复制代码


积分商城 - 让您的金币更有价值!||官方Q群 - 让您的沟通更加及时!
回复 支持 2 反对 0

使用道具 举报

连续签到天数:1天
签到总天数:765天
签到总奖励:7275金币
发表于 2021-7-22 08:54:10 | 显示全部楼层
GOOD!
积分商城 - 让您的金币更有价值!||官方Q群 - 让您的沟通更加及时!
回复 支持 反对

使用道具 举报

连续签到天数:1天
签到总天数:18天
签到总奖励:85金币
发表于 2021-7-22 14:06:18 | 显示全部楼层
偶是小星哥 发表于 2021-7-22 00:28
已解决,参考AudioPromptPlay的方法,方法这里公布下。
修改AudioPlayTone函数实现。具体参考代码,代码实 ...

懂分享的大神
积分商城 - 让您的金币更有价值!||官方Q群 - 让您的沟通更加及时!
回复 支持 反对

使用道具 举报

连续签到天数:1天
签到总天数:253天
签到总奖励:2463金币
发表于 2021-7-31 09:43:52 | 显示全部楼层
蓝牙蓝牙蓝牙,我的牙齿都蓝了
积分商城 - 让您的金币更有价值!||官方Q群 - 让您的沟通更加及时!
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册  

本版积分规则

小黑屋|手机版|我爱蓝牙网 - 52Bluetooth

GMT+8, 2024-3-29 09:23 , Processed in 0.368786 second(s), 22 queries , Gzip On, MemCached On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表