A method and related device for independently projecting sound of screen projection source process
By using a monitoring mapping table and a monitor callback function on the screen casting source, the audio of the screen casting process is cast independently, which solves the problem of multi-process audio mixing on the screen casting device and achieves clear audio casting.
Patent Information
- Application Number
- CN202111639692.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-29
- Publication Date
- 2025-01-14
- Estimated Expiration
- 2041-12-29
AI Technical Summary
In existing screen mirroring technologies, the audio from multiple processes on the screen mirroring source cannot be isolated, resulting in mixed output and audio interference.
By using a monitoring mapping table to separate process audio, each process is associated with an independent audio buffer, and the monitor's callback function is used for visualization and screen projection, ensuring that the audio of a single process is not interfered with by other processes and the system.
It enables independent projection of process audio during screen mirroring, avoiding sound interference caused by multi-process mixing and improving the audio clarity of the screen mirroring device.
Smart Images

Figure CN114281293B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of screen projection technology, and in particular to a method and related device for independently projecting the sound of a screen projection source process. Background Art
[0002] Currently, the sounds of multiple processes on the projection source are mixed and output. It is impossible to separate the sound of one process according to the process or application and project it to the projection terminal device, resulting in the mixing of multiple processes on the projection terminal and sound interference. Summary of the invention
[0003] The present application provides a method and related device for independently projecting the sound of a screen projection source process. The process sound is separated by using a monitoring mapping table, and each process is associated with an independent sound cache. When a process is projected, the audio of the process is projected without being interfered with by other processes and systems.
[0004] In a first aspect, the present application provides a method for independently projecting sound of a screen projection source process, comprising:
[0005] Determine the running process and obtain the audio corresponding to the process;
[0006] Creating a monitoring map by associating the process with the audio through an audio interface;
[0007] Receiving a target process confirmation instruction, and determining a target process and a target audio according to the target process confirmation instruction and the monitoring mapping table;
[0008] The target process and the target audio are visualized on the screen using the callback function of the monitor.
[0009] Optionally, before determining the running process, the method further includes:
[0010] Confirm the screen projection process;
[0011] The use of the monitor's callback function to visualize the target process and the audio on the screen includes:
[0012] The target process and the target audio are called back to the screen projection process using the callback function of the monitor, so that the screen projection process can visually project the target process and the target audio.
[0013] A second aspect of the present application provides a device for independently projecting sound of a screen projection source process, comprising:
[0014] A first determining unit, configured to determine a running process and obtain audio corresponding to the process;
[0015] A creating unit, configured to associate the process with the audio through an audio interface to create a monitoring mapping table;
[0016] A receiving / confirming unit, configured to receive a target process confirmation instruction, and determine a target process and a target audio according to the target process confirmation instruction and the monitoring mapping table;
[0017] A visualization unit is used to use a callback function of a monitor to visualize the target process and the target audio on a screen.
[0018] Optionally, the device further comprises:
[0019] A second determining unit, used to determine the screen projection process;
[0020] The visualization unit is also used to use the callback function of the monitor to call back the target process and the target audio to the screen projection process, so that the screen projection process can visualize the target process and the target audio.
[0021] From the above technology: determine the running process and obtain the audio corresponding to the process; associate the process and the audio through the audio interface to create a monitoring mapping table; receive the target process confirmation instruction, and determine the target process and the target audio according to the target process confirmation instruction and the monitoring mapping table; use the monitor's callback function to visualize the target process and the target audio. By using the monitoring mapping table to separate the process sound design, each process is associated with an independent sound cache. When a process is projected, the audio of the process is projected without interference from other processes and systems. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 This is a flowchart of an embodiment of a method for independently projecting sound based on a screen projection source process in this application;
[0023] Figure 2 This is a schematic diagram of the structure of the process audio interface design in the method for independently projecting the sound of the screen projection source process in this application;
[0024] Figure 3 This is a schematic diagram of the structure of an embodiment of a device that can independently project sound based on the screen projection source process in the present application. DETAILED DESCRIPTION
[0025] The embodiments of the present application provide a method and related device for independently projecting the sound of a screen projection source process. The process sounds are separated by using a monitoring mapping table, and each process is associated with an independent sound cache. When a process is projected, the audio of the process is projected without being interfered with by other processes and systems.
[0026] See also Figure 1 and Figure 2 In an embodiment of the present application, a method for independently projecting the sound of a screen projection source process includes:
[0027] 101. Determine the screen projection process;
[0028] In this embodiment, the sound of the screen projection source process can be independently delivered. Before the system can independently deliver the process sound, it is necessary to first determine whether the screen projection process in the system has been started; when the screen projection process has been started, the system will determine the screen projection process, that is, determine the screen projection process.
[0029] 102. Determine the running process and obtain the audio corresponding to the process;
[0030] Once the screen projection process is determined, the system will further determine all processes that are currently running and can be projected (such as Figure 2 After all the running processes are obtained, the audio information corresponding to all the processes is further obtained.
[0031] In this embodiment, the audio information may be video; may be sound; may be video and sound; and no specific limitation is made here.
[0032] 103. Create a monitoring mapping table by associating the process and the audio through the audio interface;
[0033] like Figure 2 In this embodiment, a monitoring mapping table is created. First, the audio interface of the process is designed, and then the audio interface is further used to create the monitoring mapping table. Specifically: for each process, a "process, audio buffer, monitor" table (i.e., a monitoring mapping table) is established for the process. When the process calls the audio interface, the process ID, audio buffer, and monitor are associated with the process.
[0034] In this embodiment, the format stored in the monitoring mapping table is: process ID (identity identifier), audio buffer and monitor.
[0035] 104. Receive a target process confirmation instruction, and determine a target process and a target audio according to the target process confirmation instruction and a monitoring mapping table;
[0036] When a user needs to project a certain process on the screen, the user will use the input device to input information for projecting a certain process to the system, which includes instructions for confirming the target process; at this time, the system will receive instructions for confirming the target process, for example: when the user needs to project process 1 on the screen, the system will receive instructions to confirm process 1 as the target process.
[0037] After receiving the target process confirmation instruction, the system will determine the target process according to the target process confirmation instruction and the monitoring mapping table established in step 103, and further determine the audio corresponding to the target process, that is, the target audio.
[0038] 105. Use the monitor's callback function to visualize the target process and target audio on the screen.
[0039] In this embodiment, the callback function of the monitor is used to visualize the target process and audio on the screen. Specifically, the callback function of the monitor is used to call back the target process and the target audio to the screen projection process, so that the screen projection process visualizes the target process and the target audio on the screen. More specifically:
[0040] After determining the target process and target audio, the screen projection process will visualize the target audio of the target process. First select the process, then obtain the process ID, and finally use FindProcessAudioPrivate to obtain the monitor of the process according to the ID, and then add a callback function to the monitor. The monitor will call the sound back to the screen projection process. The sound is not interfered with by other processes and is encapsulated and sent to the screen projection device terminal, so that the screen projection device can hear the sound of the process.
[0041] The present invention separates the process sounds by using a monitoring mapping table. Each process is associated with an independent sound cache. When a certain process is projected on the screen, the audio of the process is projected on the screen without being interfered by other processes and systems. This solves the problem that screen projection can only project mixed audio but cannot be directed to a separate application process.
[0042] See also Figure 2 In the embodiment of the present application, an embodiment of the device for independently projecting the sound of the screen projection source process includes:
[0043] The first determining unit 201 is used to determine the running process and obtain the audio corresponding to the process;
[0044] A creating unit 202, configured to associate the process with the audio through the audio interface to create a monitoring mapping table;
[0045] The receiving / confirming unit 203 is used to receive a target process confirmation instruction, and determine the target process and the target audio according to the target process confirmation instruction and the monitoring mapping table;
[0046] The visualization unit 204 is used to use the callback function of the monitor to visualize the target process and the target audio on the screen.
[0047] In this embodiment, the device may further include:
[0048] The second determining unit 205 is used to determine the screen projection process;
[0049] The visualization unit 204 is also used to use the callback function of the monitor to call back the target process and the target audio to the screen projection process, so that the screen projection process can visualize the target process and the target audio.
[0050] In this embodiment, after the second determination unit 205 determines the screen projection process, the first determination unit 201 determines the running process and obtains the audio corresponding to the process; after determining the screen projection process and the running process, the creation unit 202 associates the process and the audio through the audio interface to create a monitoring mapping table, and sends the monitoring mapping table to the receiving / confirming unit 203; the receiving / confirming unit 203 receives the target process confirmation instruction, and determines the target process and target audio according to the target process confirmation instruction and the monitoring mapping table, and sends the target process and target audio to the visualization unit 204; at this time, the visualization unit 204 uses the monitor's callback function to call back the target process and target audio to the screen projection process, so that the screen projection process visualizes the target process and target audio.
[0051] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0052] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0053] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0054] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0055] 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 computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, read-only memory), random access memory (RAM, random access memory), disk or optical disk and other media that can store program code.
Claims
1. A method for independently projecting the sound of a screen projection source process, characterized in that: include: Confirm the screen projection process; Determine the running process and obtain the audio corresponding to the process; Creating a monitoring mapping table by associating the process and the audio through an audio interface, including: designing the audio interface of the process, using the audio interface to create the monitoring mapping table; establishing a "process, audio buffer, monitor" table for the process, and associating the process ID, audio buffer, and monitor to the process when the process calls the audio interface; Receiving a target process confirmation instruction, and determining a target process and a target audio according to the target process confirmation instruction and the monitoring mapping table; Use the callback function of the monitor to visualize the target process and the target audio on the screen, including: use the callback function of the monitor to call back the target process and the target audio to the screen projection process, so that the screen projection process visualizes the target process and the target audio on the screen.
2. A device for independently projecting the sound of a screen projection source process, characterized in that: include: A first determining unit, configured to determine a running process and obtain audio corresponding to the process; A second determining unit, used to determine the screen projection process; A creating unit, used to associate the process and the audio through an audio interface to create a monitoring mapping table, including: designing the audio interface of the process, using the audio interface to create the monitoring mapping table; establishing a "process, audio buffer, monitor" table for the process, and when the process calls the audio interface, associating the process ID, audio buffer, and monitor to the process; A receiving / confirming unit, configured to receive a target process confirmation instruction, and determine a target process and a target audio according to the target process confirmation instruction and the monitoring mapping table; A visualization unit is used to use the callback function of the monitor to visualize the target process and the target audio on the screen, and is also used to use the callback function of the monitor to call back the target process and the target audio to the projection process, so that the projection process can visualize the target process and the target audio on the screen.
Citation Information
Patent Citations
Audio data processing method and device and storage medium
CN112243142A