CN116193192A - Audio output method and device, electronic equipment and storage medium - Google Patents

Audio output method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN116193192A
CN116193192A CN202310214654.3A CN202310214654A CN116193192A CN 116193192 A CN116193192 A CN 116193192A CN 202310214654 A CN202310214654 A CN 202310214654A CN 116193192 A CN116193192 A CN 116193192A
Authority
CN
China
Prior art keywords
channel
audio
target
code stream
channels
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
CN202310214654.3A
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.)
Beijing Eswin Computing Technology Co Ltd
Haining Eswin IC Design Co Ltd
Original Assignee
Beijing Eswin Computing Technology Co Ltd
Haining Eswin IC Design 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 Beijing Eswin Computing Technology Co Ltd, Haining Eswin IC Design Co Ltd filed Critical Beijing Eswin Computing Technology Co Ltd
Priority to CN202310214654.3A priority Critical patent/CN116193192A/en
Publication of CN116193192A publication Critical patent/CN116193192A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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/438Interfacing the downstream path of the transmission network originating from a server, e.g. retrieving encoded video stream packets from an IP network
    • H04N21/4383Accessing a communication channel
    • 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/436Interfacing a local distribution network, e.g. communicating with another STB or one or more peripheral devices inside the home
    • H04N21/4367Establishing a secure communication between the client and a peripheral device or smart card
    • 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
    • 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/47End-user applications
    • H04N21/485End-user interface for client configuration
    • H04N21/4852End-user interface for client configuration for modifying audio parameters, e.g. switching between mono and stereo

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • Stereophonic System (AREA)

Abstract

The invention provides an audio output method, an audio output device, electronic equipment and a storage medium, wherein the method comprises the following steps: acquiring an output mode of a first audio to be input, wherein the output mode comprises a designated channel mode or a non-designated channel mode; in the case that the output mode includes a specified channel mode, determining a plurality of target channels corresponding to the specified channel mode from all channels of the first audio to be input; determining a first channel according to the second audio to be input and the target channel; outputting a first target audio based on the first channel; determining a plurality of second channels corresponding to the unspecified channel mode from all channels of the first audio to be input in the case that the output mode includes the unspecified channel mode; adjusting the current volume corresponding to the second channel to obtain output volume; the second target audio is output based on the output volume. The method can realize corresponding adjustment of the channels in the audio to be input based on the output mode of the audio to be input, thereby flexibly outputting the corresponding target audio.

Description

Audio output method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of audio data processing technologies, and in particular, to an audio output method, an audio output device, an electronic device, and a storage medium.
Background
In the existing audio output method, the television terminal can directly transmit the audio to be input to the built-in audio playing device of the television terminal by utilizing an audio output channel, or transmit the audio signals in one or more audio output channels to the external audio playing device such as an external sound box and a Bluetooth headset by utilizing audio output interfaces such as a high-definition multimedia interface (High Definition Multimedia Interface, HDMI) and a universal serial bus (Universal Serial Bus, USB), so as to realize the audio output of the television terminal.
However, in the above audio output method, the television terminal cannot flexibly adjust the audio to be input, so that the whole audio output method does not have flexibility.
Disclosure of Invention
The invention provides an audio output method, an audio output device, electronic equipment and a storage medium, which are used for solving the defect that the existing audio output method does not have flexibility, realizing corresponding adjustment of a channel in audio to be input based on an output mode of the audio to be input, and accordingly flexibly outputting corresponding target audio.
The invention provides an audio output method, which comprises the following steps:
acquiring an output mode of a first audio to be input, wherein the output mode comprises a designated channel mode or a non-designated channel mode;
determining a plurality of target channels corresponding to the specified channel mode from all channels of the first audio to be input under the condition that the output mode comprises the specified channel mode; determining a first channel according to the second audio to be input and the target channel; outputting a first target audio based on the first channel;
determining a plurality of second channels corresponding to the unspecified channel mode from all channels of the first audio to be input under the condition that the output mode comprises the unspecified channel mode; adjusting the current volume corresponding to the second channel to obtain output volume; based on the output volume, a second target audio is output.
According to the audio output method provided by the invention, the number of channels of the second audio to be input corresponding to the number of channels of the target channel is the same as that of the channels of the target channel, and the first channel is determined according to the second audio to be input and the target channel, and the method comprises the following steps: mixing a first audio code stream corresponding to the target channel and a target audio code stream of the second channel corresponding to the audio to be input to obtain a mixed audio code stream; and mixing channels corresponding to the mixed audio code stream to obtain the first channel.
According to the audio output method provided by the invention, the first audio code stream corresponding to the target channel and the target audio code stream of the second channel corresponding to the audio to be input are mixed to obtain a mixed audio code stream, and the audio output method comprises the following steps: sampling rate conversion is carried out on the first audio code stream in the target channel, so that a second audio code stream is obtained, and the sampling rate corresponding to the second audio code stream is located in a preset sampling rate range; sampling rate conversion is carried out on the target audio code stream in the corresponding channel of the second audio to be input to obtain a third audio code stream, and the sampling rate corresponding to the third audio code stream is within the preset sampling rate range; and mixing the second audio code stream and the third audio code stream to obtain a mixed audio code stream.
According to the audio output method provided by the invention, the first target audio is output based on the first channel, and the audio output method comprises at least one of the following steps: adjusting the first channel by using an equalizer to obtain a third channel, and outputting the first target audio based on the third channel; the first channel is mapped by the dynamic range controller to obtain a third channel, and the first target audio is output based on the third channel; and determining other channels except the target channel from the all channels; splicing the first channel with the other channels according to a preset channel sequence to obtain a fourth channel; outputting the first target audio based on the fourth channel; and globally adjusting the volume corresponding to the first channel, and outputting the first target audio based on the adjusted volume.
The present invention also provides an electronic device including:
a processor for acquiring an output mode of a first audio to be input, the output mode including a specified channel mode or a non-specified channel mode; determining a plurality of target channels corresponding to the specified channel mode from all channels of the first audio to be input under the condition that the output mode comprises the specified channel mode; determining a first channel according to the second audio to be input and the target channel; outputting a first target audio based on the first channel; determining a plurality of second channels corresponding to the unspecified channel mode from all channels of the first audio to be input under the condition that the output mode comprises the unspecified channel mode;
the volume adjuster is used for adjusting the current volume corresponding to the second channel to obtain output volume;
the processor is also configured to output a second target audio based on the output volume.
Optionally, the processor includes: a code stream mixer and a channel mixer,
the code stream mixer is used for mixing the first audio code stream corresponding to the target channel and the target audio code stream of the second channel corresponding to the audio to be input to obtain a mixed audio code stream;
The channel mixer is configured to mix channels corresponding to the mixed audio code stream to obtain the first channel.
Optionally, the processor further includes: an asynchronous sample rate converter,
the asynchronous sampling rate converter is used for carrying out sampling rate conversion on the first audio code stream in the target channel to obtain a second audio code stream, and the sampling rate corresponding to the second audio code stream is in a preset sampling rate range; sampling rate conversion is carried out on the target audio code stream in the corresponding channel of the second audio to be input to obtain a third audio code stream, and the sampling rate corresponding to the third audio code stream is within the preset sampling rate range;
the code stream mixer is specifically configured to mix the second audio code stream and the third audio code stream to obtain a mixed audio code stream.
Optionally, the processor includes: at least one of an equalizer and a dynamic range controller, and an outputter;
the equalizer is used for adjusting the first channel to obtain a third channel;
the dynamic range controller is used for mapping the first channel to obtain a third channel;
the outputter is used for outputting the first target audio based on the third channel;
The processor is specifically used for determining other channels except the target channel from all the channels; splicing the first channel with the other channels according to a preset channel sequence to obtain a fourth channel; outputting the first target audio based on the fourth channel;
the volume adjuster is specifically configured to globally adjust a volume corresponding to the first channel, and output the first target audio based on the adjusted volume.
The present invention also provides an audio output apparatus including:
the acquisition module is used for acquiring an output mode of the first audio to be input, wherein the output mode comprises a specified channel mode or a non-specified channel mode;
the processing module is used for determining a plurality of target channels corresponding to the specified channel mode from all channels of the first audio to be input under the condition that the output mode comprises the specified channel mode; determining a first channel according to the second audio to be input and the target channel; outputting a first target audio based on the first channel; determining a plurality of second channels corresponding to the unspecified channel mode from all channels of the first audio to be input under the condition that the output mode comprises the unspecified channel mode; adjusting the current volume corresponding to the second channel to obtain output volume; based on the output volume, a second target audio is output.
The invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements an audio output method as described in any of the above.
According to the audio output method, the audio output device, the electronic equipment and the storage medium, the output mode of the first audio to be input is obtained, and the output mode comprises a designated channel mode or a non-designated channel mode; determining a plurality of target channels corresponding to the specified channel mode from all channels of the first audio to be input under the condition that the output mode comprises the specified channel mode; determining a first channel according to the second audio to be input and the target channel; outputting a first target audio based on the first channel; determining a plurality of second channels corresponding to the unspecified channel mode from all channels of the first audio to be input in the case that the output mode includes the unspecified channel mode; adjusting the current volume corresponding to the second channel to obtain output volume; and outputting second target audio based on the output volume. The method is used for solving the defect that the existing audio output method is not flexible, realizing the corresponding adjustment of the channel in the audio to be input based on the output mode of the audio to be input, and thus flexibly outputting the corresponding target audio.
Drawings
In order to more clearly illustrate the invention or the technical solutions of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of an audio output method according to the present invention;
fig. 2 is a schematic structural diagram of an electronic device provided by the present invention;
fig. 3 is a schematic structural diagram of an audio output device provided by the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
It should be noted that, the execution subject according to the embodiment of the present invention may be an audio output device or an electronic device, which is not limited herein.
Alternatively, the audio output device may include: headphones, speakers, etc.;
the electronic device may include: television Terminals (TVs), computers, mobile terminals, wearable devices, etc.
It should be noted that, the audio output method according to the embodiment of the present invention may be disposed on a System on a Chip (SoC) Chip in an electronic device. Because the SoC chip can process the data in parallel and is superior to a unit for processing the data in series, the data processing time delay and the processing efficiency can be effectively improved.
The following further describes embodiments of the present invention by taking an electronic device as an example.
As shown in fig. 1, a flow chart of an audio output method provided by the present invention may include:
101. an output mode of a first audio to be input is acquired.
The first audio to be input refers to audio data to be output in an output interface of the electronic device, and the number of the first audio to be input is at least one.
The output modes may include a designated channel mode or a non-designated channel mode.
The specified channel mode may include a specific channel of the audio multi-channel, which may also be referred to as a target channel, and the number of the specific channels is plural, for example: the designated channel mode may include 8 specific channels.
The unspecified channel mode may include other channels than the specific channel among the above-described audio multi-channels, the number of which is at least one, such as: there are 24 channels in total, except 8 specific channels, where the number of other channels is 16, and where the unspecified channel mode may be referred to as enhanced backhaul channel mode (enhanced Audio Return Channel, eARC).
After the electronic device obtains the first audio to be input, the electronic device may obtain an output mode of the first audio to be input.
Alternatively, in the case where the number of the first audio to be input is plural, the output modes of the respective first audio to be input may be the same or different, and are not particularly limited herein.
The number of the first audio to be input is 4, which are the first audio to be input a, the first audio to be input B, the first audio to be input C and the first audio to be input D, wherein the output mode of the first audio to be input a includes a designated channel mode; the output mode of the first audio B to be input comprises a designated channel mode; the output mode of the first audio C to be input comprises a non-designated channel mode; the output mode of the first audio D to be input includes a non-specified channel mode.
Alternatively, in the case where the number of the first audio to be input is plural, the input formats of the respective first audio to be input may be the same or different, and are not particularly limited herein.
The input format may include: compact Disk (CD) format, or audio exchange file format (Audio Interchange File Format, AIFF), etc.
Thus, the coverage range of the output scene of the first audio to be input can be effectively enlarged.
Optionally, in the case that the number of the first audio to be input is plural, the electronic device acquiring the output mode of the first audio to be input may include: the electronic equipment acquires a plurality of first audios to be input; the electronic equipment pre-processes the first audio to be input to obtain a plurality of pre-processed first audio to be input, wherein the word length of each pre-processed first audio to be input is the same; the electronic equipment acquires the output mode of the first audio to be input after each preprocessing.
After the electronic device acquires the plurality of first audio to be input, since the word lengths of the first audio to be input are different, the electronic device is not easy to perform subsequent processing on the first audio to be input. Therefore, the electronic device may perform preprocessing on the plurality of first audio to be input to obtain a plurality of preprocessed first audio to be input, that is, perform processing on word lengths of the plurality of first audio to be input to obtain first audio to be input with the same word length; then, the electronic device acquires output modes corresponding to the first audio to be input with the same word length respectively.
Optionally, the electronic device obtaining the output mode of the first audio to be input may include: the method comprises the steps that an electronic device obtains the current residual electric quantity of the electronic device; and under the condition that the current residual electric quantity is determined to be larger than a preset electric quantity threshold value, the electronic equipment acquires an output mode of the first audio to be input.
The current residual power refers to the residual power of an energy supply device (such as a battery) in the electronic equipment.
Optionally, the preset power threshold may be set before the electronic device leaves the factory, or may be user-defined, which is not specifically limited herein.
After the electronic device obtains the current remaining power of the electronic device, the current remaining power may be compared with a preset power threshold: under the condition that the current residual electric quantity is determined to be larger than the preset electric quantity threshold value, the electronic equipment indicates that the electric quantity of the electronic equipment is sufficient, and at the moment, the electronic equipment can directly acquire an output mode of a first audio to be input; and the electronic equipment indicates that the electric quantity of the electronic equipment is insufficient under the condition that the current residual electric quantity is smaller than or equal to the preset electric quantity threshold value, and the electronic equipment can output first prompt information which is used for prompting a user to charge the electronic equipment.
Illustratively, assume that the preset charge threshold is 20%. The electronic equipment obtains that the current residual capacity of the electronic equipment is 30%, and the current residual capacity is 30% greater than the preset electric quantity threshold value by 20%, at this time, the electronic equipment can directly obtain the output mode of the first audio to be input.
102. In the case that the output mode includes a specified channel mode, determining a plurality of target channels corresponding to the specified channel mode from all channels of the first audio to be input; determining a first channel according to the second audio to be input and the target channel; based on the first channel, a first target audio is output.
The number of channels corresponding to all channels of the first audio to be input is larger than that of the specific channels and the target channels.
The number of channels of the first channel is less than or equal to the number of channels of the target channel.
The number of channels of the corresponding channels of the second audio to be input is the same as that of the target channels.
After the electronic equipment acquires the output mode of the first audio to be input, the output mode can be identified, all channels of the first audio to be input are determined under the condition that the output mode comprises a designated channel mode, and a plurality of target channels corresponding to the designated channel mode are determined from all channels; then, the electronic device acquires second audio to be input, determines a first channel according to the second audio to be input and the plurality of target channels, and outputs first target audio, wherein the first channel is an effective channel.
Optionally, the determining, by the electronic device, a plurality of target channels corresponding to the specified channel mode from all channels of the first audio to be input may include: under the condition that the output mode comprises a designated channel mode, the electronic equipment determines a plurality of target channel numbers corresponding to the designated channel mode; the electronic device determines a channel with a channel number being a target channel number as a target channel in all channels.
Wherein, different target channels correspond to different target channel numbers, and each target channel has uniqueness because the target channel numbers are different.
Optionally, all channels of the first audio to be input are arranged according to a preset channel order.
Optionally, the preset channel sequence may be set before the electronic device leaves the factory, or may be user-defined, which is not specifically limited herein.
After the electronic equipment acquires the output mode of the first audio to be input, the output mode can be identified, and a plurality of target channel numbers corresponding to the specified channel mode are determined under the condition that the output mode is determined to comprise the specified channel mode; then, the electronic equipment determines channel numbers corresponding to all channels of the first audio to be input respectively; then, the electronic device determines the same channel number as the target channel number from all the channel numbers, and determines the channel corresponding to the same channel number as the target channel.
For example, the target channels corresponding to the target channels are numbered No. 1, no. 3, and No. 5, and the channel numbers corresponding to each of all the channels of the first audio to be input are respectively numbered 0, no. 1, no. 2, no. 3, no. 4, and No. 5. The electronic equipment determines the number 1, the number 3 and the number 5 from the 6 channel numbers, and determines the corresponding channel 1, the corresponding channel 3 and the corresponding channel 5 as the target channel.
In some embodiments, the number of channels of the second audio to be input corresponding to the number of channels of the target channel is the same, and the determining, by the electronic device, the first channel according to the second audio to be input and the target channel may include: the electronic equipment mixes the first audio code stream corresponding to the target channel and the target audio code stream of the second channel corresponding to the audio to be input to obtain a mixed audio code stream; the electronic equipment determines a channel corresponding to the mixed audio code stream from the target channel; the electronic equipment mixes channels corresponding to the mixed audio code stream to obtain a first channel.
The audio code stream refers to data traffic used by a video file or an audio file in a unit time.
After determining a plurality of target channels corresponding to a designated channel mode from all channels of the first audio to be input, the electronic device can determine a first audio code stream corresponding to the target channel first and acquire a target audio code stream of a channel corresponding to the second audio to be input; because the number of channels of the second audio to be input corresponding channel is the same as the number of channels of the target channel, the electronic device can directly mix the first audio code stream with the target audio code stream to obtain mixed audio code streams, and the number of the mixed audio code streams is smaller than or equal to the number of the first audio code streams; then, the electronic device mixes the channels corresponding to the mixed audio code stream to obtain effective first channels, and the number of the first channels is smaller than that of the target channels, so that the tone quality of the target audio can be effectively improved.
It should be noted that, the timing sequence of the electronic device for acquiring the first audio code stream and the electronic device for acquiring the target audio code stream is not limited.
Optionally, if the mixed audio code stream has an overflow phenomenon, the electronic device may further perform overflow processing on the mixed audio code stream to ensure subsequent normal output of the mixed audio code stream.
In some embodiments, the electronic device mixes a first audio code stream corresponding to a target channel and a target audio code stream corresponding to a second audio to be input corresponding channel to obtain a mixed audio code stream, which may include: the electronic equipment performs sampling rate conversion on the first audio code stream in the target channel to obtain a second audio code stream, wherein the sampling rate corresponding to the second audio code stream is in a preset sampling rate range; the electronic equipment performs sampling rate conversion on a target audio code stream in a channel corresponding to a second audio to be input to obtain a third audio code stream, wherein the sampling rate corresponding to the third audio code stream is in a preset sampling rate range; the electronic device mixes the second audio code stream and the third audio code stream to obtain a mixed audio code stream.
The sampling rate may be referred to as a sampling frequency or sampling speed, and refers to the number of samples that are extracted from a continuous signal corresponding to the audio to be transmitted and form a discrete signal every second, which may be expressed in hertz (Hz).
The preset sampling rate range refers to a section formed by a first preset sampling rate threshold and a second preset sampling rate threshold, and the first preset sampling rate threshold is smaller than the second preset sampling rate threshold.
Optionally, the preset sampling rate range may be set before the electronic device leaves the factory, or may be user-defined, which is not specifically limited herein.
The electronic device performs sampling rate conversion on the first audio code stream in the target channel, which may also be referred to as asynchronous sampling rate conversion (Asynchronous Sample Rate Conversion, ASRC) on the first audio code stream in the target channel by the electronic device, to obtain a second audio code stream; then, the electronic equipment performs asynchronous sampling rate conversion on a target audio code stream in a corresponding channel of the second audio to be input to obtain a third audio code stream; and finally, uniformly mixing the second audio code stream and the third audio code stream by the electronic equipment to obtain an effective mixed audio code stream.
It should be noted that, the timing of the electronic device acquiring the second audio code stream and the timing of the electronic device acquiring the third audio code stream are not limited.
In some embodiments, the electronic device outputs the first target audio based on the first channel, which may include, but is not limited to, at least one implementation of:
Implementation 1: the electronic equipment adjusts the first channel by utilizing an Equalizer (EQ) to obtain a third channel; the electronic device outputs a first target audio based on the third channel.
Wherein EQ refers to a device capable of adjusting an audio code stream signal in a first channel, for compensating and modifying the audio code stream signal to reduce intersymbol interference, and optionally, the audio code stream signal may include a high-frequency electrical signal, an intermediate-frequency electrical signal, a low-frequency electrical signal, and the like;
after the electronic device obtains the first channel, the equalizer EQ may be used to adjust the audio code stream signal in the first channel to obtain a third channel, and based on the third channel, the electronic device effectively outputs the first target audio.
Implementation 2: the electronic device maps the first channel by using a dynamic range controller (Dynamic Range Control, DRC) to obtain a third channel; the electronic device outputs a first target audio based on the third channel.
Where DRC refers to a technique that can amplitude-adjust an audio bitstream signal in a first channel for providing compression capability and amplification capability to the audio bitstream signal so that the sound at the time of the first target audio output is louder or softer.
After the electronic device obtains the first channel, the dynamic range controller DRC may be used to perform amplitude adjustment on the audio code stream signal in the first channel to obtain a third channel, and based on the third channel, the first target audio is effectively output.
Implementation 3: the electronic equipment determines other channels except the target channel from all channels; the electronic equipment performs splicing treatment on the first channel and other channels according to a preset channel sequence to obtain a fourth channel; the electronic device outputs a first target audio based on the fourth channel.
Wherein the other channels except the target channel determined in all the channels may be the second channel in step 103.
In the process of outputting the first target audio based on the first channel, the electronic equipment can determine other channels except the target channel from all channels; then, the electronic equipment performs splicing processing on the first channel and the other channels according to a preset channel sequence to obtain a spliced channel, and based on the spliced channel, the electronic equipment completely and effectively outputs audio from a first target.
Implementation 4, the electronic device outputting, based on the first channel, the first target audio may include: the electronic equipment globally adjusts the volume corresponding to the first channel, and outputs first target audio based on the adjusted volume.
In the process of globally adjusting the Volume corresponding to the first channels, the electronic device can correspondingly adjust the Volume of each first channel, wherein the Volume adjustment degree of each first channel can be the same or different, so that the change degree of Volume Control (Volume Control) in each first channel can be slowed down, and then the first target audio is output, and the subsequent phenomenon of frying sound when the electronic device outputs the first target audio is effectively prevented.
It should be noted that, whether the implementation manner 1, the implementation manner 2, the implementation manner 3, the implementation manner 4, or the implementation manner obtained by combining at least two implementation manners of the four implementation manners, the output sound quality of the first target audio may be better.
103. Determining a plurality of second channels corresponding to the unspecified channel mode from all channels of the first audio to be input in the case that the output mode includes the unspecified channel mode; adjusting the current volume corresponding to the second channel to obtain output volume; the second target audio is output based on the output volume.
Where volume refers to the sound size of the audio, which volume is also referred to as loudness or intensity.
After the electronic equipment acquires the output mode of the first audio to be input, the output mode can be identified, all channels of the first audio to be input are determined under the condition that the output mode is determined to comprise a non-appointed channel mode, and a plurality of second channels corresponding to the non-appointed channel mode are determined from all channels; and then, the electronic equipment adjusts the volume of the second channel and outputs second target audio based on the second channel with the adjusted volume.
Optionally, the electronic device adjusts the current volume corresponding to the second channel to obtain the output volume, which may include, but is not limited to, one of the following implementation manners:
implementation 1: and the electronic equipment reduces the current volume corresponding to the second channel to obtain the output volume.
Because the current volume corresponding to the second channel is larger, the electronic equipment can adjust the current volume corresponding to the second channel to obtain smaller output volume.
Implementation 2: the electronic equipment turns up the current volume corresponding to the second channel to obtain the output volume.
Because the current volume corresponding to the second channel is smaller, the electronic equipment can increase the current volume corresponding to the second channel to obtain larger output volume.
Optionally, the electronic device outputs the second target audio based on the second channel after the volume adjustment, which may include: the electronic equipment determines other channels except the second channel after the volume is adjusted from all channels; the electronic equipment performs splicing treatment on the second channel after volume adjustment and the other channels according to a preset channel sequence to obtain a fifth channel; the electronic device outputs a second target audio based on the fifth channel.
The channels other than the second channel after volume adjustment may be the first channel in step 102 or the third channel in step 102, which is not specifically limited herein.
In the process of outputting the second target audio based on the second channel after the volume is adjusted, the electronic equipment can determine other channels except the second channel after the volume is adjusted from all channels of the first audio to be input; then, the electronic equipment performs splicing processing on the second channel with the adjusted volume and the other channels according to a preset channel sequence to obtain a spliced channel, and based on the spliced channel, the electronic equipment completely and effectively outputs second target audio.
Optionally, before step 101, after step 102, or after step 103, the method may further include: the electronic equipment acquires third audio to be input; the electronic equipment performs sampling rate conversion, volume control and channel mixing processing on the third audio to be input so as to output third target audio.
Because bluetooth, USB and other support audio output channels often have higher delay, in order to meet the low-delay requirement, the electronic device can perform sample rate conversion, volume control and channel mixing processing on the third to-be-input audio after acquiring the third to-be-input audio, so as to effectively reduce the delay problem of the audio output channels and further output the third target audio with higher tone quality.
Optionally, the third audio to be input may be the same as or different from the first audio to be input, and the third audio to be input may be the same as or different from the second audio to be input, which is not specifically limited herein.
In the embodiment of the invention, an output mode of a first audio to be input is acquired, wherein the output mode comprises a specified channel mode or a non-specified channel mode; in the case that the output mode includes a specified channel mode, determining a plurality of target channels corresponding to the specified channel mode from all channels of the first audio to be input; determining a first channel according to the second audio to be input and the target channel; outputting a first target audio based on the first channel; determining a plurality of second channels corresponding to the unspecified channel mode from all channels of the first audio to be input in the case that the output mode includes the unspecified channel mode; adjusting the current volume corresponding to the second channel to obtain output volume; the second target audio is output based on the output volume. The method is used for solving the defect that the existing audio output method is not flexible, realizing the corresponding adjustment of the channel in the audio to be input based on the output mode of the audio to be input, and thus flexibly outputting the corresponding target audio.
The electronic device provided by the invention is described below, and the electronic device described below and the audio output method described above can be referred to correspondingly.
As shown in fig. 2, which is a schematic structural diagram of an electronic device provided by the present invention, the electronic device may include:
a processor 201, configured to acquire an output mode of a first audio to be input, where the output mode includes a specified channel mode or a non-specified channel mode; determining a plurality of target channels corresponding to the specified channel mode from all channels of the first audio to be input under the condition that the output mode comprises the specified channel mode; determining a first channel according to the second audio to be input and the target channel; outputting a first target audio based on the first channel; determining a plurality of second channels corresponding to the unspecified channel mode from all channels of the first audio to be input under the condition that the output mode comprises the unspecified channel mode;
a volume adjuster 202, configured to adjust a current volume corresponding to the second channel to obtain an output volume;
the processor 201 is further configured to output the second target audio based on the output volume.
Optionally, the processor 201 includes: the code stream mixer 2011 and the channel mixer 2022,
A code stream mixer 2011, configured to mix a first audio code stream corresponding to the target channel and a target audio code stream corresponding to the second audio to be input, so as to obtain a mixed audio code stream;
the channel mixer 2022 is configured to mix channels corresponding to the mixed audio code stream to obtain the first channel.
The processor 201 further includes: an asynchronous sample rate converter 2013,
an asynchronous sample rate converter 2013, configured to perform sample rate conversion on the first audio code stream in the target channel to obtain a second audio code stream, where a sample rate corresponding to the second audio code stream is in a preset sample rate range; sampling rate conversion is carried out on the target audio code stream in the corresponding channel of the second audio to be input to obtain a third audio code stream, and the sampling rate corresponding to the third audio code stream is within the preset sampling rate range;
the code stream mixer 2011 is specifically configured to mix the second audio code stream and the third audio code stream to obtain a mixed audio code stream.
The processor 201 includes: at least one of an equalizer 2014 and a dynamic range controller 2015, and an outputter 2016;
an equalizer 2014, configured to perform adjustment processing on the first channel to obtain a third channel;
A dynamic range controller 2015, configured to map the first channel to obtain a third channel;
an outputter 2016 for outputting the first target audio based on the third channel;
a processor 201, specifically configured to determine channels other than the target channel from the all channels; splicing the first channel with the other channels according to a preset channel sequence to obtain a fourth channel; outputting the first target audio based on the fourth channel;
the volume adjuster 202 is configured to globally adjust a volume corresponding to the first channel, and output the first target audio based on the adjusted volume.
The audio output device provided by the invention is described below, and the audio output device described below and the audio output method described above can be referred to correspondingly.
As shown in fig. 3, a schematic structural diagram of an audio output device provided by the present invention may include:
an obtaining module 301, configured to obtain an output mode of a first audio to be input, where the output mode includes a specified channel mode or a non-specified channel mode;
a processing module 302, configured to determine, in a case where the output mode includes the specified channel mode, a plurality of target channels corresponding to the specified channel mode from all channels of the first audio to be input; determining a first channel according to the second audio to be input and the target channel; outputting a first target audio based on the first channel; determining a plurality of second channels corresponding to the unspecified channel mode from all channels of the first audio to be input under the condition that the output mode comprises the unspecified channel mode; adjusting the current volume corresponding to the second channel to obtain output volume; based on the output volume, a second target audio is output.
Optionally, the number of channels of the second audio to be input corresponding to the number of channels of the target channel is the same, and the processing module 302 is specifically configured to mix the first audio code stream corresponding to the target channel with the target audio code stream of the second audio to be input corresponding to the channel of the target channel to obtain a mixed audio code stream; and mixing channels corresponding to the mixed audio code stream to obtain the first channel.
Optionally, the processing module 302 is specifically configured to perform sampling rate conversion on the first audio code stream in the target channel to obtain a second audio code stream, where a sampling rate corresponding to the second audio code stream is located in a preset sampling rate range; sampling rate conversion is carried out on the target audio code stream in the corresponding channel of the second audio to be input to obtain a third audio code stream, and the sampling rate corresponding to the third audio code stream is within the preset sampling rate range; and mixing the second audio code stream and the third audio code stream to obtain a mixed audio code stream.
Optionally, the processing module 302 is specifically configured to at least one of: adjusting the first channel by using an equalizer to obtain a third channel, and outputting the first target audio based on the third channel; and mapping the first channel by using a dynamic range controller to obtain at least one item in a third channel, and outputting the first target audio based on the third channel; and determining other channels except the target channel from the all channels; splicing the first channel with the other channels according to a preset channel sequence to obtain a fourth channel; outputting the first target audio based on the fourth channel; and globally adjusting the volume corresponding to the first channel, and outputting the first target audio based on the adjusted volume.
In yet another aspect, the present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, is implemented to perform the audio output method provided by the above methods, the method comprising: acquiring an output mode of a first audio to be input, wherein the output mode comprises a designated channel mode or a non-designated channel mode; determining a plurality of target channels corresponding to the specified channel mode from all channels of the first audio to be input under the condition that the output mode comprises the specified channel mode; determining a first channel according to the second audio to be input and the target channel; outputting a first target audio based on the first channel; determining a plurality of second channels corresponding to the unspecified channel mode from all channels of the first audio to be input under the condition that the output mode comprises the unspecified channel mode; adjusting the current volume corresponding to the second channel to obtain output volume; based on the output volume, a second target audio is output.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. An audio output method, comprising:
acquiring an output mode of a first audio to be input, wherein the output mode comprises a specified channel mode or a non-specified channel mode;
determining a plurality of target channels corresponding to the specified channel mode from all channels of the first audio to be input under the condition that the output mode comprises the specified channel mode; determining a first channel according to the second audio to be input and the target channel; outputting a first target audio based on the first channel;
determining a plurality of second channels corresponding to the unspecified channel mode from all channels of the first audio to be input in the case that the output mode includes the unspecified channel mode; adjusting the current volume corresponding to the second channel to obtain output volume; and outputting second target audio based on the output volume.
2. The method of claim 1, wherein the number of channels of the second audio corresponding channel to be input is the same as the number of channels of the target channel, and wherein determining the first channel according to the second audio to be input and the target channel comprises:
mixing a first audio code stream corresponding to the target channel and a target audio code stream of the second channel corresponding to the audio to be input to obtain a mixed audio code stream;
And mixing channels corresponding to the mixed audio code stream to obtain the first channel.
3. The method of claim 2, wherein mixing the first audio code stream corresponding to the target channel and the target audio code stream corresponding to the second audio to be input channel to obtain a mixed audio code stream comprises:
sampling rate conversion is carried out on the first audio code stream in the target channel to obtain a second audio code stream, and the sampling rate corresponding to the second audio code stream is in a preset sampling rate range;
sampling rate conversion is carried out on the target audio code stream in the corresponding channel of the second audio to be input to obtain a third audio code stream, and the sampling rate corresponding to the third audio code stream is in the preset sampling rate range;
and mixing the second audio code stream and the third audio code stream to obtain a mixed audio code stream.
4. A method according to any of claims 1-3, wherein the outputting a first target audio based on the first channel comprises at least one of:
adjusting the first channel by using an equalizer to obtain a third channel, and outputting the first target audio based on the third channel; the method comprises the steps of,
Mapping the first channel by using a dynamic range controller to obtain a third channel, and outputting the first target audio based on the third channel; the method comprises the steps of,
determining other channels except the target channel from all the channels; splicing the first channel and the other channels according to a preset channel sequence to obtain a fourth channel; outputting the first target audio based on the fourth channel; the method comprises the steps of,
and globally adjusting the volume corresponding to the first channel, and outputting the first target audio based on the adjusted volume.
5. An electronic device, comprising:
the processor is used for acquiring an output mode of the first audio to be input, wherein the output mode comprises a specified channel mode or a non-specified channel mode; determining a plurality of target channels corresponding to the specified channel mode from all channels of the first audio to be input under the condition that the output mode comprises the specified channel mode; determining a first channel according to the second audio to be input and the target channel; outputting a first target audio based on the first channel; determining a plurality of second channels corresponding to the unspecified channel mode from all channels of the first audio to be input in the case that the output mode includes the unspecified channel mode;
The volume adjuster is used for adjusting the current volume corresponding to the second channel to obtain output volume;
the processor is further configured to output a second target audio based on the output volume.
6. The electronic device of claim 5, wherein the processor comprises: a code stream mixer and a channel mixer,
the code stream mixer is configured to mix a first audio code stream corresponding to the target channel and a target audio code stream corresponding to the second audio to be input to obtain a mixed audio code stream;
the channel mixer is configured to mix channels corresponding to the mixed audio code stream to obtain the first channel.
7. The electronic device of claim 6, wherein the processor further comprises: an asynchronous sample rate converter,
the asynchronous sampling rate converter is used for performing sampling rate conversion on the first audio code stream in the target channel to obtain a second audio code stream, and the sampling rate corresponding to the second audio code stream is in a preset sampling rate range; sampling rate conversion is carried out on the target audio code stream in the corresponding channel of the second audio to be input to obtain a third audio code stream, and the sampling rate corresponding to the third audio code stream is in the preset sampling rate range;
The code stream mixer is specifically configured to mix the second audio code stream and the third audio code stream to obtain a mixed audio code stream.
8. The electronic device of any one of claims 5-7, wherein the processor comprises: at least one of an equalizer and a dynamic range controller, and an outputter;
the equalizer is used for adjusting the first channel to obtain a third channel;
the dynamic range controller is used for mapping the first channel to obtain a third channel;
the outputter is used for outputting the first target audio based on the third channel;
the processor is specifically configured to determine channels other than the target channel from all the channels; splicing the first channel and the other channels according to a preset channel sequence to obtain a fourth channel; outputting the first target audio based on the fourth channel;
the volume adjuster is specifically configured to globally adjust a volume corresponding to the first channel, and output the first target audio based on the adjusted volume.
9. An audio output device, comprising:
The system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring an output mode of first audio to be input, and the output mode comprises a specified channel mode or a non-specified channel mode;
the processing module is used for determining a plurality of target channels corresponding to the specified channel mode from all channels of the first audio to be input under the condition that the output mode comprises the specified channel mode; determining a first channel according to the second audio to be input and the target channel; outputting a first target audio based on the first channel; determining a plurality of second channels corresponding to the unspecified channel mode from all channels of the first audio to be input in the case that the output mode includes the unspecified channel mode; adjusting the current volume corresponding to the second channel to obtain output volume; and outputting second target audio based on the output volume.
10. A non-transitory computer readable storage medium having stored thereon a computer program, which when executed by a processor implements the audio output method according to any of claims 1 to 4.
CN202310214654.3A 2023-03-01 2023-03-01 Audio output method and device, electronic equipment and storage medium Pending CN116193192A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310214654.3A CN116193192A (en) 2023-03-01 2023-03-01 Audio output method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310214654.3A CN116193192A (en) 2023-03-01 2023-03-01 Audio output method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116193192A true CN116193192A (en) 2023-05-30

Family

ID=86442251

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310214654.3A Pending CN116193192A (en) 2023-03-01 2023-03-01 Audio output method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116193192A (en)

Similar Documents

Publication Publication Date Title
US10477311B2 (en) Merging audio signals with spatial metadata
CN107749299B (en) Multi-audio output method and device
CA2917376C (en) Audio processor for orientation-dependent processing
EP1494504A2 (en) Audio data processing device, audio data processing method, program for the same, and recording medium for the program recorded therein
CN112637732A (en) Display device and audio signal playing method
US20190239011A1 (en) Processing method and system of audio multichannel output speaker, and mobile phone
CN112188342B (en) Equalization parameter determining method, apparatus, electronic device and storage medium
US11120808B2 (en) Audio playing method and apparatus, and terminal
CN105913860A (en) Method and apparatus for playing high-fidelity (HIFI) sound through multiple players
CN116193192A (en) Audio output method and device, electronic equipment and storage medium
CN106973355B (en) Surround sound implementation method and device
WO2015131591A1 (en) Audio signal output method, device, terminal and system
WO2022114787A1 (en) Method for normalizing audio signal, and device therefor
US8605564B2 (en) Audio mixing method and audio mixing apparatus capable of processing and/or mixing audio inputs individually
CN107357547B (en) Audio control method, audio control device and audio equipment
CN108182947B (en) Sound channel mixing processing method and device
CN205943467U (en) Audio playback device and terminal
CN111048108B (en) Audio processing method and device
CN216357000U (en) Sound mixing device based on HLH intelligent sound mixing technology
US11544032B2 (en) Audio connection and transmission device
CN115364482A (en) Game sound effect production system, method, medium, terminal device and audio production terminal
US20240015448A1 (en) Hearing-aid audio control method and system
US20240276143A1 (en) Signal normalization using loudness metadata for audio processing
CN118200656A (en) Player device and signal processing method
JP2925811B2 (en) Audio channel data reception / playback method

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
CB02 Change of applicant information

Country or region after: China

Address after: 314499 Building 1, Juanhu Science and Technology Innovation Park, No. 500 Shuiyueting East Road, Xiashi Street, Haining City, Jiaxing City, Zhejiang Province (self declared)

Applicant after: Haining Yisiwei Computing Technology Co.,Ltd.

Applicant after: Beijing ESWIN Computing Technology Co.,Ltd.

Address before: Room 263, block B, science and technology innovation center, 128 Shuanglian Road, Haining Economic Development Zone, Haining City, Jiaxing City, Zhejiang Province, 314400

Applicant before: Haining yisiwei IC Design Co.,Ltd.

Country or region before: China

Applicant before: Beijing ESWIN Computing Technology Co.,Ltd.

CB02 Change of applicant information