An audio output device management method and an electronic device

By introducing an audio output device management method into the electronic device, detecting user operations and switching to the physical output device, the problem of virtual output devices not responding to volume adjustment is solved, and the human-computer interaction efficiency is improved.

CN118409725BActive Publication Date: 2025-06-13HONOR DEVICE CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202410313518.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-18
Publication Date
2025-06-13
Estimated Expiration
2044-03-18

AI Technical Summary

Technical Problem

When electronic devices use virtual audio output devices, human-computer interaction efficiency is low, especially when users try to adjust the volume, the volume adjustment problem may occur.

Method used

By introducing an audio output device management method into the electronic device, detecting user operations and displaying prompt boxes when necessary, automatically switch to the physical output device in response to the volume adjustment operation, improving human-computer interaction efficiency.

Benefits of technology

It effectively solves the problem that the virtual output device does not respond to the volume adjustment operation, improves the human-computer interaction efficiency of electronic devices when adjusting the volume, and reduces the user's ineffective operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118409725B_ABST
    Figure CN118409725B_ABST
Patent Text Reader

Abstract

An embodiment of the present application provides a method for managing an audio output device and an electronic device, which relates to the technical field of devices. It solves the problem of poor human-computer interaction efficiency when the playback device is a virtual audio output device. The specific solution is as follows: The electronic device includes a first output device and a second output device; the first output device is set as the playback device; when the playback device is the first output device, in response to a first operation of the user to adjust the volume, a first pop-up window is displayed, and the first pop-up window includes information that the playback device is the first output device; the second output device is set as the playback device, and the volume of the second output device is a first value; when the playback device is the second output device, in response to a second operation of the user to adjust the volume, the volume of the second output device is changed from the first value to a second value, and no prompt pop-up window is displayed, and the second value is different from the first value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the technical field of devices, and in particular, to a method for managing audio output devices and an electronic device. Background Art

[0002] Virtual output devices can be created in an electronic device. Among them, the virtual output device can utilize the playback capabilities provided by the physical output device in the electronic device to realize diversified audio output services and improve the intelligence level of the electronic device.

[0003] However, when the electronic device sets the virtual output device as the playback device, in some scenarios, such as when the user instructs to adjust the volume, there is a problem of poor human-computer interaction efficiency. Summary of the Invention

[0004] The embodiments of the present application provide a method for managing audio output devices and an electronic device, which are used to improve the problem of poor human-computer interaction efficiency during the use of virtual audio output devices by the electronic device.

[0005] To achieve the above object, the embodiments of the present application adopt the following technical solutions:

[0006] In a first aspect, a method for managing audio output devices provided by the embodiments of the present application is applied to an electronic device. The above electronic device includes multiple audio output devices, for example, a first output device and a second output device. Among them, the second output device is a device with its own playback capabilities, and can also be called a physical output device. For example, it can be a speaker, a headphone, etc. The first output device is a device that provides audio output services based on the playback capabilities of other output devices, and can also be called a virtual output device.

[0007] The electronic device can set the first output device or the second output device as the playback device. Among them, the playback device is an audio output device in the electronic device that is actually used to process and play audio data, and can also be called an AudioEndPoint.

[0008] When the first output device is set as the playback device, after the first output device processes the audio data, the other output device plays the audio data. During the period when the playback device is the first output device, in response to a first operation of the user instructing to adjust the volume, such as the user's operation on the volume control bar or the mute control, the electronic device can display a first pop-up window, and the first pop-up window includes information that the playback device is the first output device.

[0009] In some examples, the first output device does not respond to an operation indicating volume adjustment. After the user performs an operation indicating volume adjustment, the volume at which the electronic device actually plays audio remains unchanged. That is, volume adjustment fails. In the scenario of volume adjustment failure, by displaying a first pop-up window after the first operation, it can be prompted that there is an association between volume adjustment failure and the first output device, avoiding a large number of ineffective operations when the user solves the volume adjustment problem. Thus, the human-computer interaction efficiency is improved.

[0010] In some embodiments, after the electronic device displays the first pop-up window, it can also automatically set the second output device as the playback device. When the playback device is the second output device, the second output device processes and plays the audio data. Additionally, during the period when the playback device is the second output device, in response to a second operation by the user to adjust the volume, the volume of the second output device is changed from a first value to a second value, and no prompt pop-up window is displayed, where the second value is different from the first value.

[0011] In the above embodiments, the playback device is set as a physical output device whose volume can be adjusted. In this way, the electronic device can respond to an operation by the user indicating volume adjustment and directly adjust the volume at which the electronic device actually plays audio, which can also be referred to as adjusting the volume of the electronic device, improving the human-computer interaction efficiency of the electronic device.

[0012] In some other embodiments, the first pop-up window includes a target control corresponding to the second output device. After the electronic device displays the first pop-up window and detects an operation by the user on the target control, it can set the second output device as the playback device.

[0013] In the above embodiments, by guiding the user to select other output devices whose volume can be adjusted as the playback device, the electronic device can respond to an operation by the user indicating volume adjustment, improving the human-computer interaction efficiency of the electronic device.

[0014] In other embodiments, after the electronic device displays the first pop-up window, it can also respond to a fourth operation and set the second output device as the playback device. Among them, the above fourth operation can also be other operations by the user indicating to set the second output device as the playback device. For example, the user clicks on an audio icon to trigger the display of an audio control box. Then, in the audio control box, an operation to set the second output device as the playback device.

[0015] In some embodiments, the volume of the first output device is the first value. After receiving the first operation, in addition to displaying the first pop-up window, the electronic device can also respond to the first operation by the user indicating volume adjustment and update the volume of the first output device from the first value to a second value, where the second value is different from the first value.

[0016] In the above embodiments, when the playback device is the first output device, the volume of the electronic device can be adjusted by solving the problem that the first output device does not respond to the first operation.

[0017] In some examples, when the volume adjustment is successful, the first pop-up window can also be displayed to prompt that the playback device is the first output device and to remind the user whether they need to switch to other audio output devices.

[0018] It can be understood that during the period when the playback device is the first output device, after the volume of the audio actually played by the electronic device is adjusted, the audio playback problem actually faced by the user may still not be solved.

[0019] Exemplarily, during the process of playing music audio on the electronic device, the conference application is enabled. Since the music audio will interfere with the conference application, the user can instruct the electronic device to set the first output device as the playback device to achieve the effect of filtering out the music audio. After that, the user often forgets that the playback device is the first output device and also forgets to switch the playback device to other audio output devices, and the first output device will continue to filter out the music audio.

[0020] In this scenario, if the user then instructs the electronic device to play music audio, there will be a problem of not hearing any sound. To solve the above problem, most users will adjust the volume. Obviously, even if the volume of the audio actually played by the electronic device is increased, the expected effect of the user cannot be achieved.

[0021] It can be seen that in this scenario, by prompting that the playback device is the first output device to guide the user to switch to other audio output devices, the problem that the audio playback effect does not meet the user's expectations can be solved, a large number of invalid operations can be avoided, and the human-computer interaction efficiency can be improved.

[0022] In some embodiments, the electronic device further includes a third output device, and the third output device is also a physical output device. Taking the third output device as an example to provide audio playback capabilities for the first output device. Before receiving the first operation, the volumes of the second output device and the third output device are both the first value; after updating the volume of the first output device from the first value to the second value, in response to the user's third operation, the third output device is set as the playback device, and the volume value of the third output device has become the second value; in response to the user's fourth operation, the second output device is set as the playback device, and the volume value of the second device is the first value.

[0023] In the above embodiments, when the first output device is a playback device, the electronic device adjusts the volume of the third output device (the device that provides playback capabilities for the first output device), achieving the effect that the volume of the first output device can be adjusted, solving the problem that the volume of the first output device cannot be adjusted, and improving the human-computer interaction efficiency of the electronic device.

[0024] In some embodiments, the electronic device includes a first application. The electronic device can respond to user operations and run the first application in the foreground. After running the first application, a first output device is created and the first output device is set as the playback device. Exemplarily, the electronic device can create the first output device when it first runs the first application in the foreground after leaving the factory or after restoring the factory settings.

[0025] After setting the first output device as the playback device, a second pop-up window is displayed. The second pop-up window includes information indicating that the electronic device has set the first output device as the playback device.

[0026] In the above embodiments, when the electronic device first runs the first application, it will automatically set the first output device as the playback device. At the same time, it can also prompt through the second pop-up window that the first output device has been set as the playback device, avoiding the user mistakenly thinking that the device is faulty due to a failed volume adjustment when they are not aware of the first output device, and generating unnecessary repairs.

[0027] In other embodiments, the user can also manually instruct to configure the first output device as the playback device to use the diversified audio output services provided by the first output device.

[0028] In some embodiments, the electronic device includes a second application and an operating system. The second application sends a first registration request to the operating system. The first registration request is used to register for listening to changes in the playback device. After setting the first output device as the playback device, the operating system sends the device information of the first output device to the second application. The second application responds to the device information of the first output device and sends a second registration request to the operating system for registering for listening to operations for controlling the volume change. In response to a first operation by the user to adjust the volume, the operating system sends a first notification to the second application. The first notification includes information indicating that the first operation has been detected. The second application responds to the first notification and triggers the display of the first pop-up window.

[0029] In some embodiments, the electronic device further includes a third output device. The first output device provides an audio output service based on the playback capabilities of the third output device. After triggering the display of the first pop-up window, the second application controls the volume of the third output device corresponding to the first output device through the audio driver in the kernel state of the operating system.

[0030] In some embodiments, the operating system receives a fourth operation instructing to set a second output device as the playback device; the operating system sends the device information of the second output device to the second application; the second application sends an unregistration request to the operating system, and the unregistration request is used to listen for operations to control volume changes; the operating system receives a second operation in which the user instructs to adjust the volume; the operating system adjusts the volume of the second output device.

[0031] In a second aspect, an audio output device management method provided by an embodiment of the present application is applied to an electronic device, and the electronic device includes a first output device, a second output device, and a third output device; the volumes of the first output device, the second output device, and the third output device are all a first value; the method includes: setting the first output device as the playback device; in response to a first operation in which the user instructs to adjust the volume, changing the volume of the first output device from the first value to a second value; in response to a fourth operation of the user, setting the second output device as the playback device, and the volume of the second output device is the first value; in response to a third operation of the user, setting the third output device as the playback device, and the volume of the third output device changes from the first value to the second value.

[0032] In the above embodiment, when the first output device is the playback device, the electronic device adjusts the volume of the third output device (the device providing playback ability for the first output device) to adjust the volume of the first output device, solves the problem that the first output device cannot adjust the volume, and improves the human-computer interaction efficiency of the electronic device.

[0033] In some embodiments, after receiving the first operation in which the user instructs to adjust the volume, a first pop-up window may also be displayed.

[0034] In some embodiments, a second application and an operating system are included in the electronic device, and the second application sends a first registration request to the operating system, and the first registration request is used to register for listening for changes in the playback device. After setting the first output device as the playback device, the operating system sends the device information of the first output device to the second application; in response to the device information of the first output device, the second application sends a second registration request to the operating system for registering for listening for operations to control volume changes; in response to a first operation in which the user instructs to adjust the volume, the operating system sends a first notification to the second application, and the first notification includes information indicating that the first operation is detected; in response to the first notification, the second application controls the volume of the third output device corresponding to the first output device through the audio driver in the kernel state of the operating system.

[0035] In a third aspect, an embodiment of the present application provides an electronic device, including a processor and a memory, where the memory is used to store code instructions; the processor is used to run the code instructions so that the electronic device executes the methods described in the first aspect, the second aspect, and any implementation manner thereof.

[0036] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium storing instructions, which, when executed, cause a computer to execute the methods described in the first aspect, the second aspect, and any implementation manner thereof.

[0037] In a fifth aspect, a computer program product includes a computer program, which, when run, causes a computer to execute the methods described in the first aspect, the second aspect, and any implementation manner thereof.

[0038] It should be understood that the technical solutions of the second aspect to the fifth aspect of the present application correspond to those of the first aspect of the present application, and the beneficial effects obtained by each aspect and the corresponding feasible implementation manners are similar, so they will not be elaborated herein. Description of the Drawings

[0039] Figure 1 One of the schematic structural diagrams of a notebook computer provided by an embodiment of the present application;

[0040] Figure 2 Another schematic structural diagram of a notebook computer provided by an embodiment of the present application;

[0041] Figure 3 A scenario example diagram for viewing audio output devices that can be selected as playback devices when the audio processing application has not been run in the notebook computer provided by an embodiment of the present application;

[0042] Figure 4 A scenario example diagram for the first run of the audio processing application after the notebook computer provided by an embodiment of the present application leaves the factory;

[0043] Figure 5 An example diagram of an audio output reminder notification provided by an embodiment of the present application;

[0044] Figure 6 One of the signaling interaction diagrams between the computer management application and the OS in the notebook computer during the first run of the audio processing application after the notebook computer provided by an embodiment of the present application leaves the factory;

[0045] Figure 7 Another signaling interaction diagram between the computer management application and the OS in the notebook computer during the first run of the audio processing application after the notebook computer provided by an embodiment of the present application leaves the factory;

[0046] Figure 8Scenario example diagram for configuring headphones as a playback device provided by an embodiment of the present application;

[0047] Figure 9 During the process of configuring headphones as a playback device provided by an embodiment of the present application, signaling interaction diagram between the computer management application and the OS in the laptop;

[0048] Figure 10 Scenario example diagram for configuring a virtual output device as a playback device provided by an embodiment of the present application;

[0049] Figure 11 During the process of configuring a virtual output device as a playback device provided by an embodiment of the present application, signaling interaction diagram between the computer management application and the OS in the laptop;

[0050] Figure 12 One of the scenario example diagrams for a user to indicate volume adjustment when the playback device is a virtual output device provided by an embodiment of the present application;

[0051] Figure 13 For Figure 12 Another example diagram of the audio output reminder notification in

[0052] Figure 14 Scenario example diagram for a user to indicate volume adjustment when the playback device is a physical output device provided by an embodiment of the present application;

[0053] Figure 15 For Figure 12 Signaling interaction diagram between the computer management application and the OS in the laptop in the scenario shown in

[0054] Figure 16 Another scenario example diagram for a user to indicate volume adjustment when the playback device is a virtual output device provided by an embodiment of the present application;

[0055] Figure 17 For Figure 16 Signaling interaction diagram between the computer management application and the OS in the laptop in the scenario shown in

[0056] Figure 18 Another scenario example diagram for a user to indicate volume adjustment when the playback device is a virtual output device provided by an embodiment of the present application;

[0057] Figure 19 For Figure 18 Signaling interaction diagram between the computer management application and the OS in the laptop in the scenario shown in

[0058] Figure 20Scenarios for the user to indicate volume adjustment when the playback device is a virtual output device provided by the embodiments of the present application, from Figure 1 to Figure 4;

[0059] Figure 21 Schematic structural diagram of a chip system provided by the embodiments of the present application. Detailed implementation manners

[0060] Hereinafter, the terms "first" and "second" are only used for descriptive purposes, and cannot be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more of such features. In the description of the embodiments of the present application, unless otherwise specified, the meaning of "a plurality" is two or more.

[0061] Meanwhile, in the embodiments of the present application, words such as "exemplary" or "for example" are used to represent examples, illustrations or explanations. Any embodiment or design solution described as "exemplary" or "for example" in the embodiments of the present application should not be construed as being more preferred or having more advantages than other embodiments or design solutions. Exactly speaking, using words such as "exemplary" or "for example" aims to present relevant concepts in a specific manner for easy understanding.

[0062] An audio output management method is provided in the embodiments of the present application. The audio output management method can be applied to an electronic device. Among them, the above-mentioned electronic device can create a virtual output device (such as called the first output device), and the virtual output device can utilize the playback ability of the hardware of the electronic device to achieve more diversified audio output services.

[0063] Exemplarily, the electronic device in the embodiments of the present application can be a portable computer, a tablet computer, a desktop type, a laptop, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, and a device with an audio output device such as a cellular phone, a personal digital assistant (PDA), a media player, etc. The embodiments of the present application do not impose special restrictions on the specific form of the electronic device. In subsequent embodiments, mainly taking the electronic device as a notebook computer as an example, the specific implementation details are described.

[0064] Next, taking the electronic device as a notebook computer as an example, in combination with Figure 1 introduce the structure of the notebook computer provided by the embodiments of the present application.

[0065] As Figure 1As shown in the figure, a laptop computer may include a central processing unit (CPU), an audio codec, and a physical audio output device (which may be simply referred to as a physical output device). Among them, the physical output device may be a speaker, a headphone, etc., and may also be referred to as a second output device or a third output device.

[0066] Among them, the CPU is connected to the audio codec, and communication can be carried out between the CPU and the audio codec. In addition, after the physical output device is connected to the laptop computer, it is connected to the audio codec.

[0067] Exemplarily, the audio codec may receive audio data from the CPU, and encode and decode the audio data to convert the audio data into a format playable by the physical output device. In addition, the audio codec can also manage the physical output device. For example, the audio codec can pass the audio data to the physical output device for playback. For another example, the audio codec can control the physical output device to adjust the playback volume.

[0068] It can be understood that the above physical output device may be a peripheral device configured in the laptop computer. In laptop computers with different configurations, the physical output device may be different. For example, for a laptop computer already configured with a speaker, if the user configures the laptop computer to be connected to a headphone, the physical output devices of the laptop computer include the speaker and the headphone. If the user configures the laptop computer to be disconnected from the headphone, the physical output device of the laptop computer includes the speaker. The embodiments of the present application do not make specific limitations in this regard. In the following embodiments, the physical output device mainly includes a speaker and a headphone for illustration.

[0069] In addition, the software architecture running on the CPU is divided into an application layer, an operating system layer (operating system, OS), and a driver layer according to functions.

[0070] Exemplarily, the application layer may include a series of application programs, such as a computer manager application (second application), an audio processing application (second application). For the convenience of description, the application program will be simply referred to as an application hereinafter.

[0071] Among them, the above computer management application can monitor changes in the playback device and can also monitor the operation of the user instructing to adjust the volume, such as operations on the relative volume control bar, or, for example, clicking the mute control. In addition, the above computer management application can also trigger the audio codec to adjust the volume of the physical output device, such as adjusting the volume value, or, for example, configuring the physical output device to the mute state or the non-mute state. Among them, the above playback device can also be referred to as an AudioEndPoint, or the default audio output, which is an audio output device for processing and playing audio data. For example, the playback device can be a physical output device configured in a laptop computer (such as a configured speaker or headset), or a virtual output device created in the laptop computer.

[0072] The above audio processing application can be an application program with audio processing functions. The above audio processing functions can be, but are not limited to, noise reduction, voice change, background music addition, etc. Exemplarily, the audio processing application can create a virtual output device. After performing one or more audio processes on the audio data by the virtual output device, the audio data is played by means of the physical output device.

[0073] Taking the audio processing function as noise reduction as an example. In an exemplary scenario, when the laptop computer is playing music and the conferencing application is enabled, in this scenario, the audio data that the laptop computer needs to play includes the audio of the music and the audio from the conferencing application (such as the so-called conferencing audio). If the laptop computer plays the audio of the music and the audio from the conferencing application at the same time, the music audio will interfere with the conferencing audio. In this scenario, the laptop computer can respond to the user's operation and select the virtual output device as the playback device. In this way, the audio data including the music audio and the conferencing audio, after being processed by the noise reduction of the virtual output device, filters out the music audio and retains the conferencing audio. Then, by means of the configured physical output device, the conferencing audio is played to avoid interference with the conferencing audio.

[0074] Of course, in addition to the computer management application and the audio processing application in the application layer, there can also be other applications. The other applications can be application programs installed in the laptop computer when the operating system is installed, or third-party applications (such as applications downloaded and installed by the user through the application store), which are not limited in the embodiments of the present application.

[0075] Again exemplarily, the OS layer is configured with the operating system of the laptop computer. In the embodiments of the present application, the above operating system can be Windows OS (such as a personal computer), or Android OS (such as a tablet computer), and the embodiments of the present application do not make specific limitations in this regard. In subsequent embodiments, the operating system is taken as Windows OS as an example for description.

[0076] Such as Figure 1As shown, the operating system of the notebook computer may include two operating states: kernel state and user state. It can be understood that the CPU can use different levels of permissions to run kernel code and application code.

[0077] Exemplarily, the CPU can use the kernel state to run the kernel code and create a corresponding kernel process. Figure 1 The audio driver shown in FIG. 1 may be a process created by the CPU running kernel code. The audio driver may be referred to as running in kernel mode. As another example, the CPU may use user mode to run application code and create a corresponding application process. Figure 1 The application audio driver shown may be a process created by the CPU running the application code of the audio processing application. The application audio driver may be referred to as running in user mode.

[0078] In addition, the CPU in kernel state can access any hardware of the laptop, such as the laptop's peripherals. The CPU in user state has limited access rights and cannot directly access the laptop's peripherals. It can be seen that the application audio driver in user state cannot directly control the physical output device, so the application audio driver will also have limited functions, for example, the application audio driver cannot control the physical output device to adjust the volume.

[0079] As another example, the driver layer includes a basic input output system (BIOS).

[0080] The BIOS is a set of programs fixed on the ROM chip, which stores basic input and output programs, system setting information, self-test programs after power-on, and system self-starting programs. Its main function is to provide the most basic and direct hardware settings and control for notebook computers.

[0081] Understandable, such as Figure 1 As shown, the optional playback devices in the laptop computer include physical output devices such as speakers and headphones. In addition, the optional playback devices in the laptop computer may also include virtual output devices created by the audio processing application. Among them, the speakers and headphones both have playback capabilities, and the virtual output device needs to use the playback capabilities of the physical output devices (such as speakers or headphones) in the laptop computer to complete audio playback.

[0082] like Figure 1 As shown in the figure, when the playback device of the laptop is configured as a virtual output device, the process of the laptop playing audio data is as follows:

[0083] S1. The audio driver obtains the audio data to be played. Among them, the above audio data may include audio streams from other devices. For example, the audio stream received by the WiFi chip of a laptop from other devices (such as a cloud server). The above audio data may also include locally stored audio. The embodiments of the present application do not make specific limitations in this regard. In addition, the audio data obtained by the audio driver may also be a mixture of data of multiple audios.

[0084] S2. The audio driver transfers the audio data to the application audio driver.

[0085] S3. The application audio driver can perform one or more audio processes on the audio data, such as noise reduction, voice conversion, or background music addition.

[0086] Taking noise reduction as an example, the configuration file of the audio processing application contains noise reduction rules. For example, the noise reduction rule may be that after noise reduction, only the audio with the highest priority is retained. For another example, the noise reduction rule may also be to filter specified types of audio. In addition, the configuration file of the audio processing application may also include the priorities of different types of audio.

[0087] Exemplarily, the types of audio can be divided according to the different audio sources, such as local audio and non-local audio. In addition, the priority of non-local audio can be configured to be higher than that of local audio.

[0088] Exemplarily again, the types of audio can also be divided according to the application providing the played audio. For example, music audio is the audio provided by an audio player, and conference audio is the audio provided by a conference application. Music audio and conference audio are different types of audio. In addition, the priority of the audio provided by, for example, the music player can be configured to be lower than the priority of the audio provided by the conference application.

[0089] In addition, the above specified types of audio can be one or more of the divided audio, or can also be audio types specified by the user.

[0090] Taking the noise reduction rule of only retaining the audio with the highest priority as an example, if the audio data contains music audio and conference audio, the application audio driver can filter out the music audio according to the pre-configured noise reduction rule and use the conference audio as the noise-reduced audio data. If the audio data only contains music audio, the application audio driver can retain the music audio as the noise-reduced audio data according to the pre-configured noise reduction rule.

[0091] Taking the noise reduction rule of filtering specified types of audio as an example, if the audio provided by the audio player is the specified type of audio, and the audio data obtained by the audio driver contains music audio, the application audio driver can filter out the music audio according to the pre-configured noise reduction rule.

[0092] In other embodiments, if an instruction indicating silent operation is detected during the foreground operation of an application, it can be determined that the audio provided by the application is audio of a specified type.

[0093] S4. The audio driver passes the processed audio data to the audio driver.

[0094] S5. The audio driver passes the processed audio data to the target device through the audio codec. Here, the target device is a physical output device that provides audio playback capabilities for the virtual output device. Exemplarily, the target device can be a physical output device of a laptop computer (such as, a speaker or a headset). For example, if a laptop computer is only configured with one physical output device, the target device is this physical output device. If a laptop computer is configured with multiple physical output devices, the target device is selected from the multiple physical output devices according to a preset rule. For example, when the playback device is switched from a speaker to a virtual output device, the target device corresponding to the virtual output device is the speaker. When the playback device is switched from a headset to a virtual output device, the target device corresponding to the virtual output device is the headset. The above is only one way to select the target device of the virtual output device, and it does not specifically limit the embodiments of the present application.

[0095] S6. The target device plays the processed audio data.

[0096] Among them, Figure 1 the speaker is used as an example of the target device. The audio codec sends the processed audio data to the speaker, and then the speaker plays it.

[0097] As Figure 2 shown, the playback device of the laptop computer is a physical output device (such as, a speaker), and the process of the laptop computer playing audio data is as follows:

[0098] (1) The audio driver obtains the audio data to be played.

[0099] (2) The audio driver passes the audio data to the speaker through the audio codec.

[0100] (3) The speaker plays the audio data.

[0101] In some embodiments, the audio driver runs in the kernel mode and can access all peripherals (including physical output devices). The audio driver can directly control the physical output device. For example, it can indicate to play audio, indicate to pause playback, and adjust the volume. When the playback device is a physical output device, the operating system can send instructions indicating to play audio, pause audio playback, and / or adjust the volume to the audio driver, and the audio driver responds to achieve control of the playback device.

[0102] When the playback device of a laptop is a virtual output device, the audio driver only assists the application audio driver in transmitting audio data to the audio codec. Additionally, the application audio driver runs in the user space and is restricted from accessing peripheral devices (such as physical output devices) and does not have the permission to control the physical output device to adjust the volume. When the playback device is a virtual output device, the application audio driver cannot respond to the user's operation of adjusting the volume, resulting in failed volume adjustment and reducing the human-computer interaction efficiency of volume adjustment. Moreover, most users have insufficient understanding of virtual output devices. After the volume adjustment fails, users will mistakenly think that the device is faulty, leading to unnecessary repairs.

[0103] To address the above issues, an embodiment of the present application provides an audio output management method, which may include: after the virtual output device is configured as the playback device, in response to the user's operation of adjusting the volume, the electronic device uses methods such as displaying a prompt dialog box, triggering the setting of the physical output device as the playback device, or adjusting the volume of the target device to solve the problem that the virtual output device does not respond to the volume adjustment operation and improve the human-computer interaction efficiency of volume adjustment of the electronic device.

[0104] As shown in the foregoing embodiments, the virtual output device can provide users with diversified audio output services, such as audio noise reduction service, voice-changing service, etc. The existence of the virtual output device has, to a certain extent, improved the intelligence level of the laptop in the dimension of audio output. Additionally, the audio output services provided by the virtual output device are implemented by the application audio driver. By upgrading the application audio driver, the audio output services of the virtual output device can be updated, which is simpler and lower-cost compared to upgrading the hardware peripherals of the laptop. In some embodiments, the laptop can create the virtual output device after running an audio processing application, and the created virtual output device exists permanently and becomes one of the audio output devices available for users to select.

[0105] In addition, the audio processing application is only an example of an application program that can create a virtual output device. In other words, other application programs can also create corresponding virtual output devices. The types of audio output services provided by the virtual output devices created by different application programs can be similar or different, and the embodiments of the present application do not limit this. In the subsequent embodiments, the audio processing application is mainly used as an example for illustration.

[0106] In some embodiments, after a laptop computer leaves the factory, if no audio processing application has been run, the laptop computer does not contain a virtual output device corresponding to the audio processing application. In this scenario, the playback device in the laptop computer can be a physical output device. For example, the speakers and headphones already configured in the laptop computer. If the laptop computer runs the audio processing application for the first time after leaving the factory, the audio processing application can create a virtual output device and configure the virtual output device as the playback device.

[0107] When the laptop computer has not run the audio processing application after leaving the factory, the display interface of the laptop computer is as Figure 3 shown. As Figure 3 shown, the laptop computer can display the desktop 301 after booting up. Among them, the above-mentioned desktop 301 includes a function bar 302. Exemplarily, the function bar 302 includes shortcut entry icons for one or more applications or functions. For example, it includes an audio icon 303. The above-mentioned audio icon 303 is a function icon corresponding to the function of managing audio output.

[0108] As Figure 3 shown, in response to the user's operation on the audio icon 303, an audio control box 304 is displayed. For example, the user's operation on the audio icon 303 can include: the user operates the mouse of the laptop computer, moves the cursor corresponding to the mouse to the display position of the audio icon 303, and clicks the left mouse button (taking the right hand using the mouse as an example, if it is the left hand using the mouse, it is clicking the right mouse button).

[0109] Among them, the above-mentioned audio control box 304 includes a volume control bar 306-1 and a mute control 306-2. Among them, the volume control bar 306-1 is used to adjust the volume value of the playback device. The mute control 306-2 is used to trigger configuring the playback device to a mute state or a non-mute state. For example, the volume of the playback device is volume value 1. In response to the operation on the volume control bar 306-1, the volume of the playback device changes from volume value 1 to volume value 2, and volume value 1 and volume value 2 are different values. Again, for example, the volume of the playback device is volume value 1. In response to the operation on the mute control 306-2, the volume of the playback device is set to 0. After setting the volume of the playback device to 0, in response to the operation on the mute control 306-2, the volume of the playback device is set to volume value 1. In addition, the first audio control box 304 also includes the device identifier of the playback device. For example, if the playback device is a speaker, the device name 305 corresponding to the speaker is included in the first audio control box 304. The audio control box 304 also includes an expansion control 307.

[0110] In response to the user's operation of clicking the expansion control 307, the second audio control box 308 is displayed. The second audio control box 308 is the control box after the first audio control box 304 is expanded. The display area of the audio control box 308 is larger than that of the audio control box 304, and the displayed content is more detailed. For example, the audio control box 308 includes information columns for all audio output devices in the laptop. Each information column includes the name and icon of the corresponding audio output device. For example, the information column 309 corresponding to the speaker includes the device name and icon of the speaker. For another example, the information column 310 corresponding to the headphones includes the device name and icon of the headphones.

[0111] In addition, in the scenario where the playback device is the speaker, the information column 309 corresponding to the speaker includes a playback identifier 311, and this playback identifier 311 is used to indicate that the speaker is the playback device. In addition, since the audio processing application has not been run on the laptop, the information column for the virtual output device is not included in the audio control box 308.

[0112] On the basis of Figure 3 , in response to the operation of opening the audio processing application, the audio processing application runs in the foreground. As Figure 4 shown, the desktop 301 includes the application icon 401 of the audio processing application. In response to the user double-clicking the application icon 401, the application interface 402 of the audio processing application is displayed. After the user double-clicks the application icon 401, the laptop can create a virtual output device corresponding to the audio processing application and set the virtual output device as the playback device.

[0113] After the audio processing application is opened, in response to the user clicking the audio icon 303, the relevant information including the virtual output device is displayed, and this audio control box can prompt the user that the playback device is the virtual output device.

[0114] As Figure 4 shown, in response to the user's operation of closing the audio processing application, for example, in response to the user clicking the close control 403 in the application interface 402, the laptop does not display the application interface 402, and, displays the audio output reminder notification 404 (the second pop-up box) from the computer management application. This audio output reminder notification 404 is used to remind the user that the playback device is the virtual output device. For example, the audio output reminder notification 404 includes the information that the playback device is the virtual output device.

[0115] In other embodiments, based on the virtual output device being configured as the playback device, the laptop may also display the audio output reminder notification 404, and the embodiments of the present application do not make specific limitations on this.

[0116] In Figure 4 example, the audio output reminder notification 404 includes text information prompting that the playback device is the virtual output device.

[0117] In other possible embodiments, as Figure 5 shown in (a) of , the audio output reminder notification 404 may further include text information for prompting the user to switch to other audio output devices, and controls (target controls) corresponding to the other audio output devices. For example, among the audio output devices of a laptop computer, in addition to the virtual output device, there are also audio output devices such as speakers and headphones. The audio output reminder notification 404 further includes a speaker control 501 and a headphone control 502. In response to the user clicking on the speaker control 501, the speaker can be configured as the playback device. In response to the user clicking on the headphone control 502, the headphone can be configured as the playback device.

[0118] In other possible embodiments, as Figure 5 shown in (b) of , the audio output reminder notification 404 may further include text information for prompting not to display the audio output reminder notification 404, and a selection control 503. After detecting the operation of the user selecting the selection control 503, the display of the audio output reminder notification 404 is cancelled, and when the laptop computer runs the audio processing application again and exits the audio processing application, the audio output reminder notification 404 is no longer displayed.

[0119] As an implementation manner, in the scenario where the laptop computer runs the audio processing application for the first time after leaving the factory, as Figure 6 shown, the signaling interaction between the computer management application and the OS of the laptop computer is as follows:

[0120] S101, after the laptop computer runs the audio processing application, the computer management application sends a first registration request to the OS.

[0121] Among them, the first registration request is used to register for listening to changes in the playback device. For example, the first registration request may include the RegisterEndpointNotificationCallback function.

[0122] Among them, after the RegisterEndpointNotificationCallback function is passed to the OS: when the playback device of the laptop computer changes, the OS can call the OnDefaultDeviceChanged function to send the device information of the playback device to the computer management application.

[0123] In some embodiments, the laptop computer may send a first registration request to the OS after running the audio processing application for the first time. Exemplarily, the above-mentioned first run of the audio processing application may be the first time the laptop computer runs the audio processing application after leaving the factory. Additionally, exemplarily, the above-mentioned first run of the audio processing application may also be the first time the laptop computer runs the audio processing application after restoring the factory settings.

[0124] As an implementation, after the computer management application detects that the audio processing application is first run, for example, as Figure 4 shown, when it detects that the audio processing application is running in the foreground and the application code of the audio processing application is first executed, it sends a first registration request to the OS.

[0125] In other embodiments, other methods can also be used to determine whether the audio processing application is first run on the laptop. For example, it can be determined through the running log of the laptop. The embodiments of the present application do not make specific limitations on this.

[0126] In addition, after the OS receives the first registration request, the OS can also create a pointer P1. The pointer P1 is used to indicate whether the change of the playback device has been registered currently. Exemplarily, when the pointer P1 is valid, for example, when the return value of the RegisterEndpointNotificationCallback function is stored in the storage space 1 pointed to by the pointer P1, it indicates that the change of the playback device has been registered currently. When the pointer P1 is invalid, for example, when the pointer P1 points to null, it indicates that the change of the playback device has not been registered currently.

[0127] After the laptop is shut down, the laptop can release the pointer P1. In addition, during the operation of the laptop, if the computer management application is closed, the OS can release the pointer P1. After the pointer P1 is released, the pointer P1 points to null, that is, the pointer P1 is invalid.

[0128] S102. In response to the first registration request, the OS returns the device information of the playback device to the computer management application.

[0129] In some embodiments, after the OS receives the first registration request, it can notify the computer management application of the device information of the playback device (such as the device name, device unique identification code, etc.). Exemplarily, the OS can call the OnDefaultDeviceChanged function to feedback the device information of the playback device to the computer management application.

[0130] Among them, after the audio processing application is opened, the OS of the laptop will set the virtual output device as the playback device. In this scenario, in response to the first registration request, the OS feedbacks the device information of the virtual output device to the computer management application.

[0131] After that, every time the OS sets an audio output device as the playback device, it can determine the change of the playback device. The OS can feedback the device information of the changed playback device to the computer management application by calling the OnDefaultDeviceChanged function. For details, refer to the subsequent embodiments.

[0132] S103, the computer management application determines whether the playback device is a virtual output device.

[0133] If the playback device is a virtual output device, step 104 is executed; otherwise, the process ends. Alternatively, as Figure 7 shown, step 104 may not be executed. If the playback device is a virtual output device, step 105 is executed; otherwise, the process ends.

[0134] In some embodiments, based on the device information returned by the OS, the computer management application can identify which audio output device the playback device is. As Figure 4 shown in the scenario, after running the audio processing application, the laptop configures the virtual output device as the playback device. In this scenario, the device information received by the computer management application is the device information of the virtual output device, and the computer management application can determine that the playback device is a virtual output device based on this.

[0135] S104, the computer management application triggers the display of the audio output reminder notification 404.

[0136] In some embodiments, the computer management application can trigger the display of the audio output reminder notification 404 when exiting the audio processing application. In other embodiments, the computer management application can trigger the display of the audio output reminder notification 404 after step 103 when it determines that the playback device is a virtual output device.

[0137] Exemplarily, Figure 4 as shown, after the laptop does not display the application interface 402 of the audio processing application, the computer management application can draw and render the layer corresponding to the audio output reminder notification 404, and then trigger the laptop's display screen to display this audio output reminder notification 404.

[0138] Exemplarily, after step 103, when the computer management application determines that the playback device is a virtual output device, the computer management application can draw and render the layer corresponding to the audio output reminder notification 404, and then trigger the laptop's display screen to display this audio output reminder notification 404.

[0139] In some embodiments, after the computer management application determines that the playback device is a virtual output device, it can also monitor whether the user makes an operation to adjust the volume. For example, the user's operation on the volume control bar. Another example is the user's operation on the mute control. On the basis of Figure 6 , as Figure 7 shown, after step 103, the following steps may also be included:

[0140] S105, the computer management application sends a second registration request to the OS.

[0141] Among them, the second registration request is used to register an operation for listening to control volume changes. Exemplarily, the above-mentioned second registration request may include RegisterControlChangeNotify. After RegisterControlChangeNotify is passed to the OS: after detecting an operation by the user to adjust the volume (or an operation to control volume changes), the OS can call PAUDIO_VOLUME_NOTIFICATION_DATA to send a control volume change notification to the computer management application. In this way, in the case of detecting an operation to adjust the volume, the computer management application solves the problem that the virtual output device does not respond to the volume adjustment operation. For implementation details, refer to the subsequent embodiments and will not be elaborated here for the time being.

[0142] In some embodiments, when the playback device of the laptop is a virtual output device, other audio output devices can be configured as the playback device in response to a user operation.

[0143] Taking the case where the playback device is a virtual output device after the laptop is powered on as an example. During the period when the laptop displays the desktop 301, an audio control box for managing the playback device can be displayed in response to a user operation. For example, in response to a user operation on the audio icon 303, as Figure 8 shown, the audio control box 801 is displayed on the desktop 301. The audio control box 801 and the audio control box 304 can be pop-up boxes with the same function. The difference is that when the audio control box 801 is displayed, the playback device of the laptop is a virtual output device; when the audio control box 304 is displayed, the playback device of the laptop is the speaker. Correspondingly, the device name 802 of the virtual output device is included in the audio control box 801, indicating that the playback device is a virtual output device.

[0144] As Figure 8 shown, in response to the user clicking on the expand control 307 in the audio control box 801, the audio control box 801 is expanded to the audio control box 803. Among them, the above-mentioned audio control box 803 is similar to the audio control box 308. The difference is that when the audio control box 803 is displayed, the laptop has created a virtual output device. Correspondingly, compared with the audio control box 308, the audio control box 803 has a new information bar 804 for the virtual output device. In addition, in the audio control box 308, the playback identifier 311 is displayed in the information bar 804, indicating that the virtual output device is the playback device.

[0145] As Figure 8As shown, in response to the user clicking on the information bar 310 in the audio control box 803, the laptop can configure the audio output device corresponding to the information bar 310 (e.g., headphones) as the playback device. After that, the laptop can display the audio control box 805. In the audio control box 805, the playback indicator 311 is displayed in the information bar 310, indicating that the playback device is headphones.

[0146] Exemplarily, after the user clicks on the information bar 310 in the audio control box 803, the OS of the laptop can configure the headphones as the playback device. It can be understood that the OS participates in the process of configuring the playback device. Thus, each time after setting an audio output device as the playback device, if the playback devices before and after the configuration are different audio output devices, that is, when the playback device changes, the OS can call the OnDefaultDeviceChanged function to feedback the device information of the changed playback device to the computer management application. For example, after setting the headphones as the playback device, the OS can feedback the device information of the headphones to the computer management application.

[0147] As an implementation, in Figure 8 the scenario shown, as Figure 9 shown, the signaling interaction between the computer management application and the OS in the laptop is as follows:

[0148] S201, after the laptop is powered on, the computer management application sends a first registration request to the OS.

[0149] In some embodiments, after the laptop is powered on, the computer management application starts to run. If the computer management application does not detect the pointer P1, or the assignment of the pointer P1 is empty, the computer management application sends a first registration request to the OS.

[0150] S202, in response to the first registration request, the OS returns the device information of the playback device.

[0151] Among them, the implementation details of the above S201 and S202 can refer to S101 and S102 in the foregoing embodiments, and will not be elaborated here. Additionally, in Figure 8 the scenario shown, the playback device after the laptop is powered on is a virtual output device. Correspondingly, the device information returned by the OS in response to the first registration request can be the device information of the virtual output device. It can be understood that in other embodiments, when the playback device after the laptop is powered on is other audio output devices, the device information returned by the OS in response to the first registration request can be the device information of other audio output devices.

[0152] S203, the computer management application determines whether the playback device is a virtual output device.

[0153] In some embodiments, in Figure 8 In the scenario shown, when the laptop is powered on, the playback device is a virtual output device. In response to the first registration request, the OS sends the device information of the virtual output device to the computer management application. The computer management application can determine that the playback device is a virtual output device based on the received device information of the virtual output device, and the process proceeds to S204.

[0154] In other exemplary scenarios, when the laptop is powered on, the playback device is a physical output device. In response to the first registration request, the OS sends the device information of the physical output device to the computer management application. The computer management application can determine that the playback device is not a virtual output device based on the received device information of the virtual output device.

[0155] S204, the computer management application sends a second registration request to the OS.

[0156] In some embodiments, the implementation details of S204 above can refer to S105 in the foregoing embodiments, which will not be elaborated here. Additionally, after registering the operation of listening for and controlling volume changes, if the user operates on the volume control (such as the volume control bar, mute control), the OS can promptly notify the computer management application, and the computer management application can solve the problem that the virtual output device does not respond to volume adjustment operations. The implementation details refer to the subsequent embodiments, which will not be elaborated here.

[0157] S205, after the OS receives the second registration request, it can create a pointer P2.

[0158] In some embodiments, after the OS receives the second registration request, the OS can also create a pointer P2.

[0159] Among them, the pointer P2 is used to indicate whether the operation of listening for and controlling volume changes has been registered currently. Exemplarily, when the pointer P2 is valid, for example, when the return value of the RegisterControlChangeNotify function is stored in the storage space 2 pointed to by the pointer P2, it indicates that the operation of listening for and controlling volume changes has been registered currently. Another example is that when the pointer P2 is invalid, for example, when the pointer P2 points to null, it indicates that the operation of listening for and controlling volume changes has not been registered currently.

[0160] In other embodiments, after S203 and before S204, the computer management application can first determine whether there is a valid pointer P2. If there is a valid pointer P2, steps S204 and S205 are skipped. If there is no valid pointer P2, S204 is executed.

[0161] S206, in response to the user operation, the OS sets the headphones as the playback device.

[0162] In some embodiments, such as Figure 8 In the scenario shown, the information bar 310 is the information bar of the headset. In response to the user clicking on the information bar 310 in the audio control box 803, the OS configures the headset as the playback device. Before setting the headset as the playback device, the virtual output device is the playback device. In this scenario, the OS can determine that the playback device has changed. After the OS determines that the playback device has changed, the OS can feedback the device information of the changed playback device to the computer management application, and the process enters S207.

[0163] S207, the OS returns the device information of the playback device to the computer management application.

[0164] In some embodiments, after the computer management application registers to listen for changes in the playback device in the OS, in Figure 8 In the scenario shown, after the OS sets the headset as the playback device, it triggers the call of the OnDefaultDeviceChanged function and returns the device information of the headset to the computer management application.

[0165] S208, the computer management application determines whether the playback device is a virtual output device.

[0166] In some embodiments, in Figure 8 In the scenario shown, after setting the headset as the playback device, the computer management application can receive the device information of the headset. Based on the device information of the headset, the computer management application can determine that the playback device is not a virtual output device, and the process enters S209.

[0167] In other possible scenarios, such as the scenario where the user instructs to set another virtual output device as the playback device, after S207, the computer management application can receive the device information of the other virtual output device. In this scenario, when executing S208, it can be determined that the playback device is a virtual output device, and the process ends.

[0168] S209, the computer management application determines whether the pointer P2 is valid.

[0169] In some embodiments, after the computer management application determines that the playback device is not a virtual output device, it can determine whether the pointer P2 is valid. If the return value of the RegisterControlChangeNotify function is stored in storage space 2 of the pointer P2, it is determined that the pointer P2 is valid. If the pointer P2 is null, it is determined that the pointer P2 is invalid. When it is determined that the pointer P2 is valid, the process enters S210. When it is determined that the pointer P2 is invalid, the process ends.

[0170] S210, the computer management application cancels the registration of the operation to listen for changes in the control volume.

[0171] In some embodiments, the computer management application can call the UnRegisterContrilChangeNotify function to send an unregistration request to the OS to cancel the operation of listening for volume changes. After canceling the operation of listening for volume changes, when the OS detects the user's operation on the volume control, it will no longer notify the computer management application.

[0172] When the playback device is a physical output device (such as a speaker or headphones), the laptop can also respond to the user's operation to switch the playback device from the physical output device to a virtual output device.

[0173] Such as Figure 10 As shown, the desktop 301 displayed on the laptop includes an audio control box 805. In the audio control box 805, the playback indicator 311 is displayed in the information bar 310, indicating that the playback device is headphones. In response to the user's operation on the information bar 804 of the virtual output device, the laptop displays the audio control box 1001. Among them, the audio control box 805 and the audio control box 1001 are similar. The difference is that when the audio control box 805 is displayed, the playback device of the laptop is headphones, and when the audio control box 1001 is displayed, the playback device of the laptop is a virtual output device. In the audio control box 1001, the playback indicator 311 is displayed in the information bar 804 of the virtual output device.

[0174] Exemplarily, after the user clicks the information bar 804 in the audio control box 805, the OS can set the virtual output device as the playback device. Accordingly, the OS can determine that the playback device has changed. Additionally, when the computer management application has registered to listen for changes in the playback device, the OS can feedback the device information of the virtual output device to the computer management application.

[0175] As an implementation, in the Figure 10 shown scenario, as Figure 11 shown, the signaling interaction between the computer management application and the OS in the laptop is as follows:

[0176] S301, the OS responds to the user's operation and sets the virtual output device as the playback device.

[0177] In the Figure 10 shown scenario, the OS responds to the user's operation and sets the virtual output device as the playback device. Correspondingly, it can be determined that the playback device has changed, and the changed playback device is a virtual output device.

[0178] S302, the OS returns the device information of the playback device to the computer management application.

[0179] In some embodiments, such as Figure 10In the shown scenario, the playback device is a virtual output device. The OS calls the OnDefaultDeviceChanged function and sends the device information of the virtual output device to the computer management application.

[0180] S303. The computer management application determines whether the playback device is a virtual output device.

[0181] In some embodiments, when the computer management application receives the device information of the virtual output device from the OS, it can determine that the playback device is a virtual output device, and the process proceeds to S304. When the computer management application receives the device information of the physical output device from the OS, it can determine that the playback device is not a virtual output device, and the process ends.

[0182] S304. The computer management application determines whether pointer P2 is valid.

[0183] In some embodiments, the computer management application can determine whether pointer P2 is invalid. If the return value of the RegisterControlChangeNotify function is stored in storage space 2 of pointer P2, it is determined that pointer P2 is valid. If pointer P2 is null, it is determined that pointer P2 is invalid. When it is determined that pointer P2 has become invalid, the process proceeds to S305. When it is determined that pointer P2 has not become invalid, the process ends.

[0184] S305. The computer management application sends a second registration request to the OS.

[0185] Among them, the second registration request is used to register the operation of listening for volume change control. For specific details, refer to the foregoing embodiments and will not be elaborated here.

[0186] S306. The OS creates pointer P2.

[0187] In some embodiments, after the computer management application registers to listen for playback device changes, in the scenario where the notebook computer sets the virtual output device as the playback device, the notebook computer can execute the above S301 - S306. In the scenario where the notebook computer sets the physical output device as the playback device, the notebook computer can execute S206 - S210. The above S201 - S203 are the steps required to be executed when the notebook computer is powered on or the computer management application is enabled to run. During the actual operation of the notebook computer, more or fewer steps can be executed according to the scenario, and the embodiments of the present application do not make specific limitations in this regard.

[0188] In addition, as Figure 9 and Figure 11As shown, when the computer management application's playback device is a physical output device, the computer management application can cancel listening for operations to control volume changes. After detecting that the user adjusts the volume (the second operation), the audio driver in the OS controls the volume of the playback device. When the computer management application's playback device is a virtual output device, it registers to listen for operations to control volume changes. In this way, after detecting that the user adjusts the volume (the first operation), the computer management application can solve the problem that the virtual output device does not respond to volume adjustment.

[0189] The following combines scenarios to introduce the response of the computer management application after detecting that the user adjusts the volume when the playback device is a virtual output device:

[0190] The first response method of the computer management application: In the scenario where the playback device of the laptop is a virtual output device, after detecting that the user adjusts the volume, the computer management application can trigger the display screen to display an audio output reminder notification, prompting the user that they can adjust the volume by changing the playback device.

[0191] In an exemplary scenario, in response to the user's operation on the audio icon 303, as Figure 12 shown, the audio control box 801 is displayed. The audio control box 801 includes the device identifier of the playback device. For example, the device name 802 of the virtual output device.

[0192] In addition, the audio control box 801 also includes a volume control bar 1201-1 and a mute control 1201-2. Among them, each position point on the volume control bar 1201-1 corresponds to a volume value. The volume control bar 1201-1 includes a volume identifier 1201-3. The display position point of the volume identifier 1201-3 corresponds to a volume value (e.g., Figure 12 the volume value 55 in), and this volume value is the current volume value of the playback device. When the playback device is different audio output devices, the display position point of the volume identifier 1201-3 can be different or the same.

[0193] In some embodiments, the user can adjust the volume of the playback device of the laptop by operating on the volume control bar 1201-1 or the mute control 1201-2. For example, click on the volume control bar 1201-1. Another example is to drag the volume identifier 1201-3 relative to the volume control bar 1201-1. Another example is to click on the mute control 1201-2.

[0194] Taking the operation of adjusting the volume by clicking on the volume control bar 1201-1 as an example. As Figure 12 shown, before clicking on the volume control bar 1201-1, the display position point of the volume identifier 1201-3 is position point a, and the volume value corresponding to position point a is 55.

[0195] In response to the user clicking on position point b on the volume control bar 1201-1, the laptop can display an audio output reminder notification 1202, such as a first pop-up box or a prompt pop-up box. Among them, position point b and position point a are different positions on the volume control bar 1201-1, and the volume value corresponding to position point b is 70.

[0196] In some embodiments, in response to the user clicking on position point b on the volume control bar 1201-1, the volume identifier 1201-3 is moved from position point a to position point b. However, the actual volume of the audio played by the laptop remains unchanged.

[0197] In other embodiments, after the user clicks on position point b on the volume control bar 1201-1, the volume identifier 1201-3 continues to be displayed at position point a, and the actual volume of the audio played by the laptop remains unchanged.

[0198] As Figure 12 shown, the audio output reminder notification 1202 includes a prompt text, which can indicate that the playback device is a virtual output device. After switching the playback device to a physical output device, the volume can be adjusted. For example, Figure 12 the prompt text information 1203 shown.

[0199] In other embodiments, the audio output reminder notification 1202 can also include controls for each physical output device. As Figure 13 shown, the audio output reminder notification 1202 includes a speaker control 1301 and a headphone control 1302. Exemplarily, in response to the user clicking on control 1301, the speaker can be set as the playback device. In response to the user clicking on control 1302, the headphones can be set as the playback device.

[0200] As a comparison scenario with Figure 12 , when the playback device is a physical output device, in response to the user's operation on the audio icon 303, as Figure 14 shown, an audio control box 304 is displayed. The audio control box 304 includes the device identifier of the playback device. For example, the device name 305 of the speaker.

[0201] In addition, the volume control bar 306-1 of the audio control box 304 includes a volume identifier 306-3. The display position point of the volume identifier 306-3 corresponds to a volume value (such as, Figure 14 the volume value 55 in ), and this volume value is the current volume value of the playback device (such as the speaker).

[0202] Taking the operation of adjusting the volume by clicking on the volume control bar 306-1 as an example. As Figure 14As shown, before clicking on the volume control bar 306-1, the display position point of the volume indicator 306-3 is position point a (the volume value corresponding to position point a is 55). In response to the user clicking on position point b (the volume value corresponding to position point b is 70) on the volume control bar 306-1, the volume indicator 306-3 is moved from position point a to position point b. After the volume indicator 306-3 moves to position point b, the volume of the audio actually played by the laptop increases, and the audio output reminder notification 1202 is not displayed.

[0203] As an implementation, in Figure 12 the scenario shown, that is, when the playback device is a virtual output device, as Figure 15 shown, the signaling interaction between the computer management application and the OS in the laptop is as follows:

[0204] S401, the OS receives the operation of adjusting the volume.

[0205] As Figure 12 shown, after the user clicks on the volume control bar 1201-1, the OS can receive the operation of adjusting the volume. It can be understood that when the user adjusts the volume by other means, the OS can also receive the operation of adjusting the volume. This application embodiment does not make any limitations in this regard.

[0206] S402, the OS sends a control volume change notification to the computer management application.

[0207] Among them, the control volume change notification (the first notification) can notify the computer management application that an operation of adjusting the volume has been detected.

[0208] In addition, as Figure 7 shown in S101-S105 in Figure 9 shown in S201-S208 in Figure 11 shown in S301-S305 in Figure 12 shown, after the computer management application determines that the playback device is a virtual output device, it will register with the OS to listen for operations of controlling volume changes. In

[0209] the scenario shown, the playback device is a virtual output device. Before S401, the computer management application has already performed the step of registering to listen for operations of controlling volume changes. In this scenario, during the operation of the laptop, when the OS receives the operation of adjusting the volume, it can call PAUDIO_VOLUME_NOTIFICATION_DATA and send the control volume change notification to the computer management application to achieve notifying the computer management application.

[0210] In some embodiments, the computer management application can draw the layer corresponding to the audio output reminder notification 1202, and then trigger the display screen of the laptop to display the audio output reminder notification 1202.

[0211] The second response method of the computer management application: In a scenario where the playback device of the laptop is a virtual output device, after detecting the user's operation of adjusting the volume, the computer management application triggers the OS to set the physical output device (speaker or headset) as the playback device.

[0212] An exemplary scenario, in response to the user's operation on the audio icon 303, such as Figure 16 shown, the audio control box 801 is displayed.

[0213] Take the operation of adjusting the volume as clicking on the volume control bar 1201-1 as an example. As Figure 16 shown, before clicking on the volume control bar 1201-1, the display position point of the volume indicator 1201-3 is position point a. In response to the user clicking on position point b on the volume control bar 1201-1, a physical output device is set as the playback device. For example, the speaker is set as the playback device. Accordingly, the laptop can also display the audio control box 1601. The audio control box 1601 includes the device identifier 1602 of the speaker, indicating that the playback device is the speaker.

[0214] In addition, in the case of multiple physical output devices, one physical output device is selected from the multiple physical output devices and set as the playback device. Exemplarily, one physical output device can be randomly determined from the multiple physical output devices and set as the playback device. Another example is that the physical output device that was the playback device last time can be set as the playback device. Another example is that the physical output device that has been selected as the playback device the most times can be set as the playback device.

[0215] Take the example of setting the speaker as the playback device in response to clicking on position point b on the volume control bar 1201-1. In some embodiments, after the speaker is set as the playback device, the volume value of the speaker is configured to the volume value (70) corresponding to position point b. Accordingly, before and after clicking on position point b on the volume control bar 1201-1, the volume of the actual played audio on the laptop increases. In addition, in the audio control box 1601, the volume indicator 306-3 is displayed at position point b.

[0216] In some other embodiments, before the speaker is set as the playback device, the volume values of both the virtual output device and the speaker are 55. After the speaker is set as the playback device, the volume value of the speaker is also 55. Before and after clicking on the position point b on the volume control bar 1201-1, the volume of the actually played audio on the laptop remains unchanged. Additionally, in the audio control box 1601, the volume indicator 306-3 is displayed at the position point a.

[0217] As an implementation, in the Figure 16 scenario shown, that is, when the playback device is the virtual output device, as Figure 17 shown, the signaling interaction between the computer management application and the OS in the laptop is as follows:

[0218] S501, the OS receives an operation to adjust the volume.

[0219] As Figure 16 shown, after the user clicks on the volume control bar 1201-1, the OS can receive an operation to adjust the volume. It can be understood that when the user adjusts the volume in other ways, the OS can also receive an operation to adjust the volume, and the embodiments of this application do not make limitations in this regard.

[0220] S502, the OS sends a control volume change notification to the computer management application.

[0221] S503, the computer management application triggers the OS to set a physical output device as the playback device.

[0222] In some embodiments, the computer management application can call the member function SetDefaultAudioEndpoint of IMMDeviceEnumerator to trigger the OS to set a physical output device as the playback device. After S503, S206 to S210 in Figure 9 can also be executed.

[0223] In other embodiments, after the user makes an operation to adjust the volume, the computer management application first triggers the display of the audio output reminder notification 1202, and then the computer management application triggers the OS to set the physical output device (speaker or headset) as the playback device.

[0224] In some embodiments, after the OS sets a physical output device as the playback device, the volume value of the physical output device can be adjusted through the audio driver in the kernel mode. For example, in response to clicking on the position point b on the volume control bar 1201-1, after setting the speaker as the playback device, the volume value of the speaker is adjusted to the volume value corresponding to the position point b (e.g., 70) through the audio driver in the kernel mode.

[0225] In some other embodiments, after the OS sets an entity output device as the playback device, the volume value of the entity output device is not adjusted. For example, the volume values of the virtual output device and the speaker are both 55. After the speaker is set as the playback device in response to clicking on the position point b on the volume control bar 1201-1, the volume value of the speaker is also 55. In this way, the volume of the audio actually played by the laptop remains unchanged before and after clicking on the position point b on the volume control bar 1201-1.

[0226] Response mode three of the computer management application: In a scenario where the playback device of the laptop is a virtual output device, after detecting an operation by the user to adjust the volume, the computer management application can control the target device to adjust the volume through the audio driver in the kernel mode of the OS. Here, the target device is an entity output device that provides playback capabilities based on the virtual output device.

[0227] Exemplary scenario, in response to an operation by the user on the audio icon 303, such as Figure 18 shown, an audio control box 801 is displayed.

[0228] Taking the operation of adjusting the volume as clicking on the volume control bar 1201-1 as an example. As Figure 18 shown, before clicking on the volume control bar 1201-1, the display position point of the volume indicator 1201-3 is position point a. The volume value corresponding to position point a on the control bar 1201-1 is 55, and the audio control box 801 indicates that the volume of the virtual output device is 55.

[0229] In response to the user clicking on the position point b (the volume value corresponding to position point b is 70) on the volume control bar 1201-1, the OS is triggered to configure the volume of the target device corresponding to the virtual output device to 70. Correspondingly, the volume indicator 1201-3 is moved from position point a to position point b, indicating that the volume of the virtual output device has been adjusted to 70. Before and after clicking on the position point b on the volume control bar 1201-1, the volume of the audio actually played by the laptop increases.

[0230] As an implementation method, in the Figure 18 shown scenario, that is, when the playback device is a virtual output device, as Figure 19 shown, the signaling interaction between the computer management application and the OS in the laptop is as follows:

[0231] S601, the OS receives the operation of adjusting the volume.

[0232] As Figure 18 shown, after the user clicks on the volume control bar 1201-1, the OS can receive the operation of adjusting the volume. It can be understood that when the user adjusts the volume through other means, the OS can also receive the operation of adjusting the volume. The embodiments of the present application do not limit this.

[0233] S602, The OS sends a control volume change notification to the computer management application.

[0234] S603, The computer management application adjusts the volume of the target device through the audio driver in the OS.

[0235] In some embodiments, the member function of the computer management application IAudioEndpointVolume: SetMasterVolumeLevelScalar triggers the audio driver in the OS to adjust the volume of the target device.

[0236] Taking the target device of the virtual output device as the speaker as an example, before detecting the user's operation of adjusting the volume, the volumes of the virtual output device (such as called the first output device), the speaker (such as called the third output device), and the headset (such as called the second output device) are all 55 (such as called the first value). As Figure 20 shown, after the laptop responds to the user operation and adjusts the volume of the virtual output device to 70 (such as called the second value). In response to the operation of configuring the speaker as the playback device (the third operation), the volume control box 304 is displayed, and the volume control box 304 indicates that the playback device is the speaker and the volume of the speaker is 70. In response to the operation of configuring the headset as the playback device (the fourth operation), the volume control box 2001 is displayed, and the volume control box 2001 indicates that the playback device is the headset and the volume of the headset is 55.

[0237] Some embodiments of the present application further provide an electronic device, which may include: a memory and one or more processors. The memory and the processor are coupled. The memory is used to store computer program code, and the computer program code includes computer instructions. When the processor executes the computer instructions, the electronic device can execute each function or step executed by the electronic device in the above method embodiments. The structure of the electronic device can refer to Figure 1 the structure of the laptop shown.

[0238] Some embodiments of the present application further provide a chip system (for example, a system on a chip (SoC)), such as Figure 21As shown, the chip system includes at least one processor 2101 and at least one interface circuit 2102. The processor 2101 and the interface circuit 2102 can be interconnected by a line. For example, the interface circuit can be used to receive signals from other devices (such as the memory of an electronic device). For another example, the interface circuit 2102 can be used to send signals to other devices (such as the processor 2101 or the touch screen of an electronic device). Exemplarily, the interface circuit 2102 can read the instructions stored in the memory and send the instructions to the processor 2101. When the instructions are executed by the processor 2101, the electronic device can be made to execute each step in the above embodiments. Of course, the chip system can also include other discrete devices, and the embodiments of the present application do not make specific limitations thereto.

[0239] The embodiments of the present application also provide a computer-readable storage medium, which includes computer instructions. When the computer instructions run on the above electronic device, the electronic device is made to execute each function or step that the electronic device (such as a laptop computer) executes in the above method embodiments.

[0240] The embodiments of the present application also provide a computer program product. When the computer program product runs on an electronic device, the electronic device is made to execute each function or step that the electronic device (such as a laptop computer) executes in the above method embodiments.

[0241] Through the description of the above embodiments, those skilled in the art can clearly understand that for the convenience and brevity of description, only the above division of each functional module is used as an example. In actual applications, the above functions can be allocated to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.

[0242] In several embodiments provided by the present application, it should be understood that the disclosed device and method can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the modules or units is only a logical functional division. In actual implementation, there can be other division methods. For example, multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection to each other can be through some interfaces. The indirect coupling or communication connection of the device or unit can be in an electrical, mechanical or other form.

[0243] The unit described as a separation component may or may not be physically separated. The component shown as a unit may be a single physical unit or multiple physical units, that is, it may be located in one place or may be distributed to multiple different places. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0244] In addition, each functional unit in various embodiments of the present application may be integrated in a processing unit, may exist physically separately for each unit, or two or more units may be integrated in one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of a software functional unit.

[0245] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on such an understanding, the technical solution of the embodiments of the present application, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions for causing a device (which may be a single-chip microcomputer, a chip, etc.) or a processor to execute all or part of the steps of the methods described in various embodiments of the present application. The aforementioned storage medium includes: USB flash drives, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks, or optical discs and other various media that can store program codes.

[0246] The above content is only the specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claimed rights.

Claims

1. A method for managing an audio output device, characterized in that: Applied to an electronic device, wherein a first output device is configured in the electronic device, the first output device is a virtual output device; the hardware devices corresponding to the first output device and the third output device are both target devices, the first output device and the second output device correspond to different hardware devices, the second output device and the third output device have physical output devices, and the volumes of the first output device and the second output device are both first values, the method comprising: Setting the first output device as a playback device; In the case where the playback device is a first output device, at a first moment, the audio data is played through the target device; at the first moment, the playback volume of the electronic device is a first value; In response to a first operation of adjusting the volume by the user, displaying a first pop-up box, wherein the first pop-up box includes information that the playback device is the first output device; In response to a user's operation of switching the third output device, setting the third output device as the playback device; In the case where the third output device is a playback device and the volume is the first value, at a second moment, the audio data is played through the target device; at the second moment, the playback volume of the electronic device is the first value; In response to a user's operation of adjusting the volume, the volume value of the third output device is changed to a second value, and no prompt pop-up box is displayed; at a third moment, the third output device plays the audio data through the target device; at the third moment, the playback volume of the electronic device is the second value, and the second value is different from the first value; In response to a user's operation of switching the first output device, the first output device is set as the playback device, and, at a fourth moment, the audio data is played through the target device, and at the fourth moment, the playback volume of the electronic device is a second value; In response to a fourth operation of the user, the second output device is set as the playback device, and the volume of the second output device is a first value.

2. The method according to claim 1, characterized in that Before receiving the first operation, the volume of the first output device is a first value. After receiving the first operation, the method further includes: In response to a first operation of adjusting the volume indicated by the user, the volume of the first output device is updated from the first value to a second value, where the second value is different from the first value.

3. The method according to claim 2, characterized in that Before receiving the first operation, the volume of the second output device and the volume of the third output device are both at a first value; After updating the volume of the first output device from the first value to the second value, the method further includes: In response to a third operation by the user, the third output device is set as the playback device, and the volume value of the third output device has changed to the second value.

4. The method according to claim 1, characterized in that: The first pop-up box includes a target control corresponding to the second output device, and setting the second output device as the playback device includes: In response to a user operation on the target control, the second output device is set as the playback device.

5. The method according to claim 1, characterized in that The electronic device includes a first application, and before setting the first output device as a playback device, the method further includes: In the case where the first application is running in the foreground of the electronic device, creating the first output device; After setting the first output device as a playback device, the method further includes: A second pop-up box is displayed, wherein the second pop-up box includes information indicating that the first output device has been set as a playback device.

6. The method according to claim 1, characterized in that The electronic device includes a second application and an operating system. Before setting the first output device as a playback device, the method further includes: The second application sends a first registration request to the operating system, where the first registration request is used to register and monitor changes in the playback device; After setting the first output device as a playback device, the method further includes: The operating system sends the device information of the first output device to the second application; The second application sends a second registration request to the operating system in response to the device information of the first output device, for registering an operation of monitoring and controlling volume changes; The method of displaying a first pop-up window in response to a first operation of adjusting the volume by the user includes: In response to a first operation of adjusting the volume indicated by a user, the operating system sends a first notification to the second application, wherein the first notification includes information indicating that the first operation is detected; The second application triggers display of the first pop-up window in response to the first notification.

7. The method according to claim 6, characterized in that The electronic device further includes a third output device, the first output device provides an audio output service based on the playback capability of the third output device, and after the triggering displays the first pop-up window, the method further includes: The second application controls the volume of the third output device corresponding to the first output device through a kernel-mode audio driver in the operating system.

8. The method according to claim 6, characterized in that The method further comprises: The operating system receives a fourth operation instructing to set the second output device as the playback device; The operating system sends the device information of the second output device to the second application; The second application sends a cancellation registration request to the operating system, where the cancellation registration request is used to cancel the operation of monitoring and controlling volume changes; The operating system receives a second operation instructing the user to adjust the volume; The operating system adjusts the volume of the second output device.

9. A method for managing an audio output device, characterized in that: Applied to an electronic device, wherein a first output device is configured in the electronic device, the first output device is a virtual audio output device; the hardware devices corresponding to the first output device and the third output device are both target devices, the first output device and the second output device correspond to different hardware devices, the second output device and the third output device have physical output devices, and the volumes of the first output device, the second output device and the third output device are all first values; the method comprises: Setting the first output device as a playback device; In response to a first operation of adjusting the volume indicated by the user, changing the volume of the first output device from the first value to a second value, and controlling the volume of the target device corresponding to the first output device through a kernel-mode audio driver in the operating system; In response to a third operation of the user, the third output device is set as the playback device, and the volume of the third output device has changed to the second value; In response to a fourth operation of the user, the second output device is set as the playback device, and the volume of the second output device is the first value.

10. An electronic device comprising a memory, a processor and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the steps of the method according to any one of claims 1 to 9.

11. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.

12. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.

Citation Information

Patent Citations

  • Switching method for audio output channel, and display apparatus

    US20230319227A1