Audio output method, recording method of media file, and electronic device
Patent Information
- Application Number
- CN202110430850.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-04-21
- Publication Date
- 2026-11-27
- Estimated Expiration
- 2041-04-21
Smart Images

Figure CN115309360B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electronic technology, and in particular to an audio output method, a media file recording method, an electronic device, and a computer-readable storage medium. Background Technology
[0002] Electronic devices (such as mobile phones) can have various audio applications installed, such as music apps, navigation apps, and conferencing apps. In some electronic devices, whenever an application generates an audio playback request, the electronic device will respond to the request and play the corresponding audio for that application. Thus, when multiple applications simultaneously request audio output, the sounds from multiple applications can mix and interfere with each other, negatively impacting the user experience.
[0003] Other electronic devices employ an audio focus mechanism. Under this mechanism, the application that last sends the audio output request outputs the audio, resulting in limited flexibility in audio output. Summary of the Invention
[0004] Some embodiments of this application provide an audio output method, a media file recording method, an electronic device, and a computer-readable storage medium. The following describes this application from multiple aspects, and the embodiments and beneficial effects of the following aspects can be referred to each other.
[0005] In a first aspect, embodiments of this application provide an audio output method for an electronic device, the method comprising: receiving audio output requests from M audio applications on the electronic device (e.g., the operating system of the electronic device receives audio output requests from M audio applications on the electronic device); selecting N target applications from the M audio applications (e.g., the operating system of the electronic device selects N target applications from the M audio applications); and outputting audio data of the N target applications; wherein M is greater than N.
[0006] Essentially, this application's implementation limits the maximum number of applications (referred to herein as "target applications") that output audio simultaneously. When the number M of applications requesting audio output (referred to herein as "candidate applications") exceeds a threshold N, the electronic device filters the candidate applications to limit the number of target applications to N. By limiting the number of target applications, this application's implementation can improve the situation of audio interference between multiple applications in the prior art.
[0007] Furthermore, in existing audio focus mechanisms, the application that last sent the audio output request is determined as the target application for outputting audio. However, in this embodiment, N target applications can be selected from M candidate applications based on any filtering criteria (e.g., user-specified filtering criteria). Therefore, compared to existing audio focus mechanisms, this embodiment can determine the target application for outputting audio in a more flexible manner, thereby improving the user experience.
[0008] In some implementations, N is a positive integer greater than or equal to 2.
[0009] According to the implementation method of this application, multiple target applications (the number of target applications does not exceed N (N≥2)) are allowed to output audio simultaneously, thus satisfying the user's need to listen to multiple audios at the same time.
[0010] In some implementations, selecting N target applications from M audio applications includes: selecting N target applications from M audio applications based on the current working scenario of the electronic device; or, selecting N target applications from M audio applications based on preset application priority information; or, selecting N target applications from M audio applications based on the user's selection operation on the M audio applications.
[0011] According to the embodiments of this application, the target device is determined based on the current working scenario of the electronic device, application priority, or real-time user specification, which can better meet user needs and improve user experience.
[0012] In some implementations, selecting N target applications from M audio applications based on the current working scenario of the electronic device includes: determining the current working scenario of the electronic device; determining scenario-featured applications from the M audio applications based on the current working scenario, wherein the scenario-featured applications are applications required for the current working scenario; and determining N target applications based on the determination result of the scenario-featured applications; wherein the N target applications include at least the scenario-featured applications.
[0013] According to the embodiments of this application, the N target applications include at least the applications required for the current work scenario (i.e., scenario-feature applications), so that the audio output by the electronic device is more in line with the current work scenario, which is beneficial to improving the user experience.
[0014] In some implementations, N target applications are determined based on the determination results of scene feature applications, including: determining the priority of each application in M audio applications based on the determination results of scene feature applications, wherein the priority of scene feature applications is higher than the priority of other applications in the M audio applications; and determining the N audio applications with the highest priority as N target applications according to the priority ranking of the M audio applications, so that the N target applications include at least the scene feature applications.
[0015] In some implementations, determining the current operating scenario of the electronic device includes: determining the current operating scenario based on other electronic devices communicatively connected to the electronic device; or, determining the current operating scenario based on the application currently running on the electronic device; or, determining the current operating scenario based on measurement data from a specific sensor on the electronic device, the specific sensor being used to measure displacement, velocity, and / or acceleration data of the electronic device; or, determining the current operating scenario based on a user-specified operation.
[0016] In some implementations, the current operating scenario of the electronic device includes in-vehicle scenarios, home scenarios, meeting scenarios, sports scenarios, or high-speed rail travel scenarios.
[0017] In some embodiments, the electronic device includes multiple volume control information corresponding to N target applications, each of the N target applications corresponding to one of the multiple volume control information; outputting audio data of the N target applications includes: determining the volume of the target application based on the volume control information of the target application; and outputting the audio data of the target application at the volume.
[0018] In some implementations, the electronic device includes N volume control information entries, with each of the N target applications corresponding one-to-one with one of the N volume control information entries. Therefore, the volume of each target application can be controlled independently.
[0019] In some implementations, the electronic device includes multiple volume control information corresponding to N target applications, wherein each of the multiple volume control information can be determined based on user input.
[0020] According to the embodiments of this application, users can adjust the volume of each application as needed to improve the user experience.
[0021] In some implementations, outputting audio data of N target applications includes playing the audio data of the N target applications through multiple audio playback devices, including electronic devices and / or other devices besides electronic devices.
[0022] In some implementations, playing audio data of N target applications through multiple audio playback devices includes: determining the audio playback device corresponding to each of the N target applications, and playing the audio data of the N target applications based on the determination result of the audio playback device; wherein, determining the audio playback device corresponding to each of the N target applications includes: determining the audio playback device corresponding to the target application based on preset device priority information; or, determining the audio playback device corresponding to the target application based on the number of times the target application is played on the audio playback device.
[0023] In some implementations, the M audio applications are applications other than the system phone application.
[0024] In some implementations, N is determined by the electronic device based on the number of audio playback devices currently communicating with the electronic device.
[0025] Secondly, embodiments of this application provide a method for recording a media file for an electronic device, comprising: when the electronic device outputs audio data from multiple audio applications, receiving a first input, the first input being used to select one or more target applications from the multiple audio applications; and recording a first media file, wherein recording the first media file comprises: recording audio data from one or more target applications to generate the first media file.
[0026] According to the embodiments of this application, when an electronic device outputs audio from multiple audio applications (referred to as "candidate applications"), the electronic device only records the audio of the selected application (referred to as "target application"), and does not record the audio of other candidate applications besides the target application, thereby meeting the diverse needs of users.
[0027] In some implementations, the number of target applications is less than the number of audio applications currently outputting audio.
[0028] In some implementations, when the electronic device outputs audio data from multiple audio applications, the electronic device outputs video data from a first video application; and recording a first media file includes: recording audio data from one or more target applications and recording video data from the first video application to generate a first media file.
[0029] According to the embodiments of this application, when recording video, users can select video data sources and audio data sources, thereby meeting the diverse needs of users.
[0030] Thirdly, embodiments of this application provide an electronic device, including: a memory for storing instructions executed by one or more processors of the electronic device; and a processor, which, when executing the instructions in the memory, causes the electronic device to execute an audio output method provided in any embodiment of the first aspect of this application, or to execute a media file recording method provided in any embodiment of the second aspect of this application.
[0031] Fourthly, embodiments of this application provide a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform an audio output method provided in any embodiment of the first aspect of this application, or to perform a media file recording method provided in any embodiment of the second aspect of this application. Attached Figure Description
[0032] Figure 1 This illustrates an exemplary application scenario of the audio output method provided in this application embodiment;
[0033] Figure 2 An exemplary structural diagram of the focus queue under the audio focus mechanism is shown;
[0034] Figure 3 An exemplary scenario is shown in which a candidate application on an electronic device issues an audio output request, according to an embodiment of this application.
[0035] Figure 4a An exemplary flow of the target application selection method provided in the embodiments of this application is shown. Figure 1 ;
[0036] Figure 4b An exemplary interface diagram for specifying the current working scenario provided in an embodiment of this application is shown;
[0037] Figure 5a An exemplary interface diagram for specifying key applications is shown in an embodiment of this application;
[0038] Figure 5b An exemplary flow of the target application selection method provided in the embodiments of this application is shown. Figure 2 ;
[0039] Figure 6a An exemplary interface for specifying a target application, provided in an embodiment of this application, is shown. Figure 1 ;
[0040] Figure 6b An exemplary interface for specifying a target application, provided in an embodiment of this application, is shown. Figure 2 ;
[0041] Figure 7a A schematic diagram of the focus queue provided in an embodiment of this application is shown. Figure 1 ;
[0042] Figure 7b A schematic diagram of the focus queue provided in an embodiment of this application is shown. Figure 2 ;
[0043] Figure 7c A schematic diagram of the focus queue provided in an embodiment of this application is shown. Figure 3 ;
[0044] Figure 8 An exemplary flowchart of the audio output method provided in an embodiment of this application is shown;
[0045] Figure 9 This application provides an exemplary flow diagram of an electronic device outputting audio to a target application. Figure 1;
[0046] Figure 10a A schematic diagram of the volume adjustment interface provided in an embodiment of this application is shown. Figure 1 ;
[0047] Figure 10b A schematic diagram of the volume adjustment interface provided in an embodiment of this application is shown. Figure 2 ;
[0048] Figure 11 This illustrates an exemplary application scenario two of the audio output method provided in the embodiments of this application;
[0049] Figure 12a This application provides an exemplary flow diagram of an electronic device outputting audio to a target application. Figure 2 ;
[0050] Figure 12b An interface for specifying a preferred playback device, provided in an embodiment of this application, is shown. Figure 1 ;
[0051] Figure 12c An interface for specifying a preferred playback device, provided in an embodiment of this application, is shown. Figure 2 ;
[0052] Figure 13 This illustrates an exemplary application scenario of the media file recording method provided in this application embodiment;
[0053] Figure 14 An exemplary flowchart of a media file recording method provided in an embodiment of this application is shown;
[0054] Figure 15 An exemplary interface diagram for selecting the audio source of a media file, provided in an embodiment of this application, is shown.
[0055] Figure 16 This illustrates an exemplary application scenario two of the media file recording method provided in this application embodiment;
[0056] Figure 17 A schematic diagram illustrating the structure of an electronic device provided in an embodiment of this application;
[0057] Figure 18 A block diagram of the control device provided in an embodiment of this application is shown;
[0058] Figure 19 A schematic diagram of the structure of a System on Chip (SoC) provided in an embodiment of this application is shown. Detailed Implementation
[0059] The specific embodiments of this application will be described in detail below with reference to the accompanying drawings.
[0060] Figure 1 An application scenario of an embodiment of this application is illustrated. Figure 1 In this context, the electronic device 100 (specifically a mobile phone) has multiple audio applications installed, each capable of outputting different audio data (referred to as "audio"). For example, Kuwo Music... TM It can output audio from music programs via ZOOM. TM It can output conference audio, Dragonfly FM TM It can output audio from radio programs and Baidu Maps. TM It can output navigation voice, etc.
[0061] In some electronic devices, whenever an application generates an audio output request (referred to as a "request"), the electronic device will respond to the request and play the corresponding audio for that application. For example, when a user opens Kuwo Music and Baidu Maps, the electronic device plays songs and navigation voice prompts; if the user answers a call on the electronic device at this time, the electronic device simultaneously plays the call audio; then, if a timer set on the electronic device expires, the electronic device simultaneously plays the timer's prompt tone, and so on. In the above exemplary scenario, the audio content of many applications is mixed together and interferes with each other, resulting in a poor user experience.
[0062] To address the issue of intermittent audio playback from multiple applications, some electronic device operating systems (e.g., Android) provide an audio focus mechanism. (See reference) Figure 2 In the audio focus mechanism, only one application (usually the one that last requested the audio) can output audio at any given time. Specifically, the operating system assigns focus to the application that last requested the audio and outputs its audio; other applications lose focus and pause audio output. After the currently outputting audio application (shown as an alarm clock) releases focus, the next application adjacent to it in the focus queue (shown as a Zoom device) gains focus. Because the audio focus mechanism stipulates that an electronic device can only output audio from one application at a time, it solves the problem of mixed audio playback from multiple applications. However, the audio focus mechanism limits the flexibility of audio output to the application that last requested the audio. Furthermore, it fails to meet the needs of users who require simultaneous access to audio from multiple applications (e.g., listening to music and navigation voice simultaneously).
[0063] Therefore, this application provides an audio output method. When an electronic device 100 receives audio output requests from M audio applications, the electronic device 100 selects N target applications from the M audio applications and outputs the audio corresponding to the N target applications, while stopping the output of audio from other audio applications besides the target applications. Where M is greater than N.
[0064] Essentially, this application embodiment limits the maximum number of applications (hereinafter referred to as "target applications") that output audio at the same time (hereinafter referred to as "threshold N"). When the number M of applications requesting audio output (hereinafter referred to as "candidate applications") exceeds the threshold N, the electronic device 100 filters the candidate applications to limit the number of target applications to N. By limiting the number of target applications, this application embodiment can improve the situation of audio interference between multiple applications in the prior art.
[0065] Furthermore, in this embodiment, N target applications can be selected from M candidate applications based on any filtering criteria (e.g., user-specified filtering criteria). Therefore, compared to the existing audio focus mechanism, this embodiment can determine the target application for output audio in a more flexible manner, thereby improving the user experience.
[0066] In some embodiments of this application, N is a positive integer greater than or equal to 2. That is, the embodiments of this application allow multiple target applications (the number of target applications does not exceed N) to output audio simultaneously, thus satisfying the user's need to listen to multiple audio files at the same time.
[0067] The embodiments of this application do not limit the type of electronic device. The electronic device can be a mobile phone, laptop computer, tablet, large-screen device, wearable device (e.g., watch, smart glasses, helmet), desktop computer, augmented reality (AR) / virtual reality (VR) device, personal digital assistant (PDA), etc.
[0068] The embodiments described in this application do not limit the audio application. The audio application can be a telephone application, a timer application, a smart voice application, or a browser application (e.g., Safari). TM System applications such as ) can also be music applications (e.g., Kuwo Music). TM ), video applications (e.g., iQiyi) TM ), conferencing applications (e.g., Zoom) TM ), game applications (e.g., PUBG) TM Tank Battle TM ), payment applications (e.g., Alipay)TM ), short video applications (e.g., TikTok) TM ), social applications (Sina Weibo) TM ), navigation applications (e.g., Baidu Maps) TM ), e-book applications (e.g., Qimao Novels) TM ), radio applications (e.g., Dragonfly FM) TM Third-party applications such as audio output are acceptable, and will not be elaborated on in detail.
[0069] The following example shows an electronic device 100 selecting N target applications from M candidate applications. In this example, M = 3 and N = 2. Figure 3 This illustrates an exemplary scenario where three candidate applications on an electronic device send audio output requests to the electronic device. (Reference) Figure 3 The three candidate applications were ZOOM, Kuwo Music, and Alarm Clock. Among them, ZOOM sent the audio output request earliest, while Alarm Clock sent the audio output request latest.
[0070] (1) Example 1: Electronic device 100 selects 2 target applications from 3 candidate applications based on the current working scenario.
[0071] refer to Figure 4a This example includes the following steps:
[0072] S11: Electronic device 100 determines its current working scenario.
[0073] In some embodiments, the electronic device 100 determines the current operating scenario based on the device information of an external communication device (another electronic device that establishes a communication connection with the electronic device 100). For example, when the electronic device 100 is connected to a car audio system, the electronic device 100 determines that its current operating scenario is a car scenario; when the electronic device 100 is connected to a home gateway, the electronic device 100 determines that its current scenario is a home scenario, etc.
[0074] In some embodiments, the electronic device 100 determines the current work scenario based on the application running on the electronic device 100. For example, when the electronic device 100 is running a PowerPoint application or a meeting application (e.g., ZOOM), the electronic device 100 determines the current work scenario as a meeting scenario; when the electronic device 100 is running a fitness application (e.g., KEEP), the electronic device 100 determines the current work scenario as a workout scenario, etc.
[0075] In some embodiments, the electronic device 100 determines the current working scenario based on measurement data from a specific sensor, wherein the specific sensor is used to measure the displacement, velocity, and / or acceleration data of the electronic device 100. Exemplarily, the specific sensor is a gyroscope sensor, an accelerometer, a GPS sensor, etc. Specifically, when the measurement data from the accelerometer matches the data characteristics of a motion scenario, the electronic device 100 determines the current working scenario as a motion scenario (e.g., walking, running, etc.); when the measurement data from the GPS sensor determines that the current moving speed of the electronic device 100 is within a set range (e.g., 180 km / h to 300 km / h), the electronic device 100 determines the current scenario as a high-speed rail travel scenario.
[0076] Electronic device 100 can also determine the current working scene based on other conditions. For example, the electronic device can collect image data of the current environment through a camera or sound data of the current environment through a microphone, and determine the current working scene through AI algorithms, etc., which will not be elaborated on one by one.
[0077] In the above embodiments, the electronic device 100 automatically senses the current working scenario based on preset conditions, but this application is not limited thereto. In other embodiments, the electronic device 100 can determine the current working scenario based on the user's specified scenario operation. Figure 4b An example of a user-defined action is provided. Users can access this feature by selecting the "Application Audio Management" option in the system settings application. Figure 4b The interface 101 is shown. Interface 101 includes a scene selection list. When the user selects "Meeting Scene" from the scene selection list, the electronic device 100 determines the current working scene as a meeting scene. In this example, the scene specification operation is the user's action on interface 101, but this application is not limited to this. In other embodiments, the scene specification operation can be other user operations, such as sending voice commands to the electronic device 100.
[0078] S12: Electronic device 100 determines the scenario-featured application from three candidate applications based on the current working scenario, wherein the scenario-featured application is the application required for the current working scenario.
[0079] As an example, electronic device 100 stores a "scenario-application" relationship table. Table 1 provides an example of such a table. The "Scenario" column represents the work scenario, and the "Application" column represents the applications required for each work scenario (i.e., scenario-featured applications). After determining the current work scenario, electronic device 100 can determine the scenario-featured applications by querying the "scenario-application" relationship table. For example, after determining that the current work scenario is a high-speed rail travel scenario, electronic device 100 will identify the "alarm clock" application as the scenario-featured application.
[0080] Table 1 "Scenario-Application" Relationship Table
[0081] Scene Application of scene features In-vehicle scenarios Baidu Maps; Dragonfly FM; Kuwo Music Home Scene Smart living; Beautiful homes Meeting scene ZOOM; Tencent Meeting Sports Scene KEEP; High-speed rail travel scenarios Alarm clock; Seven Cats Novels
[0082] Table 1 can be generated by the electronic device based on the application tags of each audio application. These application tags can be defined in the application's property file (e.g., the "AndroidManifest.xml" file for an Android application). Application tags characterize the purpose of the application; for example, Baidu Maps is tagged as "Navigation," and Dragonfly FM and Kuwo Music are tagged as "Entertainment." When determining Table 1, the electronic device uses the application tags to identify the scene-specific applications corresponding to each scenario. For example, the electronic device identifies all applications tagged as "Navigation" and "Entertainment" as scene-specific applications for the in-vehicle scenario. Furthermore, the correspondence between scenarios and application tags can be preset at the factory or specified by the user through system settings.
[0083] Table 1 can also be determined using AI algorithms. During the use of electronic devices, the audio applications running on the devices in various scenarios are statistically analyzed, and the AI model is trained using the statistical results. Subsequently, the electronic device can calculate the usage probability of each application in a preset scenario based on the AI model, and identify the application whose usage probability exceeds a set threshold (e.g., 70%) as the scenario-feature application of that preset scenario.
[0084] S13: Based on the determination result of the scene feature application, the electronic device 100 determines the priority of each candidate application among M candidate applications, wherein the priority of the scene feature application is higher than the priority of other candidate applications.
[0085] Combination Figure 3 The scenario is illustrated. When electronic device 100 is operating in a meeting scenario, it determines the scenario feature application as the ZOOM application according to Table 1. Therefore, electronic device 100 identifies the ZOOM application as the highest priority application among the three candidate applications. Next, electronic device 100 determines the priority of the remaining applications based on the order in which audio output requests are sent. Specifically, applications that send requests later have higher priority; therefore, the alarm clock has a higher priority than Kuwo Music. Finally, the priority of the three candidate applications, from highest to lowest, is: ZOOM, alarm clock, Kuwo Music.
[0086] When electronic device 100 operates in a high-speed rail travel scenario, it determines the scenario's characteristic application as an alarm clock application based on Table 1. Therefore, electronic device 100 identifies the alarm clock application as the highest priority application among the three candidate applications. Next, electronic device 100 determines the priority of the remaining applications based on the order in which audio output requests are sent. Specifically, applications that send requests later have higher priority; therefore, Kuwo Music has a higher priority than ZOOM. Finally, the priority of the three candidate applications, from highest to lowest, is: alarm clock, Kuwo Music, ZOOM.
[0087] It should be noted that when there are multiple scene-feature applications, the electronic device 100 can determine the priority of each scene-feature application based on the order in which audio output requests are issued. Specifically, the application that issues the audio output request later has a higher priority. For example, in one example, the current working scenario of the electronic device is a high-speed rail travel scenario. The scene-feature applications identified by the electronic device include an alarm clock application (used to remind you of the time) and Qimao Novels (used for relaxation during the trip). Among these two applications, the application that issues the audio output request later is the alarm clock application. Therefore, the electronic device determines that the alarm clock has a higher priority than Qimao Novels.
[0088] S14: Electronic device 100 determines 2 target applications based on the priority of 3 candidate applications.
[0089] Specifically, the electronic device 100 sorts the three candidate applications by priority and determines the two applications with the highest priority as the two target applications. Since the priority of the scene feature application is higher than that of the other candidate applications, the two target applications can include at least the scene feature application determined in step S12. Specifically, for the meeting scenario described in step S13, the electronic device 100 determines ZOOM and the alarm clock as the two target applications; for the high-speed rail travel scenario described in step S13, the electronic device 100 determines the alarm clock and Kuwo Music as the two target applications.
[0090] In this example, electronic device 100 selects N target applications from M candidate applications based on the current working scenario. The N target applications include at least the scenario feature applications required for the current working scenario, so that the audio output by electronic device 100 is more in line with the current working scenario, which is beneficial to improving the user experience.
[0091] (2) Example 2: Electronic device 100 selects 2 target applications from 3 candidate applications based on preset application priority information.
[0092] For some critical applications that are important to the user, a higher priority may be required so that the user can hear the audio content output by these applications in a timely manner. These applications typically include calling applications (e.g., system phone applications), notification applications (e.g., timer applications, calendar reminder applications), payment applications (e.g., Alipay), and human-computer interaction applications (e.g., smart voice assistants). For these applications, the electronic device 100 has pre-set priority information, which allows the electronic device 100 to determine these applications as having higher priority.
[0093] In this embodiment, application priority information is attribute information added to the application. For example, when the application's attribute information is "Priority," it indicates that the application has a higher priority; when the application's attribute information is other values or is empty, it indicates that the application has a lower priority. For example, a user can... Figure 5a The interface 102 shown sets the attribute information of the application. For example, after the user checks the checkbox to the right of "Alipay", the attribute information of "Alipay" can be set to Priority. In addition, the electronic device 100 can also set the attribute information of a specific application (e.g., the system phone application) to Priority in its factory settings.
[0094] refer to Figure 5b In this example, the method by which electronic device 100 selects two target applications from three candidate applications includes the following steps:
[0095] S21: Electronic device 100 determines the key application from three candidate applications based on preset application priority information.
[0096] Specifically, electronic device 100 determines key applications based on the attribute information of each candidate application. When the attribute information of an application is "Priority," electronic device 100 determines that application as a key application. Combined with... Figure 3 and Figure 5a In this example, electronic device 100 identifies the alarm clock as a critical application.
[0097] S22: Based on the determination of the key application, the electronic device 100 determines the priority of each of the three candidate applications, wherein the priority of the key application is higher than the priority of the other candidate applications.
[0098] Since the alarm clock is a critical application, the electronic device 100 identifies it as the highest-priority application among the three candidate applications. Next, the electronic device 100 determines the priority of the remaining applications based on the order in which audio output requests are made. Specifically, applications that make requests later have higher priority; therefore, Kuwo Music has a higher priority than ZOOM. Ultimately, the priority of the three candidate applications, from highest to lowest, is: Alarm Clock, Kuwo Music, ZOOM.
[0099] It should be noted that the electronic device 100 can determine the priority of each critical application based on the order in which audio output requests are issued. Specifically, the later an application issues an audio output request, the higher its priority. For example, in a scenario where application one, application two, and application three issue audio output requests in sequence, and all three are critical applications, the electronic device 100 determines their priority order from highest to lowest as application three, application two, and application one.
[0100] S23: Electronic device 100 determines 3 target applications based on the priority of 3 candidate applications.
[0101] Similar to step S13, electronic device 100 identifies the two highest priority applications as N target applications. Therefore, in this example, electronic device 100 identifies the alarm clock and Kuwo Music as the two target applications.
[0102] In this example, the electronic device 100 selects two target applications from three candidate applications based on preset priority information, thus prioritizing the output of audio from key applications, which helps improve the user experience.
[0103] (3) Example 3: Electronic device 100 selects 2 target applications from 3 candidate applications based on the user's selection operation of 3 candidate applications.
[0104] In this example, the user's selection of three candidate applications is a selection operation performed on the application selection interface of the electronic device 100. When the number of candidate applications exceeds a threshold N, the electronic device 100 displays the application selection interface, through which the user can select the application for which the desired audio output (i.e., the target application).
[0105] Figure 6a This example shows an application selection interface. Users can select the application from which they want the audio to be output by checking the checkboxes corresponding to the candidate applications. For example, Figure 6a In the process, the user selected the checkboxes corresponding to ZOOM and Kuwo Music. Therefore, the electronic device 100 identified ZOOM and Kuwo Music as two target applications based on the user's selection.
[0106] In another scenario, the number of applications selected by the user is less than the threshold N. In this case, the electronic device 100 selects the application that requested audio output the latest from the remaining applications, and combines it with the applications selected by the user to form N target applications. Specifically, refer to... Figure 6b When the user only selects the ZOOM application, the electronic device 100 selects the application that requested the audio output the latest from Kuwo Music and the alarm clock application (specifically the alarm clock application), and sets the ZOOM application and the alarm clock application as two target applications.
[0107] In this example, the user's selection operation refers to the user's action on the application selection interface, but this application is not limited to this. In other embodiments, the user's selection operation can be other user actions, such as sending voice commands to an electronic device.
[0108] Examples one to three above are exemplary illustrations of embodiments of this application. Those skilled in the art can make other modifications. For example, the threshold N can be any other value greater than 2 (e.g., 3, 6, etc.), and M can be any other value greater than N (e.g., 5, 8, etc.).
[0109] The method for selecting N target applications from M candidate applications by electronic device 100 has been described above. The specific process of the audio output method provided in the embodiments of this application is described below.
[0110] This application utilizes the concept of an audio focus mechanism to control the audio output process. Unlike existing technologies, which allow only one application to acquire focus at a time (i.e., the number of focuses is 1), this embodiment allows up to N applications to acquire focus at the same time (i.e., the number of focuses can be up to N).
[0111] Specifically, when a candidate application sends an audio output request to the operating system, the operating system determines whether the number M of candidate applications sending the request exceeds a threshold N. If it does not exceed the threshold N, the operating system assigns focus to all applications among the M candidate applications to output the audio of the M candidate applications; if the number M exceeds the threshold N, the operating system selects N target applications from the M candidate applications and assigns focus to the N target applications to output the audio of the N target applications.
[0112] In this application embodiment, the electronic device can play (as "output") the audio of the target application through its own audio playback device (e.g., microphone), or through other audio playback devices (e.g., Bluetooth speaker) that are communicatively connected to the electronic device.
[0113] Furthermore, in this embodiment, the electronic device can set the threshold N as needed. For example, when the electronic device 100 is not connected to any other audio playback devices, the electronic device 100 sets N to a smaller value (e.g., N = 2); when the electronic device 100 is connected to other audio playback devices, the electronic device 100 sets N to a larger value. For example, when the number of other audio playback devices connected to the electronic device 100 is 4, the electronic device 100 sets N to 6. In other examples, the electronic device 100 can also determine the threshold N based on user input.
[0114] The following describes specific embodiments of this application.
[0115] Example 1
[0116] The following still combine Figure 3 The illustrated scenario will be used to introduce the audio output method provided in this embodiment. (See reference...) Figure 3 The ZOOM, Kuwo Music, and Alarm Clock applications on electronic device 100 send audio output requests to the operating system at times T1, T2, and T3, respectively. In this embodiment, N = 2. In other embodiments, N can be other integers, such as 1, 4, 7, etc.
[0117] To facilitate understanding, the focus queue (i.e., audio output queue) at different times in this embodiment is first presented. At time T1, refer to... Figure 7a After ZOOM sends an audio output request to the operating system, the operating system determines that the number of candidate applications sending the request is M=1, which does not exceed the threshold N (N=2). Therefore, the operating system assigns ZOOM the first focus and outputs ZOOM's audio through the focus queue one.
[0118] At time T2, refer to Figure 7b When Kuwo Music sends an audio output request to the operating system, the operating system determines that the number of candidate applications sending the request is M=2, which does not exceed the threshold N (N=2). Therefore, the operating system assigns a second focus to Kuwo Music and outputs Kuwo Music's audio through focus queue two.
[0119] At time T3, after the alarm clock sends an audio output request to the operating system, the operating system determines that the number of candidate applications sending the request, M = 3, exceeds the threshold N (N = 2). Therefore, the operating system readjusts the focus queue to output audio from two target applications. In this embodiment, the audio output queue at time T3 is as follows: Figure 7c As shown, electronic device 100 outputs audio for both the Zoom and alarm clock.
[0120] The following combination Figure 8This document describes the specific steps of the audio output method provided in this embodiment. To highlight the difference between this embodiment and the prior art, the following steps are described in conjunction with the audio output process after time T3.
[0121] S110: Electronic device 100 receives an audio output request sent by an audio application.
[0122] In this embodiment, an alarm clock is used as an example of an audio application. After the alarm clock's set time arrives, it sends an audio output request to the operating system. For example, the alarm clock application sends the audio output request to the operating system by calling a system-provided audio player (e.g., MediaPlayer, AudioTrack, etc. in the Android system). After the audio application sends the audio output request to the operating system, the electronic device 100 receives the audio output request.
[0123] The audio output request sent by an audio application may include the application's identifier (e.g., application name), file information of the requested audio file (e.g., audio file name, audio file address, audio file compression format), etc.
[0124] In this embodiment, an alarm clock application is used as an example of an audio application, but this application is not limited to this. In other embodiments, the audio application can be other applications, such as TikTok, a browser, etc. Furthermore, the triggering conditions for each audio application to send an audio output request to the operating system can be determined according to its own function. For example, for short video applications such as TikTok, the application sends an audio output request to the operating system after the user opens the video playback interface; for music playback applications such as Kuwo Music, the application sends an audio output request to the operating system after the user clicks the "Start Playback" button; for notification applications such as calendar reminders, the application sends an audio output request to the operating system when a set condition is met (e.g., a set time has arrived, a set event has occurred); for applications that play audio online (e.g., a browser), the application sends an audio output request to the operating system after the audio data buffering is complete, and so on. Applications not mentioned can be referred to examples in the prior art, and will not be elaborated upon one by one.
[0125] S120: Electronic device 100 determines that the number M of candidate applications is greater than the threshold N.
[0126] The operating system stores a list of candidate applications. When the operating system receives a new request, it determines whether the request comes from a new application (i.e., an application not on the application list). If so, the operating system increments the current count M by 1 and adds the application identifier of the new application to the application list; otherwise, the operating system maintains the current count M and the application list unchanged.
[0127] In this embodiment, before time T3, the application list includes Kuwo Music and ZOOM, and the number of candidate applications M = 2. When the operating system receives an audio output request from the alarm clock application at time T3, it determines that the alarm clock application is a new application based on the application list, so it updates the application count to M = 3 and adds the application identifier (e.g., application name) of the alarm clock application to the application list.
[0128] After updating the number of applications M (M=3), the operating system compares the number of applications M with the threshold N (N=2) to determine whether the number of candidate applications M that are currently sending requests is greater than the threshold N.
[0129] Additionally, during audio output, when the operating system determines that the audio output of a candidate application has ended, it decrements the application count M by 1 and removes the application identifier of that candidate application from the application list. The operating system's method for determining the end of audio output for a candidate application can refer to existing technologies; this embodiment is merely illustrative. For example, when the operating system receives an audio output end command sent by a candidate application (e.g., the application sends an audio output end command to the operating system by calling the MediaPlayer.stop() method provided by the Android system), the operating system determines that the application has ended audio output; or, when the operating system reads the end marker of the candidate application's audio file, the operating system determines that the application has ended audio output, etc.
[0130] S130: Electronic device 100 selects N target applications from M candidate applications.
[0131] The method by which the operating system selects N target applications from M candidate applications can be referred to in the descriptions of Example 1 (such as steps S11 to S14), Example 2 (such as steps S21 to S23), and Example 3 above, and will not be repeated here.
[0132] In this embodiment, the target applications identified in the meeting scenario of step S14 are used as an example. That is, in this embodiment, the target applications are ZOOM and an alarm clock.
[0133] S140: Electronic device 100 updates the focus queue based on the selection result of the target application.
[0134] As described in step S130, refer to Figure 7c After identifying ZOOM and the alarm clock as target applications, the electronic device 100 maintains the first focus assigned to ZOOM and the second focus assigned to the alarm clock (before time T3, the second focus was assigned to Kuwo Music). Furthermore, the operating system places Kuwo Music after the alarm clock in the focus queue two.
[0135] S150: Electronic device 100 outputs audio for N target applications. (Reference) Figure 9 The process of electronic device 100 outputting audio specifically includes:
[0136] S151: Electronic device 100 determines the volume of each target application based on the volume control information of each target application.
[0137] In this embodiment, the electronic device 100 includes multiple volume control information entries, with each audio application corresponding to different volume control information. For example, a user can... Figure 10a and Figure 10b The method shown sets the volume control information for audio applications. In other words, in this embodiment, the volume control information for each audio application can be determined based on user input.
[0138] Figure 10a This demonstrates one way for users to configure volume control information. Users can access this feature by selecting the "Application Audio Management" option in the system settings app. Figure 10a The interface 101 shown is included. Interface 101 includes volume control bars corresponding to various audio applications. Each position point on the volume control bar can be mapped to a volume adjustment coefficient (as volume control information). The volume control bar also includes a volume control ball, which the user can drag to set the volume corresponding to the audio application. Taking ZOOM as an example, ZOOM corresponds to volume control bar 103. When the user drags the volume control ball on volume control bar 103 to a position such as… Figure 10a When you are in the position shown, you can set the volume adjustment factor of ZOOM to 0.4.
[0139] Figure 10b This demonstrates another way for users to set volume control information. Figure 10b As shown, users can adjust the volume of the target application more quickly. Specifically, when a user operates the electronic device 100 in a predetermined manner, the electronic device 100 displays the interface 104 shown in the figure. The predetermined manner can be understood as a shortcut to bring up the interface 104. The predetermined manner may be, for example, pressing a predetermined button (e.g., a volume button), touching the screen with a predetermined gesture (e.g., a four-finger swipe gesture), or shaking the electronic device 100 in a predetermined direction (a direction perpendicular to the plane on which the electronic device 100 is located), etc., and this application does not limit it.
[0140] The interface 104 includes a volume control bar corresponding to the target application. Users can adjust the volume of each target application in real time by dragging the volume control ball on the bar. Thus, when the electronic device 100 is outputting audio from the target application, the user can... Figure 10b As shown, you can quickly adjust the volume of each target application.
[0141] When the electronic device 100 outputs audio for each target application, the operating system determines the volume of that target application based on its volume control information, and outputs the audio at that volume. Figure 10a Taking ZOOM as an example, this article denotes the audio data requested by ZOOM (e.g., decoded PCM audio data) as: Data_1. When the ZOOM volume control ball is dragged to... Figure 10a At the indicated position, the operating system uses 0.4 × Data_1 as the output audio for ZOOM.
[0142] In this embodiment, each audio application corresponds to an independent volume control information, so the volume of each audio application can be controlled independently. However, this application is not limited to this. In other embodiments, multiple audio applications can share the same audio control information. For example, the electronic device 100 categorizes audio applications into multiple application groups based on their application tags (e.g., Dragonfly FM and 7Cat Novels are categorized into an entertainment application group based on the "Entertainment" tag), and each application group corresponds to a volume control bar. In this way, the user can adjust the volume of all applications within an application group by operating a single volume control bar.
[0143] S152: Electronic device 100 mixes audio from N target applications. Specifically, the operating system superimposes the output audio data from the N target applications to generate the final audio data Data_Final output by electronic device 100.
[0144] refer to Figure 10a The audio data for ZOOM is Data_1, with a volume adjustment factor of 0.4; the audio data for the alarm clock is Data_2, with a volume adjustment factor of 1.6. Therefore, after the mixing operation, the final audio data output by electronic device 100 is Data_Final = 0.4 × Data_1 + 1.6 × Data_1.
[0145] S153: Electronic playback of the mixed audio. Specifically, the operating system sends the audio data Data_Final to the audio output device (e.g., a speaker) of the electronic device 100 to play the audio of the two target applications through the audio output device.
[0146] In summary, when the number of candidate applications M exceeds the threshold N, this embodiment can limit the number of applications (i.e., target applications) that output audio to N. By limiting the number of target applications, this embodiment can improve the situation where multiple applications' audio interferes with each other in the prior art; in addition, this embodiment allows multiple applications to output audio simultaneously (i.e., N≥2), thus meeting the user's need to listen to the audio of multiple applications at the same time.
[0147] Furthermore, in this embodiment, the volume control information for each application can be set independently. This allows users to adjust the volume of each application as needed, improving the user experience. For example, if a user doesn't want to hear voice messages in ZOOM but finds it inconvenient to exit the ZOOM application, they can increase the volume of Kuwo Music and decrease the volume of ZOOM. In this way, the sound of Kuwo Music can drown out the sound of ZOOM, satisfying the user's needs.
[0148] This embodiment is an exemplary description of the technical solution of this application, and those skilled in the art can make other modifications. For example, in other embodiments, the electronic device 100 sets the system phone application as a special case of the audio application and does not include it in the candidate applications (i.e., the candidate applications only include applications other than the system phone application). In this embodiment, the system phone application is not limited by the threshold N, and the electronic device 100 can simultaneously output the audio of the system phone application and N target applications. That is, when a user answers a call through the system phone application, the electronic device 100 can output the audio of N+1 applications.
[0149]
Example 2
[0150] This embodiment improves upon step S150 of Embodiment 1. In step S150 of Embodiment 1, the audio of N target applications is played through the same audio playback device (i.e., electronic device 100 itself); in this embodiment, the audio of N target applications is played through different audio playback devices.
[0151] Figure 11 An exemplary application scenario of this embodiment is shown. Figure 11 In this device, electronic device 100 (specifically a mobile phone) communicates with laptop 120 (device name "Laptop") and speaker 130 (device name "AI speaker") via gateway 110, and communicates with Bluetooth headset 140 (device name "FreeBuds") via Bluetooth.
[0152] Still combined Figure 3 The scenario shown is described below. Unlike Embodiment 1, in this embodiment, N=3. The three target applications currently outputting audio on electronic device 100 are ZOOM, Kuwo Music, and an alarm clock. Specifically, the audio from Kuwo Music is played through speaker 130, the audio from ZOOM is played through laptop 120, and the audio from the alarm clock is played through electronic device 100.
[0153] Figure 11In the illustrated scenario, electronic device 100 (specifically a mobile phone), laptop computer 120, speaker 130, and Bluetooth headset 140 are used as examples of audio playback devices, but this application is not limited to these. In other embodiments, the audio playback device can be a large screen, tablet, car audio system, smartwatch, or other devices, as long as they can play audio. Furthermore, the communication method between electronic device 100 and other audio playback devices can be WiFi, Bluetooth, wired communication, etc.
[0154] In this embodiment, the electronic device 100 includes a device information list, which records device information of other audio playback devices (referred to herein as "backup devices") besides the electronic device 100. A backup device is, for example, an audio playback device that has previously established a communication connection with the electronic device 100. For example, when the electronic device 100 establishes a communication connection with an audio playback device for the first time, the electronic device 100 adds the device information of that audio playback device to the device information list. The device information of the backup device may include device name, device type, device number (assigned by the electronic device 100), etc.
[0155] The device information list also includes the status information of each backup device. For example, when the communication status between a backup device and electronic device 100 changes from disconnected to connected, electronic device 100 updates the device's "status information" to "online"; conversely, when the communication status changes from connected to disconnected, electronic device 100 updates the device's "status information" to "offline". It can be understood that when a device's status information is "online", it indicates that the device is available, and electronic device 100 can play audio from the target application through that device.
[0156] Table 2 shows the comparison with Figure 11 The list of device information corresponding to the scene shown.
[0157] Table 2 Equipment Information List
[0158] serial number Equipment Name Equipment type Status information 001 FreeBuds Bluetooth headsets Online 002 AI speaker Speakers Online 003 Car speaker Car audio Offline 004 TV large screen Offline 005 Laptop laptop Online 006 Watch smartwatch Offline
[0159] Table 2 can be understood as the data preparation process in this embodiment. The following is in conjunction with... Figure 11 The scenario shown illustrates the process of audio output by the electronic device 100 in this embodiment.
[0160] refer to Figure 12a In this embodiment, the process of the electronic device 100 outputting audio for three target applications includes the following steps:
[0161] S210: Electronic device 100 determines the volume of each target application based on the volume control information of each target application.
[0162] This step is essentially the same as step S151 in Embodiment 1, so please refer to the description in step S151 of Embodiment 1, and it will not be repeated here.
[0163] S220: Electronic device 100 determines the audio playback device (i.e., the device used to play the audio of the target application) corresponding to each target application. Several specific examples are given below.
[0164] Example 1: Electronic device 100 determines the audio playback device corresponding to the target application based on preset device priority information.
[0165] For example, the device priority information in electronic device 100 is an "application-device" relationship table stored in electronic device 100. Table 3 provides an example of an "application-device" relationship table. According to Table 3, electronic device 100 can determine the preferred playback device for each target application (i.e., the audio playback device corresponding to the target application). Specifically, the audio playback device located in the same row as the audio application is the preferred playback device for that audio application. For example, "AI speaker" is the preferred playback device for Kuwo Music.
[0166] Table 3 "Application-Device" Relationship Table
[0167]
[0168]
[0169] Figure 12b An exemplary method for setting device priority information is shown. (Reference) Figure 12b The audio management interface 101 of the electronic device 100 includes several audio applications, each with a drop-down list on its right. The drop-down lists display the device names of various backup devices (e.g., the backup devices in Table 2). Users can set device priority information by selecting devices from the drop-down lists.
[0170] Taking Kuwo Music as an example, users can... Figure 12b The interface shown sets the "AI speaker (i.e., speaker 130)" as the priority playback device for Kuwo Music. Thus, when the electronic device 100 outputs audio from Kuwo Music, if speaker 130 is online, the electronic device 100 identifies speaker 130 as the audio playback device corresponding to the target application and plays the Kuwo Music audio through speaker 130; if speaker 130 is offline, the electronic device 100 plays the Kuwo Music audio through its own audio playback device (e.g., a speaker).
[0171] In other implementations, each audio application corresponds to multiple priority playback devices. For example, the Kuwo application corresponds to two priority playback devices: a first priority playback device (e.g., speaker 130) and a second priority playback device (e.g., smartwatch). When the electronic device 100 outputs audio from the Kuwo application, if the first priority playback device is online, the audio from Kuwo Music is played through the first priority playback device; if the first priority playback device is offline, the audio from Kuwo Music is played through the second priority playback device; if both the first and second priority playback devices are offline, the audio from the Kuwo application is played by the electronic device 100 itself.
[0172] Example 2: Electronic device 100 determines the audio playback device corresponding to the target application based on the number of times the target application is played on the audio playback device.
[0173] Electronic device 100 stores the number of times the target application was played on each audio playback device. Taking Kuwo Music as an example, according to the records stored in electronic device 100, Kuwo Music was played 30 times on "Watch", 24 times on "AIspeaker (i.e., speaker 130)", and 10 times on "FreeBuds". There are no records of it being played on other devices.
[0174] When electronic device 100 outputs audio from Kuwo Music, the operating system selects the device that plays Kuwo Music the most times from the currently online devices according to Table 2, and uses it as the corresponding audio playback device for Kuwo Music. In this embodiment, the device that plays Kuwo Music the most times among the currently online devices is speaker 130. Therefore, electronic device 100 plays Kuwo Music audio through speaker 130.
[0175] Since users typically choose their preferred devices to play audio, the number of times the target app is played on audio playback devices can reflect user preferences. In this example, the audio playback device corresponding to the target app is determined based on the number of times the target app is played on audio playback devices, thus better aligning with user preferences and improving the user experience.
[0176] Example 3: Electronic device 100 determines the audio playback device corresponding to the target application based on real-time user input.
[0177] Figure 12c This demonstrates how users can specify audio playback devices in real time. Figure 12c The interface shown is 105. Figure 10b Further improvements to the interface 104 shown, specifically, Figure 12c exist Figure 10b Based on this, device selection options have been added. In other words, Figure 12cIn addition to the volume control bar corresponding to the target application, the device selection list also includes an audio playback device selection list corresponding to the target application. The device selection list includes currently online audio playback devices, such as those identified in Table 2; the device selection list may also include newly discovered devices from electronic device 100, for example... Figure 12c The device is labeled "Glasses," which helps users choose the appropriate audio playback device in a new environment. Users can select the audio playback device for the target application through the operation interface 105. For example, after the user clicks "AI speaker," the electronic device 100 will set "AI speaker" as the audio playback device for Kuwo Music.
[0178] In addition, users can communicate with Figure 10b The same shortcut can be used to bring up Figure 12c The interface shown includes, for example, pressing volume buttons or touching the screen with specific gestures. In other words, this example provides a shortcut for users to select the audio output device.
[0179] S230: Electronic device 100 sends the audio of the target application to the corresponding audio playback device so as to play the audio of the three target applications through multiple audio playback devices.
[0180] refer to Figure 11 In this embodiment, based on the example in step S230, the electronic device 100 determines the speaker 130 as the audio playback device for Kuwo Music, the laptop 120 as the audio playback device for ZOOM, and the electronic device 100 itself as the audio playback device for an alarm clock.
[0181] Thus, the electronic device 100 sends the audio from Kuwo Music to the speaker 130 to play the audio from Kuwo Music through the speaker 130; sends the audio from ZOOM to the laptop 120 to play the audio from ZOOM through the laptop 120; and sends the audio from the alarm clock to its own speaker to play the alarm sound through the speaker.
[0182] In this embodiment, the audio of each target application is output through different audio playback devices. This not only further avoids mutual interference between the audio of different applications, but also allows the audio of the target application to be played through the device desired by the user, thereby improving the user experience.
[0183] It should be noted that this embodiment is an exemplary description of the technical solution of this application, and those skilled in the art can make other modifications.
[0184] For example, in this embodiment, the device for playing audio includes the electronic device 100 itself, but this application is not limited thereto. In other embodiments, the device for playing audio may not include the electronic device 100 itself, but may only include multiple external devices (external devices are audio playback devices other than the electronic device 100).
[0185] For example, in this embodiment, the audio of the three target applications is played through three audio playback devices, with each audio playback device playing the audio of one target application. However, this application is not limited to this; in other scenarios, each audio playback device can play the audio of multiple (e.g., two, three) target applications. For example, in a vehicle scenario, the car audio system can simultaneously play audio from Baidu Maps, Dragonfly FM, and telephone calls. When an external device plays the audio of multiple applications, the electronic device 100 can either mix the audio of multiple applications locally and send the mixed audio to the external device, or send the audio of each application independently to the external device, which will then mix the audio of multiple applications.
[0186]
Example 3
[0187] This embodiment provides a method for recording media files. Figure 13 An exemplary application scenario of this embodiment is shown. Figure 13 In the present example, electronic device 100 is outputting audio from Kuwo Music and ZOOM. An audio recording application (a recorder application in this embodiment) is also running on electronic device 100. The recorder can record the audio being output by electronic device 100.
[0188] In existing technology, a recorder records all audio output by the electronic device 100 (a superimposed audio of various audio sources). For example, when the electronic device 100 is outputting audio from Kuwo Music and ZOOM, the recorder records the superimposed audio of Kuwo Music and ZOOM. However, sometimes users only want to record audio from a specific application, such as only wanting to record audio from ZOOM. Existing technology cannot meet this user need.
[0189] Therefore, this embodiment provides a method for recording audio files (as media files). When the electronic device 100 outputs audio from multiple audio applications (referred to as "candidate applications"), the electronic device 100 only records the audio of the selected application (referred to as "target application"), and does not record the audio of other candidate applications besides the target application, thereby meeting the diverse needs of users.
[0190] The following combination Figure 14 The technical solution of this embodiment is described in detail. (See reference...) Figure 14 The audio recording method in this embodiment includes the following steps:
[0191] S310: Electronic device 100 outputs audio for multiple candidate applications.
[0192] In this embodiment, the electronic device 100 outputs audio from two candidate applications (specifically, Kuwo Music and ZOOM). In other embodiments, the electronic device 100 may output audio from other numbers (e.g., four) of candidate applications. Furthermore, the candidate applications can be other applications besides Kuwo Music and ZOOM, such as iQiyi, Baidu Maps, etc., as long as they can output audio.
[0193] Additionally, the electronic device 100 may output audio from multiple candidate applications, which may include: the electronic device 100 playing the audio of the candidate applications through its own audio playback device (e.g., a speaker), and / or the electronic device 100 playing the audio of the candidate applications through other audio playback devices (e.g., Bluetooth headsets, smartwatches).
[0194] S320: Electronic device 100 receives a first input, the first input being used to select one or more target applications from a plurality of candidate applications.
[0195] In this embodiment, the first input is screen input from the user. Figure 15 An example of screen input is given. Specifically, after clicking the recorder application icon, the user can enter... Figure 15 The interface 106 of the recorder application is shown. Interface 106 includes a "Start Recording" button and checkboxes corresponding to each candidate application. Users can select the target application for which they wish to record audio using the checkboxes.
[0196] refer to Figure 15 (a) After the user checks the ZOOM checkbox, the electronic device 100 identifies ZOOM as the target application. This is understandable. Figure 15 (a) In the example given, the number of target applications is less than the number of candidate applications.
[0197] refer to Figure 15 (b) When the user selects both Kuwo Music and ZOOM checkboxes, the electronic device 100 will identify both Kuwo Music and ZOOM as target applications.
[0198] The above is an exemplary description of the target application selection method, and those skilled in the art can make other modifications. For example, in other embodiments, the number of target applications can be other numbers, such as four; or, in other embodiments, the user selects the target application through voice commands (i.e., the first input is the user's voice input).
[0199] S330: Electronic device 100 records audio for one or more target applications to generate audio file A (as an example of a first media file).
[0200] exist Figure 15 (a) The user selects ZOOM as the target application. Then, after the user clicks the "Start Recording" button on interface 106, the recorder application begins acquiring the audio stream data from ZOOM (i.e., begins recording audio from ZOOM) and uses the ZOOM audio stream data to create audio file A. In other words, Figure 15 (a) In the example given, the audio data in audio file A is the audio data of ZOOM (denoted as Record_Data_1).
[0201] exist Figure 15 (b) The user selects both Kuwo Music and ZOOM as the target applications. When the user clicks the "Start Recording" button on interface 106, the recorder application begins acquiring the audio stream data after mixing the audio from ZOOM and Kuwo Music (i.e., begins recording the audio from Kuwo Music and ZOOM), and uses the mixed audio stream data to create audio file A. In other words, Figure 15 (b) In the example given, the audio data in audio file A is the superimposed audio data of Kuwo Music (audio data is Record_Data_2) and ZOOM (audio data is Record_Data_1), specifically Record_Data_1+Record_Data_2.
[0202] In this embodiment, when the electronic device 100 simultaneously outputs audio from multiple candidate applications, the electronic device 100 can record only the audio of the target application, thereby meeting the diverse needs of users. For example, refer to... Figure 15 (a) When electronic device 100 is outputting audio from Kuwo Music and ZOOM, if the user wishes to record only the ZOOM audio and not the Kuwo Music audio, the user can... Figure 15 (a) Select the target application as shown. In this way, after the electronic device 100 finishes recording, the audio file A will only include the audio from ZOOM and not the audio from Kuwo Music.
[0203] It should be noted that this embodiment is an exemplary description of the technical solution of this application, and those skilled in the art can make other modifications.
[0204] For example, in another embodiment, the electronic device 100 outputs video data of a first video application while simultaneously outputting audio data of multiple candidate applications. The first video application can be one of the multiple candidate applications, or it can be another application besides the multiple candidate applications.
[0205] The following combination Figure 16 The scenario shown illustrates this embodiment. Figure 16In this example, electronic device 100 is running Kuwo Music and ZOOM, which serve as examples of several candidate applications (applications outputting audio on electronic device 100). ZOOM also serves as an example of a first video application (ZOOM's video data is real-time call image data). That is, in this example, the first video application is one of several candidate applications. Additionally, electronic device 100 also runs a video recorder application. Figure 16 The main interface 107 of the video recorder application is shown.
[0206] refer to Figure 16 The main interface 107 of the recorder application includes two video data source options (referred to as "video options"), namely the screen image and the video application currently running on the electronic device 100 (specifically "ZOOM"). Interface 107 also includes radio buttons corresponding to the two video options, allowing the user to select one of the video options as the video data source for the recorder application. Figure 16 The video data source for the video recorder application is ZOOM.
[0207] The main interface 107 of the video recorder application also includes two audio data source options (referred to as "audio options"), which are the two audio applications currently running on the electronic device 100 (i.e., candidate applications, specifically Kuwo Music and ZOOM). Interface 107 also includes checkboxes corresponding to the two audio options, allowing the user to select one or more candidate applications as the audio data source for the video recorder application (the selected candidate application is the target application). Figure 16 The audio data for the video recorder application comes from Kuwo Music. That is, Figure 16 The target application is Kuwo Music.
[0208] After the user clicks the "Start Recording Video" button, the video recorder application begins acquiring video stream data from ZOOM (i.e., begins recording ZOOM video); and simultaneously acquires audio stream data from Kuwo Music (i.e., begins recording Kuwo Music audio), and combines the ZOOM video stream data and Kuwo Music audio stream data into video file B (as an example of the first media file). In other words, Figure 16 In the given example, the video data in video file B is video data from ZOOM, and the audio data in video file B is audio data from Kuwo Music.
[0209] Understandably, in another example, if the user selects both Kuwo Music and ZOOM in the audio options of interface 107, then the audio data in the video file B recorded by the video recorder application will be the superimposed audio data of Kuwo Music and ZOOM.
[0210] pass Figure 16The provided embodiment allows users to select both video and audio data sources when recording video, thus meeting diverse user needs. For example, through... Figure 16 In the provided embodiment, users can use Kuwo Music audio as background audio for ZOOM call images, thereby increasing the fun.
[0211] It should be noted that, Figure 16 The scenario shown is merely an exemplary application scenario of the technical solution of this application, and those skilled in the art can make other modifications. For example, the audio application can be an application other than Kuwo Music and ZOOM, and the first video application can be an application other than the audio application, etc.
[0212] Figure 17 A schematic diagram of the structure of electronic device 100 is shown. Electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) connector 130, a charging management module 140, a power management module 141, a battery 142, antenna 1, antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0213] It is understood that the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0214] Processor 110 may include one or more processing units, such as application processors (APs), modem processors, graphics processing units (GPUs), image signal processors (ISPs), controllers, video codecs, digital signal processors (DSPs), baseband processors, and / or neural network processing units (NPUs). These different processing units may be independent devices or integrated into one or more processors.
[0215] The processor can generate operation control signals based on the instruction opcode and timing signals to control the instruction fetching and execution.
[0216] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0217] In some embodiments, the processor 110 may include one or more interfaces. These interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, and a subscriber identity module (SIM) interface.
[0218] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple I2C buses. The processor 110 can couple to the touch sensor 180K, charger, flash, camera 193, etc., through different I2C bus interfaces. For example, the processor 110 can couple to the touch sensor 180K through the I2C interface, enabling the processor 110 and the touch sensor 180K to communicate through the I2C bus interface, thereby realizing the touch function of the electronic device 100.
[0219] The I2S interface can be used for audio communication. In some embodiments, the processor 110 may include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the I2S interface to enable the function of answering phone calls through a Bluetooth headset.
[0220] The PCM interface can also be used for audio communication, sampling, quantizing, and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via the PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface, enabling the function of answering phone calls through a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
[0221] The UART interface is a universal serial data bus used for asynchronous communication. This bus can be a bidirectional communication bus. It converts the data to be transmitted between serial and parallel communication. In some embodiments, the UART interface is typically used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 via the UART interface to implement Bluetooth functionality. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the UART interface to enable music playback through Bluetooth headphones.
[0222] The MIPI interface can be used to connect the processor 110 to peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI) and a display serial interface (DSI). In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to enable the electronic device 100 to capture images. The processor 110 and the display screen 194 communicate via the DSI interface to enable the electronic device 100 to display images.
[0223] The GPIO interface can be configured via software. It can be configured as a control signal or a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 to a camera 193, a display screen 194, a wireless communication module 160, an audio module 170, a sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.
[0224] It is understood that the interface connection relationships between the modules illustrated in the embodiments of the present invention are merely illustrative and do not constitute a structural limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.
[0225] USB connector 130 is a USB standard-compliant connector used to connect electronic device 100 to peripheral devices. Specifically, it can be a standard USB connector (e.g., Type-C), Mini USB, Micro USB, etc. USB connector 130 can be used to connect a charger to charge electronic device 100, and can also be used for data transfer between electronic device 100 and peripheral devices. It can also be used to connect headphones for audio playback. This connector can also be used to connect other electronic devices, such as AR devices. In some implementations, processor 110 can support Universal Serial Bus (USB), with standards such as USB 1.x, USB 2.0, USB 3.x, and USB 4.
[0226] The charging management module 140 receives charging input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 receives charging input from the wired charger via a USB connector 130. In some wireless charging embodiments, the charging management module 140 receives wireless charging input via the wireless charging coil of the electronic device 100. While charging the battery 142, the charging management module 140 can also supply power to the electronic device via the power management module 141.
[0227] The power management module 141 connects the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, providing power to the processor 110, internal memory 121, display screen 194, camera 193, and wireless communication module 160, etc. The power management module 141 can also monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage current, impedance). In some other embodiments, the power management module 141 may also be located within the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may be located in the same device.
[0228] The wireless communication function of electronic device 100 can be realized through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor, etc.
[0229] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with tuning switches.
[0230] The mobile communication module 150 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1. In some embodiments, at least some functional modules of the mobile communication module 150 may be housed in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 may be housed in the same device.
[0231] The modem processor may include a modulator and a demodulator. The modulator modulates the low-frequency baseband signal to be transmitted into a mid-to-high frequency signal. The demodulator demodulates the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After processing by the baseband processor, the low-frequency baseband signal is transmitted to the application processor. The application processor outputs sound signals through an audio device (not limited to speaker 170A, receiver 170B, etc.) or displays images or videos through the display screen 194. In some embodiments, the modem processor may be a separate device. In other embodiments, the modem processor may be independent of the processor 110 and may be housed in the same device as the mobile communication module 150 or other functional modules.
[0232] The wireless communication module 160 can provide solutions for wireless communication applications on the electronic device 100, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.
[0233] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, enabling electronic device 100 to communicate with networks and other devices via wireless communication technology. The wireless communication technology may include Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Time Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technologies, etc. The GNSS may include the Global Positioning System (GPS), the Global Navigation Satellite System (GLONASS), the BeiDou Navigation Satellite System (BDS), the Quasi-Zenith Satellite System (QZSS), and / or satellite-based augmentation systems (SBAS).
[0234] Electronic device 100 implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0235] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a miniature LED, a microLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, electronic device 100 may include one or N displays 194, where N is a positive integer greater than 1.
[0236] Electronic device 100 can perform shooting functions through ISP, camera 193, video codec, GPU, display 194 and application processor.
[0237] The ISP (Image Signal Processor) is used to process data fed back from the camera 193. For example, when taking a picture, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, and the camera's photosensitive element transmits the electrical signal to the ISP for processing, transforming it into an image visible to the naked eye. The ISP can also perform algorithmic optimization of image noise, brightness, and skin tone. The ISP can also optimize parameters such as exposure and color temperature of the shooting scene. In some embodiments, the ISP can be set in the camera 193.
[0238] Camera 193 is used to capture still images or videos. An object is projected onto a photosensitive element by generating an optical image through the lens. The photosensitive element can be a charge-coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, which is then passed to an ISP for conversion into a digital image signal. The ISP outputs the digital image signal to a DSP for processing. The DSP converts the digital image signal into image signals in standard RGB, YUV, or other formats. In some embodiments, the electronic device 100 may include one or N cameras 193, where N is a positive integer greater than 1.
[0239] Digital signal processors (DSPs) are used to process digital signals. Besides digital image signals, they can also process other digital signals. For example, when electronic device 100 selects a frequency, the DSP can perform Fourier transforms on the frequency energy.
[0240] Video codecs are used to compress or decompress digital video. Electronic device 100 may support one or more video codecs. Thus, electronic device 100 can play or record videos in various encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
[0241] An NPU (Neural Processing Unit) is a computational processor for neural networks (NNs). By borrowing the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it can rapidly process input information and continuously learn on its own. NPUs enable intelligent cognitive applications in electronic devices, such as image recognition, facial recognition, speech recognition, and text understanding.
[0242] The external storage interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external storage interface 120 to perform data storage functions. For example, music, video, and other files can be saved on the external memory card.
[0243] Internal memory 121 can be used to store computer executable program code, which includes instructions. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, applications required for at least one function (such as sound playback, image playback, etc.), etc. The data storage area may store data created during the use of electronic device 100 (such as audio data, phonebook, etc.). Furthermore, internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc. Processor 110 executes various functional applications and data processing of electronic device 100 by running instructions stored in internal memory 121 and / or instructions stored in memory disposed in the processor. Instructions stored in memory 121 may include instructions that, when executed by at least one processor, cause electronic device 100 to implement the audio output method and / or media file recording method provided in the embodiments of this application.
[0244] Electronic device 100 can implement audio functions, such as music playback and recording, through audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and application processor.
[0245] The audio module 170 is used to convert digital audio information into analog audio signals for output, and also to convert analog audio input into digital audio signals. The audio module 170 can also be used for encoding and decoding audio signals. In some embodiments, the audio module 170 may be located in the processor 110, or some functional modules of the audio module 170 may be located in the processor 110.
[0246] The speaker 170A, also known as a "loudspeaker," is used to convert audio electrical signals into sound signals. The electronic device 100 can listen to music or make hands-free calls through the speaker 170A.
[0247] The receiver 170B, also known as the "earpiece," is used to convert audio electrical signals into sound signals. When the electronic device 100 answers a telephone call or voice message, the receiver 170B can be brought close to the ear to listen to the voice.
[0248] Microphone 170C, also known as a "microphone" or "voice transducer," is used to convert sound signals into electrical signals. When making a phone call or sending a voice message, the user can speak by bringing their mouth close to microphone 170C, inputting the sound signal into microphone 170C. Electronic device 100 may have at least one microphone 170C. In some embodiments, electronic device 100 may have two microphones 170C, which, in addition to collecting sound signals, can also perform noise reduction. In other embodiments, electronic device 100 may also have three, four, or more microphones 170C, which can collect sound signals, reduce noise, identify the sound source, and perform directional recording, etc.
[0249] The 170D headphone jack is used to connect wired headphones. The 170D headphone jack can be a USB 130 connector or a 3.5mm Open Mobile Terminal Platform (OMTP) standard interface, a CTIA (Cellular Telecommunications Industry Association of the USA) standard interface.
[0250] Pressure sensor 180A is used to sense pressure signals and convert them into electrical signals. In some embodiments, pressure sensor 180A can be disposed on display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors. A capacitive pressure sensor may include at least two parallel plates with conductive material. When force is applied to pressure sensor 180A, the capacitance between the electrodes changes. Electronic device 100 determines the pressure intensity based on the change in capacitance. When a touch operation is applied to display screen 194, electronic device 100 detects the intensity of the touch operation based on pressure sensor 180A. Electronic device 100 can also calculate the touch position based on the detection signal from pressure sensor 180A. In some embodiments, touch operations applied to the same touch position but with different touch operation intensities can correspond to different operation commands. For example, when a touch operation with an intensity less than a first pressure threshold is applied to the SMS application icon, a command to view an SMS is executed. When a touch operation with an intensity greater than or equal to the first pressure threshold is applied to the SMS application icon, a command to create a new SMS is executed.
[0251] The gyroscope sensor 180B can be used to determine the motion attitude of the electronic device 100. In some embodiments, the gyroscope sensor 180B can determine the angular velocity of the electronic device 100 about three axes (i.e., the x, y, and z axes). The gyroscope sensor 180B can be used for image stabilization. For example, when the shutter is pressed, the gyroscope sensor 180B detects the angle of the shake of the electronic device 100, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to counteract the shake of the electronic device 100 by moving in the opposite direction, thus achieving image stabilization. The gyroscope sensor 180B can also be used in navigation and motion-sensing game scenarios.
[0252] The barometric pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates altitude using the air pressure value measured by the barometric pressure sensor 180C to assist in positioning and navigation.
[0253] The magnetic sensor 180D includes a Hall sensor. The electronic device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip cover. In some embodiments, when the electronic device 100 is a flip phone, the electronic device 100 can detect the opening and closing of the flip cover using the magnetic sensor 180D. Then, based on the detected opening and closing state of the cover or the flip cover, features such as automatic flip unlocking can be set.
[0254] The 180E accelerometer can detect the magnitude of acceleration of electronic device 100 in various directions (typically three axes). When electronic device 100 is stationary, it can detect the magnitude and direction of gravity. It can also be used to identify the posture of electronic devices and applied to applications such as screen orientation switching and pedometers.
[0255] A distance sensor 180F is used to measure distance. Electronic device 100 can measure distance via infrared or laser. In some embodiments, during a shooting scene, electronic device 100 can utilize the distance sensor 180F to measure distance for rapid focusing.
[0256] The proximity sensor 180G may include, for example, a light-emitting diode (LED) and a light detector, such as a photodiode. The LED may be an infrared LED. The electronic device 100 emits infrared light outward through the LED. The electronic device 100 uses the photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 can determine that there is no object near the electronic device 100. The electronic device 100 may use the proximity sensor 180G to detect when a user holds the electronic device 100 close to their ear for a call, so as to automatically turn off the screen to save power. The proximity sensor 180G can also be used in holster mode and pocket mode for automatic unlocking and locking of the screen.
[0257] The ambient light sensor 180L is used to sense the brightness of ambient light. The electronic device 100 can adaptively adjust the brightness of the display screen 194 based on the sensed ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also work with the proximity sensor 180G to detect whether the electronic device 100 is in a pocket to prevent accidental touches.
[0258] The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can utilize the characteristics of the collected fingerprints to achieve fingerprint unlocking, accessing application locks, taking photos with fingerprints, answering calls with fingerprints, etc.
[0259] Temperature sensor 180J is used to detect temperature. In some embodiments, electronic device 100 uses the temperature detected by temperature sensor 180J to execute a temperature handling strategy. For example, when the temperature reported by temperature sensor 180J exceeds a threshold, electronic device 100 performs thermal protection by reducing the performance of a processor located near temperature sensor 180J to reduce power consumption. In other embodiments, when the temperature is below another threshold, electronic device 100 heats battery 142 to prevent abnormal shutdown of electronic device 100 due to low temperature. In still other embodiments, when the temperature is below yet another threshold, electronic device 100 boosts the output voltage of battery 142 to prevent abnormal shutdown due to low temperature.
[0260] Touch sensor 180K, also known as a "touch device," can be located on display screen 194. The touch sensor 180K and display screen 194 together form a touchscreen, also known as a "touchscreen." Touch sensor 180K detects touch operations applied to or near it. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through display screen 194. In other embodiments, touch sensor 180K may also be located on the surface of electronic device 100, in a different position than display screen 194.
[0261] The bone conduction sensor 180M can acquire vibration signals. In some embodiments, the bone conduction sensor 180M can acquire vibration signals from the vibrating bone segments of the human vocal cords. The bone conduction sensor 180M can also contact the human pulse to receive blood pressure signals. In some embodiments, the bone conduction sensor 180M can also be incorporated into headphones to form bone conduction headphones. The audio module 170 can parse the voice signals from the vibrating bone segments of the vocal cords acquired by the bone conduction sensor 180M to realize voice functionality. The application processor can parse heart rate information from the blood pressure signals acquired by the bone conduction sensor 180M to realize heart rate detection functionality.
[0262] Buttons 190 include a power button, volume buttons, etc. Buttons 190 can be mechanical buttons or touch-sensitive buttons. Electronic device 100 can receive button input and generate key signal inputs related to user settings and function control of electronic device 100.
[0263] Motor 191 can generate vibration alerts. Motor 191 can be used for incoming call vibration alerts or for touch vibration feedback. For example, different vibration feedback effects can correspond to touch operations performed on different applications (such as taking photos, playing audio, etc.). Motor 191 can also correspond to different vibration feedback effects for touch operations performed on different areas of the display screen 194. Different application scenarios (such as time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also be customized.
[0264] Indicator 192 can be an indicator light, used to indicate charging status, power changes, or to indicate messages, missed calls, notifications, etc.
[0265] The SIM card interface 195 is used to connect a SIM card. The SIM card can be inserted into or removed from the SIM card interface 195 to make contact with and separate from the electronic device 100. The electronic device 100 can support one or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, etc. Multiple cards can be inserted into the same SIM card interface 195 simultaneously. The multiple cards can be of the same or different types. The SIM card interface 195 is also compatible with different types of SIM cards. The SIM card interface 195 is also compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to realize functions such as calls and data communication. In some embodiments, the electronic device 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
[0266] Now for reference Figure 18 The diagram shows a block diagram of an electronic device 400 according to one embodiment of the present application. The electronic device 400 may include one or more processors 401 coupled to a controller hub 403. In at least one embodiment, the controller hub 403 communicates with the processor 401 via a multi-branch bus such as a Front Side Bus (FSB), a point-to-point interface such as a QuickPath Interconnect (QPI), or a similar connection 406. The processor 401 executes instructions controlling general types of data processing operations. In one embodiment, the controller hub 403 includes, but is not limited to, a Graphics & Memory Controller Hub (GMCH) (not shown) and an Input / Output Hub (IOH) (which may be on a separate chip) (not shown), wherein the GMCH includes memory and a graphics controller and is coupled to the IOH.
[0267] Electronic device 400 may also include a coprocessor 402 and a memory 404 coupled to a controller hub 403. Alternatively, one or both of the memory and GMCH may be integrated within the processor (as described in this application), with memory 404 and coprocessor 402 directly coupled to processor 401 and controller hub 403, which is located on a single chip with IOH.
[0268] Memory 404 may be, for example, Dynamic Random Access Memory (DRAM), Phase Change Memory (PCM), or a combination of both. Memory 404 may include one or more tangible, non-transitory computer-readable media for storing data and / or instructions. The computer-readable storage medium stores instructions, specifically, temporary and permanent copies of those instructions.
[0269] The instructions stored in memory 404 may include, when executed by at least one of the processors, causing the electronic device to perform, as Figure 4a , Figure 5b , Figure 8 , Figure 9 , Figure 12a , Figure 14 The instructions for the method shown.
[0270] In one embodiment, the coprocessor 402 is a dedicated processor, such as, for example, a high-throughput many-integrated core (MIC) processor, a network or communication processor, a compression engine, a graphics processor, general-purpose computing on graphics processing units (GPGPU), or an embedded processor, etc. Optional properties of the coprocessor 402 are indicated by dashed lines. Figure 18 middle.
[0271] In one embodiment, electronic device 400 may further include a Network Interface Controller (NIC) 406. The network interface 406 may include a transceiver for providing a radio interface for electronic device 400 to communicate with any other suitable device (such as a front-end module, antenna, etc.). In various embodiments, the network interface 406 may be integrated with other components of electronic device 400. The network interface 406 can implement the functions of the communication unit in the above embodiments.
[0272] Electronic device 400 may further include input / output (I / O) devices 405. I / O 405 may include: a user interface designed to enable a user to interact with electronic device 400; a peripheral component interface designed to enable peripheral components to also interact with electronic device 400; and / or sensors designed to determine environmental conditions and / or location information related to electronic device 400.
[0273] It is worth noting that, Figure 18 This is merely an example. That is, although... Figure 18 The electronic device 400 shown includes multiple devices such as a processor 401, a controller hub 403, and a memory 404. However, in practical applications, devices using the methods of this application may include only a portion of the devices in the electronic device 400. For example, it may include only the processor 401 and the network interface 406. Figure 18 The properties of the optional devices are shown by dashed lines.
[0274] Now for reference Figure 19 The diagram shown is a block diagram of a System-on-Chip (SoC) 500 according to an embodiment of this application. Figure 19 In the diagram, similar components share the same reference numerals. Additionally, dashed boxes are an optional feature for more advanced SoCs. Figure 19 In this SoC 500, the following components are included: an interconnect unit 550 coupled to the processor 510; a system proxy unit 580; a bus controller unit 590; an integrated memory controller unit 540; a group or one or more coprocessors 520, which may include integrated graphics logic, an image processor, an audio processor, and a video processor; a static random access memory (SRAM) unit 530; and a direct memory access (DMA) unit 560. In one embodiment, the coprocessor 520 includes a dedicated processor, such as, for example, a network or communication processor, a compression engine, general-purpose computing on graphics processing units (GPGPU), a high-throughput MIC processor, or an embedded processor.
[0275] Static random access memory unit 530 may include one or more tangible, non-transitory computer-readable media for storing data and / or instructions. The computer-readable storage medium stores instructions, specifically, temporary and permanent copies of those instructions.
[0276] like Figure 19 The illustrated SoC can be disposed in an electronic device. When the SoC is disposed in an electronic device, static random access memory unit 530 stores instructions that may include: when executed by at least one of the processors, causing the electronic device to perform, as Figure 4a , Figure 5b , Figure 8 , Figure 9 , Figure 12a , Figure 14 The instructions for the method shown.
[0277] In this article, the term "and / or" is merely a description of the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone.
[0278] All methods and implementations of this application can be implemented in the form of software, magnetic files, firmware, etc.
[0279] Program code can be applied to input instructions to perform the functions described herein and generate output information. The output information can be applied to one or more output devices in a known manner. For the purposes of this application, the processing system includes any system having a processor such as, for example, a digital signal processor (DSP), a microcontroller, an application-specific integrated circuit (ASIC), or a microprocessor.
[0280] The program code can be implemented using a high-level procedural language or an object-oriented programming language to communicate with the processing system. Assembly language or machine language can also be used when needed. In fact, the mechanisms described in this paper are not limited to any particular programming language. In either case, the language can be a compiled language or an interpreted language.
[0281] One or more aspects of at least one embodiment can be implemented by representational instructions stored on a computer-readable storage medium, the instructions representing various logics in a processor, which, when read by a machine, cause the machine to create logic for performing the techniques described herein. These representations, referred to as “Intellectual Property (IP) cores,” can be stored on a tangible computer-readable storage medium and provided to multiple customers or production facilities for loading into manufacturing machines that actually manufacture the logic or processor.
[0282] In some cases, an instruction translator can be used to translate instructions from a source instruction set to a target instruction set. For example, an instruction translator can transform (e.g., using static binary transformation, including dynamically compiled dynamic binary transformation), morph, emulate, or otherwise translate instructions into one or more other instructions that will be processed by the core. Instruction translators can be implemented in software, hardware, firmware, or a combination thereof. Instruction translators can be on the processor, off the processor, or partially on and partially off the processor.
Claims
1. An audio output method for an electronic device, characterized in that, The method includes: Receives audio output requests from M audio applications on the electronic device; Based on the current operating scenario of the electronic device, select N target applications from the M audio applications and output the audio data of the N target applications; where M is greater than N; The selection of N target applications from the M audio applications based on the current working scenario of the electronic device includes: Determine the current working scenario of the electronic device, which includes in-vehicle scenario, home scenario, meeting scenario, sports scenario, or high-speed rail travel scenario; Based on the current work scenario, a scenario-featured application is determined from the M audio applications, wherein the scenario-featured application is the application required for the current work scenario; Based on the determination result of the scene feature application, the N target applications are determined; wherein, the N target applications include at least the scene feature application; Furthermore, determining the current operating scenario of the electronic device includes: The current working scenario is determined based on other electronic devices that are communicatively connected to the electronic device; or... The current working scenario is determined based on the application currently running on the electronic device; or... The current working scenario is determined based on measurement data from specific sensors on the electronic device, wherein the specific sensors are used to measure the displacement, velocity, and / or acceleration data of the electronic device.
2. The method according to claim 1, characterized in that, N is a positive integer greater than or equal to 2.
3. The method according to claim 1, characterized in that, The determination result based on the scene features determines the N target applications, including: Based on the determination result of the scene feature application, the priority of each application in the M audio applications is determined, wherein the priority of the scene feature application is higher than the priority of other applications in the M audio applications; Based on the priority ranking of the M audio applications, the N audio applications with the highest priority are determined as the N target applications, so that the N target applications include at least the scene feature applications.
4. The method according to any one of claims 1 to 3, characterized in that, The electronic device includes multiple volume control information corresponding to the N target applications, and each target application in the N target applications corresponds to one of the multiple volume control information. The output of the audio data for the N target applications includes: The volume of the target application is determined based on the volume control information corresponding to the target application; The audio data of the target application is output at the specified volume.
5. The method according to claim 4, characterized in that, The electronic device includes N volume control information, and the N target applications correspond one-to-one with the N volume control information.
6. The method according to claim 4, characterized in that, The electronic device includes multiple volume control information corresponding to the N target applications, wherein each of the multiple volume control information can be determined based on user input.
7. The method according to any one of claims 1 to 6, characterized in that, The output of the audio data for the N target applications includes: The audio data of the N target applications is played through multiple audio playback devices, including the electronic device and / or other devices besides the electronic device.
8. The method according to claim 7, characterized in that, The step of playing audio data from the N target applications through multiple audio playback devices includes: Determine the audio playback device corresponding to each of the N target applications, and play the audio data of the N target applications based on the determination result of the audio playback device; The step of determining the audio playback device corresponding to each of the N target applications includes: Based on preset device priority information, the audio playback device corresponding to the target application is determined; or... The audio playback device corresponding to the target application is determined based on the number of times the target application is played on each of the audio playback devices.
9. The method according to any one of claims 1 to 8, characterized in that, The M audio applications are applications other than the system telephone application.
10. The method according to any one of claims 1 to 9, characterized in that, N is determined by the electronic device based on the number of audio playback devices currently communicating with the electronic device.
11. An electronic device, comprising: A memory for storing instructions executed by one or more processors of the electronic device; A processor, when executing the instructions in the memory, causes the electronic device to perform the audio output method according to any one of claims 1 to 10.
12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed on a computer, cause the computer to perform the audio output method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Audio mixing control method and apparatus for Wince vehicle-mounted multimedia
CN104023305A
Audio playing method and device, electronic device and storage medium
CN109445740A
Audio playing method and device, computer equipment and storage medium
CN111142838A
Method, device and system for controlling multi-channel audio playing, vehicle and storage medium
CN111327990A
Screen recording method and screen recording device for electronic terminal
CN111858277A
