Volume type control method and device, equipment and storage medium
By acquiring and adjusting the volume type of the application, the problem of single volume type control method in the prior art is solved, and flexible control and adaptability are improved in different scenarios.
Patent Information
- Application Number
- CN202311435432.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-31
- Publication Date
- 2025-05-02
AI Technical Summary
In the prior art, the volume type control method of the application is relatively single, which leads to the inability to flexibly control the volume type of the application in different scenarios of the terminal device, especially when the volume type conflicts with the real volume type of the terminal device, the volume cannot be effectively adjusted.
By obtaining the expected volume type of the application and the real volume type of the terminal device, when there is a conflict between the two, the expected volume type of the application is adjusted to obtain the adjusted volume type, and audio is broadcasted according to that type.
It realizes flexible control of application volume types in different scenarios, avoids volume type conflicts, improves the adaptability of application and different scenarios, and ensures consistency of volume types.
Smart Images

Figure CN119917054A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a volume type control method, device, equipment and storage medium. Background Art
[0002] Different volume types are usually corresponding to different scenarios of the terminal device. For example, the call volume type is usually used in the call scenario, and the media volume type is usually used in the general media scenario (such as the scene of playing music).
[0003] In the related art, the volume type of an application is usually pre-set and remains unchanged. Assume that application a is of media volume type, and application b is of call volume type. When application a is opened and then application b is opened, since the priority of the call volume type is usually higher than the media volume type, the actual volume type of the default terminal device is the call volume type. Under the call volume type, since the volume type of application a is of media volume type, the audio played by application a cannot be controlled through the physical buttons of the terminal device.
[0004] Therefore, the volume control method of the application program in the related art is relatively simple. Summary of the invention
[0005] The embodiments of the present application provide a volume type control method, apparatus, device and storage medium, and the technical solution includes the following aspects.
[0006] According to one aspect of an embodiment of the present application, a volume type control method is provided, and the method includes the following steps.
[0007] Obtaining an expected volume type of an application and an actual volume type of a terminal device where the application is located; wherein the expected volume type is the volume type expected of the application, and the actual volume type is the actual current volume type of the terminal device;
[0008] When there is a conflict between the expected volume type and the actual volume type, adjusting the expected volume type of the application to obtain an adjusted volume type of the application;
[0009] The audio is collected and broadcast according to the adjusted volume type.
[0010] According to one aspect of an embodiment of the present application, a volume control device is provided, and the device includes the following modules.
[0011] A volume type acquisition module, used to acquire the expected volume type of the application and the actual volume type of the terminal device where the application is located; wherein the expected volume type is the volume type expected for the application, and the actual volume type is the actual volume type of the terminal device at present;
[0012] A volume type adjustment module, configured to adjust the expected volume type of the application program to obtain an adjusted volume type of the application program when there is a conflict between the expected volume type and the actual volume type;
[0013] The audio acquisition and broadcasting module is used to acquire and broadcast audio according to the adjusted volume type.
[0014] According to one aspect of an embodiment of the present application, a computer device is provided, comprising a processor and a memory, wherein a computer program is stored in the memory, and the computer program is loaded and executed by the processor to implement the above-mentioned volume type control method.
[0015] According to one aspect of an embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored. The computer program is loaded and executed by a processor to implement the above-mentioned volume type control method.
[0016] According to one aspect of an embodiment of the present application, a computer program product is provided. The computer program product includes a computer program. The computer program is loaded and executed by a processor to implement the above-mentioned volume type control method.
[0017] The technical solution provided in the embodiments of the present application can bring the following beneficial effects.
[0018] By obtaining the expected volume type of the application and the actual volume type of the terminal device where the application is located, when there is a conflict between the two, the expected volume type of the application is adjusted to obtain the adjusted volume type of the application, and the audio is broadcast according to the adjusted volume type. Since the present application adjusts the expected volume type of the application when the expected volume type of the application conflicts with the actual volume type of the terminal device, the expected volume type of the application does not conflict with the actual volume type of the terminal device, so as to maintain the consistency between the volume type of the application and the actual volume type. This achieves flexible control of the volume type while improving the adaptability of the application to different scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 It is a schematic diagram of an implementation environment of a solution provided by an embodiment of the present application;
[0020] Figure 2 is a schematic diagram of a volume control method provided by an embodiment of the present application;
[0021] Figure 3 is a flow chart of a volume type control method provided by an embodiment of the present application;
[0022] Figure 4 is a flow chart of a volume type control method provided by another embodiment of the present application;
[0023] Figure 5 is a flow chart of a volume type control method provided by another embodiment of the present application;
[0024] Figure 6 is a block diagram of a volume type control method provided by an embodiment of the present application;
[0025] Figure 7 is a schematic diagram of a working mode of a volume detection module provided by an embodiment of the present application;
[0026] Figure 8 is a schematic diagram of a working mode of a volume type decision module provided by an embodiment of the present application;
[0027] Fig. 9 is a block diagram of a volume control device provided by an embodiment of the present application;
[0028] Fig.10 is a block diagram of a volume control device provided by another embodiment of the present application;
[0029] Fig.11 It is a structural block diagram of a computer device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0030] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0031] Before introducing the technical solution of this application, some background technical knowledge involved in this application is first introduced and explained. The following related technologies can be combined arbitrarily with the technical solution of the embodiment of this application as optional solutions, and they all belong to the protection scope of the embodiment of this application. The embodiment of this application includes at least part of the following contents.
[0032] Cloud technology refers to a hosting technology that unifies hardware, software, network and other series of resources in a wide area network or local area network to realize the calculation, storage, processing and sharing of data. Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, application technology, etc. based on the cloud computing business model application, which can form a resource pool, which is used on demand and is flexible and convenient. Cloud computing technology will become an important support. The background services of the technical network system require a large amount of computing and storage resources, such as video websites, picture websites and more portal websites. With the high development and application of the Internet industry, each item may have its own identification mark in the future, and all need to be transmitted to the background system for logical processing. Data of different levels will be processed separately, and all kinds of industry data require strong system backing support, which can only be achieved through cloud computing. The technical solutions mentioned in the embodiments of the present application can also be implemented through cloud technology. For example, the computer equipment described below as the execution subject can also include a cloud server.
[0033] Intelligent Traffic System (ITS), also known as Intelligent Transportation System, is an effective and comprehensive application of advanced science and technology (information technology, computer technology, data communication technology, sensor technology, electronic control technology, automatic control theory, operations research, artificial intelligence, etc.) to transportation, service control and vehicle manufacturing, strengthening the connection between vehicles, roads and users, thereby forming a comprehensive transportation system that ensures safety, improves efficiency, improves the environment and saves energy. The embodiments of the present application can also be used in the field of transportation, for example, the above-mentioned terminal device can be a vehicle-mounted terminal.
[0034] Before introducing the technical solution of the present application, some terms involved in the present application are explained. The following related explanations can be combined arbitrarily with the technical solution of the embodiment of the present application as optional solutions, and they all belong to the protection scope of the embodiment of the present application. The embodiment of the present application includes at least part of the following contents.
[0035] Volume type: The working modes of volume mainly include call volume type and media volume type. Call volume type is mainly used in voice call scenarios. The volume cannot be adjusted to 0 and is often accompanied by the opening of AEC (Acoustic Echo Cancel). Media volume type is used in normal media mode and AEC is not turned on. Call volume type has a higher priority than media volume type. That is, different applications set call volume type and media volume type respectively, and the call volume type will take effect in the end.
[0036] SCO (Synchronous Connection Oriented): A connection-oriented Bluetooth connection (link) method. After establishing a SCO connection, the Bluetooth headset can support collection and playback. When the Bluetooth headset is connected at the call volume, the collection and playback will go through the Bluetooth headset only after the application actively applies for a SCO connection. Otherwise, the sound will be played from the receiver or speaker. Under the media volume type, the application does not need to apply for a SCO connection, and the system will automatically output the played sound from the Bluetooth headset.
[0037] Audio Source: A virtual audio capture device in the system. The call volume type and media volume type also have corresponding Audio Sources. Using the Audio Source corresponding to the call volume type allows the capture to be processed by AEC, while using the Audio Source corresponding to the media volume allows the capture to be performed without any pre-processing to avoid sound quality damage. These two sets are commonly used in the system. To be precise, there are others in the system, such as ringtones, phone sounds, notification sounds, etc., which also correspond to different Audio Sources. The audio collected for the call volume type also needs to undergo echo cancellation, while the audio collected for the media volume mode does not undergo echo cancellation. In some embodiments, the call volume type and the media volume type correspond to the same physical device and correspond to different virtual audio capture devices.
[0038] Stream Type: used to describe the stream type of playback data. The call volume and media volume have their own constrained stream types. Adjusting the volume key under a certain volume type will only change the playback sound corresponding to the stream type constrained by the volume type.
[0039] Please refer to Figure 1 , which shows a schematic diagram of a solution implementation environment provided by an embodiment of the present application. The solution implementation environment may include: a terminal device 10 and a server 20.
[0040] The terminal device 10 includes, but is not limited to, electronic devices such as smart phones, tablet computers, laptop computers, desktop computers, smart speakers, smart watches, smart voice interaction devices, game consoles, wearable devices, multimedia playback devices, PCs (Personal Computers), vehicle-mounted terminals, smart home appliances, aircraft, etc., but is not limited thereto. The client of the target application can be installed in the terminal device 10. Optionally, the target application can be an application that needs to be downloaded and installed, or it can be in the form of a web page or a small program, which is not limited in the embodiments of the present application.
[0041] In an embodiment of the present application, the target application is used to control the volume type of a certain application. Of course, the target application can be an independent application, or it can be a functional module in a certain target application that has the function of controlling the volume type. Optionally, the target application can be a chat application, a search application, a social application, a media application, a call application, etc., which is not limited in the present application. For example, if the target application is a media application, it can obtain the expected volume type of the media application and the actual volume type of the terminal device where the media application is located; in the case where there is a conflict between the expected volume type and the actual volume type, the expected volume type of the media application is adjusted to obtain the adjusted volume type of the media application; audio is collected and broadcast according to the adjusted volume type. Optionally, a client of the above-mentioned target application is running in the terminal device 10. In other embodiments, the target application may also be a web page. On the terminal device 10 running the web page, the expected volume type of the web page and the actual volume type of the terminal device are obtained; when there is a conflict between the expected volume type and the actual volume type, the expected volume type of the web page is adjusted to obtain the adjusted volume type of the web page; and audio is broadcast according to the adjusted volume type.
[0042] The server 20 is used to provide background services for the client of the target application in the terminal device 10. For example, the server 20 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms, but is not limited to these.
[0043] The terminal device 10 and the server 20 may be directly or indirectly connected via wired or wireless communication, which is not limited in this application. For example, the terminal device 10 and the server 20 may communicate with each other via a network. The network may be a wired network or a wireless network.
[0044] In the method provided in the embodiment of the present application, the execution subject of each step may be a computer device, which refers to an electronic device with data calculation, processing and storage capabilities. The computer device may be Figure 1 The terminal device 10 may also be a server 20.
[0045] Before introducing the technical solution provided by the embodiments of the present application, some volume control methods in the related art are briefly described.
[0046] In the audio and video scenarios of the Android system, in order to provide the best experience in specific scenarios, the volume type is often set, such as the call volume type or the media volume type. The call volume type will avoid echoes, while the media volume type will make music sound better. Since the volume type is a system attribute, when the Android manufacturer customizes the volume type or other third-party applications also set the volume type, the actual volume type that takes effect will not be the volume type expected by the application. At this time, various uncertain performances will appear, such as the Bluetooth headset external speaker, the volume cannot be adjusted directly by pressing the volume button, etc. The following will first explain the Bluetooth headset external speaker scenario. The Bluetooth headset external speaker scenario can be considered that the mobile phone is connected to the Bluetooth headset, but the sound played does not come out of the Bluetooth headset, but comes out of the mobile phone speaker. When there is a volume type conflict, it will cause Bluetooth external speaker. For example, in the call volume type, it is necessary to actively establish a Bluetooth SCO link to allow the sound to be played from the Bluetooth headset. However, if there is a volume type conflict, the application thinks that the current volume type is the media volume type, but it is actually the call volume type. At this time, the external speaker will appear because the Bluetooth headset is not connected. Then explain the scenario where the volume cannot be adjusted directly by pressing the volume button. Because different playbacks correspond to different audio stream types (Stream Type), for example, the stream type of the remote sound played when answering a call is different from the stream type of a normal music player. The call volume type and the media volume type can control different stream types. Pressing the volume button adjusts the playback sound volume of the steam type corresponding to the actual volume type of the current terminal device. If a certain playback stream type is not within the control range of the current volume type, the volume cannot be adjusted. For example, when playing music and answering a call, you will find that pressing the volume button cannot adjust the volume of the music.
[0047] In the related art, for example, a certain voice application will customize the volume type according to the scene. For example, the Bluetooth scene will be forcibly specified as the call volume. Since the Android system is on the mobile phone, the call volume type priority will be higher than the media volume type, so setting the call volume type will most likely succeed, and the volume type conflict can be avoided. However, this method has certain disadvantages. First of all, the Bluetooth scene will definitely use the call volume type, and the sound quality will be damaged when listening to music, affecting the user experience. This is because the music will be processed through echo cancellation under the call volume type, causing the music to be damaged. Secondly, some vehicle-mounted systems (vehicle-mounted terminals) do not support the call volume type, so the application needs to be customized separately for the system, which brings complexity to maintenance. Furthermore, it cannot cover more common scenarios, such as volume type conflicts in non-Bluetooth mode.
[0048] In some embodiments, please refer to Figure 2 , which shows a schematic diagram of a volume control method provided by an embodiment of the present application. Figure 2 As shown in 200, when a conflict occurs between the actual volume type and the expected volume type, the expected volume type is adjusted, and the adjusted volume type is used to produce and broadcast audio. The technical solution provided in the embodiment of the present application can avoid customization for the scene, and can automatically correct the expected volume type, so that users can enjoy the expected sound quality in scenes without volume type conflicts, and can automatically adapt to various complex volume conflict scenes without affecting the basic functions of the application. That is, the present application proposes a method for avoiding volume type conflicts for this scenario, and when a volume type conflict occurs, the volume type expected by the current application is corrected to avoid uncertain performance of the application.
[0049] Please refer to Figure 3 , which shows a flow chart of a volume type control method provided by an embodiment of the present application. The execution subject of the method can be the terminal device 10 introduced above, or the server 20. In the following method embodiment, for the convenience of description, only the execution subject of each step is introduced as a "computer device". The method can include at least one of the following steps (310-330):
[0050] Step 310, obtaining the expected volume type of the application and the actual volume type of the terminal device where the application is located; wherein the expected volume type is the volume type expected by the application, and the actual volume type is the actual volume type of the terminal device.
[0051] In the embodiment of the present application, there is no limitation on the type of application whose volume is to be adjusted. The application may be any application related to audio acquisition or playback, such as a music application, a call application, and the like.
[0052] For the explanation of volume type, please refer to the above explanation. For terminal devices, different applications correspond to different volume types, and applications of the same type may correspond to the same volume type. Exemplarily, if the application is a call application (or other applications with call scenarios), the corresponding volume type should be the call volume type. At this time, the audio is collected or played according to the audio source corresponding to the call volume type, and the stream type of the audio data is the data type corresponding to the call volume type. Of course, in the call scenario, the audio needs to be echo-cancelled to improve the call quality. Exemplarily, if the application is a media application (or other applications related to audio and video playback), the corresponding volume type should be the media volume type. At this time, the audio is collected or played according to the audio source corresponding to the media volume type, and the stream type of the audio data is the data type corresponding to the call volume type. Of course, in the media scenario, there is no need to echo-cancel the audio to ensure the audio effect (for example, some audio effects are reverberation, echo, etc.).
[0053] In some embodiments, the volume type expected by the application refers to the default volume type of the application or the volume type set by the user for the application. Exemplarily, the default volume type of the application is obtained, or the volume type of the application is obtained according to the user's setting.
[0054] In some embodiments, the target application and the application in step 310 are the same application, and the terminal device in step 310 and the above-mentioned terminal device 10 are the same terminal device. That is, for an application, a control module for controlling the volume type of the application is integrated therein. The client of the application where the control module is located (or the server of the application) can implement steps 310 to 330, thereby realizing flexible control of the volume type of the application where it is located.
[0055] In some embodiments, the target application and the application in step 310 are different applications, and the terminal device in step 310 and the terminal device 10 are the same terminal device. That is, for a terminal device, the above application and the above target application (which are two different applications) are running therein. The client of the above target application (or the server of the target application) can implement steps 310 to 330, thereby realizing flexible control of the volume type of other applications on the terminal device where it is located.
[0056] In some embodiments, the target application and the application in step 310 are different applications, and the terminal device in step 310 and the terminal device 10 are different terminal devices. That is, the target application is running on the first terminal device, and the application is running on the second terminal device, and the first terminal device and the second terminal device are different terminal devices. At this time, the first terminal device and the server of the first terminal device can be regarded as the execution subject mentioned above - the computer device, and the first terminal device or the server corresponding to the first terminal device is used to execute steps 310 to 330.
[0057] Specifically, the first terminal device or the server of the first terminal device obtains the expected volume type of the application running on the second terminal device and the actual volume type of the second terminal device, and adjusts the expected volume type of the application in the second terminal device according to the difference between the expected volume type of the application in the second terminal device and the actual volume type of the second terminal device, thereby realizing flexible control of the volume type of the application located in the second terminal device. At this time, the target application running in the first terminal device can be a separate application related to the application in the second terminal device, or the first terminal device can also be regarded as a remote control for adjusting the volume type of the application on the second terminal device. In other embodiments, the first terminal device or the server of the first terminal device can only control the volume type of a specific application running in the second terminal device, or the first terminal device or the server of the first terminal device can control the volume type of all applications running on the second terminal device, which is not limited in this application.
[0058] In some embodiments, the real volume type of the terminal device is obtained. Exemplarily, the system of the terminal device provides an interface for querying the volume type. When the above-mentioned computer device accesses the interface, the real volume type of the terminal device can be queried. Exemplarily, when the target application is only the control module in the above-mentioned application, the control module directly accesses the interface for querying the volume type in the system where the terminal device is located, thereby obtaining the real volume type. At the same time, the control module directly accesses the address storing the volume type in the application where it is located, thereby obtaining the expected volume type of the application. Exemplarily, when the target application and the above-mentioned application are different applications on the same terminal device, the target application directly accesses the interface for querying the volume type in the system where the terminal device is located, thereby obtaining the real volume type. Similarly, the target application directly accesses the interface for querying the volume type in the application, thereby obtaining the expected volume type of the application. Exemplarily, when the target application and the above-mentioned application are different applications on different terminal devices (the two terminal devices have established a certain connection relationship and can transmit information to each other), the target application directly accesses the interface for querying the volume type in the system where the terminal device running the application is located, thereby obtaining the real volume type of the terminal device and the expected volume type of the application.
[0059] Specifically, when there are multiple volume types for applications running in the terminal device, the terminal device sorts the volume types according to their priorities and uses the volume type with the highest priority as the real volume type of the terminal device. For example, there are multiple applications running in the terminal device, including media volume type and call volume type. Since the call volume type has a higher priority than the media volume type, the call volume type is selected as the real volume type of the terminal device.
[0060] In some embodiments, before step 320, the method further includes: when the expected volume type and the actual volume type are inconsistent, determining that there is a conflict between the expected volume type and the actual volume type; when the expected volume type and the actual volume type are consistent, determining that there is no conflict between the expected volume type and the actual volume type.
[0061] Exemplarily, when the expected volume type is a media volume type and the actual volume type is a call volume type, it is determined that there is a conflict between the expected volume type and the actual volume type. Exemplarily, when the expected volume type is a call volume type and the actual volume type is a media volume type, it is determined that there is a conflict between the expected volume type and the actual volume type.
[0062] Exemplarily, when the expected volume type is a media volume type and the actual volume type is a media volume type, it is determined that there is no conflict between the expected volume type and the actual volume type. Exemplarily, when the expected volume type is a call volume type and the actual volume type is a call volume type, it is determined that there is a conflict between the expected volume type and the actual volume type.
[0063] In other embodiments, it is assumed that the volume type can be divided into multiple large groups. For example, the volume type can be divided into multiple groups such as Group A, Group B, Group C, etc. Further, the same large group includes multiple volume types belonging to the same category. Exemplarily, when the expected volume type and the real volume type are in the same large group, it is determined that there is no conflict between the real volume type and the expected volume type. Exemplarily, when the expected volume type and the real volume type belong to different large groups, it is determined that there is a conflict between the real volume type and the expected volume type.
[0064] In other embodiments, it is assumed that the volume type can be divided into a plurality of large groups, and there is a conflict relationship or a non-conflict relationship between different groups. Exemplarily, in the case where there is a conflict relationship between the large groups where the expected volume type and the real volume type are respectively located, it is determined that there is a conflict between the real volume type and the expected volume type. Exemplarily, in the case where there is no conflict relationship between the large groups where the expected volume type and the real volume type are respectively located, it is determined that there is no conflict between the real volume type and the expected volume type.
[0065] Step 320: When there is a conflict between the expected volume type and the actual volume type, the expected volume type of the application is adjusted to obtain an adjusted volume type of the application.
[0066] In some embodiments, the method for adjusting the expected volume type of the application includes the following. The first is to adjust the expected volume type of the application to the real volume type, that is, to keep the expected volume type and the real volume type consistent. The second is to adjust the expected volume type of the application to the third volume type, and at the same time adjust the real volume type to the third volume type, wherein the third volume type is a volume type different from the above-mentioned expected volume type and the real volume type. Exemplarily, the third volume type is the volume type with the highest priority supported in the terminal device. The third is to adjust the expected volume type of the application to the fourth volume type, keep the real volume type unchanged, wherein the fourth volume type and the real volume type do not conflict (the determination of non-conflict here can refer to the above embodiment). The fourth is to keep the expected volume type of the application unchanged, and adjust the real volume type to the fifth volume type, wherein the fifth volume type and the expected volume type do not conflict (the determination of non-conflict here can refer to the above embodiment).
[0067] In some embodiments, when there is no conflict between the expected volume type and the actual volume type, the expected volume type of the application is kept unchanged. At this time, the original expected volume type of the application is still used to collect and broadcast audio.
[0068] Step 330, collecting and broadcasting audio according to the adjusted volume type.
[0069] In some embodiments, audio collection and broadcasting includes but is not limited to at least one of the following: only collecting audio, only playing audio, collecting and playing audio. The audio collection and broadcasting in step 330 should be interpreted broadly, including at least one of collecting audio and playing audio. Of course, the audio is also interpreted broadly. The audio in the embodiments of the present application may refer to real-time audio, such as audio during a call, or may refer to non-real-time audio, such as an audio work that has been published. Of course, data including audio, such as video and screen recording, is also included in the protection scope of the present application.
[0070] In some embodiments, after adjusting the expected volume type to obtain the adjusted volume type, when using the application to collect or play audio, it is necessary to use the data source and stream data corresponding to the adjusted volume type.
[0071] The technical solution provided by the embodiment of the present application obtains the expected volume type of the application and the actual volume type of the terminal device where the application is located. When there is a conflict between the two, the expected volume type of the application is adjusted to obtain the adjusted volume type of the application, and the audio is broadcast according to the adjusted volume type. Since the present application adjusts the expected volume type of the application when the expected volume type of the application conflicts with the actual volume type of the terminal device, the expected volume type of the application does not conflict with the actual volume type of the terminal device, so as to maintain the consistency between the volume type of the application and the actual volume type. This also achieves flexible control of the volume type while improving the adaptability of the application to different scenarios.
[0072] Please refer to Figure 4 , which shows a flow chart of a volume type control method provided by another embodiment of the present application. The execution subject of the method can be the terminal device 10 introduced above, or the server 20. In the following method embodiment, for the convenience of description, only the execution subject of each step is introduced as a "computer device". The method can include at least one of the following steps (410-430):
[0073] Step 410, obtaining the expected volume type of the application and the actual volume type of the terminal device where the application is located; wherein the expected volume type is the volume type expected by the application, and the actual volume type is the actual volume type of the terminal device at present.
[0074] Step 420: When there is a conflict between the expected volume type and the actual volume type, determine the adjusted volume type of the application program according to the actual volume type.
[0075] In some embodiments, when the expected volume type is a first volume type and the actual volume type is a second volume type, the adjusted volume type is determined to be the second volume type; when the expected volume type is the second volume type and the actual volume type is the first volume type, the adjusted volume type is determined to be the first volume type; wherein the first volume type refers to the volume type applied to call scenarios, and the second volume type refers to the volume type applied to media playback scenarios.
[0076] Specifically, the first volume type is the above-mentioned call volume type, and the second volume type is the above-mentioned media volume type. When the expected volume type is the call volume and the actual volume type is the media volume type, the adjusted volume type is determined to be the media volume type; when the expected volume type is the media volume type and the actual volume type is the call volume type, the adjusted volume type is determined to be the call volume type.
[0077] In other embodiments, after the expected volume type of the application is adjusted, the adjusted volume type is kept unchanged unless a situation is encountered where it is necessary to adjust again. This can reduce the number of adjustments to the volume type and reduce the processing overhead of the device.
[0078] Step 430, recording and broadcasting audio according to the recording and broadcasting parameters corresponding to the adjusted volume type.
[0079] In some embodiments, the acquisition and playback parameters include acquisition parameters and playback parameters. The acquisition parameters are parameters involved in the process of acquiring audio, and the playback parameters are parameters involved in the process of playing audio.
[0080] In some embodiments, the acquisition parameters include sampling rate, number of channels, and Audio Source. Of course, these parameters are determined by the volume type, and the specific corresponding relationship is shown in Table 1. In some embodiments, the playback parameters include sampling rate, number of channels, and Stream Type. These parameters are also determined by the volume type, and the specific corresponding relationship is shown in Table 2.
[0081] Table 1 Correspondence between acquisition parameters and volume types
[0082] Acquisition parameters Sampling rate Number of channels Audio Source Call volume type 16k 1 VOICE_COMMUNICATION Media volume type 32k / 44.1k / 48k 1 / 2 MIC
[0083] Table 2 Correspondence between acquisition parameters and volume types
[0084] Playback parameters Sampling rate Number of channels Stream Type Call volume type 44.1k 1 STREAM_VOICE_CALL Media volume type 44.1k / 48k 2 STREAM_MUSIC
[0085] In some embodiments, when the adjusted volume type is the first volume type, the audio is collected according to the collection parameters of the first volume type, and the audio is played according to the playback parameters of the first volume type.
[0086] In some embodiments, when the volume type is adjusted to the first volume type, audio is collected according to the collection parameters of the first volume type, and after the collected audio is not echo-cancelled, the audio is played according to the playback parameters of the first volume type. In some embodiments, an echo cancellation module is installed in the target application. Generally speaking, when the volume type is the first volume type, that is, the call volume type, the audio should be echo-cancelled to ensure the call quality. In the embodiment of the present application, the originally expected volume type is the media volume type, which should not require echo cancellation. Therefore, in order to maintain the original sound quality as much as possible, although it is adjusted to the call volume mode here, the echo cancellation module is not used for echo cancellation.
[0087] In some embodiments, when the adjusted volume type is the second volume type, the audio is collected according to the collection parameters of the second volume type, and the audio is played according to the playback parameters of the second volume type.
[0088] In some embodiments, when the volume type is adjusted to the second volume type, audio is collected according to the collection parameters of the second volume type, echo cancellation is performed on the collected audio, and the audio is played according to the playback parameters of the second volume type. In some embodiments, an echo cancellation module is installed in the target application. Generally speaking, when the volume type is the second volume type, that is, the media volume type, echo cancellation should not be performed on the audio to ensure the sound effect. However, in the embodiment of the present application, the originally expected volume type is the call volume type, which should be subject to echo cancellation. Therefore, in order to ensure the call quality as much as possible, although it is adjusted to the media volume mode here, echo cancellation is still performed through the echo cancellation module. For the specific details of echo cancellation, this application does not go into details.
[0089] A specific example is as follows: when application A plays sound under the media volume type, another application B is started in the middle, and application B sets the volume type to the call volume type. At this time, application A will also adjust its own audio and video to the Audio Source and Stream Type corresponding to the call volume type. If there is a Bluetooth device, a SCO connection will be started (see the following embodiment here), thereby avoiding problems such as volume adjustment not working and Bluetooth external speaker. Even after application B exits, application A does not need to adjust again, avoiding the impact of repeated startup of other applications on application A. Exemplarily, when the working mode (volume type) of application A is the call volume type, and a certain system (the system of the terminal device) does not support the call volume type, application A will adjust the expected volume type to the media volume type, and adjust the audio and video to the Audio Source and Stream Type corresponding to the media volume type.
[0090] Please refer to Figure 5 , which shows a flow chart of a volume type control method provided by another embodiment of the present application. The execution subject of the method can be the terminal device 10 introduced above, or the server 20. In the following method embodiment, for the convenience of description, only the execution subject of each step is introduced as a "computer device". The method can include at least one of the following steps (510-540):
[0091] Step 510: Determine the expected volume type of the application according to the type of the application.
[0092] In some embodiments, when the application is a call application, the expected volume type of the application is determined to be a first volume type. In some embodiments, when the application is a media application, the expected volume type of the application is determined to be a second volume type. The first volume type refers to a volume type applied to a call scenario, and the second volume type refers to a volume type applied to a media playback scenario.
[0093] The media applications in the embodiments of the present application include but are not limited to music applications, video applications, broadcast applications, etc. The call type applications in the embodiments of the present application include but are not limited to voice chat applications, video call applications, and social applications.
[0094] In some embodiments, the expected volume type of the application is built into the application in advance, and the expected volume type of the application can be directly obtained from the application.
[0095] In other embodiments, the type of the application is obtained, and the expected volume type of the application is determined based on the type of the application.
[0096] Step 520, obtaining the expected volume type of the application and the actual volume type of the terminal device where the application is located; wherein the expected volume type is the volume type expected by the application, and the actual volume type is the actual volume type of the terminal device at present.
[0097] Step 530: When there is a conflict between the expected volume type and the actual volume type, the expected volume type of the application is adjusted to obtain an adjusted volume type of the application.
[0098] Step 540: collect and broadcast audio according to the adjusted volume type.
[0099] In some embodiments, before step 540, it also includes: in the presence of an external playback device, determining an audio routing connection mode according to the adjusted volume type; wherein the audio routing connection mode is used to determine a connection mode between the audio and the external playback device; and establishing a connection with the external playback device according to the audio routing connection mode.
[0100] In some embodiments, the audio routing connection mode includes: a first audio routing connection mode and a second audio routing connection mode; when the adjusted volume type is the first volume type, the audio routing connection mode is the first audio routing connection mode, and the first audio routing connection mode is a connection initiated by the application program itself with an external playback device; when the adjusted volume type is the second volume type, the audio routing connection mode is the second audio routing connection mode, and the second audio routing connection mode is a connection initiated by the terminal device itself with an external playback device.
[0101] Exemplarily, in the presence of an external playback device, when the adjusted volume type is the first volume type, the audio routing connection mode is determined to be the first audio routing connection mode, that is, the application program initiates a connection with the external playback device by itself, and establishes a connection with the external playback device, thereby avoiding the occurrence of Bluetooth external speaker under the call volume type.
[0102] Exemplarily, when there is an external playback device and the adjusted volume type is the second volume type, the audio routing connection mode is determined to be the second audio routing connection mode, that is, the terminal device initiates a connection with the external playback device by itself and establishes a connection with the external playback device.
[0103] The external playback device in the embodiment of the present application is a terminal device that is connected to the terminal device and can play audio. The specific category of the external playback device is not limited in the present application. For example, the external playback device includes but is not limited to mobile phones, tablet computers, intelligent voice interaction devices, game consoles, wearable devices, multimedia playback devices, PCs, vehicle-mounted terminals, smart home appliances and other electronic devices.
[0104] The technical method provided in the embodiment of the present application automatically determines the expected volume type of the application according to the type of the application, thereby improving the efficiency of determining the expected volume type. Furthermore, different audio routing connection methods are determined according to the different adjusted volume types, thereby ensuring that no matter what the volume type is, it can automatically establish a connection with the external playback device, thereby ensuring that the audio can be broadcast from the external playback device.
[0105] Please refer to Figure 6 , which shows a block diagram of a volume type control method provided by an embodiment of the present application.
[0106] In some embodiments, Figure 6 As shown in 600, the target application includes a volume type detection module, a volume type decision model and a production and broadcasting module. The volume type detection module is responsible for sensing volume conflict information. The volume type decision module is responsible for deciding the volume type to be used according to the volume type set by the user and the current conflict status of the volume type, and notifying the production and broadcasting module of the result. The production and broadcasting module updates the AudioSource and Stream Type according to the volume type provided by the volume type decision module. If there is a peripheral (external playback device) connected, such as a Bluetooth headset, it is also connected according to the corresponding volume type model.
[0107] Please refer to Figure 7 , which is a schematic diagram showing the working mode of the volume detection module provided by an embodiment of the present application.
[0108] In some embodiments, Figure 7As shown in 700, the volume detection module first obtains the volume type expected by the user. In different scenarios, the user also has a preference for the volume type. For example, in the process of voice chat, the user hopes to use the call volume (that is, the call volume type mentioned above, which has the same meaning). In this way, the system's echo cancellation can specially process the collected sound to avoid echoes. In the music scene, the user hopes to use the media volume (that is, the media volume type mentioned above, which has the same meaning). The media volume can retain the original audio information as much as possible to avoid damage to the music data. The application can obtain the best volume type for the scenario according to the user's usage scenario, and use the volume type as the volume type expected by the user. The application uses the system interface to try to set the system's current volume type (real volume type) to the expected volume type (expected volume type), and notify the acquisition and broadcasting module of the volume type. The acquisition and broadcasting module updates the Audio Source corresponding to the acquisition and the Stream Type corresponding to the playback according to the expected volume type. The volume detection module periodically obtains the actual volume type of the system and compares it with the expected volume type. Since the volume type is a global property of the system and the capabilities of different systems are different, the volume type set by the application may be inconsistent with the actual volume type of the system. It is necessary to periodically obtain the volume type to detect whether there is a conflict between the actual volume type and the expected volume type. When the actual volume type of the system is consistent with the expected volume type, it is considered that there is no conflict and the periodic detection continues. When the actual volume type of the system is different from the expected volume type, it is determined that there is a volume type conflict. There are two main types of volume type conflicts. The first is the expected call volume, which is actually the media volume. At this time, the user hopes to have an echo cancellation effect, but the system may not support the call volume. Therefore, the expected volume type needs to be changed to the media volume. At the same time, the application starts its own echo cancellation module to perform echo cancellation to ensure that the user scenario function is not affected. The second is the expected media volume, which is actually the call volume. At this time, the system may have other applications setting the call volume. Since the call volume priority is greater than the media volume, the media volume set by the user application will be invalid. At this time, if the application continues to use collection and playback according to the media volume, it will cause various problems such as noise in the collected sound, and adjusting the playback volume through the volume key will not work. If the user connects a Bluetooth headset, it will cause the Bluetooth headset connection to fail, and the sound cannot be played from the headset, seriously affecting the customer experience. Therefore, it is necessary to modify the current expected volume type to call volume to ensure that the application functions normally. The echo cancellation in the embodiment of the present application is a set of algorithm programs, which are generally available in the system and application of the terminal device. Most applications will automatically bring their own echo cancellation algorithm, so that the trial range is wider and it is easy to form their own competitiveness.
[0109] Please refer to Figure 8 , which shows a schematic diagram of the working mode of the volume type decision module provided by an embodiment of the present application.
[0110] In some embodiments, Figure 8 As shown in 800, the volume type decision module obtains the expected volume type and volume type conflict information. The volume type conflict information should be empty when it is started for the first time. At this time, the expected volume type is directly notified to the volume type detection module and set to the system. At the same time, the information is also notified to the acquisition and broadcasting module. The acquisition and broadcasting module collects the corresponding Audio Source and plays the Stream Type according to the volume type decision. When the volume type conflict information is not empty, it is necessary to make a decision according to the conflict information. There are mainly two types of conflicts. One is the expected call volume type, which is actually the media volume type. At this time, it means that the user needs to use the echo cancellation capability, and the current system's capability is temporarily unavailable. Therefore, it is necessary to adjust the expected volume type to the media volume type, and notify the echo cancellation module to turn on the echo cancellation. In addition, it is also necessary to notify the acquisition and broadcasting module to update the parameters. The other is the expected media volume type, which is actually the call volume type. At this time, the expected volume type can only be modified to the call volume type, and the echo detection module is notified to turn off the echo cancellation, and the acquisition and broadcasting module is notified to update the parameters.
[0111] When the acquisition and broadcasting parameters are inconsistent with the actual volume type, various uncertainties such as acquisition noise and inability to adjust the playback volume will occur, which seriously affect the application function and experience. Therefore, the acquisition and broadcasting parameters must match the actual volume type of the system. When the volume type detection module detects a volume type conflict, it decides on a new volume type that is consistent with the actual volume type of the system, and notifies the acquisition and broadcasting module of the volume type. The acquisition and broadcasting module will select the corresponding parameters according to the actual volume type of the system to avoid application unavailability.
[0112] In addition, the audio routing needs to be configured in the acquisition and broadcasting module. For external devices, especially Bluetooth devices, the connection methods under different volume types are also different, as follows: Under call volume, applications that need to use Bluetooth actively initiate SCO connections, otherwise the Bluetooth device will be ignored. Under media volume, the system will actively connect to the Bluetooth device without application intervention. Therefore, when the expected volume type is inconsistent with the actual volume type, the Bluetooth device will become unavailable. Therefore, the acquisition and broadcasting module also needs to update the audio routing connection method according to the volume type provided by the volume type decision module.
[0113] The embodiment of the present application uses the above solution to automatically solve the volume type problem without the need for the application to be customized for the scenario, thereby avoiding uncertain behaviors such as the application volume not working and Bluetooth external speaker.
[0114] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.
[0115] Please refer to Fig. 9 , which shows a block diagram of a volume control device provided by an embodiment of the present application. Fig. 9 As shown, the device 900 may include: a volume type acquisition module 910, a volume type adjustment module 920 and an audio acquisition and broadcasting module 930.
[0116] The volume type acquisition module 910 is used to obtain the expected volume type of the application and the actual volume type of the terminal device where the application is located; wherein the expected volume type is the volume type expected for the application, and the actual volume type is the actual current volume type of the terminal device.
[0117] The volume type adjustment module 920 is used to adjust the expected volume type of the application program to obtain the adjusted volume type of the application program when there is a conflict between the expected volume type and the actual volume type.
[0118] The audio collection and broadcasting module 930 is used to collect and broadcast audio according to the adjusted volume type.
[0119] In some embodiments, the volume type adjustment module 920 is configured to determine the adjusted volume type according to the actual volume type.
[0120] In some embodiments, the volume type adjustment module 920 is used to determine that the adjusted volume type is the second volume type when the expected volume type is the first volume type and the actual volume type is the second volume type; and to determine that the adjusted volume type is the first volume type when the expected volume type is the second volume type and the actual volume type is the first volume type; wherein the first volume type refers to the volume type applied to the call scenario, and the second volume type refers to the volume type applied to the media playback scenario.
[0121] In some embodiments, the audio acquisition and broadcasting module 930 is used to acquire and broadcast audio according to the acquisition and broadcasting parameters corresponding to the adjusted volume type; wherein the acquisition and broadcasting parameters include acquisition parameters and playback parameters, the acquisition parameters are parameters involved in the process of acquiring audio, and the playback parameters are parameters involved in the process of playing audio.
[0122] In some embodiments, the audio collection and playback module 930 is used to collect audio according to the collection parameters of the first volume type and play the audio according to the playback parameters of the first volume type when the adjusted volume type is the first volume type; and to collect audio according to the collection parameters of the second volume type and play the audio according to the playback parameters of the second volume type when the adjusted volume type is the second volume type; wherein the first volume type refers to the volume type applied to call scenarios, and the second volume type refers to the volume type applied to media playback scenarios.
[0123] In some embodiments, the audio collection and broadcasting module 930 is further used to not perform echo cancellation on the collected audio after collecting the audio according to the collection parameters of the first volume type.
[0124] In some embodiments, the audio collection and broadcasting module 930 is further used to perform echo cancellation on the collected audio after collecting the audio according to the collection parameters of the second volume type.
[0125] In some embodiments, the volume type acquisition module 910 is further configured to determine an expected volume type of the application program according to the type of the application program.
[0126] In some embodiments, the volume type acquisition module 910 is also used to determine that the expected volume type of the application is a first volume type when the application is a call application; and to determine that the expected volume type of the application is a second volume type when the application is a media application; wherein the first volume type refers to the volume type applied to the call scenario, and the second volume type refers to the volume type applied to the media playback scenario.
[0127] In some embodiments, the volume type adjustment module 920 is configured to keep the expected volume type of the application unchanged when there is no conflict between the expected volume type and the actual volume type.
[0128] In some embodiments, Fig.10 As shown, the device further includes a connection module 940 .
[0129] In some embodiments, the connection module 940 is used to determine the audio routing connection mode according to the adjusted volume type; wherein the audio routing connection mode is used to determine the connection mode between the audio and the external playback device; and establish a connection with the external playback device according to the audio routing connection mode.
[0130] In some embodiments, the audio routing connection mode includes: a first audio routing connection mode and a second audio routing connection mode; when the adjusted volume type is the first volume type, the audio routing connection mode is the first audio routing connection mode, and the first audio routing connection mode is initiated by the application program itself to connect with the external playback device; when the adjusted volume type is the second volume type, the audio routing connection mode is the second audio routing connection mode, and the second audio routing connection mode is initiated by the terminal device itself to connect with the external playback device; wherein, the first volume type refers to the volume type applied to the call scenario, and the second volume type refers to the volume type applied to the media playback scenario.
[0131] In some embodiments, the volume type adjustment module 920 is further used to determine, when the expected volume type and the actual volume type are inconsistent, that there is a conflict between the expected volume type and the actual volume type; and when the expected volume type and the actual volume type are consistent, determine that there is no conflict between the expected volume type and the actual volume type.
[0132] It should be noted that the device provided in the above embodiment, when implementing its functions, is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the content structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device and method embodiments provided in the above embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.
[0133] Please refer to Fig.11 , which shows a block diagram of a computer device 1100 provided in one embodiment of the present application. The computer device 1100 may be any electronic device with data calculation, processing and storage capabilities. The computer device 1100 may be used to implement the above-mentioned volume type control method.
[0134] Typically, the computer device 1100 includes a processor 1101 and a memory 1102 .
[0135] The processor 1101 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. The processor 1101 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field Programmable Gate Array), and PLA (Programmable Logic Array). The processor 1101 may also include a main processor and a coprocessor. The main processor is a processor for processing data in an awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 1101 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 1101 may also include an AI processor for processing computing operations related to machine learning.
[0136] The memory 1102 may include one or more computer-readable storage media, which may be non-transitory. The memory 1102 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 1102 is used to store a computer program, which is configured to be executed by one or more processors to implement the above-mentioned volume type control method.
[0137] Those skilled in the art will understand that Fig.11 The structure shown in the figure does not constitute a limitation on the computer device 1100, and the computer device 1100 may include more or less components than shown in the figure, or combine some components, or adopt a different component arrangement.
[0138] In an exemplary embodiment, a computer-readable storage medium is also provided, in which a computer program is stored, and when the computer program is executed by a processor, the above-mentioned volume type control method is implemented. Optionally, the computer-readable storage medium may include: ROM (Read-Only Memory), RAM (Random Access Memory), SSD (Solid State Drives) or optical disks, etc. Among them, the random access memory may include ReRAM (Resistance Random Access Memory) and DRAM (Dynamic Random Access Memory).
[0139] In an exemplary embodiment, a computer program product is also provided, the computer program product comprising a computer program, the computer program being stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the computer device performs the above-mentioned volume type control method.
[0140] It should be noted that the collection and processing of relevant data (including expected volume type and actual volume type, etc.) in this application should be strictly in accordance with the requirements of relevant national laws and regulations when applied in examples, and the informed consent or separate consent of the personal information subject should be obtained. Subsequent data use and processing should be carried out within the scope of authorization of laws and regulations and the personal information subject.
[0141] It should be understood that the "multiple" mentioned in this article refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. In addition, the step numbers described in this article only illustrate a possible execution sequence between the steps. In some other embodiments, the above steps may not be executed in the order of the numbers, such as two steps with different numbers are executed at the same time, or two steps with different numbers are executed in the opposite order to the diagram. The embodiments of the present application are not limited to this.
[0142] The above description is only an exemplary embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A volume type control method, characterized in that: The method comprises: Obtaining an expected volume type of an application and an actual volume type of a terminal device where the application is located; wherein the expected volume type is the volume type expected of the application, and the actual volume type is the actual current volume type of the terminal device; When there is a conflict between the expected volume type and the actual volume type, adjusting the expected volume type of the application to obtain an adjusted volume type of the application; The audio is collected and broadcast according to the adjusted volume type.
2. The method according to claim 1, characterized in that The step of adjusting the expected volume type of the application to obtain the adjusted volume type of the application includes: The adjusted volume type is determined according to the actual volume type.
3. The method according to claim 2, characterized in that The step of determining the adjusted volume type according to the actual volume type includes: In a case where the expected volume type is a first volume type and the actual volume type is a second volume type, determining that the adjusted volume type is the second volume type; In a case where the expected volume type is the second volume type and the actual volume type is the first volume type, determining that the adjusted volume type is the first volume type; The first volume type refers to a volume type applied to a call scenario, and the second volume type refers to a volume type applied to a media playback scenario.
4. The method according to claim 1, characterized in that: The collecting and broadcasting audio according to the adjusted volume type includes: Produce and broadcast audio according to the production and broadcast parameters corresponding to the adjusted volume type; The acquisition and playback parameters include acquisition parameters and playback parameters. The acquisition parameters are parameters involved in the process of acquiring audio, and the playback parameters are parameters involved in the process of playing audio.
5. The method according to claim 4, characterized in that The step of collecting and broadcasting audio according to the collection and broadcasting parameters corresponding to the adjusted volume type includes: When the adjusted volume type is the first volume type, collecting audio according to collection parameters of the first volume type, and playing audio according to playback parameters of the first volume type; When the adjusted volume type is the second volume type, collecting audio according to collection parameters of the second volume type, and playing audio according to playing parameters of the second volume type; The first volume type refers to a volume type applied to a call scenario, and the second volume type refers to a volume type applied to a media playback scenario.
6. The method according to claim 5, characterized in that After collecting audio according to the collection parameters of the first volume type, the method further includes: No echo cancellation is performed on the collected audio; After collecting the audio according to the collection parameters of the second volume type, the method further includes: Perform echo cancellation on the collected audio.
7. The method according to claim 1, characterized in that Before obtaining the expected volume type of the application and the actual volume type of the terminal device where the application is located, the method further includes: According to the type of the application, an expected volume type of the application is determined.
8. The method according to claim 7, characterized in that The step of determining the expected volume type of the application according to the type of the application includes: In the case where the application is a call application, determining that the expected volume type of the application is a first volume type; In the case where the application is a media application, determining that the expected volume type of the application is a second volume type; The first volume type refers to a volume type applied to a call scenario, and the second volume type refers to a volume type applied to a media playback scenario.
9. The method according to claim 1, characterized in that: The method further comprises: When there is no conflict between the expected volume type and the actual volume type, the expected volume type of the application is kept unchanged.
10. The method according to claim 1, characterized in that In the case where there is an external playback device, the method further includes: Determine an audio routing connection mode according to the adjusted volume type; wherein the audio routing connection mode is used to determine a connection mode between the audio and the external playback device; According to the audio routing connection mode, a connection is established with the external playback device.
11. The method according to claim 10, characterized in that The audio routing connection mode includes: a first audio routing connection mode and a second audio routing connection mode; When the adjusted volume type is the first volume type, the audio routing connection mode is the first audio routing connection mode, and the first audio routing connection mode is that the application program initiates a connection with the external playback device on its own; When the adjusted volume type is the second volume type, the audio routing connection mode is the second audio routing connection mode, and the second audio routing connection mode is that the terminal device initiates a connection with the external playback device by itself; The first volume type refers to a volume type applied to a call scenario, and the second volume type refers to a volume type applied to a media playback scenario.
12. The method according to claim 1, characterized in that The method further comprises: In a case where the expected volume type and the actual volume type are inconsistent, determining that there is a conflict between the expected volume type and the actual volume type; When the expected volume type is consistent with the actual volume type, it is determined that there is no conflict between the expected volume type and the actual volume type.
13. A volume control device, characterized in that: The device comprises: A volume type acquisition module, used to acquire the expected volume type of the application and the actual volume type of the terminal device where the application is located; wherein the expected volume type is the volume type expected for the application, and the actual volume type is the actual volume type of the terminal device at present; A volume type adjustment module, configured to adjust the expected volume type of the application program to obtain an adjusted volume type of the application program when there is a conflict between the expected volume type and the actual volume type; The audio acquisition and broadcasting module is used to acquire and broadcast audio according to the adjusted volume type.
14. A computer device, characterized in that: The computer device comprises a processor and a memory, wherein a computer program is stored in the memory, and the computer program is loaded and executed by the processor to implement the volume type control method according to any one of claims 1 to 12.
15. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is loaded and executed by a processor to implement the volume type control method according to any one of claims 1 to 12.