CN116074688A - Audio playing method, device and computer readable storage medium - Google Patents

Audio playing method, device and computer readable storage medium Download PDF

Info

Publication number
CN116074688A
CN116074688A CN202111287915.1A CN202111287915A CN116074688A CN 116074688 A CN116074688 A CN 116074688A CN 202111287915 A CN202111287915 A CN 202111287915A CN 116074688 A CN116074688 A CN 116074688A
Authority
CN
China
Prior art keywords
audio
audio data
input
virtual
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111287915.1A
Other languages
Chinese (zh)
Inventor
罗亚
陈杰柱
晏家红
涂岱键
陈熙文
王乾
张裕辉
卢伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202111287915.1A priority Critical patent/CN116074688A/en
Publication of CN116074688A publication Critical patent/CN116074688A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R3/00Circuits for transducers, loudspeakers or microphones
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/21Server components or server architectures
    • H04N21/218Source of audio or video content, e.g. local disk arrays
    • H04N21/2187Live feed
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/439Processing of audio elementary streams
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R2430/00Signal processing covered by H04R, not provided for in its groups
    • H04R2430/01Aspects of volume control, not necessarily automatic, in sound systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Physics & Mathematics (AREA)
  • Acoustics & Sound (AREA)
  • Databases & Information Systems (AREA)
  • Circuit For Audible Band Transducer (AREA)

Abstract

The embodiment of the application discloses an audio playing method, an audio playing device and a computer readable storage medium, and relates to the technical field of Internet; acquiring system audio data input by a system audio input component; when a virtual audio driver in the system is started, intercepting system audio data input by a system audio input component by utilizing the virtual audio driver; processing the audio parameters of the intercepted system audio data to obtain processed audio data; and sending the processed audio data to the system audio output assembly through the virtual audio driver so that the system audio output assembly plays the processed audio data. Therefore, the system audio data input by the system audio input assembly is intercepted through the virtual audio driver, the intercepted system audio data is processed, the processed audio data is sent to the system audio output assembly for playing, normal playing of the audio data is guaranteed, and then the efficiency of audio playing is improved.

Description

Audio playing method, device and computer readable storage medium
Technical Field
The present application relates to the field of internet technologies, and in particular, to an audio playing method, an audio playing device, and a computer readable storage medium.
Background
With the rapid development of internet technology, live scenes based on the internet are becoming more and more popular in the daily life of users, for example, scenes in which online lectures are performed through live applications.
However, the user often has a situation of sound evasion in the live broadcast process, where the system can suppress the system volume of other applications when the microphone is used by the current live broadcast application. The phenomenon of sound evasion ensures that a user cannot normally acquire system audio of other applications in the live broadcast process, and the normal play of system audio data in the live broadcast process is influenced, so that the efficiency of audio play is lower.
Disclosure of Invention
The embodiment of the application provides an audio playing method, an audio playing device and a computer readable storage medium, which can ensure normal playing of system audio data in a live broadcast process, thereby improving the efficiency of audio playing.
The embodiment of the application provides an audio playing method, which comprises the following steps:
acquiring system audio data input by a system audio input assembly, wherein the system audio input assembly is an audio input assembly currently used by a system;
when a virtual audio driver in a system is started, intercepting system audio data input by an audio input component of the system by utilizing the virtual audio driver, wherein the virtual audio driver is an audio driver program created in advance;
Processing the audio parameters of the intercepted system audio data to obtain processed audio data;
and sending the processed audio data to a system audio output assembly through the virtual audio driver so that the system audio output assembly plays the processed audio data, wherein the system audio output assembly is an audio output assembly currently used by a system.
Accordingly, an embodiment of the present application provides an audio playing device, including:
the system comprises an acquisition unit, a control unit and a control unit, wherein the acquisition unit is used for acquiring system audio data input by a system audio input assembly, and the system audio input assembly is an audio input assembly currently used by the system;
the system audio input module is used for inputting system audio data to a user, and the system audio input module is used for inputting system audio data to the user;
the processing unit is used for processing the audio parameters of the intercepted system audio data to obtain processed audio data;
and the sending unit is used for sending the processed audio data to a system audio output assembly through the virtual audio driver so that the system audio output assembly plays the processed audio data, and the system audio output assembly is an audio output assembly currently used by the system.
In an embodiment, the interception unit includes:
a switching subunit, configured to switch an audio output component currently used by the system to the virtual audio driver;
a creating subunit, configured to create a virtual audio component through the virtual audio driver, where the virtual audio component is a component of an analog audio device;
and the interception subunit is used for intercepting the system audio data input by the system audio input assembly according to the virtual audio assembly.
In an embodiment, the processing unit comprises:
the calling subunit is used for calling the attribute parameter acquisition interface and acquiring parameter processing attributes according to a calling result;
and the adjusting subunit is used for adjusting the audio parameters of the intercepted system audio data according to the parameter processing attribute to obtain the processed audio data.
In an embodiment, the adjustment subunit comprises:
the configuration module is used for carrying out attribute configuration on the virtual audio component according to the parameter processing attribute;
the audio parameter adjusting module is used for adjusting the audio parameters of the intercepted system audio data through the configured virtual audio component to obtain the processed audio data.
In an embodiment, the audio playing device further includes:
a determining unit, configured to obtain an initial volume value of the system audio output component before the virtual audio driver is started, and determine a target volume value according to the initial volume value;
and the playing unit is used for playing the processed audio data based on the target volume value.
In an embodiment, the determining unit includes:
the comparison subunit is used for comparing the initial volume value with a preset volume threshold value and determining a system volume value and a driving volume value according to a comparison result;
and the calculating subunit is used for calculating according to the system volume value and the driving volume value to obtain the target volume value.
In an embodiment, the audio playing device further includes:
the acquisition unit is used for acquiring external input audio data when receiving an audio mixed stream request aiming at the processed audio data;
the preprocessing unit is used for carrying out data preprocessing on the processed audio data to obtain target system audio data, and carrying out data preprocessing on the external input audio data to obtain target external audio data;
And the synthesis unit is used for synthesizing the target system audio data and the target external audio data to obtain mixed stream audio data and pushing the mixed stream audio data.
In an embodiment, the data preprocessing unit includes:
the caching subunit is used for respectively caching the processed audio data and the external input audio data into an audio data storage pool;
the first adjusting subunit is used for adjusting the processed audio data in the audio data storage pool according to preset processing parameters to obtain the audio data of the target system;
and the second adjusting subunit is used for adjusting the external input audio data in the audio data storage pool according to the preset processing parameters to obtain target external audio data.
In addition, the embodiment of the application further provides a computer readable storage medium, wherein the computer readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the steps in any one of the audio playing methods provided by the embodiment of the application.
In addition, the embodiment of the application also provides a computer device, which comprises a processor and a memory, wherein the memory stores an application program, and the processor is used for running the application program in the memory to realize the audio playing method provided by the embodiment of the application.
Embodiments of the present application also provide a computer program product or computer program comprising computer instructions stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions, so that the computer device executes the steps in the audio playing method provided in the embodiment of the application.
The embodiment of the application acquires the system audio data input by the system audio input component; when a virtual audio driver in the system is started, intercepting system audio data input by a system audio input component by utilizing the virtual audio driver; processing the audio parameters of the intercepted system audio data to obtain processed audio data; and sending the processed audio data to the system audio output assembly through the virtual audio driver so that the system audio output assembly plays the processed audio data. Therefore, the system audio data input by the system audio input assembly is intercepted through the virtual audio driver, the intercepted system audio data is processed, the processed audio data is further transmitted to the system audio output assembly for playing through the virtual audio driver, the phenomenon of sound evasion in the prior art is avoided, the normal playing of the audio data is ensured, and the playing efficiency of the audio data is further improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly introduced below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic view of an implementation scenario of an audio playing method according to an embodiment of the present application;
fig. 2 is a schematic flow chart of an audio playing method according to an embodiment of the present application;
fig. 3 is a schematic implementation flow diagram of a virtual audio driver of an audio playing method according to an embodiment of the present application;
fig. 4 is a schematic diagram of a target volume value determining flow of an audio playing method according to an embodiment of the present application;
fig. 5a is an audio mixing flow schematic diagram of an audio playing method according to an embodiment of the present application;
fig. 5b is a schematic diagram of mixed-stream audio data sharing in an audio playing method according to an embodiment of the present application;
fig. 6 is another flow chart of an audio playing method according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of an audio playing device according to an embodiment of the present application;
Fig. 8 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
The embodiment of the application provides an audio playing method, an audio playing device and a computer readable storage medium. The audio playing device may be integrated in a computer device, which may be a server or a terminal.
The server may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, network acceleration services (Content Delivery Network, CDN), basic cloud computing services such as big data and an artificial intelligent platform. The terminal may be, but not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, or other devices capable of playing audio. The terminal and the server may be directly or indirectly connected through wired or wireless communication, which is not limited herein.
For a better description of embodiments of the present application, please refer to the following terms:
and (3) driving: computer software terminology refers to a program that drives software in a computer. The driver, collectively referred to as a device driver, is a special program added to the operating system and contains information about the hardware device. This information enables the computer to communicate with the corresponding device. The driver is a configuration file written by a hardware manufacturer according to an operating system, so that the hardware in the computer cannot work without the driver.
Audio driving: the audio device is a driver on a computer, and mainly comprises a sound card, an audio decoder, an optical drive and the like, and the driver is required to be used for enabling the sound card, the audio decoder, the optical drive and the like to normally operate, and is collectively called as an audio device driver. The main function of the system is that the users can produce sound when listening to music, watching movies or playing audio-video discs on the computer.
Referring to fig. 1, taking an example that an audio playing device is integrated in an electronic device, fig. 1 is a schematic view of an implementation scenario of an audio playing method provided in an embodiment of the present application, where the electronic device may be a terminal, and the terminal may obtain system audio data input by a system audio input component; when a virtual audio driver in the system is started, intercepting system audio data input by a system audio input component by utilizing the virtual audio driver; processing the audio parameters of the intercepted system audio data to obtain processed audio data; and sending the processed audio data to the system audio output assembly through the virtual audio driver so that the system audio output assembly plays the processed audio data.
It should be noted that, the schematic view of the implementation environment of the audio playing method shown in fig. 1 is only an example, and the implementation environment of the audio playing method described in the embodiment of the present application is for more clearly describing the technical solution of the embodiment of the present application, and does not constitute a limitation to the technical solution provided in the embodiment of the present application. As one of ordinary skill in the art can know, with the evolution of audio playing and the appearance of new service scenes, the technical scheme provided by the application is also applicable to similar technical problems.
With the rapid development of internet technology, live broadcasting scenes based on the internet are becoming more and more popular in daily life of users, for example, a scene that a host can perform an activity popularization and sales of various products through a network, a teacher can perform online teaching through the network, and a student can listen to the lessons through the network. With the diversification of social situations, such as epidemic situations, online education based on networks is increasingly important.
However, the user often has a situation of sound evasion in the live broadcast process, where the system can suppress the system volume of other applications when the microphone is used by the current live broadcast application. The phenomenon of sound evasion ensures that a user cannot normally acquire system audio of other applications in the live broadcast process, the scene requirement that the user needs to acquire audio acquired by a microphone and audio provided by other applications at the same time in the live broadcast process cannot be met, the normal play of system audio data in the live broadcast process is influenced, and the efficiency of audio play is lower. In order to solve the above problems, the embodiments of the present application provide an audio playing method, which avoids the phenomenon of sound evasion in the prior art by intercepting system audio data, ensures normal playing of the audio data, and further improves the efficiency of playing the audio data.
The following will describe in detail. The following description of the embodiments is not intended to limit the preferred embodiments.
The present embodiment will be described from the perspective of an audio playing apparatus, which may be integrated in a computer device, which may be a terminal, and the present application is not limited thereto.
Referring to fig. 2, fig. 2 is a flowchart of an audio playing method according to an embodiment of the present application. The audio playing method comprises the following steps:
in step 101, system audio data input by a system audio input component is acquired.
The system audio input component may be an audio input component currently used by the system, and is used for acquiring audio data of the system to play the system audio data, and correspondingly, a system audio output component also exists in the system, where the system audio output component may be used for playing the system audio data acquired and input by the system audio input component, and the system audio output component and the system audio input component may be integrated in one audio device of the system or may be integrated in different audio devices, for example, the system audio input component and the system audio output component may be an audio input module and an audio output module in an audio output device of the system, where the system audio output device may be a device that converts audio data stored on a computer device into sound after digital-to-analog conversion and noise filtration in the system for playing the system audio data. The system audio output device may include an audio input component, which may be used to obtain system audio data, and an audio output component, which may be used to play the system audio data obtained and input by the audio input component.
The system may be an operating system such as macOS, which may be a graphical operating system based on a hybrid kernel of the darwinian operating system (XNU).
The system audio data may be audio data obtained from the system and may be provided to at least one application installed in the system, or may be audio data provided to the system by an external storage device or an internal storage device, which is not limited herein. The system audio data may generate system sounds, such as sounds generated by playing audio data such as music, video, etc. through an application on the system, or message alert tones of a message received by the application, or alert tones generated by the system in response to user-triggered operations, such as the user may adjust the volume of a speaker of the system through a terminal, after the user's adjustment operation is completed, the system may respond to the completion of the user's adjustment operation by generating and playing alert tones, etc.
In this way, in order to realize the playing of the audio data, the system audio data input by the system audio input component can be acquired through the system audio data acquired by the system audio input component. In a specific embodiment, the system audio data input by the system audio input component may be filtered according to different data sources, for example, when the system audio data includes audio data of a plurality of applications, the audio data of different applications may be filtered according to actual requirements, for example, if the system audio data includes audio data of application a, application B and application C, when the audio data of application a and application C need to be played, the audio data of application a and application C may be filtered according to the sources of the audio data, so as to implement subsequent playing.
In step 102, when a virtual audio driver in the system is started, system audio data input by a system audio input component is intercepted by the virtual audio driver.
The virtual audio driver may be a pre-created audio driver (Device), may be pre-installed in the system, may create a virtual Device by installing the virtual audio driver, and simulate the audio Device by the created virtual Device, so as to intercept the audio data of the system.
Optionally, the implementation process of the virtual audio driver may refer to fig. 3, and fig. 3 is a schematic implementation flow diagram of a virtual audio driver of an audio playing method provided in this embodiment of the present application, where a process of creating virtual Device (create Device), starting input/output (Start IO), about to Start input/output operation (wil DoIO), starting input/output operation (Begin IO), ending input/output operation (End IO), stopping input/output operation (Stop IO), destroying interface functions such as virtual Device (destroydevice), and performing repeated input/output operations between the starting input/output operation and the ending input/output operation to obtain system audio data may be performed by using an application program interface (Application Programming Interface, abbreviated as API) of a system bottom layer, so that a process of creating system audio data by using the virtual audio driver may be implemented, and the virtual Device may implement simulation of the audio Device according to capabilities provided by these interface functions.
In this embodiment, the virtual audio driver may be created in the system in advance, and then when the virtual audio driver in the system is started, the system audio data input by the system audio input component may be intercepted by using the virtual audio driver.
Alternatively, the system audio output component currently used by the system can be switched to a virtual audio driver created in advance, so as to intercept the system audio data input by the system audio input component and originally transmitted to the system audio output component through the virtual audio driver. The system audio data can be acquired through virtual equipment created by the virtual audio driver, specifically, an audio output component currently used by the system can be switched to the virtual audio driver, further, a virtual audio component can be created by the virtual audio driver, system audio data input by the system audio input component can be intercepted according to the virtual audio component, and the virtual audio component can be a component of analog audio equipment and is used for acquiring the system audio data. The virtual audio component may be a virtual device created through a virtual audio driver, specifically, the virtual audio component, that is, the virtual device, may be created through the virtual audio driver, and further, system audio data that needs to be routed and transmitted may be continuously intercepted, acquired, and processed through a message loop that the virtual device performs a poll between starting an input/output operation and ending the input/output operation.
In step 103, the audio parameters of the intercepted system audio data are processed, so as to obtain processed audio data.
The audio parameters may include index information such as a sampling rate, a code rate, the number of audio tracks, and a volume, so that the audio parameters of the intercepted system audio data may be processed to obtain processed audio data in order to realize normal playing of the intercepted audio data.
Optionally, the attribute parameter obtaining interface may be called, and the parameter processing attribute may be obtained according to the calling result, so that the audio parameters of the intercepted system audio data may be adjusted according to the parameter processing attribute, so as to obtain the processed audio data. The attribute parameter obtaining interface may be an interface that is set in advance according to requirements, and the parameter processing attribute may be obtained by calling the interface, where the parameter processing attribute may be set by a related technician according to actual requirements, may be provided by a system, may also be adjusted in real time according to actual conditions, and is not limited herein, and may be used to adjust audio parameters of system audio data, so that the system audio data may be played normally.
Specifically, the attribute configuration can be performed on the virtual audio component according to the parameter processing attribute, and then the target audio parameter of the system audio data can be determined through the configured virtual audio component, so that the audio parameter of the intercepted system audio data can be adjusted through the target audio parameter, and the processed audio data can be obtained. For example, assuming that the sampling rate of the system audio data is set to a and the number of audio tracks is set to b, the virtual audio component may be configured with the parameter processing attribute that sets the sampling rate of the system audio data to a and the number of audio tracks to b, so that the audio parameters of the intercepted system audio data and the number of audio tracks may be adjusted by the configured virtual audio component to obtain the processed audio data.
In step 104, the processed audio data is sent to the system audio output component via the virtual audio driver.
The system audio output component can be used for playing the system audio data acquired and input by the audio input component, specifically, after the system audio data intercepted by the virtual equipment created by the virtual audio driver is acquired and processed, the processed audio data can be sent to the system audio output component through the virtual audio driver after the processed audio data are obtained, so that the processed audio data are played through the system audio output component, and the problem that in the prior art, when a user speaks through a microphone in the live broadcast process, the volume of the acquired system audio data is low by the system, and the normal acquisition of the system audio is affected by the user can be avoided. Therefore, the normal playing of the system audio data is ensured, and the playing efficiency of the audio data is further improved.
The system audio output component can be an audio output component currently used by the system, and can also be an audio output component used by the system before the system audio data is intercepted by the virtual audio drive, optionally, before the system audio data is intercepted by the virtual audio drive, the audio output component currently used by the system can be acquired and recorded through a musical instrument digital interface (Musical Instrument Digital Interface, abbreviated as MIDI), and then the processed audio data can be transmitted to the pre-recorded audio output component for playing by routing when the processed audio data is acquired.
In an embodiment, when playing the system audio data, the volume of the system audio data may be comprehensively determined according to the volume set by the system audio output component and the virtual audio component, which may cause abnormal playing of the system audio data if the volume of the system audio data is not adjusted. In order to ensure that the final playing volume of the system audio data can be played normally at a proper volume, the final playing volume of the system audio data can be kept in a state equal to the volume value initially set by the system.
Therefore, an adjustment policy for adjusting the volume value of the system audio data may be formulated, so that the volume of the processed audio data when being played may be the volume value initially set by the system, please refer to fig. 4, fig. 4 is a schematic diagram of a target volume value determination flow of an audio playing method in this embodiment, specifically, the initial volume value of the system audio output assembly before the virtual audio drive is started may be obtained after the virtual audio drive is started, the initial volume value of the system audio output assembly before the virtual audio drive is started may also be obtained before the virtual audio drive is started, the target volume value may be determined according to the initial volume value, and then the volume setting may be performed on the system audio output assembly based on the target volume value, so that the processed audio data may be played according to the audio output assembly after the volume setting. The initial volume value may be a volume value of an audio output component of the system before the virtual audio driver is started, that is, an initial volume value of the system, the target volume value may be a volume value for playing the processed audio data, may be a volume value determined according to the initial volume value, that is, may be a volume value obtained after adjustment according to an adjustment policy, and the target volume value may be the initial volume value.
In an embodiment, the initial volume value may be compared with a preset volume threshold, and a system volume value and a driving volume value may be determined according to the comparison result, so as to calculate according to the system volume value and the driving volume value, thereby obtaining the target volume value. The preset volume threshold may be a preset critical value, when the volume value is equal to the critical value, the user hears the sound effect more properly, the critical value may be determined according to an empirical value, when the volume value is greater than the critical value, the user may feel that the volume is larger, and when the volume value is less than the critical value, the user may feel that the volume is smaller, so the target volume value may be determined according to a comparison result between the initial volume value and the preset volume threshold, and in addition, the preset volume threshold may be a value set to ensure that the final target volume value is the same as the initial volume value. The system volume value may be a volume value of a system audio output component, and the driving volume value may be a volume value of a virtual audio drive, that is, a volume value of a virtual audio component.
Therefore, the system volume value and the driving volume value can be determined according to the comparison result of the initial volume value and the preset volume threshold, alternatively, when the initial volume value is larger than the preset volume threshold, the preset system volume value can be obtained and can be a preset parameter value, the target volume value can be set as the value of the target volume value through the introduction of the parameter value, the preset system volume value can be used as the system volume value, and the driving volume value to be determined can be assigned according to the initial volume value, so that the driving volume value is obtained. When the initial volume value is not greater than the preset volume threshold value, the preset volume threshold value may be taken as a system volume value, and a value of a preset system volume value (preset volume threshold value)/initial volume value may be determined as a driving volume value.
And calculating according to the system volume value and the driving volume value to obtain the target volume value, wherein the system volume value can be multiplied by the driving volume value to calculate, and the ratio of the calculated product to the preset system volume value is determined as the target volume value. For example, it may be assumed that the initial volume value is 50, the preset volume threshold value is 80, and the preset system volume value is 100, and since the initial volume value 50 is smaller than the preset volume threshold value 80, the system volume value is 80, the driving volume value is 100 ≡ (80 ≡50) =62.5, and the target volume value is 80×62.5 ≡100=50, that is, equal to the initial volume value. For another example, assuming that the initial volume value is 90, the preset volume threshold value is 80, and the preset system volume value is 100, the initial volume value 90 is greater than the preset volume threshold value 80, and the driving volume value is 90, the target volume value is 100×90+.100=90, that is, equal to the initial volume value.
Thus, through the above adjustment strategy, the adjustment that the target volume value is equal to the initial volume value can be realized, so that the processed audio data can be played at a proper volume.
In an embodiment, in order to realize that the sound collected by the microphone and the system sound of other applications in the system can be combined and shared in the live broadcast process, so that other users in the live broadcast room can hear the sound collected by the microphone and the system sound of the end user where the microphone is located, the audio data collected by the microphone in the live broadcast process and the system audio data of other applications in the system can be mixed, please refer to fig. 5a, fig. 5a is a schematic audio mixing flow chart of the audio playing method provided in the embodiment of the present application, specifically, when an audio mixing flow request for the processed audio data is received, the audio collecting device can collect external input audio data, for example, the external input audio data can be collected through the microphone device, the external input audio data can be audio data input by the user through the microphone, so that the processed audio data can be subjected to data preprocessing, the target system audio data can be obtained, the external input audio data can be subjected to data preprocessing, and the target external audio data can be obtained, and the target system audio data and the target audio data can be subjected to data preprocessing, and the target audio data can be subjected to audio mixing flow mixing and the target audio data to the audio data to be sent to the audio mixing flow (Pulse Code Modulation buffer) to be processed, and the audio data is subjected to the mixing flow to be processed. The mixed-stream audio data obtained by synthesis can be sent to a server, and the mixed-stream audio data is sent to an associated client through the server, for example, the client corresponding to other users in the same live broadcasting room. Optionally, referring to fig. 5b, fig. 5b is a schematic view of mixed-stream audio data sharing in an audio playing method according to an embodiment of the present application, where the mixed-stream audio data may be sent to an associated client through a server by a sharing button in a live broadcast application.
The data preprocessing may include resampling, data format conversion, and data size adjustment of the processed audio data and the external input audio data, so that the processed audio data and the external input audio data may be mixed. Specifically, the processed audio data and the external input audio data may be resampled according to the actually required sampling rate, so as to process the sampling rates of the processed audio data and the external input audio data to the actually required sampling rate, the data formats of the processed audio data and the external input audio data may be converted according to the actually required data formats, so as to process the data formats of the processed audio data and the external input audio data to the actually required data formats, the data sizes of the processed audio data and the external input audio data may be processed according to the actually required data sizes, so as to process the data sizes of the processed audio data and the external input audio data to the actually required data sizes, and so on.
In an embodiment, the post-consumer processed audio data and the external input audio data may be cached in the producer consumer mode to perform data preprocessing of the post-consumer processed audio data and the external input audio data, and specifically, the post-consumer processed audio data and the external input audio data may be respectively cached in an audio data storage pool, so that the post-consumer processed audio data in the audio data storage pool may be adjusted according to a preset processing parameter to obtain the target system audio data, and meanwhile, the external input audio data in the audio data storage pool may be adjusted according to the preset processing parameter to obtain the target external audio data. The preset processing parameters may include parameters such as a sampling rate, a data format, and a data size, which are set in advance according to actual situations, and the preset processing parameters may be determined according to actual situations.
As can be seen from the above, in the embodiments of the present application, system audio data input by a system audio input component is obtained; when a virtual audio driver in the system is started, intercepting system audio data input by a system audio input component by utilizing the virtual audio driver; processing the audio parameters of the intercepted system audio data to obtain processed audio data; and sending the processed audio data to the system audio output assembly through the virtual audio driver so that the system audio output assembly plays the processed audio data. Therefore, the system audio data input by the system audio input assembly is intercepted through the virtual audio driver, the intercepted system audio data is processed, the processed audio data is further transmitted to the system audio output assembly for playing through the virtual audio driver, the phenomenon of sound evasion in the prior art is avoided, the normal playing of the audio data is ensured, and the playing efficiency of the audio data is further improved.
According to the method described in the above embodiments, examples are described in further detail below.
In this embodiment, an example will be described in which the audio playback apparatus is specifically integrated in a computer device. The audio playing method uses the terminal as an execution main body to specifically describe.
For better describing the embodiments of the present application, please refer to fig. 6, fig. 6 is another flow chart of the audio playing method provided in the embodiments of the present application. The specific flow is as follows:
in step 201, the terminal obtains system audio data input by the system audio input component, when a virtual audio driver in the system is started, the audio output component currently used by the system is switched to the virtual audio driver, a virtual audio component is created through the virtual audio driver, and the system audio data input by the system audio input component is intercepted according to the virtual audio component.
The system audio input component can be a component used for acquiring system audio data to play the system audio data in the system, and in order to play the audio data, the terminal can acquire the system audio data input by the system audio input component through the system audio data acquired by the system audio input component. The audio output assembly currently used by the system can be switched into a virtual audio drive, a virtual audio assembly can be further created through the virtual audio drive, system audio data input by the system audio input assembly are intercepted according to the virtual audio assembly, and the virtual audio assembly can be an assembly of analog audio equipment and is used for acquiring the system audio data. The virtual audio component may be a virtual device created through a virtual audio driver, specifically, the terminal may create the virtual audio component, that is, the virtual device, through the virtual device, and may further continuously intercept, acquire and process system audio data that needs to be routed through a polling message loop between starting and ending an input/output operation by the virtual device.
In step 202, the terminal invokes an attribute parameter obtaining interface, obtains a parameter processing attribute according to the invoking result, performs attribute configuration on the virtual audio component according to the parameter processing attribute, and adjusts the audio parameters of the intercepted system audio data through the configured virtual audio component to obtain processed audio data.
In order to play the system audio data normally, the terminal can acquire the parameter processing attributes according to the calling result by calling the attribute parameter acquisition interface, and then adjust the audio parameters of the intercepted system audio data according to the parameter processing attributes, so as to obtain the processed audio data. The attribute parameter obtaining interface may be an interface that is set in advance according to requirements, and the parameter processing attribute may be obtained by calling the interface, where the parameter processing attribute may be set by a related technician according to actual requirements, may be provided by a system, may also be adjusted in real time according to actual conditions, and is not limited herein, and may be used to adjust audio parameters of system audio data, so that the system audio data may be played normally.
Specifically, the terminal can perform attribute configuration on the virtual audio component according to the parameter processing attribute, and further can determine a target audio parameter of the system audio data through the configured virtual audio component, so that the audio parameter of the intercepted system audio data can be adjusted through the target audio parameter, and the processed audio data is obtained. For example, assuming that the sampling rate of the system audio data is set to a and the number of audio tracks is set to b, the virtual audio component may be configured with the parameter processing attribute that sets the sampling rate of the system audio data to a and the number of audio tracks to b, so that the audio parameters of the intercepted system audio data and the number of audio tracks may be adjusted by the configured virtual audio component to obtain the processed audio data.
In step 203, the terminal sends the processed audio data to the system audio output component through the virtual audio driver, obtains an initial volume value of the system audio output component before the virtual audio driver is started, compares the initial volume value with a preset volume threshold, and determines a system volume value and a driving volume value according to a comparison result.
The terminal can send the processed audio data to the system audio output assembly through virtual equipment created by the virtual audio drive, can acquire an initial volume value of the system audio output assembly before the virtual audio drive is started, can compare the initial volume value with a preset volume threshold value, and can further determine the system volume value and the drive volume value according to a comparison result.
With continued reference to fig. 4, the terminal may determine a system volume value and a driving volume value according to a comparison result between the initial volume value and a preset volume threshold, so that the terminal may calculate according to the system volume value and the driving volume value to obtain the target volume value, and further may set a volume of the system audio output component based on the target volume value, so that the processed audio data may be played according to the audio output component after the volume setting. Optionally, when the initial volume value is greater than the preset volume threshold, a preset system volume value may be obtained, where the preset system volume value may be a preset parameter value, and the introduction of the parameter value may enable the target volume value to be set as a value of the target volume value, and the preset system volume value may be used as the system volume value, and the driving volume value may be obtained by performing assignment processing on the driving volume value to be determined according to the initial volume value. When the initial volume value is not greater than the preset volume threshold value, the preset volume threshold value may be taken as a system volume value, and a value of a preset system volume value (preset volume threshold value)/initial volume value may be determined as a driving volume value.
In step 204, the terminal calculates the target volume value according to the system volume value and the driving volume value, and plays the processed audio data based on the target volume value.
Specifically, the terminal may calculate the system volume value and the driving volume value to obtain the target volume value, and further may play the processed audio data based on the target volume value, so that the processed audio data is played with the target volume value. The system volume value may be multiplied by the driving volume value to calculate, and a ratio of the calculated product to a preset system volume value may be determined as the target volume value. For example, it may be assumed that the initial volume value is 50, the preset volume threshold value is 80, and the preset system volume value is 100, and since the initial volume value 50 is smaller than the preset volume threshold value 80, the system volume value is 80, the driving volume value is 100 ≡ (80 ≡50) =62.5, and the target volume value is 80×62.5 ≡100=50, that is, equal to the initial volume value. For another example, assuming that the initial volume value is 90, the preset volume threshold value is 80, and the preset system volume value is 100, the initial volume value 90 is greater than the preset volume threshold value 80, and the driving volume value is 90, the target volume value is 100×90+.100=90, that is, equal to the initial volume value.
Thus, through the above adjustment strategy, the adjustment that the target volume value is equal to the initial volume value can be realized, so that the processed audio data can be played at a proper volume.
In step 205, when an audio mixing request for the processed audio data is received, the terminal collects external input audio data, and buffers the processed audio data and the external input audio data into an audio data storage pool, respectively.
In order to realize the combination and sharing of the sound collected by the microphone and the system sound of other applications in the system in the live broadcast process, other users in the live broadcast room can hear the sound collected by the microphone and the system sound of the end user where the microphone is located, and the audio data collected by the microphone in the live broadcast process and the system audio data of other applications in the system can be mixed. With continued reference to fig. 5a, the post-consumer audio data and the external input audio data may be cached in the producer consumer mode to perform data preprocessing of the post-consumer audio data and the external input audio data, specifically, when an audio mixing request for the post-consumer audio data is received, for example, when the user triggers the audio mixing request for the post-consumer audio data through the sharing button in fig. 5b, the terminal may collect the external input audio data, and may cache the post-consumer audio data and the external input audio data in the audio data storage pool respectively.
In step 206, the terminal adjusts the processed audio data in the audio data storage pool according to the preset processing parameters to obtain the audio data of the target system, and adjusts the externally input audio data in the audio data storage pool according to the preset processing parameters to obtain the target external audio data.
In order to realize the synthesis of the target system audio data and the target external audio data, the terminal may perform data preprocessing on the processed audio data to obtain the target system audio data, and perform data preprocessing on the external input audio data to obtain the target external audio data, where the data preprocessing may include resampling, data format conversion, and data size adjustment on the processed audio data and the external input audio data, so that the processed audio data and the external input audio data may perform audio mixing. Specifically, the processed audio data and the external input audio data can be resampled according to the sampling rate actually required, the processed audio data and the external input audio data can be converted according to the data format actually required, the processed audio data and the external input audio data can be processed according to the data size actually required, and the like.
Specifically, the terminal may buffer the processed audio data and the external input audio data into an audio data storage pool, and may further adjust the processed audio data in the audio data storage pool according to a preset processing parameter to obtain audio data of the target system, and may adjust the external input audio data in the audio data storage pool according to the preset processing parameter to obtain target external audio data. The preset processing parameters may include parameters such as a sampling rate, a data format, and a data size, which are set in advance according to actual situations, and the preset processing parameters may be determined according to actual situations.
In step 207, the terminal synthesizes the target system audio data and the target external audio data to obtain mixed stream audio data, and pushes the mixed stream audio data.
The terminal can send the target system audio data and the target external audio data to a finger pulse code modulation buffer area to be synthesized to obtain mixed stream audio data, and push the mixed stream audio data. The mixed-stream audio data obtained by synthesis can be sent to a server, and the mixed-stream audio data is sent to an associated client through the server, for example, the client corresponding to other users in the same live broadcasting room.
As can be seen from the above, in the embodiment of the present application, system audio data input by a system audio input component is obtained through a terminal, when a virtual audio driver in the system is started, an audio output component currently used by the system is switched to a virtual audio driver, a virtual audio component is created through the virtual audio driver, and system audio data input by the system audio input component is intercepted according to the virtual audio component; the terminal calls an attribute parameter acquisition interface, acquires a parameter processing attribute according to a call result, performs attribute configuration on the virtual audio component according to the parameter processing attribute, and adjusts the audio parameters of the intercepted system audio data through the configured virtual audio component to obtain processed audio data; the terminal sends the processed audio data to a system audio output assembly through a virtual audio driver, acquires an initial volume value of the system audio output assembly before the virtual audio driver is started, compares the initial volume value with a preset volume threshold value, and determines a system volume value and a driving volume value according to a comparison result; the terminal calculates according to the system volume value and the driving volume value to obtain the target volume value, and plays the processed audio data based on the target volume value; when receiving an audio mixing request for the processed audio data, the terminal acquires external input audio data and respectively caches the processed audio data and the external input audio data into an audio data storage pool; the terminal adjusts the processed audio data in the audio data storage pool according to preset processing parameters to obtain target system audio data, and adjusts the externally input audio data in the audio data storage pool according to the preset processing parameters to obtain target external audio data; the terminal synthesizes the target system audio data and the target external audio data to obtain mixed stream audio data, and pushes the mixed stream audio data. Therefore, system audio data input by the system audio input assembly are intercepted through the virtual audio driver, the intercepted system audio data are processed, the processed audio data are further transmitted to the system audio output assembly to be played through the virtual audio driver, the phenomenon of sound evasion in the prior art is avoided, normal playing of the audio data is guaranteed, meanwhile, the processed audio data and external input audio data are synthesized, mixed stream audio data obtained through synthesis are pushed, other clients can acquire the system audio data and the external input audio data in the current client system at the same time, audio acquisition efficiency is improved, and audio data playing efficiency is further improved.
In order to better implement the above method, the embodiment of the present invention further provides an audio playing device, where the audio playing device may be integrated in a computer device, and the computer device may be a terminal.
For example, as shown in fig. 7, a schematic structural diagram of an audio playing device provided in an embodiment of the present application may include an obtaining unit 301, an intercepting unit 302, a processing unit 303, and a sending unit 304, as follows:
an obtaining unit 301, configured to obtain system audio data input by a system audio input component, where the system audio input component is an audio input component currently used by the system;
an interception unit 302, configured to intercept, when a virtual audio driver in the system is started, system audio data input by the system audio input component using the virtual audio driver, where the virtual audio driver is a pre-created analog audio driver component;
a processing unit 303, configured to process the audio parameters of the intercepted system audio data to obtain processed audio data;
and the sending unit 304 is configured to send the processed audio data to a system audio output component through the virtual audio driver, so that the system audio output component plays the processed audio data, where the system audio output component is an audio output component currently used by the system.
In one embodiment, the interception unit 302 includes:
a switching subunit, configured to switch an audio output component currently used by the system to a virtual audio driver;
a creation subunit for creating a virtual audio component through a virtual audio driver;
and the interception subunit is used for intercepting the system audio data input by the system audio input assembly according to the virtual audio assembly.
In one embodiment, the processing unit 303 includes:
the calling subunit is used for calling the attribute parameter acquisition interface and acquiring parameter processing attributes according to a calling result;
and the adjusting subunit is used for adjusting the audio parameters of the intercepted system audio data according to the parameter processing attribute to obtain the processed audio data.
In one embodiment, the adjustment subunit includes:
the configuration module is used for carrying out attribute configuration on the virtual audio component according to the parameter processing attribute;
the audio parameter adjusting module is used for adjusting the audio parameters of the intercepted system audio data through the configured virtual audio component to obtain the processed audio data.
In an embodiment, the audio playing device further includes:
a determining unit, configured to obtain an initial volume value of the system audio output component before the virtual audio driver is started, and determine a target volume value according to the initial volume value;
And the playing unit is used for playing the processed audio data based on the target volume value.
In an embodiment, the determining unit includes:
the comparison subunit is used for comparing the initial volume value with a preset volume threshold value and determining a system volume value and a driving volume value according to a comparison result;
and the calculating subunit is used for calculating according to the system volume value and the driving volume value to obtain the target volume value.
In an embodiment, the audio playing device further includes:
the acquisition unit is used for acquiring external input audio data when receiving an audio mixed stream request aiming at the processed audio data;
the preprocessing unit is used for carrying out data preprocessing on the processed audio data to obtain target system audio data, and carrying out data preprocessing on the external input audio data to obtain target external audio data;
and the synthesis unit is used for synthesizing the target system audio data and the target external audio data to obtain mixed stream audio data and pushing the mixed stream audio data.
In one embodiment, the data preprocessing unit includes:
the buffer subunit is used for buffering the processed audio data and the external input audio data into an audio data storage pool respectively;
The first adjusting subunit is used for adjusting the processed audio data in the audio data storage pool according to preset processing parameters to obtain the audio data of the target system;
and the second adjusting subunit is used for adjusting the external input audio data in the audio data storage pool according to the preset processing parameters to obtain target external audio data.
In the implementation, each unit may be implemented as an independent entity, or may be implemented as the same entity or several entities in any combination, and the implementation of each unit may be referred to the foregoing method embodiment, which is not described herein again.
As can be seen from the above, in the embodiment of the present application, the acquiring unit 301 acquires the system audio data input by the system audio input component; the interception unit 302 intercepts system audio data input by a system audio input component using a virtual audio driver when the virtual audio driver in the system is started; the processing unit 303 processes the audio parameters of the intercepted system audio data to obtain processed audio data; the transmitting unit 304 transmits the processed audio data to the system audio output component via the virtual audio driver, so that the system audio output component plays the processed audio data. Therefore, the system audio data input by the system audio input assembly is intercepted through the virtual audio driver, the intercepted system audio data is processed, the processed audio data is further transmitted to the system audio output assembly for playing through the virtual audio driver, the phenomenon of sound evasion in the prior art is avoided, the normal playing of the audio data is ensured, and the playing efficiency of the audio data is further improved.
The embodiment of the application further provides a computer device, as shown in fig. 8, which shows a schematic structural diagram of the computer device according to the embodiment of the application, where the computer device may be a terminal, specifically:
the computer device may include one or more processors 401 of a processing core, memory 402 of one or more computer readable storage media, a power supply 403, and an input unit 404, among other components. Those skilled in the art will appreciate that the computer device structure shown in FIG. 8 is not limiting of the computer device and may include more or fewer components than shown, or may be combined with certain components, or a different arrangement of components. Wherein:
the processor 401 is a control center of the computer device, connects various parts of the entire computer device using various interfaces and lines, and performs various functions of the computer device and processes data by running or executing software programs and/or modules stored in the memory 402, and calling data stored in the memory 402, thereby performing overall monitoring of the computer device. Optionally, processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, an application program, etc., and the modem processor mainly processes wireless communication. It will be appreciated that the modem processor described above may not be integrated into the processor 401.
The memory 402 may be used to store software programs and modules, and the processor 401 executes various functional applications and audio playback by running the software programs and modules stored in the memory 402. The memory 402 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like; the storage data area may store data created according to the use of the computer device, etc. In addition, memory 402 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 with access to the memory 402.
The computer device further comprises a power supply 403 for supplying power to the various components, preferably the power supply 403 may be logically connected to the processor 401 by a power management system, so that functions of charge, discharge, and power consumption management may be performed by the power management system. The power supply 403 may also include one or more of any of a direct current or alternating current power supply, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
The computer device may also include an input unit 404, which input unit 404 may be used to receive input numeric or character information and to generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
Although not shown, the computer device may further include a display unit or the like, which is not described herein. In particular, in this embodiment, the processor 401 in the computer device loads executable files corresponding to the processes of one or more application programs into the memory 402 according to the following instructions, and the processor 401 executes the application programs stored in the memory 402, so as to implement various functions as follows:
acquiring system audio data input by a system audio input component; when a virtual audio driver in the system is started, intercepting system audio data input by a system audio input component by utilizing the virtual audio driver; processing the audio parameters of the intercepted system audio data to obtain processed audio data; and sending the processed audio data to the system audio output assembly through the virtual audio driver so that the system audio output assembly plays the processed audio data.
The specific implementation of each operation may be referred to the previous embodiments, and will not be described herein. It should be noted that, the computer device provided in the embodiment of the present application and the method applicable to audio playing in the above embodiment belong to the same concept, and detailed implementation processes of the computer device are shown in the above method embodiment, which is not repeated here.
Those of ordinary skill in the art will appreciate that all or a portion of the steps of the various methods of the above embodiments may be performed by instructions, or by instructions controlling associated hardware, which may be stored in a computer-readable storage medium and loaded and executed by a processor.
To this end, embodiments of the present application provide a computer readable storage medium having stored therein a plurality of instructions capable of being loaded by a processor to perform steps in any of the audio playback methods provided by the embodiments of the present application. For example, the instructions may perform the steps of:
acquiring system audio data input by a system audio input component; when a virtual audio driver in the system is started, intercepting system audio data input by a system audio input component by utilizing the virtual audio driver; processing the audio parameters of the intercepted system audio data to obtain processed audio data; and sending the processed audio data to the system audio output assembly through the virtual audio driver so that the system audio output assembly plays the processed audio data.
Wherein the computer-readable storage medium may comprise: read Only Memory (ROM), random access Memory (RAM, random Access Memory), magnetic or optical disk, and the like.
Because the instructions stored in the computer readable storage medium may execute the steps in any audio playing method provided in the embodiments of the present application, the beneficial effects that any audio playing method provided in the embodiments of the present application may be achieved are detailed in the previous embodiments, and are not described herein.
Among other things, according to one aspect of the present application, a computer program product or computer program is provided that includes computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the methods provided in the various alternative implementations provided in the above embodiments.
The foregoing has described in detail the methods, apparatuses and computer readable storage medium for audio playback provided by the embodiments of the present application, and specific examples have been applied herein to illustrate the principles and implementations of the present application, and the description of the foregoing embodiments is only for aiding in the understanding of the methods and core ideas of the present application; meanwhile, those skilled in the art will have variations in the specific embodiments and application scope in light of the ideas of the present application, and the present description should not be construed as limiting the present application in view of the above.

Claims (11)

1. An audio playing method, comprising:
acquiring system audio data input by a system audio input assembly, wherein the system audio input assembly is an audio input assembly currently used by a system;
when a virtual audio driver in a system is started, intercepting system audio data input by an audio input component of the system by utilizing the virtual audio driver, wherein the virtual audio driver is an audio driver program created in advance;
processing the audio parameters of the intercepted system audio data to obtain processed audio data;
and sending the processed audio data to a system audio output assembly through the virtual audio driver so that the system audio output assembly plays the processed audio data, wherein the system audio output assembly is an audio output assembly currently used by a system.
2. The audio playing method of claim 1, wherein intercepting the system audio data input by the system audio input component using the virtual audio driver comprises:
switching an audio output component currently used by the system to the virtual audio driver;
creating a virtual audio component through the virtual audio driver, wherein the virtual audio component is a component of an analog audio device;
Intercepting the system audio data input by the system audio input component according to the virtual audio component.
3. The audio playing method as set forth in claim 2, wherein the processing the audio parameters of the intercepted system audio data to obtain processed audio data includes:
calling an attribute parameter acquisition interface, and acquiring parameter processing attributes according to a calling result;
and adjusting the audio parameters of the intercepted system audio data according to the parameter processing attributes to obtain the processed audio data.
4. The audio playing method as set forth in claim 3, wherein the adjusting the audio parameters of the intercepted system audio data according to the parameter processing attribute to obtain the processed audio data includes:
performing attribute configuration on the virtual audio component according to the parameter processing attribute;
and adjusting the audio parameters of the intercepted system audio data through the configured virtual audio component to obtain the processed audio data.
5. The audio playing method according to any one of claims 1 to 4, further comprising, after the transmitting the processed audio data into a system audio output component via the virtual audio driver:
Acquiring an initial volume value of the system audio output assembly before the virtual audio drive is started, and determining a target volume value according to the initial volume value;
and playing the processed audio data based on the target volume value.
6. The audio playback method of claim 5, wherein the determining a target volume value from the initial volume value comprises:
comparing the initial volume value with a preset volume threshold value, and determining a system volume value and a driving volume value according to a comparison result;
and calculating according to the system volume value and the driving volume value to obtain the target volume value.
7. The audio playing method as set forth in claim 1, wherein the processing the audio parameters of the intercepted system audio data to obtain the processed audio data further comprises:
when receiving an audio mixing request for the processed audio data, collecting external input audio data;
performing data preprocessing on the processed audio data to obtain target system audio data, and performing data preprocessing on the externally input audio data to obtain target external audio data;
And synthesizing the target system audio data and the target external audio data to obtain mixed stream audio data, and pushing the mixed stream audio data.
8. The audio playing method as set forth in claim 7, wherein the performing data preprocessing on the processed audio data to obtain target system audio data, and performing data preprocessing on the external input audio data to obtain target external audio data, includes:
respectively caching the processed audio data and the external input audio data into an audio data storage pool;
adjusting the processed audio data in the audio data storage pool according to preset processing parameters to obtain audio data of a target system;
and adjusting the external input audio data in the audio data storage pool according to preset processing parameters to obtain target external audio data.
9. An audio playback apparatus, comprising:
the system comprises an acquisition unit, a control unit and a control unit, wherein the acquisition unit is used for acquiring system audio data input by a system audio input assembly, and the system audio input assembly is an audio input assembly currently used by the system;
the system audio input module is used for inputting system audio data to a user, and the system audio input module is used for inputting system audio data to the user;
The processing unit is used for processing the audio parameters of the intercepted system audio data to obtain processed audio data;
and the sending unit is used for sending the processed audio data to a system audio output assembly through the virtual audio driver so that the system audio output assembly plays the processed audio data, and the system audio output assembly is an audio output assembly currently used by the system.
10. A computer readable storage medium storing a plurality of instructions adapted to be loaded by a processor to perform the steps of the audio playing method of any one of claims 1 to 8.
11. A computer program, characterized in that the computer program comprises computer instructions stored in a storage medium, from which computer instructions a processor of a computer device reads, the processor executing the computer instructions, causing the computer device to perform the audio playback method of any one of claims 1 to 8.
CN202111287915.1A 2021-11-02 2021-11-02 Audio playing method, device and computer readable storage medium Pending CN116074688A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111287915.1A CN116074688A (en) 2021-11-02 2021-11-02 Audio playing method, device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111287915.1A CN116074688A (en) 2021-11-02 2021-11-02 Audio playing method, device and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN116074688A true CN116074688A (en) 2023-05-05

Family

ID=86179048

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111287915.1A Pending CN116074688A (en) 2021-11-02 2021-11-02 Audio playing method, device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN116074688A (en)

Similar Documents

Publication Publication Date Title
CN109658932B (en) Equipment control method, device, equipment and medium
WO2020221190A1 (en) Applet state synchronization method, device and computer storage medium
US11227598B2 (en) Method for controlling terminal by voice, terminal, server and storage medium
CN100433828C (en) Information-processing apparatus, information-processing methods, recording mediums, and programs
US20220406021A1 (en) Virtual Reality Experiences and Mechanics
CN108597509A (en) Intelligent sound interacts implementation method, device, computer equipment and storage medium
JP6906584B2 (en) Methods and equipment for waking up devices
WO2019071808A1 (en) Video image display method, apparatus and system, terminal device, and storage medium
CN113827953B (en) Game control system
US10228901B1 (en) Dynamically rendered music in the cloud
US20240329919A1 (en) Speech message playback
JP2022517562A (en) How to run standalone programs, appliances, devices and computer programs
CN113885827A (en) Audio playing method and device, electronic equipment, computer readable medium and product
CN111312280B (en) Method and apparatus for controlling speech
WO2023165320A1 (en) Playback parameter configuration method and device
CN116074688A (en) Audio playing method, device and computer readable storage medium
CN114785848B (en) Collaborative interaction and collaborative method, device and system between electronic devices
US20230297324A1 (en) Audio Control Method, System, and Electronic Device
US9762704B2 (en) Service based media player
WO2024000645A1 (en) Vibration motor control method and apparatus, storage medium, and electronic device
CN112433697B (en) Resource display method and device, electronic equipment and storage medium
CN112307161B (en) Method and apparatus for playing audio
CN114124911A (en) Live broadcast echo cancellation method, computer-readable storage medium and electronic device
CN112433698A (en) Resource display method and device, electronic equipment and storage medium
CN115379256B (en) Audio adjustment method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination