Movatterモバイル変換


[0]ホーム

URL:


CN106095387A - A terminal sound effect setting method and terminal - Google Patents

A terminal sound effect setting method and terminal
Download PDF

Info

Publication number
CN106095387A
CN106095387ACN201610440003.6ACN201610440003ACN106095387ACN 106095387 ACN106095387 ACN 106095387ACN 201610440003 ACN201610440003 ACN 201610440003ACN 106095387 ACN106095387 ACN 106095387A
Authority
CN
China
Prior art keywords
audio stream
audio
type
path
terminal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201610440003.6A
Other languages
Chinese (zh)
Other versions
CN106095387B (en
Inventor
李亚军
甘高亭
涂广
杨海
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp LtdfiledCriticalGuangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201610440003.6ApriorityCriticalpatent/CN106095387B/en
Publication of CN106095387ApublicationCriticalpatent/CN106095387A/en
Application grantedgrantedCritical
Publication of CN106095387BpublicationCriticalpatent/CN106095387B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

The embodiment of the invention discloses a sound effect setting method of a terminal and the terminal. The method comprises the following steps: monitoring a creating request of an audio playing channel; after the audio playing path is established, acquiring an audio stream output through the audio playing path; identifying a type of the audio stream; and determining to turn on or off sound effect setting aiming at the audio stream according to the recognized type of the audio stream. A corresponding terminal is also disclosed. The method has the advantages that the problem that the overall sound effect is not suitable for certain scenes to cause noise or cannot achieve expected auditory enjoyment can be solved by identifying the type of the audio stream output by the audio playing channel established in the current scene and setting the sound effect according to the identified type of the audio stream, and the adaptive sound effect can be obtained in different application scenes.

Description

Translated fromChinese
一种终端的音效设置方法及终端A terminal sound effect setting method and terminal

技术领域technical field

本发明涉及信息处理技术领域,尤其涉及一种终端的音效设置方法及终端。The present invention relates to the technical field of information processing, in particular to a terminal sound effect setting method and a terminal.

背景技术Background technique

目前的终端上传输和播放的音频流多种多样,其来源也多种多样,比如来自语音通话、音乐播放器、系统插件、游戏应用等。为了用户在收听音频时能获得更舒适的听觉享受,开发工程师会对系统的输出音效进行设置,但是这种设置是针对全局的,并不能因音频流是属于通话音频或音乐或提示音等有所区别。但是在实际使用中,使用者往往对不同类型的音频有不同的音效期望,例如通话过程中的音频需要保证其清晰度和保真度;游戏音频往往希望声音背景强劲有力,节奏感强;音乐播放时则希望增强临场感。对系统音频音效进行统一设置的方式并不能满足这些要求。The audio streams transmitted and played on current terminals are various, and their sources are also various, such as voice calls, music players, system plug-ins, game applications, and the like. In order for users to obtain a more comfortable listening experience when listening to audio, the development engineer will set the output sound effect of the system, but this setting is for the whole world, and cannot be affected by the audio stream because it belongs to call audio, music or prompt sound. difference. However, in actual use, users often have different sound expectations for different types of audio. For example, audio during a call needs to ensure its clarity and fidelity; game audio often hopes that the sound background is strong and rhythmic; music When playing, I hope to enhance the sense of presence. The method of uniformly setting system audio sound effects cannot meet these requirements.

发明内容Contents of the invention

本发明实施例提供一种终端的音效设置方法及终端,以解决全局音效不适应某些场景而导致杂音或达不到期望的听觉享受的问题,保证在不同应用场景下都能获得相适应的音效效果。Embodiments of the present invention provide a terminal sound effect setting method and a terminal to solve the problem that the global sound effect is not suitable for certain scenes, resulting in noise or not reaching the expected auditory enjoyment, so as to ensure that suitable sound effects can be obtained in different application scenarios. sound effects.

一方面,提供了一种终端的音效设置方法,所述方法包括:In one aspect, a method for setting sound effects of a terminal is provided, the method comprising:

监听音频播放通路的创建请求;Monitor the creation request of the audio playback channel;

当创建了所述音频播放通路后,获取通过所述音频播放通路输出的音频流;After the audio playback path is created, obtain the audio stream output through the audio playback path;

识别所述音频流的类型;identifying the type of audio stream;

根据识别出的所述音频流的类型,确定打开或关闭针对所述音频流的音效设置。According to the identified type of the audio stream, it is determined to enable or disable the sound effect setting for the audio stream.

优选地,不同的音频流的类型对应不同的播放场景。Preferably, different types of audio streams correspond to different playback scenarios.

优选地,所述终端中同时创建了至少一个音频播放通路,所述音频流包括多个播放进程,同一个音频播放通路中的音频流的多个播放进程具有同一标识;Preferably, at least one audio playback path is created in the terminal at the same time, the audio stream includes multiple playback processes, and multiple playback processes of the audio stream in the same audio playback path have the same identifier;

所述识别所述音频流的类型,包括:The type of identifying the audio stream includes:

根据所述播放进程的标识,识别所述音频流的音频播放通路;Identify the audio playback path of the audio stream according to the identifier of the playback process;

根据识别出的所述音频播放通路,识别所述音频流的类型。Identify the type of the audio stream according to the identified audio playback path.

优选地,所述根据识别出的所述音频流的类型,确定打开或关闭针对所述音频流的音效设置,包括:Preferably, the determining to turn on or off the sound effect setting for the audio stream according to the identified type of the audio stream includes:

当所述音频流的类型为第一音频流类型时,确定打开针对所述音频流的音效设置,所述第一音频流类型包括:音乐声;When the type of the audio stream is the first audio stream type, it is determined to turn on the sound effect setting for the audio stream, and the first audio stream type includes: music sound;

当所述音频流的类型为第二音频流类型时,确定关闭针对所述音频流的音效设置,所述第二音频流类型包括以下至少一种:警告声、系统声音、铃声和电话声音。When the type of the audio stream is the second audio stream type, it is determined to turn off the sound effect setting for the audio stream, and the second audio stream type includes at least one of the following: warning sound, system sound, ringtone and telephone sound.

优选地,所述方法还包括:Preferably, the method also includes:

监听所述音频播放通路的释放请求;Monitoring the release request of the audio playback channel;

当所述音频播放通路已释放,关闭针对所述音频流的音效设置。When the audio playback channel is released, close the sound effect setting for the audio stream.

另一方面,提供了一种终端,所述终端包括:In another aspect, a terminal is provided, and the terminal includes:

监听模块,用于监听音频播放通路的创建请求;A monitoring module, configured to monitor the creation request of the audio playback path;

获取模块,用于当所述监听模块监听到创建了所述音频播放通路后,获取通过所述音频播放通路输出的音频流;An acquisition module, configured to acquire the audio stream output through the audio playback channel after the monitoring module monitors that the audio playback channel is created;

识别模块,用于识别所述获取模块获取的所述音频流的类型;An identification module, configured to identify the type of the audio stream acquired by the acquisition module;

设置模块,用于根据所述识别模块识别出的所述音频流的类型,确定打开或关闭针对所述音频流的音效设置。A setting module, configured to determine whether to turn on or turn off sound effect settings for the audio stream according to the type of the audio stream identified by the identification module.

优选地,不同的音频流的类型对应不同的播放场景。Preferably, different types of audio streams correspond to different playback scenarios.

优选地,所述终端中同时创建了至少一个音频播放通路,所述音频流包括多个播放进程,同一个音频播放通路中的音频流的多个播放进程具有同一标识;Preferably, at least one audio playback path is created in the terminal at the same time, the audio stream includes multiple playback processes, and multiple playback processes of the audio stream in the same audio playback path have the same identifier;

所述识别模块包括:The identification module includes:

第一识别单元,用于根据所述播放进程的标识,识别所述音频流的音频播放通路;A first identifying unit, configured to identify the audio playback path of the audio stream according to the identifier of the playback process;

第二识别单元,用于根据所述第一识别单元识别出的所述音频播放通路,识别所述音频流的类型。The second identification unit is configured to identify the type of the audio stream according to the audio playback path identified by the first identification unit.

优选地,所述设置模块包括:Preferably, the setting module includes:

打开单元,用于当所述识别模块识别出的所述音频流的类型为第一音频流类型时,确定打开针对所述音频流的音效设置,所述第一音频流类型包括:音乐声;The opening unit is used to determine to open the sound effect setting for the audio stream when the type of the audio stream identified by the identification module is a first audio stream type, and the first audio stream type includes: music sound;

关闭单元,用于当所述识别模块识别出的所述音频流的类型为第二音频流类型时,确定关闭针对所述音频流的音效设置,所述第二音频流类型包括以下至少一种:警告声、系统声音、铃声和电话声音。A closing unit, configured to determine to close the sound effect setting for the audio stream when the type of the audio stream identified by the identification module is a second audio stream type, and the second audio stream type includes at least one of the following : Warning sound, system sound, ring tone and phone sound.

优选地,所述监听模块还用于监听所述音频播放通路的释放请求;Preferably, the monitoring module is also used to monitor the release request of the audio playback path;

所述设置模块还用于当所述监听模块监听到所述音频播放通路已释放,关闭针对所述音频流的音效设置。The setting module is further configured to close the sound effect setting for the audio stream when the monitoring module detects that the audio playback channel has been released.

又一方面,提供了一种终端,所述终端包括输入装置、输出装置、存储器和处理器;In yet another aspect, a terminal is provided, and the terminal includes an input device, an output device, a memory, and a processor;

所述存储器用于存储指令;The memory is used to store instructions;

所述处理器用于执行所述指令以实现:The processor is configured to execute the instructions to:

监听音频播放通路的创建请求;Monitor the creation request of the audio playback channel;

当创建了所述音频播放通路后,获取通过所述音频播放通路输出的音频流;After the audio playback path is created, obtain the audio stream output through the audio playback path;

识别所述音频流的类型;identifying the type of audio stream;

根据识别出的所述音频流的类型,确定打开或关闭针对所述音频流的音效设置。According to the identified type of the audio stream, it is determined to enable or disable the sound effect setting for the audio stream.

优选地,不同的音频流的类型对应不同的播放场景。Preferably, different types of audio streams correspond to different playback scenarios.

优选地,所述终端中同时创建了至少一个音频播放通路,所述音频流包括多个播放进程,同一个音频播放通路中的音频流的多个播放进程具有同一标识;Preferably, at least one audio playback path is created in the terminal at the same time, the audio stream includes multiple playback processes, and multiple playback processes of the audio stream in the same audio playback path have the same identifier;

所述处理器具体用于:The processor is specifically used for:

根据所述播放进程的标识,识别所述音频流的音频播放通路;Identify the audio playback path of the audio stream according to the identifier of the playback process;

根据识别出的所述音频播放通路,识别所述音频流的类型。Identify the type of the audio stream according to the identified audio playback path.

优选地,所述处理器具体用于:Preferably, the processor is specifically used for:

当所述音频流的类型为第一音频流类型时,确定打开针对所述音频流的音效设置,所述第一音频流类型包括:音乐声;When the type of the audio stream is the first audio stream type, it is determined to turn on the sound effect setting for the audio stream, and the first audio stream type includes: music sound;

当所述音频流的类型为第二音频流类型时,确定关闭针对所述音频流的音效设置,所述第二音频流类型包括以下至少一种:警告声、系统声音、铃声和电话声音。When the type of the audio stream is the second audio stream type, it is determined to turn off the sound effect setting for the audio stream, and the second audio stream type includes at least one of the following: warning sound, system sound, ringtone and telephone sound.

优选地,所述处理器还用于:Preferably, the processor is also used for:

监听所述音频播放通路的释放请求;Monitoring the release request of the audio playback channel;

当所述音频播放通路已释放,关闭针对所述音频流的音效设置。When the audio playback channel is released, close the sound effect setting for the audio stream.

实施本发明实施例提供的一种终端的音效设置方法及终端,具有如下有益效果:Implementing a terminal sound effect setting method and a terminal provided by an embodiment of the present invention have the following beneficial effects:

通过识别当前场景下创建的音频播放通路输出的音频流的类型,根据识别出的音频流的类型进行音效设置,可以解决全局音效不适应某些场景而导致杂音或达不到期望的听觉享受的问题,保证在不同应用场景下都能获得相适应的音效效果。By identifying the type of the audio stream output by the audio playback channel created in the current scene, and setting the sound effect according to the type of the identified audio stream, it can solve the problem that the global sound effect does not adapt to some scenes and cause noise or fail to achieve the desired auditory enjoyment problems, to ensure that suitable sound effects can be obtained in different application scenarios.

附图说明Description of drawings

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present invention. Those skilled in the art can also obtain other drawings based on these drawings without creative work.

图1为本发明实施例提供的一种终端的音效设置方法的流程示意图;FIG. 1 is a schematic flowchart of a method for setting sound effects of a terminal provided by an embodiment of the present invention;

图2为本发明实施例提供的另一种终端的音效设置方法的流程示意图;FIG. 2 is a schematic flowchart of another method for setting sound effects of a terminal provided by an embodiment of the present invention;

图3为本发明实施例提供的一种终端的结构示意图;FIG. 3 is a schematic structural diagram of a terminal provided by an embodiment of the present invention;

图4为本发明实施例提供的另一种终端的结构示意图;FIG. 4 is a schematic structural diagram of another terminal provided by an embodiment of the present invention;

图5为本发明实施例提供的又一种终端的结构示意图。FIG. 5 is a schematic structural diagram of another terminal provided by an embodiment of the present invention.

具体实施方式detailed description

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.

图1为本发明实施例提供的一种终端的音效设置方法的流程示意图,该方法包括以下步骤:Fig. 1 is a schematic flow chart of a terminal sound effect setting method provided by an embodiment of the present invention, the method comprising the following steps:

S101,监听音频播放通路的创建请求。S101, monitor a request for creating an audio playback path.

在终端后台运行一个音效管理服务的应用,所有在终端播放的音频须经音效管理服务进行统一的音效设置。在播放音频时,首先需要创建一个音频源所在客户端到音效管理服务的音频播放通路,经过该通路向音效管理服务输出音频流。在输出音频流之前,监听该音频播放通路的创建请求。具体在Google解码器中,是监听AudioTrack的创建。Run an application of sound effect management service in the background of the terminal, and all audio played on the terminal must go through the sound effect management service for unified sound effect settings. When playing audio, you first need to create an audio playback path from the client where the audio source is located to the sound management service, and output the audio stream to the sound management service through this path. Before outputting the audio stream, monitor the creation request of the audio playback channel. Specifically in the Google decoder, it is to monitor the creation of AudioTrack.

S102,当创建了所述音频播放通路后,获取通过所述音频播放通路输出的音频流。S102. After the audio playback path is created, acquire an audio stream output through the audio playback path.

在创建了音频播放通路后,音频源所在客户端可以通过该通路向音效管理服务输出音频流,音频管理服务获取该音频流。After the audio playback channel is created, the client where the audio source is located can output the audio stream to the audio management service through the channel, and the audio management service obtains the audio stream.

S103,识别所述音频流的类型。S103. Identify the type of the audio stream.

音频流类型(Stream Type)在构造AudioTrack的第一个参数中使用,这个参数和Android中的AudioManager有关系,涉及到终端上的音频管理策略。The audio stream type (Stream Type) is used in the first parameter of constructing AudioTrack. This parameter is related to the AudioManager in Android and involves the audio management strategy on the terminal.

Android将系统的声音或音频分为以下几类常见的类型:Android divides system sounds or audio into the following common types:

STREAM_ALARM:警告声;STREAM_ALARM: warning sound;

STREAM_MUSIC:音乐声,例如music等;STREAM_MUSIC: music sound, such as music, etc.;

STREAM_RING:铃声;STREAM_RING: Ringtone;

STREAM_SYSTEM:系统声音;STREAM_SYSTEM: system sound;

STREAM_VOCIE_CALL:电话声音。STREAM_VOCIE_CALL: Telephone sound.

以上仅为示例,本实施例不限制音频流的类型。The above is only an example, and this embodiment does not limit the type of the audio stream.

获取音频流后,可以识别音频流的类型,该识别方式可采用现有技术手段,在此不再赘述。After the audio stream is acquired, the type of the audio stream can be identified. The identification method can use existing technical means, which will not be repeated here.

S104,根据识别出的所述音频流的类型,确定打开或关闭针对所述音频流的音效设置。S104. Determine to enable or disable sound effect settings for the audio stream according to the identified type of the audio stream.

不同的音频流的类型对应不同的播放场景,例如,音频流类型为铃声,对应的播放场景或客户端可能为闹铃,音频流类型为音乐声,则对应的播放场景或客户端可能为音乐或视频播放器,音效在一些场景下确实能大大提高用户体验,比如播放音乐、视频,但某些场景效果恰恰相反,比如闹铃、通知音等,因此,根据识别出的音频流的类型,确定打开或关闭针对该音频流的音效设置,使音效设置与场景相适应十分重要,否则,音效设置起到了相反的作用。在上面的示例中,音频流类型为音乐声时,可以打开音效设置,而音频流类型为铃声时,则建议关闭音效设置。Different audio stream types correspond to different playback scenarios. For example, if the audio stream type is ringtone, the corresponding playback scenario or client may be an alarm, and the audio stream type is music, then the corresponding playback scenario or client may be music Or video player, the sound effect can greatly improve the user experience in some scenarios, such as playing music and video, but the effect is just the opposite in some scenarios, such as alarm bells, notification sounds, etc. Therefore, according to the type of the recognized audio stream, Make sure to turn on or off the sound effect setting for this audio stream, it is very important to make the sound effect setting fit the scene, otherwise, the sound effect setting has the opposite effect. In the above example, when the audio stream type is music, you can turn on the sound effect setting, but when the audio stream type is ringtone, it is recommended to turn off the sound effect setting.

对于一些音频流的类型,需要打开音效设置,而对于另外一些音频流的类型,需要关闭音效设置,可以在终端中存储音频流的类型与打开或关闭音效设置的对应关系,以自动实现音效设置与场景相匹配。For some types of audio streams, you need to turn on the sound effect settings, and for other types of audio streams, you need to turn off the sound effect settings. You can store the corresponding relationship between the type of audio stream and the sound effect setting on or off in the terminal to automatically realize the sound effect settings. Match the scene.

根据本发明实施例提供的一种终端的音效设置方法,通过识别当前场景下创建的音频播放通路输出的音频流的类型,根据识别出的音频流的类型进行音效设置,可以解决全局音效不适应某些场景而导致杂音或达不到期望的听觉享受的问题,保证在不同应用场景下都能获得相适应的音效效果。According to a terminal sound effect setting method provided by an embodiment of the present invention, by identifying the type of the audio stream output by the audio playback path created in the current scene, the sound effect setting is performed according to the identified audio stream type, which can solve the problem that the global sound effect does not adapt Certain scenarios lead to noise or unreachable auditory enjoyment, ensuring that suitable sound effects can be obtained in different application scenarios.

图2为本发明实施例提供的另一种终端的音效设置方法的流程示意图,该方法包括以下步骤:Fig. 2 is a schematic flow chart of another terminal sound effect setting method provided by an embodiment of the present invention, the method comprising the following steps:

S201,监听音频播放通路的创建请求。S201, monitor a request for creating an audio playback path.

S202,当创建了所述音频播放通路后,获取通过所述音频播放通路输出的音频流。S202. After the audio playback path is created, acquire an audio stream output through the audio playback path.

步骤S201、S202的实现分别与图1所示实施例的步骤S101、S102相同,在此不再赘述。Implementations of steps S201 and S202 are respectively the same as steps S101 and S102 in the embodiment shown in FIG. 1 , and will not be repeated here.

S203,根据所述音频流的播放进程的标识,识别所述音频流的音频播放通路。S203. Identify the audio playback path of the audio stream according to the identifier of the playback process of the audio stream.

S204,根据识别出的所述音频播放通路,识别所述音频流的类型。S204. Identify the type of the audio stream according to the identified audio playback path.

本实施例中,终端中可同时创建一个或多个音频播放通路,一个音频流又包括多个播放进程,且同一个音频播放通路中的音频流的多个播放进程具有同一标识,因此,根据播放进程的标识可以识别音频流的音频播放通路,而一个音频播放通路中只播放一种类型的音频流,因此根据识别出的音频播放通路,可以确定音频流的类型。音频流的类型包括以下至少一种:音乐声、警告声、系统声音、铃声和电话声音。In this embodiment, one or more audio playback channels can be created in the terminal at the same time, and one audio stream includes multiple playback processes, and multiple playback processes of the audio stream in the same audio playback channel have the same identifier. Therefore, according to The identifier of the playback process can identify the audio playback channel of the audio stream, and only one type of audio stream is played in an audio playback channel, so the type of the audio stream can be determined according to the identified audio playback channel. The type of the audio stream includes at least one of the following: music sound, warning sound, system sound, ring tone and telephone sound.

S205,当所述音频流的类型为第一音频流类型时,确定打开针对所述音频流的音效设置,所述第一音频流类型包括:音乐声;或当所述音频流的类型为第二音频流类型时,确定关闭针对所述音频流的音效设置,所述第二音频流类型包括以下至少一种:警告声、系统声音、铃声和电话声音。S205. When the type of the audio stream is the first audio stream type, determine to turn on the sound effect setting for the audio stream, the first audio stream type includes: music sound; or when the type of the audio stream is the second audio stream When there are two audio stream types, it is determined to turn off the sound effect setting for the audio stream, and the second audio stream type includes at least one of the following: warning sound, system sound, ringtone and telephone sound.

不同的音频流的类型对应不同的播放场景,例如,音频流类型为铃声,对应的播放场景或客户端可能为闹铃,音频流类型为音乐声,则对应的播放场景或客户端可能为音乐或视频播放器,音效在一些场景下确实能大大提高用户体验,比如播放音乐、视频,但某些场景效果恰恰相反,比如闹铃、通知音等,因此,根据识别出的音频流的类型,确定打开或关闭针对该音频流的音效设置,使音效设置与场景相适应十分重要,否则,音效设置起到了相反的作用。在上面的示例中,音频流类型为音乐声时,可以打开音效设置,而音频流类型为铃声时,则建议关闭音效设置。Different audio stream types correspond to different playback scenarios. For example, if the audio stream type is ringtone, the corresponding playback scenario or client may be an alarm, and the audio stream type is music, then the corresponding playback scenario or client may be music Or video player, the sound effect can greatly improve the user experience in some scenarios, such as playing music and video, but the effect is just the opposite in some scenarios, such as alarm bells, notification sounds, etc. Therefore, according to the type of the recognized audio stream, Make sure to turn on or off the sound effect setting for this audio stream, it is very important to make the sound effect setting fit the scene, otherwise, the sound effect setting has the opposite effect. In the above example, when the audio stream type is music, you can turn on the sound effect setting, but when the audio stream type is ringtone, it is recommended to turn off the sound effect setting.

对于第一音频流类型,需要打开音效设置,而对于第二音频流类型,需要关闭音效设置,可以在终端中存储第一、第二音频流类型与打开或关闭音效设置的对应关系,以及存储第一、第二音频流类型分别包括哪几种音频流类型,以自动实现音效设置与场景相匹配。这里,第一、第二音频流类型是指音频流类型的类别。For the first audio stream type, the sound effect setting needs to be turned on, and for the second audio stream type, the sound effect setting needs to be turned off, and the corresponding relationship between the first and second audio stream types and the sound effect setting being turned on or off can be stored in the terminal, and stored Which audio stream types are included in the first and second audio stream types, so as to automatically match the sound effect setting with the scene. Here, the first and second audio stream types refer to categories of audio stream types.

S206,监听所述音频播放通路的释放请求。S206. Monitor the release request of the audio playback channel.

在该音频播放通路的音频播放完毕或停止播放后,需要释放音频播放通路,以节省系统资源,本实施例可以监听音频播放通路的释放,具体在Google解码器中,是监听AudioTrack的释放。After the audio playback of the audio playback path is finished or stopped playing, the audio playback path needs to be released to save system resources. This embodiment can monitor the release of the audio playback path, specifically in the Google decoder, it is to monitor the release of AudioTrack.

S207,当所述音频播放通路已释放,关闭针对所述音频流的音效设置。S207. When the audio playback channel is released, turn off the sound effect setting for the audio stream.

如果针对该已释放的音频播放通路的音频流的音效设置是打开的,则关闭针对该音频流的音效设置。If the sound effect setting for the audio stream of the released audio playback channel is turned on, turn off the sound effect setting for the audio stream.

根据本发明实施例提供的一种终端的音效设置方法,通过识别当前场景下创建的音频播放通路输出的音频流的类型,根据识别出的音频流的类型进行音效设置,可以解决全局音效不适应某些场景而导致杂音或达不到期望的听觉享受的问题,保证在不同应用场景下都能获得相适应的音效效果。According to a terminal sound effect setting method provided by an embodiment of the present invention, by identifying the type of the audio stream output by the audio playback path created in the current scene, the sound effect setting is performed according to the identified audio stream type, which can solve the problem that the global sound effect does not adapt Certain scenarios lead to noise or unreachable auditory enjoyment, ensuring that suitable sound effects can be obtained in different application scenarios.

需要说明的是,对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本发明并不受所描述的动作顺序的限制,因为根据本发明,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本发明所必须的。It should be noted that for the foregoing method embodiments, for the sake of simple description, they are expressed as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described action sequence. Because according to the present invention, certain steps may be performed in other order or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification belong to preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.

图3为本发明实施例提供的一种终端的结构示意图,该终端1000包括:FIG. 3 is a schematic structural diagram of a terminal provided by an embodiment of the present invention. The terminal 1000 includes:

监听模块11,用于监听音频播放通路的创建请求。The monitoring module 11 is configured to monitor the creation request of the audio playback path.

在终端后台运行一个音效管理服务的应用,所有在终端播放的音频须经音效管理服务进行统一的音效设置。在播放音频时,首先需要创建一个音频源所在客户端到音效管理服务的音频播放通路,经过该通路向音效管理服务输出音频流。在输出音频流之前,监听该音频播放通路的创建请求。具体在Google解码器中,是监听AudioTrack的创建。Run an application of sound effect management service in the background of the terminal, and all audio played on the terminal must go through the sound effect management service for unified sound effect settings. When playing audio, you first need to create an audio playback path from the client where the audio source is located to the sound management service, and output the audio stream to the sound management service through this path. Before outputting the audio stream, monitor the creation request of the audio playback path. Specifically in the Google decoder, it is to monitor the creation of AudioTrack.

获取模块12,用于当所述监听模块监听到创建了所述音频播放通路后,获取通过所述音频播放通路输出的音频流。The acquisition module 12 is configured to acquire the audio stream output through the audio playback channel after the monitoring module detects that the audio playback channel is created.

在创建了音频播放通路后,音频源所在客户端可以通过该通路向音效管理服务输出音频流,音频管理服务获取该音频流。After the audio playback channel is created, the client where the audio source is located can output the audio stream to the audio management service through the channel, and the audio management service obtains the audio stream.

识别模块13,用于识别所述获取模块获取的所述音频流的类型。The identifying module 13 is configured to identify the type of the audio stream acquired by the acquiring module.

音频流类型(Stream Type)在构造AudioTrack的第一个参数中使用,这个参数和Android中的AudioManager有关系,涉及到终端上的音频管理策略。The audio stream type (Stream Type) is used in the first parameter of constructing AudioTrack. This parameter is related to the AudioManager in Android and involves the audio management strategy on the terminal.

Android将系统的声音或音频分为以下几类常见的类型:Android divides system sounds or audio into the following common types:

STREAM_ALARM:警告声;STREAM_ALARM: warning sound;

STREAM_MUSIC:音乐声,例如music等;STREAM_MUSIC: music sound, such as music, etc.;

STREAM_RING:铃声;STREAM_RING: Ringtone;

STREAM_SYSTEM:系统声音;STREAM_SYSTEM: system sound;

STREAM_VOCIE_CALL:电话声音。STREAM_VOCIE_CALL: Telephone sound.

以上仅为示例,本实施例不限制音频流的类型。The above is only an example, and this embodiment does not limit the type of the audio stream.

获取音频流后,可以识别音频流的类型,该识别方式可采用现有技术手段,在此不再赘述。After the audio stream is acquired, the type of the audio stream can be identified. The identification method can use existing technical means, which will not be repeated here.

设置模块14,用于根据所述识别模块识别出的所述音频流的类型,确定打开或关闭针对所述音频流的音效设置。The setting module 14 is configured to determine whether to enable or disable the sound effect setting for the audio stream according to the type of the audio stream identified by the identification module.

不同的音频流的类型对应不同的播放场景,例如,音频流类型为铃声,对应的播放场景或客户端可能为闹铃,音频流类型为音乐声,则对应的播放场景或客户端可能为音乐或视频播放器,音效在一些场景下确实能大大提高用户体验,比如播放音乐、视频,但某些场景效果恰恰相反,比如闹铃、通知音等,因此,根据识别出的音频流的类型,确定打开或关闭针对该音频流的音效设置,使音效设置与场景相适应十分重要,否则,音效设置起到了相反的作用。在上面的示例中,音频流类型为音乐声时,可以打开音效设置,而音频流类型为铃声时,则建议关闭音效设置。Different audio stream types correspond to different playback scenarios. For example, if the audio stream type is ringtone, the corresponding playback scenario or client may be an alarm, and the audio stream type is music, then the corresponding playback scenario or client may be music Or video player, the sound effect can greatly improve the user experience in some scenarios, such as playing music and video, but the effect is just the opposite in some scenarios, such as alarm bells, notification sounds, etc. Therefore, according to the type of the recognized audio stream, Make sure to turn on or off the sound effect setting for this audio stream, it is very important to make the sound effect setting fit the scene, otherwise, the sound effect setting has the opposite effect. In the above example, when the audio stream type is music, you can turn on the sound effect setting, but when the audio stream type is ringtone, it is recommended to turn off the sound effect setting.

对于一些音频流的类型,需要打开音效设置,而对于另外一些音频流的类型,需要关闭音效设置,可以在终端中存储音频流的类型与打开或关闭音效设置的对应关系,以自动实现音效设置与场景相匹配。For some types of audio streams, you need to turn on the sound effect settings, and for other types of audio streams, you need to turn off the sound effect settings. You can store the corresponding relationship between the type of audio stream and the sound effect setting on or off in the terminal to automatically realize the sound effect settings. Match the scene.

根据本发明实施例提供的一种终端,通过识别当前场景下创建的音频播放通路输出的音频流的类型,根据识别出的音频流的类型进行音效设置,可以解决全局音效不适应某些场景而导致杂音或达不到期望的听觉享受的问题,保证在不同应用场景下都能获得相适应的音效效果。According to a terminal provided by an embodiment of the present invention, by identifying the type of the audio stream output by the audio playback path created in the current scene, and setting the sound effect according to the identified audio stream type, it can solve the problem that the global sound effect does not adapt to certain scenes Problems that cause noise or unsatisfactory listening enjoyment, ensure that suitable sound effects can be obtained in different application scenarios.

图4为本发明实施例提供的另一种终端的结构示意图,该终端2000包括:FIG. 4 is a schematic structural diagram of another terminal provided by an embodiment of the present invention. The terminal 2000 includes:

监听模块21,用于监听音频播放通路的创建请求。The monitoring module 21 is configured to monitor the creation request of the audio playback channel.

获取模块22,用于当所述监听模块监听到创建了所述音频播放通路后,获取通过所述音频播放通路输出的音频流。The acquisition module 22 is configured to acquire the audio stream output through the audio playback channel after the monitoring module detects that the audio playback channel is created.

监听模块21、获取模块22的功能实现分别与图3所示实施例的监听模块11、获取模块12相同,在此不再赘述。The functions of the monitoring module 21 and the acquiring module 22 are respectively the same as those of the monitoring module 11 and the acquiring module 12 in the embodiment shown in FIG. 3 , and will not be repeated here.

识别模块23,用于识别所述获取模块获取的所述音频流的类型。The identifying module 23 is configured to identify the type of the audio stream acquired by the acquiring module.

在本实施例中,识别模块23包括第一识别单元231和第二识别单元232。In this embodiment, the identification module 23 includes a first identification unit 231 and a second identification unit 232 .

第一识别单元231,用于根据所述音频流的播放进程的标识,识别所述音频流的音频播放通路。The first identifying unit 231 is configured to identify the audio playback path of the audio stream according to the identifier of the playback process of the audio stream.

第二识别单元232,用于根据所述第一识别单元识别出的所述音频播放通路,识别所述音频流的类型。The second identification unit 232 is configured to identify the type of the audio stream according to the audio playback path identified by the first identification unit.

本实施例中,终端中可同时创建一个或多个音频播放通路,一个音频流又包括多个播放进程,且同一个音频播放通路中的音频流的多个播放进程具有同一标识,因此,根据播放进程的标识可以识别音频流的音频播放通路,而一个音频播放通路中只播放一种类型的音频流,因此根据识别出的音频播放通路,可以确定音频流的类型。音频流的类型包括以下至少一种:音乐声、警告声、系统声音、铃声和电话声音。In this embodiment, one or more audio playback channels can be created in the terminal at the same time, and one audio stream includes multiple playback processes, and multiple playback processes of the audio stream in the same audio playback channel have the same identifier. Therefore, according to The identifier of the playback process can identify the audio playback channel of the audio stream, and only one type of audio stream is played in an audio playback channel, so the type of the audio stream can be determined according to the identified audio playback channel. The type of the audio stream includes at least one of the following: music sound, warning sound, system sound, ring tone and telephone sound.

设置模块24,用于根据所述识别模块识别出的所述音频流的类型,确定打开或关闭针对所述音频流的音效设置。The setting module 24 is configured to determine whether to enable or disable the sound effect setting for the audio stream according to the type of the audio stream identified by the identification module.

在本实施例中,设置模块24包括打开单元241和关闭单元242。In this embodiment, the setting module 24 includes an opening unit 241 and a closing unit 242 .

打开单元241,用于当所述识别模块识别出的所述音频流的类型为第一音频流类型时,确定打开针对所述音频流的音效设置,所述第一音频流类型包括:音乐声。The opening unit 241 is configured to determine to open the sound effect setting for the audio stream when the type of the audio stream identified by the identification module is a first audio stream type, and the first audio stream type includes: music sound .

关闭单元242,用于当所述识别模块识别出的所述音频流的类型为第二音频流类型时,确定关闭针对所述音频流的音效设置,所述第二音频流类型包括以下至少一种:警告声、系统声音、铃声和电话声音。The closing unit 242 is configured to determine to close the sound effect setting for the audio stream when the type of the audio stream identified by the identification module is a second audio stream type, and the second audio stream type includes at least one of the following Types: warning sounds, system sounds, ring tones, and phone tones.

不同的音频流的类型对应不同的播放场景,例如,音频流类型为铃声,对应的播放场景或客户端可能为闹铃,音频流类型为音乐声,则对应的播放场景或客户端可能为音乐或视频播放器,音效在一些场景下确实能大大提高用户体验,比如播放音乐、视频,但某些场景效果恰恰相反,比如闹铃、通知音等,因此,根据识别出的音频流的类型,确定打开或关闭针对该音频流的音效设置,使音效设置与场景相适应十分重要,否则,音效设置起到了相反的作用。在上面的示例中,音频流类型为音乐声时,可以打开音效设置,而音频流类型为铃声时,则建议关闭音效设置。Different audio stream types correspond to different playback scenarios. For example, if the audio stream type is ringtone, the corresponding playback scenario or client may be an alarm, and the audio stream type is music, then the corresponding playback scenario or client may be music Or video player, the sound effect can greatly improve the user experience in some scenarios, such as playing music and video, but the effect is just the opposite in some scenarios, such as alarm bells, notification sounds, etc. Therefore, according to the type of the recognized audio stream, Make sure to turn on or off the sound effect setting for this audio stream, it is very important to make the sound effect setting fit the scene, otherwise, the sound effect setting has the opposite effect. In the above example, when the audio stream type is music, you can turn on the sound effect setting, but when the audio stream type is ringtone, it is recommended to turn off the sound effect setting.

对于第一音频流类型,需要打开音效设置,而对于第二音频流类型,需要关闭音效设置,可以在终端中存储第一、第二音频流类型与打开或关闭音效设置的对应关系,以及存储第一、第二音频流类型分别包括哪几种音频流类型,以自动实现音效设置与场景相匹配。这里,第一、第二音频流类型是指音频流类型的类别。For the first audio stream type, the sound effect setting needs to be turned on, and for the second audio stream type, the sound effect setting needs to be turned off, and the corresponding relationship between the first and second audio stream types and the sound effect setting being turned on or off can be stored in the terminal, and stored Which audio stream types are included in the first and second audio stream types, so as to automatically match the sound effect setting with the scene. Here, the first and second audio stream types refer to categories of audio stream types.

监听模块21还用于监听所述音频播放通路的释放请求。The monitoring module 21 is also configured to monitor the release request of the audio playback path.

在该音频播放通路的音频播放完毕或停止播放后,需要释放音频播放通路,以节省系统资源,本实施例可以监听音频播放通路的释放,具体在Google解码器中,是监听AudioTrack的释放。After the audio playback of the audio playback path is finished or stopped playing, the audio playback path needs to be released to save system resources. This embodiment can monitor the release of the audio playback path, specifically in the Google decoder, it is to monitor the release of AudioTrack.

设置模块24还用于当所述监听模块监听到所述音频播放通路已释放,关闭针对所述音频流的音效设置。The setting module 24 is further configured to disable the sound effect setting for the audio stream when the monitoring module detects that the audio playback channel has been released.

如果针对该已释放的音频播放通路的音频流的音效设置是打开的,则关闭针对该音频流的音效设置。If the sound effect setting for the audio stream of the released audio playback channel is turned on, turn off the sound effect setting for the audio stream.

根据本发明实施例提供的一种终端,通过识别当前场景下创建的音频播放通路输出的音频流的类型,根据识别出的音频流的类型进行音效设置,可以解决全局音效不适应某些场景而导致杂音或达不到期望的听觉享受的问题,保证在不同应用场景下都能获得相适应的音效效果。According to a terminal provided by an embodiment of the present invention, by identifying the type of the audio stream output by the audio playback path created in the current scene, and setting the sound effect according to the identified audio stream type, it can solve the problem that the global sound effect does not adapt to certain scenes Problems that cause noise or unsatisfactory listening enjoyment, ensure that suitable sound effects can be obtained in different application scenarios.

本发明实施例还提供了又一种终端,如图5所示,为了便于说明,仅示出了与本发明实施例相关的部分,具体技术细节未揭示的,请参照本发明实施例方法部分。该终端设备可以为包括手机、平板电脑、PDA(Personal Digital Assistant,个人数字助理)、POS(Point of Sales,销售终端)、车载电脑等任意终端设备,以终端设备为手机为例:The embodiment of the present invention also provides another terminal, as shown in FIG. 5 , for the convenience of description, only the parts related to the embodiment of the present invention are shown. For specific technical details not disclosed, please refer to the method part of the embodiment of the present invention. . The terminal device can be any terminal device including mobile phone, tablet computer, PDA (Personal Digital Assistant, personal digital assistant), POS (Point of Sales, sales terminal), vehicle-mounted computer, etc. Taking the terminal device as a mobile phone as an example:

图5示出的是与本发明实施例提供的终端设备相关的手机的部分结构的框图。参考图5,手机包括:射频(Radio Frequency,RF)电路1110、存储器1120、输入单元1130、显示单元1140、传感器1150、音频电路1160、无线保真(WirelessFidelity,WiFi)模块1170、处理器1180、以及电源1190等部件。本领域技术人员可以理解,图5中示出的手机结构并不构成对手机的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。Fig. 5 shows a block diagram of a partial structure of a mobile phone related to a terminal device provided by an embodiment of the present invention. Referring to FIG. 5 , the mobile phone includes: a radio frequency (Radio Frequency, RF) circuit 1110, a memory 1120, an input unit 1130, a display unit 1140, a sensor 1150, an audio circuit 1160, a wireless fidelity (Wireless Fidelity, WiFi) module 1170, a processor 1180, And power supply 1190 and other components. Those skilled in the art can understand that the structure of the mobile phone shown in FIG. 5 is not limited to the mobile phone, and may include more or less components than shown in the figure, or combine some components, or arrange different components.

下面结合图5对手机的各个构成部件进行具体的介绍:The following is a specific introduction to each component of the mobile phone in conjunction with Figure 5:

RF电路1110可用于收发信息或通话过程中,信号的接收和发送,特别地,将基站的下行信息接收后,给处理器1180处理;另外,将设计上行的数据发送给基站。通常,RF电路1110包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器(Low NoiseAmplifier,LNA)、双工器等。此外,RF电路1110还可以通过无线通信与网络和其他设备通信。上述无线通信可以使用任一通信标准或协议,包括但不限于全球移动通讯系统(GlobalSystem of Mobile communication,GSM)、通用分组无线服务(General Packet RadioService,GPRS)、码分多址(Code Division Multiple Access,CDMA)、宽带码分多址(Wideband Code Division Multiple Access,WCDMA)、长期演进(Long Term Evolution,LTE)、电子邮件、短消息服务(Short Messaging Service,SMS)等。The RF circuit 1110 can be used for sending and receiving information or receiving and sending signals during a call. In particular, after receiving the downlink information from the base station, it is processed by the processor 1180; in addition, the designed uplink data is sent to the base station. Generally, the RF circuit 1110 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (Low Noise Amplifier, LNA), a duplexer, and the like. In addition, RF circuitry 1110 may also communicate with networks and other devices via wireless communications. The above-mentioned wireless communication can use any communication standard or protocol, including but not limited to Global System of Mobile Communication (Global System of Mobile communication, GSM), General Packet Radio Service (General Packet Radio Service, GPRS), Code Division Multiple Access (Code Division Multiple Access) , CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (Long Term Evolution, LTE), email, Short Messaging Service (Short Messaging Service, SMS), etc.

存储器1120可用于存储软件程序以及模块,处理器1180通过运行存储在存储器1120的软件程序以及模块,从而执行手机的各种功能应用以及数据处理。存储器1120可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据手机的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器1120可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。The memory 1120 can be used to store software programs and modules, and the processor 1180 executes various functional applications and data processing of the mobile phone by running the software programs and modules stored in the memory 1120 . The memory 1120 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application program required by a function (such as a sound playback function, an image playback function, etc.) and the like; Data created by the use of mobile phones (such as audio data, phonebook, etc.), etc. In addition, the memory 1120 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage devices.

输入单元1130可用于接收输入的数字或字符信息,以及产生与手机的用户设置以及功能控制有关的键信号输入。具体地,输入单元1130可包括触控面板1131以及其他输入设备1132。触控面板1131,也称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板1131上或在触控面板1131附近的操作),并根据预先设定的程式驱动相应的连接装置。可选的,触控面板1131可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器1180,并能接收处理器1180发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板1131。除了触控面板1131,输入单元1130还可以包括其他输入设备1132。具体地,其他输入设备1132可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。The input unit 1130 can be used to receive input numbers or character information, and generate key signal input related to user settings and function control of the mobile phone. Specifically, the input unit 1130 may include a touch panel 1131 and other input devices 1132 . The touch panel 1131, also referred to as a touch screen, can collect touch operations of the user on or near it (for example, the user uses any suitable object or accessory such as a finger or a stylus on the touch panel 1131 or near the touch panel 1131). operation), and drive the corresponding connection device according to the preset program. Optionally, the touch panel 1131 may include two parts, a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, and detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and sends it to the to the processor 1180, and can receive and execute commands sent by the processor 1180. In addition, the touch panel 1131 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 1131 , the input unit 1130 may also include other input devices 1132 . Specifically, other input devices 1132 may include, but are not limited to, one or more of physical keyboards, function keys (such as volume control keys, switch keys, etc.), trackballs, mice, joysticks, and the like.

显示单元1140可用于显示由用户输入的信息或提供给用户的信息以及手机的各种菜单。显示单元1140可包括显示面板1141,可选的,可以采用液晶显示器(LiquidCrystal Display,LCD)、有机发光二极管(Organic Light-Emitting Diode,OLED)等形式来配置显示面板1141。进一步的,触控面板1131可覆盖显示面板1141,当触控面板1131检测到在其上或附近的触摸操作后,传送给处理器1180以确定触摸事件的类型,随后处理器1180根据触摸事件的类型在显示面板1141上提供相应的视觉输出。虽然在图5中,触控面板1131与显示面板1141是作为两个独立的部件来实现手机的输入和输入功能,但是在某些实施例中,可以将触控面板1131与显示面板1141集成而实现手机的输入和输出功能。The display unit 1140 may be used to display information input by or provided to the user and various menus of the mobile phone. The display unit 1140 may include a display panel 1141. Optionally, the display panel 1141 may be configured in the form of a liquid crystal display (Liquid Crystal Display, LCD) or an organic light-emitting diode (Organic Light-Emitting Diode, OLED). Further, the touch panel 1131 can cover the display panel 1141, and when the touch panel 1131 detects a touch operation on or near it, it sends it to the processor 1180 to determine the type of the touch event, and then the processor 1180 determines the type of the touch event according to the The type provides a corresponding visual output on the display panel 1141 . Although in FIG. 5 , the touch panel 1131 and the display panel 1141 are used as two independent components to realize the input and input functions of the mobile phone, in some embodiments, the touch panel 1131 and the display panel 1141 can be integrated to form a mobile phone. Realize the input and output functions of the mobile phone.

手机还可包括至少一种传感器1150,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板1141的亮度,接近传感器可在手机移动到耳边时,关闭显示面板1141和/或背光。作为运动传感器的一种,加速计传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;至于手机还可配置的陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。The handset may also include at least one sensor 1150, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 1141 according to the brightness of the ambient light, and the proximity sensor may turn off the display panel 1141 and/or when the mobile phone is moved to the ear. or backlight. As a kind of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in various directions (generally three axes), and can detect the magnitude and direction of gravity when it is stationary, and can be used to identify the application of mobile phone posture (such as horizontal and vertical screen switching, related Games, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tap), etc.; as for other sensors such as gyroscope, barometer, hygrometer, thermometer, infrared sensor, etc. repeat.

音频电路1160、扬声器1161,传声器1162可提供用户与手机之间的音频接口。音频电路1160可将接收到的音频数据转换后的电信号,传输到扬声器1161,由扬声器1161转换为声音信号输出;另一方面,传声器1162将收集的声音信号转换为电信号,由音频电路1160接收后转换为音频数据,再将音频数据输出处理器1180处理后,经RF电路1110以发送给比如另一手机,或者将音频数据输出至存储器1120以便进一步处理。The audio circuit 1160, the speaker 1161, and the microphone 1162 can provide an audio interface between the user and the mobile phone. The audio circuit 1160 can transmit the electrical signal converted from the received audio data to the speaker 1161, and the speaker 1161 converts it into an audio signal for output; After being received, it is converted into audio data, and then the audio data is processed by the output processor 1180, and then sent to another mobile phone through the RF circuit 1110, or the audio data is output to the memory 1120 for further processing.

WiFi属于短距离无线传输技术,手机通过WiFi模块1170可以帮助用户收发电子邮件、浏览网页和访问流式媒体等,它为用户提供了无线的宽带互联网访问。虽然图5示出了WiFi模块1170,但是可以理解的是,其并不属于手机的必须构成,完全可以根据需要在不改变发明的本质的范围内而省略。WiFi is a short-distance wireless transmission technology. The mobile phone can help users send and receive emails, browse web pages, and access streaming media through the WiFi module 1170, which provides users with wireless broadband Internet access. Although Fig. 5 shows the WiFi module 1170, it can be understood that it is not an essential component of the mobile phone, and can be completely omitted as required without changing the essence of the invention.

处理器1180是手机的控制中心,利用各种接口和线路连接整个手机的各个部分,通过运行或执行存储在存储器1120内的软件程序和/或模块,以及调用存储在存储器1120内的数据,执行手机的各种功能和处理数据,从而对手机进行整体监控。可选的,处理器1180可包括一个或多个处理单元;优选的,处理器1180可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器1180中。The processor 1180 is the control center of the mobile phone. It uses various interfaces and lines to connect various parts of the entire mobile phone. By running or executing software programs and/or modules stored in the memory 1120, and calling data stored in the memory 1120, execution Various functions and processing data of the mobile phone, so as to monitor the mobile phone as a whole. Optionally, the processor 1180 may include one or more processing units; preferably, the processor 1180 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface and application programs, etc. , the modem processor mainly handles wireless communications. It can be understood that the foregoing modem processor may not be integrated into the processor 1180 .

手机还包括给各个部件供电的电源1190(比如电池),优选的,电源可以通过电源管理系统与处理器1180逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。The mobile phone also includes a power supply 1190 (such as a battery) for supplying power to various components. Preferably, the power supply can be logically connected to the processor 1180 through the power management system, so as to realize functions such as managing charging, discharging, and power consumption management through the power management system.

尽管未示出,手机还可以包括摄像头、蓝牙模块等,在此不再赘述。Although not shown, the mobile phone may also include a camera, a Bluetooth module, etc., which will not be repeated here.

在本发明实施例中,该终端设备所包括的处理器1180还具有以下功能:In the embodiment of the present invention, the processor 1180 included in the terminal device also has the following functions:

监听音频播放通路的创建请求;Monitor the creation request of the audio playback channel;

当创建了所述音频播放通路后,获取通过所述音频播放通路输出的音频流;After the audio playback path is created, obtain the audio stream output through the audio playback path;

识别所述音频流的类型;identifying the type of audio stream;

根据识别出的所述音频流的类型,确定打开或关闭针对所述音频流的音效设置。According to the identified type of the audio stream, it is determined to enable or disable the sound effect setting for the audio stream.

在一种实现方式中,不同的音频流的类型对应不同的播放场景。In an implementation manner, different types of audio streams correspond to different playback scenarios.

在另一种实现方式中,所述终端中同时创建了至少一个音频播放通路,所述音频流包括多个播放进程,同一个音频播放通路中的音频流的多个播放进程具有同一标识;In another implementation, at least one audio playback path is created in the terminal at the same time, the audio stream includes multiple playback processes, and multiple playback processes of the audio stream in the same audio playback path have the same identifier;

所述处理器1180具体用于:The processor 1180 is specifically used for:

根据所述播放进程的标识,识别所述音频流的音频播放通路;Identify the audio playback path of the audio stream according to the identifier of the playback process;

根据识别出的所述音频播放通路,识别所述音频流的类型。Identify the type of the audio stream according to the identified audio playback path.

在又一种实现方式中,所述处理器1180具体用于:In yet another implementation manner, the processor 1180 is specifically configured to:

当所述音频流的类型为第一音频流类型时,确定打开针对所述音频流的音效设置,所述第一音频流类型包括:音乐声;When the type of the audio stream is the first audio stream type, it is determined to turn on the sound effect setting for the audio stream, and the first audio stream type includes: music sound;

当所述音频流的类型为第二音频流类型时,确定关闭针对所述音频流的音效设置,所述第二音频流类型包括以下至少一种:警告声、系统声音、铃声和电话声音。When the type of the audio stream is the second audio stream type, it is determined to turn off the sound effect setting for the audio stream, and the second audio stream type includes at least one of the following: warning sound, system sound, ringtone and telephone sound.

在又一种实现方式中,所述处理器1180还用于:In yet another implementation, the processor 1180 is further configured to:

监听所述音频播放通路的释放请求;Monitoring the release request of the audio playback channel;

当所述音频播放通路已释放,关闭针对所述音频流的音效设置。When the audio playback channel is released, close the sound effect setting for the audio stream.

根据本发明实施例提供的一种终端,通过识别当前场景下创建的音频播放通路输出的音频流的类型,根据识别出的音频流的类型进行音效设置,可以解决全局音效不适应某些场景而导致杂音或达不到期望的听觉享受的问题,保证在不同应用场景下都能获得相适应的音效效果。According to a terminal provided by an embodiment of the present invention, by identifying the type of the audio stream output by the audio playback path created in the current scene, and setting the sound effect according to the identified audio stream type, it can solve the problem that the global sound effect does not adapt to certain scenes Problems that cause noise or unsatisfactory listening enjoyment, ensure that suitable sound effects can be obtained in different application scenarios.

本发明实施例还提供一种计算机存储介质,其中,该计算机存储介质可存储有程序,该程序执行时包括上述方法实施例中记载的任何一种终端的音效设置方法的部分或全部步骤。An embodiment of the present invention also provides a computer storage medium, wherein the computer storage medium can store a program, and when the program is executed, some or all steps of any method for setting sound effects of a terminal described in the above method embodiments are included.

在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。In the foregoing embodiments, the descriptions of each embodiment have their own emphases, and for parts not described in detail in a certain embodiment, reference may be made to relevant descriptions of other embodiments.

通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到本发明可以用硬件实现,或固件实现,或它们的组合方式来实现。当使用软件实现时,可以将上述功能存储在计算机可读介质中或作为计算机可读介质上的一个或多个指令或代码进行传输。计算机可读介质包括计算机存储介质和通信介质,其中通信介质包括便于从一个地方向另一个地方传送计算机程序的任何介质。存储介质可以是计算机能够存取的任何可用介质。以此为例但不限于:计算机可读介质可以包括随机存取存储器(Random Access Memory,RAM)、只读存储器(Read-Only Memory,ROM)、电可擦可编程只读存储器(ElectricallyErasable Programmable Read-Only Memory,EEPROM)、只读光盘(Compact Disc Read-Only Memory,CD-ROM)或其他光盘存储、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质。此外。任何连接可以适当的成为计算机可读介质。例如,如果软件是使用同轴电缆、光纤光缆、双绞线、数字用户线(Digital Subscriber Line,DSL)或者诸如红外线、无线电和微波之类的无线技术从网站、服务器或者其他远程源传输的,那么同轴电缆、光纤光缆、双绞线、DSL或者诸如红外线、无线和微波之类的无线技术包括在所属介质的定影中。如本发明所使用的,盘(Disk)和碟(disc)包括压缩光碟(CD)、激光碟、光碟、数字通用光碟(DVD)、软盘和蓝光光碟,其中盘通常磁性的复制数据,而碟则用激光来光学的复制数据。上面的组合也应当包括在计算机可读介质的保护范围之内。Through the above description of the implementation manners, those skilled in the art can clearly understand that the present invention can be implemented by hardware, firmware, or a combination thereof. When implemented in software, the functions described above may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a computer. Take this as an example but not limited to: computer-readable media may include Random Access Memory (Random Access Memory, RAM), Read-Only Memory (Read-Only Memory, ROM), Electrically Erasable Programmable Read-Only Memory (Electrically Erasable Programmable Read -Only Memory, EEPROM), CD-ROM (Compact Disc Read-Only Memory, CD-ROM) or other optical disk storage, magnetic disk storage medium or other magnetic storage devices, or can be used to carry or store information in the form of instructions or data structures desired program code and any other medium that can be accessed by a computer. also. Any connection can suitably be a computer-readable medium. For example, if the Software is transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, Digital Subscriber Line (DSL), or wireless technologies such as infrared, radio, and microwave, Coaxial cable, fiber optic cable, twisted pair, DSL or wireless technologies such as infrared, wireless and microwave are then included in the fixation of the associated medium. As used herein, Disk and disc include compact disc (CD), laser disc, compact disc, digital versatile disc (DVD), floppy disc, and Blu-ray disc, where discs usually reproduce data magnetically, and discs Lasers are used to optically reproduce the data. Combinations of the above should also be included within the scope of computer-readable media.

总之,以上所述仅为本发明技术方案的较佳实施例而已,并非用于限定本发明的保护范围。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。In a word, the above descriptions are only preferred embodiments of the technical solutions of the present invention, and are not intended to limit the protection scope of the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.

Claims (10)

CN201610440003.6A2016-06-162016-06-16Sound effect setting method of terminal and terminalActiveCN106095387B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201610440003.6ACN106095387B (en)2016-06-162016-06-16Sound effect setting method of terminal and terminal

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201610440003.6ACN106095387B (en)2016-06-162016-06-16Sound effect setting method of terminal and terminal

Publications (2)

Publication NumberPublication Date
CN106095387Atrue CN106095387A (en)2016-11-09
CN106095387B CN106095387B (en)2019-06-25

Family

ID=57237038

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201610440003.6AActiveCN106095387B (en)2016-06-162016-06-16Sound effect setting method of terminal and terminal

Country Status (1)

CountryLink
CN (1)CN106095387B (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN106658300A (en)*2017-03-012017-05-10深圳市麦思美汽车电子有限公司Sound effect control method for vehicle-mounted audio/video system
CN107885855A (en)*2017-11-152018-04-06福州掌易通信息技术有限公司Dynamic caricature generation method and system based on intelligent terminal
CN109165005A (en)*2018-09-042019-01-08Oppo广东移动通信有限公司Sound effect enhancement method and device, electronic equipment and storage medium
CN109218528A (en)*2018-09-042019-01-15Oppo广东移动通信有限公司Sound effect treatment method, device and electronic equipment
WO2020048209A1 (en)*2018-09-042020-03-12Oppo广东移动通信有限公司Sound effect processing method and apparatus, and electronic device and storage medium
CN111124351A (en)*2019-12-242020-05-08RealMe重庆移动通信有限公司Audio output method, audio output device, electronic equipment and storage medium
CN112420078A (en)*2020-11-182021-02-26青岛海尔科技有限公司 A monitoring method, device, storage medium and electronic device
CN113190404A (en)*2021-04-232021-07-30Oppo广东移动通信有限公司Scene recognition method and device, electronic equipment and computer-readable storage medium
CN116684523A (en)*2023-05-292023-09-01成都中科创达软件有限公司Terminal mode adjusting method, device, equipment and storage medium
CN119943091A (en)*2023-11-022025-05-06Oppo广东移动通信有限公司 Audio stream identification method, device, electronic device and computer storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN103051794A (en)*2012-12-182013-04-17广东欧珀移动通信有限公司Method and device for dynamically setting sound effect of mobile terminal
US20140142954A1 (en)*2011-07-262014-05-22Booktrack Holdings LimitedSoundtrack for electronic text
CN103927146A (en)*2014-04-302014-07-16深圳市中兴移动通信有限公司Sound effect self-adapting method and device
CN104090766A (en)*2014-07-172014-10-08广东欧珀移动通信有限公司Sound effect switching method and system for mobile terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20140142954A1 (en)*2011-07-262014-05-22Booktrack Holdings LimitedSoundtrack for electronic text
CN103051794A (en)*2012-12-182013-04-17广东欧珀移动通信有限公司Method and device for dynamically setting sound effect of mobile terminal
CN103927146A (en)*2014-04-302014-07-16深圳市中兴移动通信有限公司Sound effect self-adapting method and device
CN104090766A (en)*2014-07-172014-10-08广东欧珀移动通信有限公司Sound effect switching method and system for mobile terminal

Cited By (14)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN106658300A (en)*2017-03-012017-05-10深圳市麦思美汽车电子有限公司Sound effect control method for vehicle-mounted audio/video system
CN107885855A (en)*2017-11-152018-04-06福州掌易通信息技术有限公司Dynamic caricature generation method and system based on intelligent terminal
CN109218528B (en)*2018-09-042021-03-02Oppo广东移动通信有限公司Sound effect processing method and device and electronic equipment
CN109218528A (en)*2018-09-042019-01-15Oppo广东移动通信有限公司Sound effect treatment method, device and electronic equipment
WO2020048221A1 (en)*2018-09-042020-03-12Oppo广东移动通信有限公司Sound effect enhancement method and apparatus, electronic device, and storage medium
WO2020048209A1 (en)*2018-09-042020-03-12Oppo广东移动通信有限公司Sound effect processing method and apparatus, and electronic device and storage medium
CN109165005B (en)*2018-09-042020-08-25Oppo广东移动通信有限公司Sound effect enhancement method and device, electronic equipment and storage medium
CN109165005A (en)*2018-09-042019-01-08Oppo广东移动通信有限公司Sound effect enhancement method and device, electronic equipment and storage medium
CN111124351A (en)*2019-12-242020-05-08RealMe重庆移动通信有限公司Audio output method, audio output device, electronic equipment and storage medium
CN112420078A (en)*2020-11-182021-02-26青岛海尔科技有限公司 A monitoring method, device, storage medium and electronic device
CN113190404A (en)*2021-04-232021-07-30Oppo广东移动通信有限公司Scene recognition method and device, electronic equipment and computer-readable storage medium
CN113190404B (en)*2021-04-232023-01-03Oppo广东移动通信有限公司Scene recognition method and device, electronic equipment and computer-readable storage medium
CN116684523A (en)*2023-05-292023-09-01成都中科创达软件有限公司Terminal mode adjusting method, device, equipment and storage medium
CN119943091A (en)*2023-11-022025-05-06Oppo广东移动通信有限公司 Audio stream identification method, device, electronic device and computer storage medium

Also Published As

Publication numberPublication date
CN106095387B (en)2019-06-25

Similar Documents

PublicationPublication DateTitle
CN106095387B (en)Sound effect setting method of terminal and terminal
CN106155623B (en)A kind of audio collocation method, system and relevant device
CN104967900B (en)A kind of method and apparatus generating video
CN106126172B (en) A sound effect processing method and mobile terminal
CN106126159B (en)Audio stream processing method and mobile terminal
CN110633067B (en) Method for adjusting sound effect parameters and mobile terminal
CN105208056B (en) Information interaction method and terminal
CN106170034B (en)Sound effect processing method and mobile terminal
CN105959483B (en) An audio stream processing method and mobile terminal
WO2020107290A1 (en)Audio output control method and apparatus, computer readable storage medium, and electronic device
CN106126165B (en)A kind of audio stream processing method and mobile terminal
CN105959482B (en) A kind of scene sound effect control method, and electronic device
CN106126170B (en)Sound effect setting method of terminal and terminal
CN106095385A (en) A sound effect setting method and mobile terminal
CN106126163A (en) A method and terminal for adjusting sound effects
CN107371102A (en) Audio playback volume control method, device, storage medium and mobile terminal
CN114489558A (en)Disturbance-free method and terminal
CN103491240A (en) A kind of alarm clock ringing method, device and mobile terminal
CN106506834A (en) Method, terminal and system for adding background sound during call
CN110989816B (en)Application processing method and device and storage medium
CN106101420A (en) A method and terminal for adjusting sound effect
CN106686428A (en) A video playback method and device
CN105159655B (en)Behavior event playing method and device
CN106126166A (en) Method and terminal for sound effect processing
CN106210325B (en) A method, device and terminal for setting ringtones for social applications

Legal Events

DateCodeTitleDescription
C06Publication
PB01Publication
C10Entry into substantive examination
SE01Entry into force of request for substantive examination
CB02Change of applicant information
CB02Change of applicant information

Address after:523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong

Applicant after:OPPO Guangdong Mobile Communications Co., Ltd.

Address before:523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong

Applicant before:Guangdong OPPO Mobile Communications Co., Ltd.

GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp