WO2019237667A1 - 播放音频数据的方法和装置 - Google Patents
播放音频数据的方法和装置 Download PDFInfo
- Publication number
- WO2019237667A1 WO2019237667A1 PCT/CN2018/117916 CN2018117916W WO2019237667A1 WO 2019237667 A1 WO2019237667 A1 WO 2019237667A1 CN 2018117916 W CN2018117916 W CN 2018117916W WO 2019237667 A1 WO2019237667 A1 WO 2019237667A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- audio data
- left channel
- frequency
- right channel
- channel
- 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.)
- Ceased
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04S—STEREOPHONIC SYSTEMS
- H04S1/00—Two-channel systems
- H04S1/007—Two-channel systems in which the audio signals are in digital form
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/16—Sound input; Sound output
- G06F3/165—Management of the audio stream, e.g. setting of volume, audio stream path
-
- G—PHYSICS
- G10—MUSICAL INSTRUMENTS; ACOUSTICS
- G10L—SPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
- G10L19/00—Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis
- G10L19/02—Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis using spectral analysis, e.g. transform vocoders or subband vocoders
-
- G—PHYSICS
- G10—MUSICAL INSTRUMENTS; ACOUSTICS
- G10L—SPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
- G10L19/00—Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis
- G10L19/02—Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis using spectral analysis, e.g. transform vocoders or subband vocoders
- G10L19/032—Quantisation or dequantisation of spectral components
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/724—User interfaces specially adapted for cordless or mobile telephones
- H04M1/72403—User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
- H04M1/72409—User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by interfacing with external accessories
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04R—LOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; ELECTRIC HEARING AIDS; PUBLIC ADDRESS SYSTEMS
- H04R3/00—Circuits for transducers
- H04R3/04—Circuits for transducers for correcting frequency response
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04S—STEREOPHONIC SYSTEMS
- H04S7/00—Indicating arrangements; Control arrangements, e.g. balance control
- H04S7/30—Control circuits for electronic adaptation of the sound field
- H04S7/301—Automatic calibration of stereophonic sound system, e.g. with test microphone
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04S—STEREOPHONIC SYSTEMS
- H04S2420/00—Techniques used stereophonic systems covered by H04S but not provided for in its groups
- H04S2420/07—Synergistic effects of band splitting and sub-band processing
Definitions
- the present disclosure relates to the field of computer technology, and in particular, to a method and device for playing audio data.
- stereo audio is becoming more and more common.
- the left and right channels are used for playback.
- the left channel is usually maintained.
- right channel balance is usually used for playback.
- the volume of the left and right channels of a playback device is generally adjusted to balance the left and right channels.
- the embodiments of the present disclosure provide a method and a device for playing audio data.
- the technical solution is as follows:
- a method for playing audio data includes:
- the left channel is used to play audio data to be played on the left channel
- the right channel is used to play audio data to be played on the right channel.
- the acquiring the left channel audio data and the right channel audio data of the target audio includes:
- the currently buffered left channel audio data and right channel audio data are obtained .
- the left channel audio data is subjected to polyphase filtering processing, the left channel audio data is divided into a preset number of frequency subbands, and the right channel audio data is The data is subjected to polyphase filtering processing, and the audio data of the right channel is divided into the preset number of frequency subbands, including:
- the rear left channel audio data is subjected to inverse window processing on the synthesized left channel audio data to obtain the left channel audio data to be played.
- the audio data of the channel is subjected to inverse window processing on the synthesized audio data of the right channel to obtain audio data to be played on the right channel.
- the synthesized audio data is synthesized to obtain audio data to be played on the right channel.
- the method further includes:
- the adjustment parameter value of the left channel and the adjustment of the right channel corresponding to the first preset frequency range are determined according to the position of the adjustment pointer on the adjustment slider.
- the adjustment coefficient of the left channel and the adjustment of the right channel corresponding to the first frequency subband The coefficient, the adjustment parameter value of the left channel and the adjustment parameter value of the right channel corresponding to the first preset frequency range, and determine the left channel calibration parameter value and the right channel calibration parameter corresponding to the first frequency subband value.
- the method further includes:
- the adjustment parameter value of the left channel and the adjustment of the right channel corresponding to the second preset frequency range are determined according to the position of the adjustment pointer on the adjustment slider.
- the adjustment coefficient of the left channel and the right channel corresponding to the second frequency subband, the adjustment parameter value of the left channel corresponding to the second preset frequency range, and the right sound includes:
- the first preset frequency range is a frequency range of a fundamental tone
- the second preset frequency range is a frequency range of overtones.
- the third preset frequency range is obtained by combining a frequency range of the fundamental tone and a frequency range of the overtone.
- the preset number of frequency subbands are divided into second preset values based on a difference between endpoint values of a frequency range corresponding to each frequency subband.
- an apparatus for playing audio data includes:
- An acquisition module configured to acquire audio data of a left channel and audio data of a right channel of the target audio during the process of playing the target audio
- a determining module configured to determine a preset number of frequency subbands corresponding to the sampling frequency according to the sampling frequency of the target audio
- a filtering module configured to perform polyphase filtering processing on the audio data of the left channel, divide the audio data of the left channel into a preset number of frequency subbands, and perform audio processing of the right channel audio data Performing polyphase filtering processing to divide the audio data of the right channel into the preset number of frequency subbands;
- a synthesis module configured to synthesize the left channel audio data divided into the preset number of frequency subbands according to the left channel calibration parameter values corresponding to the preset number of frequency subbands to obtain a left Channel audio data to be played, and perform right channel audio data divided into the preset number of frequency subbands according to the right channel calibration parameter values corresponding to the preset number of frequency subbands respectively Synthesize to obtain audio data to be played on the right channel;
- a playback module configured to play audio data to be played on the left channel through the left channel, and play audio data to be played on the right channel through the right channel.
- the obtaining module is configured to:
- the currently buffered left channel audio data and right channel audio data are obtained .
- the filtering module is configured to:
- the synthesis module is configured to:
- the rear left channel audio data is subjected to inverse window processing on the synthesized left channel audio data to obtain the left channel audio data to be played.
- the audio data of the channel is subjected to inverse window processing on the synthesized audio data of the right channel to obtain audio data to be played on the right channel.
- the synthesis module is configured to:
- the synthesized audio data is synthesized to obtain audio data to be played on the right channel.
- the playback module is further configured to:
- the device further includes:
- a display module for displaying an adjustment slider for adjusting parameters, wherein the first preset audio data is mono audio data
- the determining module is further configured to:
- the adjustment parameter value of the left channel and the adjustment of the right channel corresponding to the first preset frequency range are determined according to the position of the adjustment pointer on the adjustment slider.
- the adjustment coefficient of the left channel and the adjustment of the right channel corresponding to the first frequency subband The coefficient, the adjustment parameter value of the left channel and the adjustment parameter value of the right channel corresponding to the first preset frequency range, and determine the left channel calibration parameter value and the right channel calibration parameter corresponding to the first frequency subband value.
- the playback module is further configured to:
- the determining module is further configured to:
- the adjustment parameter value of the left channel and the adjustment of the right channel corresponding to the second preset frequency range are determined according to the position of the adjustment pointer on the adjustment slider.
- the determining module is further configured to:
- the synthesis module is configured to:
- the left channel The audio data is calibrated, and the audio data of the right channel in each frequency subband is calibrated.
- a method for adjusting the balance of the left channel and the right channel is provided. Method to better adjust the balance between the left and right channels, so that the audio data played out has a better effect.
- FIG. 1 is a schematic flowchart of a method for playing audio data according to an embodiment of the present disclosure
- FIG. 2 is a schematic diagram of a cascaded QMF provided by an embodiment of the present disclosure
- FIG. 3 is a schematic diagram of an interface for adjusting balance provided by an embodiment of the present disclosure.
- FIG. 4 is a schematic structural diagram of a device for playing audio data according to an embodiment of the present disclosure
- FIG. 5 is a schematic structural diagram of a device for playing audio data according to an embodiment of the present disclosure
- FIG. 6 is a schematic structural diagram of a terminal according to an embodiment of the present disclosure.
- An embodiment of the present disclosure provides a method for playing audio data.
- the method may be executed by a terminal, and the terminal may be a mobile phone, a tablet computer, a computer, or the like.
- An audio application program may be provided in the terminal and used to play audio data.
- the audio data of the terminal is played through at least two channels (such as the left channel and the right channel).
- the terminal has two external speakers, and the headset of the terminal has two earphones (left ear and right ear).
- the terminal may be provided with a processor, a memory, a transceiver, a player, etc.
- the processor may be a central processor of the terminal, the processor may be used for processing of the process of playing audio data, and the memory may be used for storing the process of playing audio data Transceiver can be used to receive and send data, and player can be used to play audio data.
- the processor can be connected to a memory, a transceiver, and a player.
- the terminal may also be provided with input and output devices such as a screen, the screen may be used to display an audio playback control interface, and the screen may be a touch screen.
- the embodiment of the present disclosure uses the terminal as a mobile phone to perform a detailed description of the solution, and other situations are similar, and the embodiment of the present disclosure will not repeat them.
- users use two-channel playback devices (two speakers or headphones with left and right channels).
- the audio data on the left channel is different from the audio data on the right channel.
- Some users have different sensitivities to sounds of different frequencies.
- the left ear is more sensitive to the sound of the guitar, but not sensitive to the sound of the piano.
- the piano sound heard by the left ear simply increase the left channel's Sound.
- the user can hear the sound of the piano, the volume of other sounds that can be heard also becomes larger, and the user experience is relatively poor. Therefore, the solution of the embodiment of the present disclosure is proposed based on this.
- the processing flow of the method for playing audio data may be as follows:
- step 101 in the process of playing the target audio, the left channel audio data and the right channel audio data are acquired.
- the target audio is any audio data in stereo audio, such as the song "Ice Rain”.
- an audio application is installed in the terminal.
- the user can open the audio application, the terminal can display a list of songs, and the user can Select the target audio in the list, and then click the corresponding playback option, and the terminal will detect the click instruction of the playback option, and cache the audio data of the target audio to the terminal's player (either from the terminal's local cache to the player, or From the background server cache of the audio application to the player).
- the terminal's player either from the terminal's local cache to the player, or From the background server cache of the audio application to the player.
- the terminal Whenever the terminal detects that the left channel audio data and the right channel audio data of the target audio buffered to the player, it can obtain the buffered left channel audio data and right channel audio data.
- a certain amount of left channel audio data and right channel audio data can be acquired each time, and the corresponding processing can be as follows:
- the first preset value can be preset and stored in the terminal, such as 1024 audio frames.
- the terminal whenever the terminal detects that the data amount of the left channel audio data and the right channel audio data of the target audio buffered to the player reaches the first preset value, the currently buffered left channel can be obtained.
- the audio data of the channel and the audio data of the right channel are processed afterwards.
- the first preset value is 1024 audio frames.
- Step 102 Determine a preset number of frequency subbands corresponding to the sampling frequency according to the sampling frequency of the target audio.
- the sampling frequency refers to the number of samples that are extracted from continuous signals per second and constitute discrete signals, such as the sampling frequency is 44.1KHz.
- the frequency bandwidths of the preset number of frequency subbands are basically the same, that is, the difference between the maximum frequency minus the minimum frequency of each frequency subband is basically the same, for example, the difference is 689Hz.
- the preset number is generally even.
- the terminal may obtain the sampling frequency of the target audio from the attribute information of the target audio, and the sampling frequency of the target audio corresponds to the frequency range of the audio data of the target audio.
- the maximum value of the frequency range of the audio data is generally Half the sampling frequency.
- the sampling frequency is 44.1KHz
- the frequency range of the target audio data is "0 to 22.05KHz”
- the sampling frequency is 88.2KHz
- the frequency range of the target audio data is "0 to 44.10KHz"
- the terminal stores the correspondence between the sampling frequency and the frequency subband.
- the terminal can use the sampling frequency of the target audio. From this correspondence, the preset number of frequency subbands corresponding to the sampling frequency is determined.
- the general sampling frequency is 44.1KHz.
- the number of corresponding frequency subbands is 32, and there are also frequency ranges of 32 frequency subbands.
- the terminal can also store the standard sampling frequency and the corresponding number of frequency subbands.
- the standard sampling frequency is 44.1KHz and the corresponding number of frequency subbands is 32.
- the standard sampling frequency can be used later to determine the sampling of the target audio.
- the frequency subband corresponding to the frequency For example, the sampling frequency of the target audio is 22.05 KHz, and the number of corresponding frequency subbands is 16 (the sampling frequency is half of the standard sampling frequency, and the number of frequency subbands is also half of the standard).
- the sampling frequency of the target audio is 88.2KHz, and the number of corresponding frequency subbands is 64 (the sampling frequency is twice the standard sampling frequency, and the number of frequency subbands is also twice the standard).
- Step 103 Perform polyphase filtering processing on the left channel audio data, divide the left channel audio data into a preset number of frequency subbands, and perform polyphase filtering processing on the right channel audio data.
- the audio data of a channel is divided into a preset number of frequency subbands.
- the terminal after the terminal obtains the left channel audio data and the right channel audio data, it can use the cascaded QMF (Quadrature mirror filter) to perform polyphase filtering on the left channel audio data.
- the processing divides the left channel audio data into a preset number of frequency subbands, and each frequency subband corresponds to a different frequency range.
- the cascaded QMF can be used to perform polyphase filtering on the audio data of the right channel to divide the audio data of the right channel into a preset number of frequency subbands.
- the cascaded QMF includes multiple QMFs, and each QMF can divide the input audio data into two sets of audio data, and the frequency of the two sets of audio data The ranges are different, and the frequency of one set of audio data is higher than the frequency of the other set of audio data.
- the frequency range of the audio data input to QMF is 20 Hz to 22050 Hz
- the frequency range of the two sets of audio data is 20 Hz to 11035 Hz.
- the cascaded QMF generally includes (preset number -1) QMF. For example, as shown in FIG. 2, if the preset number is 32, 31 QMFs are required.
- the sampling frequency is 44.1KHz
- the target audio data of 20Hz to 22050Hz is generally input into the first QMF
- the frequency subbands are 20Hz to 11035Hz.
- the two sets of audio data at 11035Hz to 22050Hz are divided into 20Hz to 11035Hz and 11035Hz to 22050Hz, respectively, and the frequency range is equally divided to obtain audio data of a preset number of frequency subbands.
- the acquired left-channel audio data and right-channel audio data may be windowed.
- the corresponding processing in step 103 may be as follows:
- the left channel audio data is subjected to window processing to obtain the windowed left channel audio data
- the right channel audio data is subjected to window processing to obtain the windowed process.
- Audio data of the right channel of the channel perform polyphase filtering on the audio data of the windowed left channel, divide the audio data of the windowed left channel into a preset number of frequency subbands, and Polyphase filtering is performed on the windowed right channel audio data, and the windowed right channel audio data is divided into a preset number of frequency subbands.
- the preset window function can be stored in the terminal in advance.
- the signal can be truncated with different interception functions.
- the interception functions are called window functions, such as the Hamming window function, Hanning window function, etc.
- Hamming window function is also a kind of cosine window function, also called improved raised cosine window function.
- the embodiment of the present disclosure takes the window function as a Hamming window function as an example for description.
- the window length of the preset window function may be equal to the first preset value in step 101.
- the terminal may obtain a preset window function, and then perform window processing on the buffered left channel audio data to obtain Audio data of the left channel after windowing.
- the terminal may use a preset window function to perform window processing on the buffered right channel audio data to obtain the windowed right channel audio data.
- step 101 the currently buffered left channel audio data is X1
- the window function is W
- the windowed left channel audio data is X1 * W
- step 102 the currently buffered right channel audio data is X2
- the window function is W
- the windowed right channel audio data is X2 * W.
- the terminal may use the cascaded QMF to perform polyphase filtering processing on the left channel audio data, and divide the windowed left channel audio data into a preset number of frequency subbands.
- the cascaded QMF can be used to perform polyphase filtering on the audio data of the right channel, and the windowed right audio data can be divided into a preset number of frequency subbands.
- Step 104 According to the left channel calibration parameter values corresponding to the preset number of frequency subbands, synthesize the left channel audio data divided into the preset number of frequency subbands to obtain the left channel audio to be played. Data, and according to the right channel calibration parameter values corresponding to the preset number of frequency subbands, the audio data of the right channel divided into the preset number of frequency subbands is synthesized to obtain the audio to be played in the right channel. data.
- the terminal stores the left channel calibration parameter value and the right channel calibration parameter value corresponding to each frequency subband in advance.
- the terminal may obtain the left channel calibration parameter value and the right channel calibration parameter value corresponding to each frequency subband stored in advance. Then, the terminal may synthesize the left channel audio data divided into a preset number of frequency subbands based on the left channel calibration parameter values corresponding to each frequency subband to obtain the left channel audio data to be played. In addition, based on the right channel calibration parameter values corresponding to each frequency subband, the audio data of the right channel divided into a preset number of frequency subbands may be synthesized to obtain audio data to be played on the right channel.
- the audio data to be played on the left channel and the audio data to be played on the right channel may be determined based on the multiplication method.
- the corresponding processing in step 104 may be as follows:
- the terminal may obtain the left channel calibration parameter value corresponding to the frequency subband, and may obtain the right channel calibration parameter corresponding to the frequency subband. Value, and then multiplying the left channel audio data divided into the frequency subband by the acquired left channel calibration parameter value to obtain the calibrated audio data of the left channel under the frequency subband.
- the audio data of the right channel divided into the frequency subband may be multiplied by the acquired right channel calibration parameter value to obtain the calibrated audio data of the right channel in the frequency subband.
- the terminal then synthesizes the calibrated audio data of the left channel in the preset number of frequency subbands (also called mixing processing), obtains the audio data to be played in the left channel, and sets the preset number of frequencies.
- the calibrated audio data of the right channel under the subband is synthesized to obtain audio data to be played on the right channel.
- the preset number is 32.
- the audio data of the left channel is represented by SUBBAND1 (n)
- n represents any frequency subband
- COEFF (n) _L represents the left channel calibration parameter corresponding to the frequency subband n Value (L is an abbreviation for LEFT, which means left)
- SUBBAND1 (n) represents the audio data of the left channel in the frequency subband n.
- COEFF (n) _R means the frequency subband n
- SUBBAND2 (n) represents the audio data of the right channel in the frequency subband n.
- step 103 windowing is performed on the audio data, and inverse window processing should also be performed on the audio data.
- the corresponding step 104 can be processed as follows:
- the left channel calibration parameter values corresponding to the preset number of frequency subbands synthesize the windowed left channel audio data divided into the preset number of frequency subbands to obtain the synthesized left sound
- the audio data of the channel is based on a preset inverse window function, and the inverse window processing is performed on the synthesized left channel audio data to obtain the left channel audio data to be played, corresponding to a preset number of frequency subbands respectively.
- the right channel calibration parameter value synthesizes the windowed right channel audio data divided into a preset number of frequency subbands to obtain the synthesized right channel audio data, based on a preset inverse window
- the function performs inverse window processing on the synthesized audio data of the right channel to obtain audio data to be played on the right channel.
- the inverse window function can be preset and stored in the terminal.
- the inverse window function corresponds to the previous window function. If the window function is a Hamming window function, the inverse window function is also an inverse Hamming window function.
- the window function is W, and the inverse window function is IW.
- the terminal may obtain the left channel calibration parameter value corresponding to the frequency subband, and may obtain the right channel calibration parameter corresponding to the frequency subband. Value, and then multiplying the left channel audio data divided into the frequency subband by the acquired left channel calibration parameter value to obtain the calibrated audio data of the left channel under the frequency subband.
- the audio data of the right channel divided into the frequency subband may be multiplied by the acquired right channel calibration parameter value to obtain the calibrated audio data of the left channel in the frequency subband.
- the terminal then synthesizes the calibrated audio data of the left channel under the preset number of frequency subbands (also referred to as mixing processing) to obtain the synthesized left channel audio data. Then, based on a preset inverse window function, the inverse window processing is performed on the synthesized left channel audio data to obtain the left channel audio data to be played.
- the synthesized audio data of the right channel under the preset number of frequency subbands is synthesized (also referred to as mixing processing) to obtain the synthesized audio data of the right channel, and then based on a preset inverse window
- the function performs inverse window processing on the synthesized audio data of the right channel to obtain audio data to be played on the right channel.
- the synthesized left channel audio data is Y1
- the inverse window function can be IW
- the synthesized right channel audio data is Y2
- the inverse window is The function can be IW.
- the audio data of the synthesized left channel and the audio data of the synthesized right channel can also be adjusted, and the corresponding processing can be as follows :
- the right channel calibration parameter value synthesizes the right channel audio data divided into a preset number of frequency subbands to obtain the synthesized right channel audio data, and the right sound corresponding to the third preset frequency range.
- the channel calibration parameter value is multiplied with the audio data of the right channel after synthesis to obtain the audio data of the right channel to be played.
- the third preset frequency range can be preset and stored in the terminal.
- the third preset frequency range can be obtained by combining the first preset frequency range and the second preset frequency range mentioned later.
- the third preset frequency range is 20 Hz to 22050 Hz.
- the terminal may obtain the left channel calibration parameter value corresponding to the frequency subband, and may obtain the right channel calibration parameter corresponding to the frequency subband. Value, and then multiplying the left channel audio data divided into the frequency subband by the acquired left channel calibration parameter value to obtain the calibrated audio data of the left channel under the frequency subband.
- the audio data of the right channel divided into the frequency subband may be multiplied by the acquired right channel calibration parameter value to obtain the calibrated audio data of the right channel in the frequency subband.
- the terminal then synthesizes the calibrated audio data of the left channel under the preset number of frequency subbands (also referred to as mixing processing) to obtain the synthesized left channel audio data. Then multiplying the synthesized left channel audio data with the left channel calibration parameter value corresponding to the third preset frequency range to obtain the left channel audio data to be played. And synthesize the calibrated audio data of the right channel under the preset number of frequency subbands (also called mixing processing) to obtain the audio data of the synthesized right channel, and then synthesize the right audio after synthesis Multiply the audio data of the channel with the right channel calibration parameter value corresponding to the third preset frequency range to obtain the audio data to be played on the right channel.
- mixing processing also referred to as mixing processing
- the left channel calibration parameter value corresponding to the third preset frequency range is used to synthesize the left channel audio after synthesis.
- the data is calibrated, and the right channel audio data corresponding to the third preset frequency range is used to calibrate the synthesized right channel audio data. Since the third preset frequency range corresponds to the frequency range of the synthesized left audio channel data, and corresponds to the frequency range of the synthesized right channel audio data, the left channel calibration corresponding to the third preset frequency range is used.
- the parameter value and the right channel calibration parameter value, and perform comprehensive calibration again, can make the left channel and the right channel balance adjustment better.
- step 105 audio data to be played on the left channel is played through the left channel, and audio data to be played on the right channel is played through the right channel.
- the terminal can play the audio data to be played on the left channel through the left channel of the player, and at the same time through the player's
- the right channel plays audio data to be played on the right channel.
- a method for determining the left channel calibration parameter value and the right channel calibration parameter value is also provided.
- the corresponding processing may be as follows:
- the first preset audio data of the first preset frequency range is simultaneously played through the left channel and the right channel, and an adjustment slider for adjusting parameters is displayed, where the first preset audio data is mono audio data; when detecting When the determination instruction corresponding to the adjustment slider is used, the adjustment parameter value of the left channel and the adjustment parameter of the right channel corresponding to the first preset frequency range are determined according to the position of the adjustment pointer on the adjustment slider.
- the first frequency subband whose frequency range is the first preset frequency range according to the adjustment coefficients of the left channel and the right channel of the first frequency subband, corresponding to the first preset frequency range
- the adjustment parameter value of the left channel and the adjustment parameter value of the right channel determine the left channel calibration parameter value and the right channel calibration parameter value corresponding to the first frequency subband.
- the first preset frequency range is generally the frequency range of the pitch, for example, the frequency range is 20 Hz to 689 Hz.
- the first preset audio data can be preset to be any audio data and is mono audio data.
- the setting options include the adjustment balance option.
- the terminal can click the adjustment balance option, and the terminal will detect the click instruction of the adjustment balance option.
- the terminal may display an adjustment balance interface and play the first preset audio data of the first preset frequency range. As shown in FIG. 3, a slide bar and an OK button are displayed in the adjustment balance interface.
- the user can determine whether the left and right channels are balanced by listening to the first preset audio data. If they feel unbalanced, they can drag the adjustment pointer on the slider until the user feels that the left and right channels are balanced. .
- the user can click the confirmation button displayed on the interface, and the terminal will detect the click instruction of the confirmation button, that is, the confirmation instruction corresponding to the adjustment slider is detected to determine the position of the adjustment pointer on the adjustment slider. Then, the determined position is used to determine the adjustment parameter value of the left channel and the adjustment parameter value of the right channel corresponding to the first preset frequency range.
- the left channel calibration parameter value corresponding to the first preset frequency range is determined as the left channel calibration parameter value corresponding to the first frequency subband, and the right channel calibration parameter value corresponding to the first preset frequency range is determined. Calibrate parameter values for the right channel corresponding to the first frequency subband. Then, the left channel calibration parameter value and the right channel calibration parameter value are stored, and these two calibration parameter values can be used later.
- the user can set it in the setting options of the terminal, and the corresponding processing can be as follows:
- the terminal's setting options there is a sound option.
- the user can trigger the interface corresponding to the sound option, and the audio balance option is displayed in the interface.
- the user can trigger the option to control the terminal to display the adjustment balance interface.
- the terminal detects the option.
- the trigger instruction is displayed, the first preset audio data of the first preset frequency range can also be played at the same time when the adjustment balance interface is displayed.
- the latter method is the same as that set in the audio application, and is not repeated here. .
- the left channel parameter value and the right channel parameter value of the frequency subbands other than the first frequency subband among the preset number of frequency subbands are further determined. Processing can be as follows:
- the second preset audio data of the second preset frequency range is simultaneously played through the left channel and the right channel, and an adjustment slider for adjusting parameters is displayed, where the second preset audio data is mono audio data;
- the adjustment parameter value of the left channel and the adjustment parameter of the right channel corresponding to the second preset frequency range are determined according to the position of the adjustment pointer on the adjustment slider; for a preset number of The second frequency subband among the frequency subbands other than the first frequency subband, according to the adjustment coefficient of the left channel and the adjustment coefficient of the right channel corresponding to the second frequency subband, the second preset The left channel adjustment parameter value and the right channel adjustment parameter value corresponding to the frequency range determine the left channel calibration parameter value and the right channel calibration parameter value corresponding to the second frequency subband, where the second frequency subband is Any of the other frequency subbands.
- the second preset frequency range is generally a frequency range of overtones, such as a frequency range of 690 Hz to 22050 Hz.
- the second preset audio data can be preset to be any audio data and is mono audio data.
- the terminal after the terminal detects the determination instruction corresponding to the adjustment slider, it can also play the second preset audio data of the second preset frequency range, and the user can judge the left channel and the right by listening to the second preset audio data. Whether the channels are balanced. If you feel unbalanced, you can drag the adjustment pointer on the slider until the user feels that the sound of the left and right channels is balanced.
- the user can click the confirmation button displayed on the interface, and the terminal will detect the click instruction of the confirmation button, that is, the confirmation instruction corresponding to the adjustment slider is detected to determine the position of the adjustment pointer on the adjustment slider. Then, the determined position is used to determine the adjustment parameter value of the left channel and the adjustment parameter value of the right channel corresponding to the second preset frequency range.
- the terminal may obtain the pre-stored adjustment coefficients and the right of the left channel corresponding to the second frequency subband.
- the adjustment coefficient of the channel and then according to the adjustment coefficient of the left channel and the right channel corresponding to the second frequency subband, the adjustment parameter value of the left channel and the adjustment of the right channel corresponding to the second preset frequency range
- the parameter value determines a left channel calibration parameter value and a right channel calibration parameter value corresponding to the second frequency subband. In this way, the left channel calibration parameter values and the right channel calibration parameter values of the preset number of frequency subbands can be determined. Then, the left channel calibration parameter value and the right channel calibration parameter value are stored, and these two calibration parameter values can be used later.
- the user can set it in the setting options of the terminal, and the corresponding processing can be as follows:
- the terminal's setting options there is a sound option.
- the user can trigger the interface corresponding to the sound option, and the audio balance option is displayed in the interface.
- the user can trigger the option to control the terminal to display the adjustment balance interface, and the terminal detects the option.
- the triggering instruction is displayed, the second preset audio data of the second preset frequency range can also be played at the same time when the adjustment balance interface is displayed.
- the latter method is the same as that set in the audio application program, and will not be repeated here. .
- the range of the above-mentioned adjustment slider is generally [-100, +100].
- the minimum movement length of the adjustment pointer is at least 1, that is, from -100 to at least -99, but not to -99.5.
- Each value from -100 to +100 can be split into the adjustment parameter value of the left channel and the adjustment parameter value of the right channel.
- -100 can be split into [100,0]
- 100 represents the adjustment parameter value of the left channel
- 0 represents the adjustment parameter value of the right channel
- -50 can be divided into [100,50]
- 100 represents the left sound
- the adjustment parameter value of the channel, 50 represents the adjustment parameter value of the right channel. In this way, as long as the position of the current adjustment pointer is known, the adjustment parameter value of the left channel and the adjustment parameter value of the right channel can be determined.
- the first frequency range corresponds to the frequency range of the pitch
- the second frequency range corresponds to the frequency range of the overtones.
- the left channel calibration parameter value and the right channel calibration parameter value corresponding to the fundamental and overtone should be determined separately, that is, the first frequency subband correspondence is determined separately.
- the left and right channel calibration parameter values are more accurate.
- the following methods can be used to determine the left channel calibration parameter value and the right channel calibration parameter value corresponding to the second frequency subband, and the corresponding processing can be as follows:
- the terminal multiplies the adjustment coefficient of the left channel of the second frequency subband by the adjustment parameter value of the left channel corresponding to the second preset frequency range to obtain the left channel calibration parameter corresponding to the second frequency subband. Value, and multiplying the adjustment coefficient of the right channel of the second frequency subband by the adjustment parameter value of the right channel corresponding to the second preset frequency range to obtain the right channel calibration parameter value corresponding to the second frequency subband.
- the third preset audio data in the third preset frequency range is only used.
- the third preset audio data is adjusted.
- the adjustment coefficients of the left channel and the adjustment coefficient of the right channel corresponding to the third preset frequency range are used.
- the rest of the process corresponds to the above-mentioned determination of the first preset frequency range.
- the process of the left channel calibration parameter value and the right channel calibration parameter value is the same, and is not repeated here.
- the preset number is 32
- the adjustment coefficients of the left channel and the right channel of each frequency subband are shown in Table 1. As shown:
- Adjustment factor for left channel Adjustment factor for right channel 1 1.0 1.0 2 1.0 1.0 3 1.0 1.0 4 0.989 1.011 5 0.978 1.022 6 0.967 1.033 7 0.846 1.154 8 1.154 0.846 9 1.033 0.967 10 1.022 0.978 11 1.011 0.989 12 0.877 1.123 13 0.877 1.123 14 0.877 1.123 15 0.877 1.123 16 1.123 0.877 17 1.123 0.877 18 1.123 0.877 19 1.123 0.877
- N represents the label of the frequency subband, and each frequency subband corresponds to a frequency range, and there is no crossover.
- the difference between the end points of the frequency range corresponding to each frequency subband is approximately 689 Hz (No. (The second preset value is 689Hz).
- the frequency range of the frequency subband is 0 ⁇ 689Hz
- N 2
- the frequency range of the frequency subband is 690Hz ⁇ 1379Hz
- N 32
- the frequency range of the frequency subband is 21361Hz ⁇ 22050Hz.
- the sampling rate is 88.2KHz
- the frequency range is 0 ⁇ 44100Hz. Since the sound range that humans can hear is generally 0 ⁇ 22050Hz, the left channel calibration parameter values and right channel calibration of the above 32 frequency subbands can be used only
- the parameters can be adjusted from 0 to 22050Hz audio data. Since 22051Hz to 44100Hz audio data cannot be heard by the user, it does not matter if it is not adjusted.
- the frequency range is 0 to 11025Hz, so only the left channel calibration parameter value and the right channel calibration parameter value of the first 16 frequency subbands of the 32 frequency subbands can be used. 0 ⁇ 11025Hz audio data can be adjusted.
- the user listens to the audio in advance to determine the left channel calibration parameter value and the right channel calibration parameter value of each frequency subband, and then directly adjusts these two calibration parameter values. Users can hear the audio data that they feel the left and right channels are balanced.
- the audio data of different frequency subbands are adjusted so that the user can hear that he is not sensitive the sound of.
- the left ear of the user is more sensitive to the sound of the guitar, but not to the sound of the piano.
- the left channel calibration parameter value of the frequency subband corresponding to the piano sound the sound of the piano sound can be made higher without changing. Sound of other frequencies of the left channel.
- the left channel The audio data is calibrated, and the audio data of the right channel in each frequency subband is calibrated.
- a method for adjusting the balance of the left channel and the right channel is provided. Method to better adjust the balance between the left and right channels, so that the audio data played out has a better effect.
- an embodiment of the present disclosure further provides a device for playing audio data.
- the device includes:
- An acquisition module 410 configured to acquire audio data of a left channel and audio data of a right channel of the target audio during a process of playing the target audio;
- a determining module 420 configured to determine a preset number of frequency subbands corresponding to the sampling frequency according to the sampling frequency of the target audio
- the filtering module 430 is configured to perform polyphase filtering processing on the audio data of the left channel, divide the audio data of the left channel into a preset number of frequency subbands, and perform audio processing on the audio of the right channel. Performing polyphase filtering on the data to divide the audio data of the right channel into the preset number of frequency subbands;
- a synthesizing module 440 is configured to synthesize the left channel audio data divided into the preset number of frequency subbands according to the left channel calibration parameter values corresponding to the preset number of frequency subbands to obtain The left channel audio data to be played, and the right channel audio data divided into the preset number of frequency subbands according to the right channel calibration parameter values corresponding to the preset number of frequency subbands respectively Perform synthesis to obtain audio data to be played on the right channel;
- the playback module 450 is configured to play audio data to be played on the left channel through the left channel, and play audio data to be played on the right channel through the right channel.
- the obtaining module 410 is configured to:
- the currently buffered left channel audio data and right channel audio data are obtained .
- the filtering module 430 is configured to:
- the synthesis module 440 is configured to:
- the rear left channel audio data is subjected to inverse window processing on the synthesized left channel audio data to obtain the left channel audio data to be played.
- the audio data of the channel is subjected to inverse window processing on the synthesized audio data of the right channel to obtain audio data to be played on the right channel.
- the synthesis module 440 is configured to:
- the synthesized audio data is synthesized to obtain audio data to be played on the right channel.
- the playback module 450 is further configured to:
- the device further includes:
- a display module 460 configured to display an adjustment slider for adjusting parameters, wherein the first preset audio data is mono audio data
- the determining module 420 is further configured to:
- the adjustment parameter value of the left channel and the adjustment of the right channel corresponding to the first preset frequency range are determined according to the position of the adjustment pointer on the adjustment slider.
- the adjustment coefficient of the left channel and the adjustment of the right channel corresponding to the first frequency subband The coefficient, the adjustment parameter value of the left channel and the adjustment parameter value of the right channel corresponding to the first preset frequency range, and determine the left channel calibration parameter value and the right channel calibration parameter corresponding to the first frequency subband value.
- the playback module 450 is further configured to:
- the determining module 420 is further configured to:
- the adjustment parameter value of the left channel and the adjustment of the right channel corresponding to the second preset frequency range are determined according to the position of the adjustment pointer on the adjustment slider.
- the determining module 420 is further configured to:
- the synthesis module 440 is configured to:
- the first preset frequency range is a frequency range of a fundamental tone
- the second preset frequency range is a frequency range of overtones.
- the third preset frequency range is obtained by combining a frequency range of the fundamental tone and a frequency range of the overtone.
- the preset number of frequency subbands are divided into second preset values based on a difference between endpoint values of a frequency range corresponding to each frequency subband.
- the left channel The audio data is calibrated, and the audio data of the right channel in each frequency subband is calibrated.
- a method for adjusting the balance of the left channel and the right channel is provided. Method to better adjust the balance between the left and right channels, so that the audio data played out has a better effect.
- the device for playing audio data when playing the audio data, only uses the division of the foregoing function modules as an example. In practical applications, the functions described above may be assigned by different function modules. Finished, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
- the apparatus for playing audio data provided in the foregoing embodiments and the method embodiment for playing audio data belong to the same concept. For specific implementation processes, refer to the method embodiments, and details are not described herein again.
- FIG. 6 shows a structural block diagram of a terminal 600 provided by an exemplary embodiment of the present disclosure.
- the terminal 600 may be: smartphone, tablet, MP3 player (Moving Picture Experts Group Audio Layer III, moving picture expert compression standard audio level 3), MP4 (Moving Picture Expert Experts Group Audio Audio Layer IV, moving picture expert compression standard audio Level 4) Player, laptop or desktop computer.
- the terminal 600 may also be called other names such as user equipment, portable terminal, laptop terminal, desktop terminal, and the like.
- the terminal 600 includes a processor 601 and a memory 602.
- the processor 601 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like.
- the processor 601 may use at least one hardware form among DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). achieve.
- the processor 601 may also include a main processor and a coprocessor.
- the main processor is a processor for processing data in the wake state, also called a CPU (Central Processing Unit).
- the coprocessor is Low-power processor for processing data in standby.
- the processor 601 may be integrated with a GPU (Graphics Processing Unit).
- the GPU is responsible for rendering and drawing content needed to be displayed on the display screen.
- the processor 601 may further include an AI (Artificial Intelligence) processor, and the AI processor is configured to process computing operations related to machine learning.
- AI Artificial Intelligence
- the memory 602 may include one or more computer-readable storage media, which may be non-transitory.
- the memory 602 may also include high-speed random access memory, and non-volatile memory, such as one or more disk storage devices, flash storage devices.
- non-transitory computer-readable storage medium in the memory 602 is used to store at least one instruction for execution by the processor 601 to implement playing audio provided by the method embodiment in the present disclosure. Data method.
- the terminal 600 may optionally include a peripheral device interface 603 and at least one peripheral device.
- the processor 601, the memory 602, and the peripheral device interface 603 may be connected through a bus or a signal line.
- Each peripheral device can be connected to the peripheral device interface 603 through a bus, a signal line, or a circuit board.
- the peripheral device includes at least one of a radio frequency circuit 604, a touch display screen 605, a camera 606, an audio circuit 607, a positioning component 608, and a power source 609.
- the peripheral device interface 603 may be used to connect at least one peripheral device related to I / O (Input / Output) to the processor 601 and the memory 602.
- the processor 601, the memory 602, and the peripheral device interface 603 are integrated on the same chip or circuit board; in some other embodiments, any one of the processor 601, the memory 602, and the peripheral device interface 603 or Both can be implemented on separate chips or circuit boards, which is not limited in this embodiment.
- the radio frequency circuit 604 is used for receiving and transmitting an RF (Radio Frequency) signal, also called an electromagnetic signal.
- the radio frequency circuit 604 communicates with a communication network and other communication devices through electromagnetic signals.
- the radio frequency circuit 604 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals.
- the radio frequency circuit 604 includes an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and the like.
- the radio frequency circuit 604 can communicate with other terminals through at least one wireless communication protocol.
- the wireless communication protocols include, but are not limited to: metropolitan area networks, mobile communication networks of various generations (2G, 3G, 4G, and 5G), wireless local area networks, and / or WiFi (Wireless Fidelity) networks.
- the radio frequency circuit 604 may further include NFC (Near Field Communication) related circuits, which is not limited in this disclosure.
- the display screen 605 is used to display a UI (User Interface).
- the UI may include graphics, text, icons, videos, and any combination thereof.
- the display screen 605 also has the ability to collect touch signals on or above the surface of the display screen 605.
- the touch signal can be input to the processor 601 as a control signal for processing.
- the display screen 605 may also be used to provide a virtual button and / or a virtual keyboard, which is also called a soft button and / or a soft keyboard.
- the display screen 605 may be one, and the front panel of the terminal 600 is provided; in other embodiments, the display screen 605 may be at least two, respectively disposed on different surfaces of the terminal 600 or in a folded design; In still other embodiments, the display screen 605 may be a flexible display screen disposed on a curved surface or a folded surface of the terminal 600. Furthermore, the display screen 605 can also be set as a non-rectangular irregular figure, that is, a special-shaped screen.
- the display screen 605 can be made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).
- the camera component 606 is used for capturing images or videos.
- the camera component 606 includes a front camera and a rear camera.
- the front camera is disposed on the front panel of the terminal, and the rear camera is disposed on the back of the terminal.
- the camera assembly 606 may further include a flash.
- the flash can be a monochrome temperature flash or a dual color temperature flash.
- a dual color temperature flash is a combination of a warm light flash and a cold light flash, which can be used for light compensation at different color temperatures.
- the audio circuit 607 may include a microphone and a speaker.
- the microphone is used for collecting sound waves of the user and the environment, and converting the sound waves into electrical signals and inputting them to the processor 601 for processing, or inputting to the radio frequency circuit 604 to realize voice communication.
- the microphone can also be an array microphone or an omnidirectional acquisition microphone.
- the speaker is used to convert electrical signals from the processor 601 or the radio frequency circuit 604 into sound waves.
- the speaker can be a traditional film speaker or a piezoelectric ceramic speaker.
- the speaker When the speaker is a piezoelectric ceramic speaker, it can not only convert electrical signals into sound waves audible to humans, but also convert electrical signals into sound waves inaudible to humans for ranging purposes.
- the audio circuit 607 may further include a headphone jack.
- the positioning component 608 is used to locate the current geographic position of the terminal 600 to implement navigation or LBS (Location Based Service).
- the positioning component 608 may be a positioning component based on the United States' GPS (Global Positioning System, Global Positioning System), China's Beidou system, Russia's Granus system, or the European Union's Galileo system.
- the power supply 609 is used to power various components in the terminal 600.
- the power source 609 may be an alternating current, a direct current, a disposable battery, or a rechargeable battery.
- the rechargeable battery may support wired charging or wireless charging.
- the rechargeable battery can also be used to support fast charging technology.
- the terminal 600 further includes one or more sensors 610.
- the one or more sensors 610 include, but are not limited to, an acceleration sensor 611, a gyroscope sensor 612, a pressure sensor 613, a fingerprint sensor 614, an optical sensor 615, and a proximity sensor 616.
- the acceleration sensor 611 can detect the magnitude of acceleration on three coordinate axes of the coordinate system established by the terminal 600.
- the acceleration sensor 611 may be used to detect components of the acceleration of gravity on three coordinate axes.
- the processor 601 may control the touch display screen 605 to display the user interface in a horizontal view or a vertical view according to the gravity acceleration signal collected by the acceleration sensor 611.
- the acceleration sensor 611 may also be used for collecting motion data of a game or a user.
- the gyro sensor 612 can detect the body direction and the rotation angle of the terminal 600, and the gyro sensor 612 can cooperate with the acceleration sensor 611 to collect a 3D motion of the user on the terminal 600. Based on the data collected by the gyro sensor 612, the processor 601 can implement the following functions: motion sensing (such as changing the UI according to the user's tilt operation), image stabilization during shooting, game control, and inertial navigation.
- the pressure sensor 613 may be disposed on a side frame of the terminal 600 and / or a lower layer of the touch display screen 605.
- a user's grip signal to the terminal 600 can be detected, and the processor 601 performs left-right hand recognition or quick operation according to the grip signal collected by the pressure sensor 613.
- the processor 601 controls the operability controls on the UI interface according to the user's pressure operation on the touch display screen 605.
- the operability controls include at least one of a button control, a scroll bar control, an icon control, and a menu control.
- the fingerprint sensor 614 is used to collect a user's fingerprint, and the processor 601 identifies the user's identity based on the fingerprint collected by the fingerprint sensor 614, or the fingerprint sensor 614 recognizes the user's identity based on the collected fingerprint. When identifying the user's identity as a trusted identity, the processor 601 authorizes the user to perform related sensitive operations, which include unlocking the screen, viewing encrypted information, downloading software, paying, and changing settings.
- the fingerprint sensor 614 may be provided on the front, back, or side of the terminal 600. When a physical button or a manufacturer's logo is set on the terminal 600, the fingerprint sensor 614 can be integrated with the physical button or the manufacturer's logo.
- the optical sensor 615 is used to collect the ambient light intensity.
- the processor 601 may control the display brightness of the touch display screen 605 according to the ambient light intensity collected by the optical sensor 615. Specifically, when the ambient light intensity is high, the display brightness of the touch display screen 605 is increased; when the ambient light intensity is low, the display brightness of the touch display screen 605 is decreased.
- the processor 601 may also dynamically adjust the shooting parameters of the camera component 606 according to the ambient light intensity collected by the optical sensor 615.
- the proximity sensor 616 also called a distance sensor, is usually disposed on the front panel of the terminal 600.
- the proximity sensor 616 is used to collect the distance between the user and the front side of the terminal 600.
- the processor 601 controls the touch display screen 605 to switch from the bright screen state to the closed screen state; when the proximity sensor 616 detects When the distance between the user and the front side of the terminal 600 gradually increases, the touch display screen 605 is controlled by the processor 601 to switch from the rest screen state to the bright screen state.
- FIG. 6 does not constitute a limitation on the terminal 600, and may include more or fewer components than shown, or combine certain components, or adopt different component arrangements.
- the program may be stored in a computer-readable storage medium.
- the storage medium mentioned may be a read-only memory, a magnetic disk or an optical disk.
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Signal Processing (AREA)
- Acoustics & Sound (AREA)
- Multimedia (AREA)
- Human Computer Interaction (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Health & Medical Sciences (AREA)
- Theoretical Computer Science (AREA)
- Spectroscopy & Molecular Physics (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Networks & Wireless Communication (AREA)
- Stereophonic System (AREA)
Abstract
本公开提供了一种播放音频数据的方法和装置,属于计算机技术领域。所述方法包括:在播放音频的过程中,将音频的左声道的音频数据分割成预设数目个频率子带的音频数据,并将右声道的音频数据分割成预设数目个频率子带的音频数据,然后使用各频率子带的左声道校准参数值,对左声道的各频率子带的音频数据进行校准,得到左声道待播放的音频数据。并使用各频率子带的右声道校准参数值,对右声道的各频率子带的音频数据进行校准,得到右声道待播放的音频数据,然后通过左声道,播放左声道待播放的音频数据,并通过右声道,播放右声道待播放的音频数据。采用本公开,可以更好的调节左声道和右声道的平衡。
Description
本公开要求于2018年06月12日提交申请号为201810603069.1、发明名称为“播放音频数据的方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本公开中。
本公开涉及计算机技术领域,特别涉及一种播放音频数据的方法和装置。
随着计算机技术的发展,立体声音频越来越普遍,在播放立体声音频时,通过使用左声道和右声道进行播放,在使用左声道和右声道播放时,通常要保持左声道和右声道平衡。
相关技术中,一般是调节播放设备的左声道和右声道的音量,来使左声道和右声道平衡。
由于人类的听觉系统对不同频率的声音的采样方法是不相同的,所以简单的调节左声道和右声道的音量达不到最佳听觉效果,所以急需提供一种调节左声道和右声道平衡的方法。
发明内容
为了解决相关技术的问题,本公开实施例提供了一种播放音频数据的方法和装置。所述技术方案如下:
第一方面,提供了一种播放音频数据的方法,所述方法包括:
在播放目标音频的过程中,获取所述目标音频的左声道的音频数据和右声道的音频数据;
根据所述目标音频的采样频率,确定所述采样频率对应的预设数目个频率子带;
对所述左声道的音频数据进行多相滤波处理,将所述左声道的音频数据分割到预设数目个频率子带中,并对所述右声道的音频数据进行多相滤波处理,将所述右声道的音频数据分割到所述预设数目个频率子带中;
根据所述预设数目个频率子带分别对应的左声道校准参数值,对分割到所 述预设数目个频率子带中的左声道的音频数据进行合成,得到左声道待播放的音频数据,并根据所述预设数目个频率子带分别对应的右声道校准参数值,对分割到所述预设数目个频率子带中的右声道的音频数据进行合成,得到右声道待播放的音频数据;
通过所述左声道,播放所述左声道待播放的音频数据,并通过所述右声道,播放所述右声道待播放的音频数据。
可选的,所述获取所述目标音频的左声道的音频数据和右声道的音频数据,包括:
缓存所述目标音频中左声道的音频数据和右声道的音频数据;
当缓存的所述目标音频中左声道的音频数据和右声道的音频数据的数据量均达到第一预设数值时,获取当前缓存的左声道的音频数据和右声道的音频数据。
可选的,所述对所述左声道的音频数据进行多相滤波处理,将所述左声道的音频数据分割到预设数目个频率子带中,并对所述右声道的音频数据进行多相滤波处理,将所述右声道的音频数据分割到所述预设数目个频率子带中,包括:
基于预设的窗函数,对所述左声道的音频数据进行加窗处理,得到加窗处理后的左声道的音频数据,并对所述右声道的音频数据进行加窗处理,得到加窗处理后的右声道的音频数据;对所述加窗处理后的左声道的音频数据进行多相滤波处理,将所述加窗处理后的左声道的音频数据分割到预设数目个频率子带中,并对所述加窗处理后的右声道的音频数据进行多相滤波处理,将所述加窗处理后的右声道的音频数据分割到所述预设数目个频率子带中;
所述根据所述预设数目个频率子带分别对应的左声道校准参数值,对分割到所述预设数目个频率子带中的左声道的音频数据进行合成,得到左声道待播放的音频数据,并根据所述预设数目个频率子带分别对应的右声道校准参数值,对分割到所述预设数目个频率子带中的右声道的音频数据进行合成,得到右声道待播放的音频数据,包括:
根据所述预设数目个频率子带分别对应的左声道校准参数值,对分割到所述预设数目个频率子带中的加窗处理后的左声道的音频数据进行合成,得到合成后的左声道的音频数据,基于预设的逆窗函数,对所述合成后的左声道的音频数据,进行逆窗处理,得到左声道待播放的音频数据,并根据所述预设数目 个频率子带分别对应的右声道校准参数值,对分割到所述预设数目个频率子带中的加窗处理后的右声道的音频数据进行合成,得到合成后的右声道的音频数据,基于所述预设的逆窗函数,对所述合成后的右声道的音频数据,进行逆窗处理,得到右声道待播放的音频数据。
可选的,所述根据所述预设数目个频率子带分别对应的左声道校准参数值,对分割到所述预设数目个频率子带中的左声道的音频数据进行合成,得到左声道待播放的音频数据,并根据所述预设数目个频率子带分别对应的右声道校准参数值,对分割到所述预设数目个频率子带中的右声道的音频数据进行合成,得到右声道待播放的音频数据,包括:
对于所述预设数目个频率子带中的每个频率子带,将所述频率子带对应的左声道校准参数值与分割到所述频率子带的左声道的音频数据相乘,得到所述频率子带下,所述左声道的校准后的音频数据,并将所述频率子带对应的右声道校准参数值与分割到所述频率子带的右声道的音频数据相乘,得到所述频率子带下,所述右声道的校准后的音频数据;
将所述预设数目个频率子带下左声道的校准后的音频数据进行合成,得到左声道待播放的音频数据,并将所述预设数目个频率子带下右声道的校准后的音频数据进行合成,得到右声道待播放的音频数据。
可选的,所述方法还包括:
通过所述左声道和所述右声道同时播放第一预设频率范围的第一预设音频数据,并显示调节参数的调节滑动条,其中,所述第一预设音频数据为单声道音频数据;
当检测到对应所述调节滑动条的确定指令时,根据所述调节滑动条上调节指针的位置,确定所述第一预设频率范围对应的左声道的调节参数值和右声道的调节参数值;
对于所述预设数目个频率子带中,频率范围为第一预设频率范围的第一频率子带,根据所述第一频率子带对应的左声道的调节系数和右声道的调节系数、所述第一预设频率范围对应的左声道的调节参数值和右声道的调节参数值,确定所述第一频率子带对应的左声道校准参数值和右声道校准参数值。
可选的,所述方法还包括:
通过所述左声道和所述右声道同时播放第二预设频率范围的第二预设音频数据,并显示调节参数的调节滑动条,其中,所述第二预设音频数据为单声 道音频数据;
当检测到对应所述调节滑动条的确定指令时,根据所述调节滑动条上调节指针的位置,确定所述第二预设频率范围对应的左声道的调节参数值和右声道的调节参数值;
对于所述预设数目个频率子带中除所述第一频率子带之外的其它频率子带中的第二频率子带,根据所述第二频率子带对应的左声道的调节系数和右声道的调节系数、所述第二预设频率范围对应的左声道的调节参数值和右声道的调节参数值,确定所述第二频率子带对应的左声道校准参数值和右声道校准参数值,其中,所述第二频率子带为所述其它频率子带中的任一频率子带。
可选的,所述根据所述第二频率子带对应的左声道的调节系数和右声道的调节系数、所述第二预设频率范围对应的左声道的调节参数值和右声道的调节参数值,确定所述第二频率子带对应的左声道校准参数值和右声道校准参数值,包括:
将所述第二频率子带对应的左声道的调节系数与所述第二预设频率范围对应的左声道的调节参数值相乘,得到所述第二频率子带对应的左声道校准参数值,并将所述第二频率子带对应的右声道的调节系数与所述第二预设频率范围对应的右声道的调节参数值相乘,得到所述第二频率子带对应的右声道校准参数值。
可选的,所述根据所述预设数目个频率子带分别对应的左声道校准参数值,对分割到所述预设数目个频率子带中的左声道的音频数据进行合成,得到左声道待播放的音频数据,并根据所述预设数目个频率子带分别对应的右声道校准参数值,对分割到所述预设数目个频率子带中的右声道的音频数据进行合成,得到右声道待播放的音频数据,包括:
根据所述预设数目个频率子带分别对应的左声道校准参数值,对分割到所述预设数目个频率子带中的左声道的音频数据进行合成,得到合成后的左声道的音频数据,将第三预设频率范围对应的左声道校准参数值与所述合成后的左声道的音频数据相乘,得到左声道待播放的音频数据,并根据所述预设数目个频率子带分别对应的右声道校准参数值,对分割到所述预设数目个频率子带中的右声道的音频数据进行合成,得到合成后的右声道的音频数据,将所述第三预设频率范围对应的右声道校准参数值与所述合成后的右声道的音频数据相乘,得到右声道待播放的音频数据。
可选的,所述第一预设频率范围为基音的频率范围,所述第二预设频率范围为泛音的频率范围。
可选的,所述第三预设频率范围由基音的频率范围与泛音的频率范围合并得到。
可选的,所述预设数目个频率子带是基于每个频率子带对应的频率范围的端点值之差为第二预设数值划分的。
第二方面,提供了一种播放音频数据的装置,所述装置包括:
获取模块,用于在播放目标音频的过程中,获取所述目标音频的左声道的音频数据和右声道的音频数据;
确定模块,用于根据所述目标音频的采样频率,确定所述采样频率对应的预设数目个频率子带;
滤波模块,用于对所述左声道的音频数据进行多相滤波处理,将所述左声道的音频数据分割到预设数目个频率子带中,并对所述右声道的音频数据进行多相滤波处理,将所述右声道的音频数据分割到所述预设数目个频率子带中;
合成模块,用于根据所述预设数目个频率子带分别对应的左声道校准参数值,对分割到所述预设数目个频率子带中的左声道的音频数据进行合成,得到左声道待播放的音频数据,并根据所述预设数目个频率子带分别对应的右声道校准参数值,对分割到所述预设数目个频率子带中的右声道的音频数据进行合成,得到右声道待播放的音频数据;
播放模块,用于通过所述左声道,播放所述左声道待播放的音频数据,并通过所述右声道,播放所述右声道待播放的音频数据。
可选的,所述获取模块,用于:
缓存所述目标音频中左声道的音频数据和右声道的音频数据;
当缓存的所述目标音频中左声道的音频数据和右声道的音频数据的数据量均达到第一预设数值时,获取当前缓存的左声道的音频数据和右声道的音频数据。
可选的,所述滤波模块,用于:
基于预设的窗函数,对所述左声道的音频数据进行加窗处理,得到加窗处理后的左声道的音频数据,并对所述右声道的音频数据进行加窗处理,得到加窗处理后的右声道的音频数据;对所述加窗处理后的左声道的音频数据进行多相滤波处理,将所述加窗处理后的左声道的音频数据分割到预设数目个频率子 带中,并对所述加窗处理后的右声道的音频数据进行多相滤波处理,将所述加窗处理后的右声道的音频数据分割到所述预设数目个频率子带中;
所述合成模块,用于:
根据所述预设数目个频率子带分别对应的左声道校准参数值,对分割到所述预设数目个频率子带中的加窗处理后的左声道的音频数据进行合成,得到合成后的左声道的音频数据,基于预设的逆窗函数,对所述合成后的左声道的音频数据,进行逆窗处理,得到左声道待播放的音频数据,并根据所述预设数目个频率子带分别对应的右声道校准参数值,对分割到所述预设数目个频率子带中的加窗处理后的右声道的音频数据进行合成,得到合成后的右声道的音频数据,基于所述预设的逆窗函数,对所述合成后的右声道的音频数据,进行逆窗处理,得到右声道待播放的音频数据。
可选的,所述合成模块,用于:
对于所述预设数目个频率子带中的每个频率子带,将所述频率子带对应的左声道校准参数值与分割到所述频率子带的左声道的音频数据相乘,得到所述频率子带下,所述左声道的校准后的音频数据,并将所述频率子带对应的右声道校准参数值与分割到所述频率子带的右声道的音频数据相乘,得到所述频率子带下,所述右声道的校准后的音频数据;
将所述预设数目个频率子带下左声道的校准后的音频数据进行合成,得到左声道待播放的音频数据,并将所述预设数目个频率子带下右声道的校准后的音频数据进行合成,得到右声道待播放的音频数据。
可选的,所述播放模块,还用于:
通过所述左声道和所述右声道同时播放第一预设频率范围的第一预设音频数据;
所述装置还包括:
显示模块,用于显示调节参数的调节滑动条,其中,所述第一预设音频数据为单声道音频数据;
所述确定模块,还用于:
当检测到对应所述调节滑动条的确定指令时,根据所述调节滑动条上调节指针的位置,确定所述第一预设频率范围对应的左声道的调节参数值和右声道的调节参数值;
对于所述预设数目个频率子带中,频率范围为第一预设频率范围的第一频 率子带,根据所述第一频率子带对应的左声道的调节系数和右声道的调节系数、所述第一预设频率范围对应的左声道的调节参数值和右声道的调节参数值,确定所述第一频率子带对应的左声道校准参数值和右声道校准参数值。
可选的,所述播放模块,还用于:
通过所述左声道和所述右声道同时播放第二预设频率范围的第二预设音频数据,所述显示模块,还用于显示调节参数的调节滑动条,其中,所述第二预设音频数据为单声道音频数据;
所述确定模块,还用于:
当检测到对应所述调节滑动条的确定指令时,根据所述调节滑动条上调节指针的位置,确定所述第二预设频率范围对应的左声道的调节参数值和右声道的调节参数值;
对于所述预设数目个频率子带中除所述第一频率子带之外的其它频率子带中的第二频率子带,根据所述第二频率子带对应的左声道的调节系数和右声道的调节系数、所述第二预设频率范围对应的左声道的调节参数值和右声道的调节参数值,确定所述第二频率子带对应的左声道校准参数值和右声道校准参数值,其中,所述第二频率子带为所述其它频率子带中的任一频率子带。
可选的,所述确定模块,还用于:
将所述第二频率子带对应的左声道的调节系数与所述第二预设频率范围对应的左声道的调节参数值相乘,得到所述第二频率子带对应的左声道校准参数值,并将所述第二频率子带对应的右声道的调节系数与所述第二预设频率范围对应的右声道的调节参数值相乘,得到所述第二频率子带对应的右声道校准参数值。
可选的,所述合成模块,用于:
根据所述预设数目个频率子带分别对应的左声道校准参数值,对分割到所述预设数目个频率子带中的左声道的音频数据进行合成,得到合成后的左声道的音频数据,将第三预设频率范围对应的左声道校准参数值与所述合成后的左声道的音频数据相乘,得到左声道待播放的音频数据,并根据所述预设数目个频率子带分别对应的右声道校准参数值,对分割到所述预设数目个频率子带中的右声道的音频数据进行合成,得到合成后的右声道的音频数据,将所述第三预设频率范围对应的右声道校准参数值与所述合成后的右声道的音频数据相乘,得到右声道待播放的音频数据。
本公开实施例提供的技术方案带来的有益效果至少包括:
本公开实施例中,通过将音频拆分成多个频率子带,基于不同频率子带的左声道校准参数值和右声道校准参数值,分别对各频率子带下,左声道的音频数据,进行校准,并对各频率子带下,右声道的音频数据,进行校准,相对于现有技术中仅调整音量的方法,提供了一种调节左声道和右声道平衡的方法,更好的调节左声道和右声道的平衡,使播放出的音频数据有更好的效果。
图1是本公开实施例提供的一种播放音频数据的方法的流程示意图;
图2是本公开实施例提供的一种级联QMF的示意图;
图3是本公开实施例提供的一种调节平衡界面的示意图;
图4是本公开实施例提供的一种播放音频数据的装置的结构示意图;
图5是本公开实施例提供的一种播放音频数据的装置的结构示意图;
图6是本公开实施例提供的一种终端的结构示意图。
为使本公开的目的、技术方案和优点更加清楚,下面将结合附图对本公开实施方式作进一步地详细描述。
本公开实施例提供了一种播放音频数据的方法,该方法的执行主体可以是终端,终端可以是手机、平板电脑、电脑等,终端中可以设置有音频应用程序,可以用于播放音频数据,终端的音频数据通过至少两个声道进行播放(如左声道和右声道),例如,终端有两个外接音箱,终端的耳机有两个听筒(左耳的和右耳的)。终端中可以设置有处理器、存储器、收发器、播放器等,处理器可以是终端的中央处理器,处理器可以用于播放音频数据的过程的处理,存储器可以用于存储播放音频数据的过程中需要的数据以及产生的数据,收发器可以用于接收以及发送数据,播放器可以用于播放音频数据。处理器可以与存储器、收发器和播放器连接。终端中还可以设置有屏幕等输入输出设备,屏幕可以用于显示音频播放控制界面等,屏幕可以是触摸屏幕等。
本公开实施例中以终端为手机进行方案的详细描述,其它情况与之类似,本公开实施例不再赘述。
在进行实施前,首先介绍本公开实施例的应用场景:
目前,用户使用两个声道的回放设备(两个音响或有左声道和右声道的耳机),听立体声音频时,左声道的音频数据和右声道的音频数据是不相同的,某些用户对不同频率的声音的敏感度不相同,如左耳对吉他声比较敏感,而对钢琴声音不敏感,为了能使左耳听到的钢琴声,单纯的增大左声道的声音,用户虽然能听到钢琴声,但是其他本来能听见的声音音量也变大,用户体验比较差,所以基于此提出了本公开实施例的方案。
如图1所示,播放音频数据的方法的处理流程可以如下:
步骤101,在播放目标音频的过程中,获取目标音频的左声道的音频数据和右声道的音频数据。
其中,目标音频为立体声音频中的任一音频数据,如歌曲《冰雨》等。
在实施中,终端中安装有音频应用程序,在使用音频应用程序播放某个立体声音频(后续可以称为是目标音频)时,用户可以打开音频应用程序,终端可以显示歌曲列表,用户可以在歌曲列表中选择目标音频,然后点击对应的播放选项,终端则会检测到播放选项的点击指令,将目标音频的音频数据缓存至终端的播放器(可以是从终端本地缓存至播放器,也可以是从音频应用程序的后台服务器缓存至播放器)。此处需要说明的是,由于有两个声道,在缓存时,同一时刻有两路音频数据,一路是左声道的音频数据,另一路是右声道的音频数据。
每当终端检测到缓存至播放器中有目标音频的左声道的音频数据和右声道的音频数据,可以获取缓存的左声道的音频数据和右声道的音频数据。
可选的,可以每次获取一定量的左声道的音频数据和右声道的音频数据,相应的处理可以如下:
缓存目标音频中左声道的音频数据和右声道的音频数据;当缓存的目标音频中左声道的音频数据和右声道的音频数据的数据量均达到第一预设数值时,获取当前缓存的左声道的音频数据和右声道的音频数据。
其中,第一预设数值可以预设,并且存储至终端中,如1024个音频帧等。
在实施中,每当终端检测到缓存至播放器中的,目标音频的左声道的音频数据和右声道的音频数据的数据量均达到第一预设数值时,可以获取当前缓存的左声道的音频数据和右声道的音频数据,进行后续处理。例如,第一预设数 值为1024个音频帧,终端检测到缓存至播放器中目标音频的左声道的音频数据和右声道的音频数据的数据量均达到1024个音频帧时,可以获取当前缓存的2048个音频帧,进行后续处理。
步骤102,根据目标音频的采样频率,确定采样频率对应的预设数目个频率子带。
其中,采样频率指每秒从连续信号中提取并组成离散信号的采样个数,如采样频率为44.1KHz等。预设数目个频率子带的频带宽度基本是相同的,即每个频率子带的最大频率减去最小频率的差值基本相同,例如,差值均为689Hz等。预设数目一般是偶数。
在实施中,终端可以从目标音频的属性信息中,获取目标音频的采样频率,目标音频的采样频率,也就对应了目标音频的音频数据的频率范围,音频数据的频率范围的最大值一般是采样频率的一半。例如,采样频率为44.1KHz,目标音频的数据的频率范围为“0~22.05KHz”,采样频率为88.2KHz,目标音频的数据的频率范围为“0~44.10KHz”
终端中存储有采样频率与频率子带的对应关系,终端可以使用目标音频的采样频率,从该对应关系中,确定出采样频率对应的预设数目个频率子带,一般采样频率为44.1KHz,对应的频率子带的数目为32,还有32个频率子带的频率范围。
另外,终端还可以存储标准的采样频率与对应的频率子带的数目,标准的采样频率为44.1KHz,对应的频率子带的数目为32,后续可以使用标准的采样频率,确定目标音频的采样频率对应的频率子带。例如,目标音频的采样频率为22.05KHz,对应的频率子带的数目为16(采样频率为标准的采样频率的一半,频率子带的数目也为标准的一半)。目标音频的采样频率为88.2KHz,对应的频率子带的数目为64(采样频率为标准的采样频率的2倍,频率子带的数目也为标准的2倍)。
步骤103,对左声道的音频数据进行多相滤波处理,将左声道的音频数据分割到预设数目个频率子带中,并对右声道的音频数据进行多相滤波处理,将右声道的音频数据分割到预设数目个频率子带中。
在实施中,终端得到左声道的音频数据和右声道的音频数据后,可以使用级联的QMF(Quadrature mirror filter,正交镜象滤波器)对左声道的音频数据进行多相滤波处理,将左声道的音频数据分割至预设数目个频率子带内,每个 频率子带对应不同的频率范围。并且可以使用级联的QMF对右声道的音频数据进行多相滤波处理,将右声道的音频数据分割至预设数目个频率子带内。
在上述处理中,对于左声道的音频数据或右声道的音频数据,级联的QMF包括多个QMF,每个QMF可以将输入的音频数据分成两组音频数据,两组音频数据的频率范围不相同,且一组音频数据的频率均高于另一组音频数据的频率,例如,输入QMF的音频数据的频率范围为20Hz~22050Hz,得到的两组音频数据的频率范围为20Hz~11035Hz、11035Hz~22050Hz。这样,级联的QMF一般包括(预设数目-1)个QMF。例如,如图2所示,如果预设数目为32,需要31个QMF。
需要说明的是,上述在得到预设数目个频率子带时,如果采样频率为44.1KHz,一般是将20Hz~22050Hz的目标音频数据输入到第一个QMF中,得到频率子带为20Hz~11035Hz、11035Hz~22050Hz的两组音频数据,后续分别对20Hz~11035Hz、11035Hz~22050Hz进行频率范围均等拆分,得到预设数目个频率子带的音频数据。
可选的,为了减少音频的频谱能量泄露,可以对获取到的左声道的音频数据和右声道的音频数据进行加窗处理,相应的步骤103的处理可以如下:
基于预设的窗函数,对左声道的音频数据进行加窗处理,得到加窗处理后的左声道的音频数据,并对右声道的音频数据进行加窗处理,得到加窗处理后的右声道的音频数据;对加窗处理后的左声道的音频数据进行多相滤波处理,将加窗处理后的左声道的音频数据分割到预设数目个频率子带中,并对加窗处理后的右声道的音频数据进行多相滤波处理,将加窗处理后的右声道的音频数据分割到预设数目个频率子带中。
其中,预设的窗函数可以预先存储至终端中,为了减少频谱能量泄漏,可采用不同的截取函数对信号进行截断,截取函数称为窗函数,如海明窗函数、汉宁窗函数等,海明窗函数也是余弦窗函数的一种,又称改进的升余弦窗函数。本公开实施例以窗函数为海明窗函数为例进行说明。预设的窗函数的窗长可以等于步骤101中的第一预设数值。
在实施中,终端在获取到缓存的左声道的音频数据和右声道的音频数据后,可以获取预设的窗函数,然后对缓存的左声道的音频数据,进行加窗处理,得到加窗处理后的左声道的音频数据。并且终端可以使用预设的窗函数,对缓存的右声道的音频数据,进行加窗处理,得到加窗处理后的右声道的音频数据。
例如,步骤101中获取到当前缓存的左声道的音频数据为X1,窗函数为W,加窗处理后的左声道的音频数据为X1*W。步骤102中获取到当前缓存的右声道的音频数据为X2,窗函数为W,加窗处理后的右声道的音频数据为X2*W。
然后,终端可以使用级联的QMF对左声道的音频数据进行多相滤波处理,将加窗处理后的左声道的音频数据分割至预设数目个频率子带内。并且可以使用级联的QMF对右声道的音频数据进行多相滤波处理,将加窗处理后的右声道的音频数据分割至预设数目个频率子带内。
步骤104,根据预设数目个频率子带分别对应的左声道校准参数值,对分割到预设数目个频率子带中的左声道的音频数据进行合成,得到左声道待播放的音频数据,并根据预设数目个频率子带分别对应的右声道校准参数值,对分割到预设数目个频率子带中的右声道的音频数据进行合成,得到右声道待播放的音频数据。
其中,终端中预先存储有每个频率子带分别对应的左声道校准参数值和右声道校准参数值。
在实施中,终端可以获取预先存储的每个频率子带分别对应的左声道校准参数值和右声道校准参数值。然后终端可以基于每个频率子带分别对应的左声道校准参数值,对分割到预设数目个频率子带中的左声道的音频数据进行合成,得到左声道待播放的音频数据。并且可以基于每个频率子带分别对应的右声道校准参数值,对分割到预设数目个频率子带中的右声道的音频数据进行合成,得到右声道待播放的音频数据。
可选的,可以基于乘法方式,来确定左声道待播放的音频数据和右声道待播放的音频数据,相应的步骤104的处理可以如下:
对于预设数目个频率子带中的每个频率子带,将频率子带对应的左声道校准参数值与分割到频率子带的左声道的音频数据相乘,得到频率子带下,左声道的校准后的音频数据,并将频率子带对应的右声道校准参数值与分割到频率子带的右声道的音频数据相乘,得到频率子带下,右声道的校准后的音频数据;将预设数目个频率子带下左声道的校准后的音频数据进行合成,得到左声道待播放的音频数据,并将预设数目个频率子带下右声道的校准后的音频数据进行合成,得到右声道待播放的音频数据。
在实施中,对于预设数目个频率子带中的任一频率子带,终端可以获取该 频率子带对应的左声道校准参数值,并且可以获取该频率子带对应的右声道校准参数值,然后将分割到该频率子带的左声道的音频数据与获取到的左声道校准参数值相乘,得到该频率子带下,左声道的校准后的音频数据。并且可以将分割到该频率子带的右声道的音频数据与获取到的右声道校准参数值相乘,得到该频率子带下,右声道的校准后的音频数据。
然后终端将预设数目个频率子带下左声道的校准后的音频数据进行合成(也可以称为是混音处理),得到左声道待播放的音频数据,并将预设数目个频率子带下右声道的校准后的音频数据进行合成,得到右声道待播放的音频数据。
例如,预设数目为32,预设数目个音频子带下,左声道的音频数据使用SUBBAND1(n)表示,n表示任一频率子带,n满足大于或等于1,且小于或等于32。任一频率子带n下,左声道校准后的音频数据为SUBBAND1【n】=SUBBAND1(n)*COEFF(n)_L,COEFF(n)_L表示频率子带n对应的左声道校准参数值(L为LEFT的缩写,表示左),SUBBAND1(n)表示频率子带n下左声道的音频数据。将预设数目个频率子带下,左声道的校准后的音频数据进行合成后为:Y1=SUBBAND1【n】+SUBBAND1【n-1】+……+SUBBAND1【1】,基于Y1,得到左声道待播放的音频数据LOUT。
同理对于右声道,任一频率子带n下,右声道校准后的音频数据为SUBBAND2【n】=SUBBAND2(n)*COEFF(n)_R,COEFF(n)_R表示频率子带n对应的右声道校准参数值(R表示RIGHT的缩写,表示右),SUBBAND2(n)表示频率子带n下右声道的音频数据。将预设数目个频率子带下右声道的校准后的音频数据进行合成后为:Y2=SUBBAND2【n】+SUBBAND2【n-1】+……+SUBBAND2【1】,基于Y2,得到右声道待播放的音频数据为ROUT。
可选的,对应步骤103中,对音频数据进行加窗处理,此处还应对音频数据进行逆窗处理,相应的步骤104的处理可以如下:
根据预设数目个频率子带分别对应的左声道校准参数值,对分割到预设数目个频率子带中的加窗处理后的左声道的音频数据进行合成,得到合成后的左声道的音频数据,基于预设的逆窗函数,对合成后的左声道的音频数据,进行逆窗处理,得到左声道待播放的音频数据,根据预设数目个频率子带分别对应的右声道校准参数值,对分割到预设数目个频率子带中的加窗处理后的右声道 的音频数据进行合成,得到合成后的右声道的音频数据,基于预设的逆窗函数,对合成后的右声道的音频数据,进行逆窗处理,得到右声道待播放的音频数据。
其中,逆窗函数可以预设,并且存储至终端中,逆窗函数与前面的窗函数相对应,如果窗函数为海明窗函数,则逆窗函数也为逆海明窗函数。用公式表示为窗函数为W,逆窗函数为IW。
在实施中,对于预设数目个频率子带中的任一频率子带,终端可以获取该频率子带对应的左声道校准参数值,并且可以获取该频率子带对应的右声道校准参数值,然后将分割到该频率子带的左声道的音频数据与获取到的左声道校准参数值相乘,得到该频率子带下,左声道的校准后的音频数据。并且可以将分割到该频率子带的右声道的音频数据与获取到的右声道校准参数值相乘,得到该频率子带下,左声道的校准后的音频数据。
然后终端将预设数目个频率子带下左声道的校准后的音频数据进行合成(也可以称为是混音处理),得到合成后的左声道的音频数据。然后基于预设的逆窗函数,对合成后的左声道的音频数据,进行逆窗处理,得到左声道待播放的音频数据。并将预设数目个频率子带下右声道的校准后的音频数据进行合成(也可以称为是混音处理),得到合成后的右声道的音频数据,然后基于预设的逆窗函数,对合成后的右声道的音频数据,进行逆窗处理,得到右声道待播放的音频数据。例如,合成后的左声道的音频数据为Y1,逆窗函数可以是IW,左声道待播放的音频数据为LOUT=Y1*IW,合成后的右声道的音频数据为Y2,逆窗函数可以是IW,右声道待播放的音频数据为ROUT=Y2*IW。
可选的,为了使左声道和右声道的平衡调节的更好,还可以对合成后的左声道的音频数据和合成后的右声道的音频数据进行调整,相应的处理可以如下:
根据预设数目个频率子带分别对应的左声道校准参数值,对分割到预设数目个频率子带中的左声道的音频数据进行合成,得到合成后的左声道的音频数据,将第三预设频率范围对应的左声道校准参数值与合成后的左声道的音频数据相乘,得到左声道待播放的音频数据,并根据预设数目个频率子带分别对应的右声道校准参数值,对分割到预设数目个频率子带中的右声道的音频数据进行合成,得到合成后的右声道的音频数据,将第三预设频率范围对应的右声道校准参数值与合成后的右声道的音频数据相乘,得到右声道待播放的音频数据。
其中,第三预设频率范围可以预设,并且存储至终端中,第三预设频率范围可以由后面提到的第一预设频率范围与第二预设频率范围合并得到。如第三预设频率范围为20Hz~22050Hz。
在实施中,对于预设数目个频率子带中的任一频率子带,终端可以获取该频率子带对应的左声道校准参数值,并且可以获取该频率子带对应的右声道校准参数值,然后将分割到该频率子带的左声道的音频数据与获取到的左声道校准参数值相乘,得到该频率子带下,左声道的校准后的音频数据。并且可以将分割到该频率子带的右声道的音频数据与获取到的右声道校准参数值相乘,得到该频率子带下,右声道的校准后的音频数据。
然后终端将预设数目个频率子带下左声道的校准后的音频数据进行合成(也可以称为是混音处理),得到合成后的左声道的音频数据。然后将合成后的左声道的音频数据与第三预设频率范围对应的左声道校准参数值相乘,得到左声道待播放的音频数据。并将预设数目个频率子带下右声道的校准后的音频数据进行合成(也可以称为是混音处理),得到合成后的右声道的音频数据,然后将合成后的右声道的音频数据与第三预设频率范围对应的右声道校准参数值相乘,得到右声道待播放的音频数据。
这样,在得到合成后的左声道的音频数据和合成后的右声道的音频数据后,使用第三预设频率范围对应的左声道校准参数值,对合成后的左声道的音频数据进行校准,并且使用第三预设频率范围对应的右声道校准参数值,对合成后的右声道的音频数据进行校。由于第三预设频率范围对应合成后的左声道的音频数据的频率范围,并对应合成后的右声道的音频数据的频率范围,所以使用第三预设频率范围对应的左声道校准参数值和右声道校准参数值,再次进行综合校准,可以使左声道和右声道的平衡调节的更好。
需要说明的是,确定第三预设频率范围对应的右声道校准参数值与左声道校准参数的方式,与后面确定第一预设频率范围对应的右声道校准参数值与左声道校准参数的方式相同,在后文进行描述。
步骤105,通过左声道播放左声道待播放的音频数据,并通过右声道播放右声道待播放的音频数据。
在实施中,终端在得到左声道待播放的音频数据和右声道待播放的音频数据后,可以通过播放器的左声道播放左声道待播放的音频数据,并且同时通过播放器的右声道播放右声道待播放的音频数据。这样,由于左声道待播放的音 频数据和右声道待播放的音频数据都经过了校准参数值的调整,所以可以更好的保持左右声道的平衡,使用户听到最佳效果的立体声音频。
另外,本公开实施例中,还给出了确定左声道校准参数值和右声道校准参数值的方法,相应的处理可以如下:
通过左声道和右声道同时播放第一预设频率范围的第一预设音频数据,并显示调节参数的调节滑动条,其中,第一预设音频数据为单声道音频数据;当检测到对应调节滑动条的确定指令时,根据调节滑动条上调节指针的位置,确定第一预设频率范围对应的左声道的调节参数值和右声道的调节参数值;对于预设数目个频率子带中,频率范围为第一预设频率范围的第一频率子带,根据第一频率子带对应的左声道的调节系数和右声道的调节系数、第一预设频率范围对应的左声道的调节参数值和右声道的调节参数值,确定第一频率子带对应的左声道校准参数值和右声道校准参数值。
其中,第一预设频率范围一般是基音的频率范围,如频率范围为20Hz~689Hz。第一预设音频数据可以预设,为任一音频数据,为单声道的音频数据。
在实施中,用户打开音频应用程序,听目标音频时,可以打开设置选项,设置选项中有调节平衡选项,终端可以点击调节平衡选项,终端则会检测到调节平衡选项的点击指令。终端可以显示调节平衡界面,并且播放第一预设频率范围的第一预设音频数据,如图3所示,在调节平衡界面中显示有滑动条和确定按键。用户可以通过听第一预设音频数据,判断左声道与右声道是否平衡,如果觉得不平衡,可以拖动滑动条上的调节指针,直到用户感觉左声道和右声道的声音平衡。用户可以点击界面中显示的确认按键,终端则会检测到确认按键的点击指令,也就是检测到对应调节滑动条的确定指令,确定调节滑动条上调节指针的位置。然后使用确定出的位置,确定第一预设频率范围对应的左声道的调节参数值和右声道的调节参数值。
然后获取预先存储的第一频率子带对应的左声道的调节系数,并获取预先存储的第一频率子带对应的右声道的调节系数。然后将左声道的调节系数与第一预设频率范围对应的左声道的调节参数值相乘,得到第一预设频率范围对应的左声道校准参数值,并将右声道的调节系数与第一预设频率范围对应的右声道的调节参数值相乘,得到第一预设频率范围对应的右声道校准参数值。
将第一预设频率范围对应的左声道校准参数值,确定为第一频率子带对应 的左声道校准参数值,并将第一预设频率范围对应的右声道校准参数值,确定为第一频率子带对应的右声道校准参数值。然后对左声道校准参数值和右声道校准参数值进行存储,后续可以使用这两个校准参数值。
或者,用户在播放音频之前,可以在终端的设置选项中,进行设置,相应的处理可以如下:
终端的设置选项中,设置有声音选项,用户可以触发显示声音选项对应的界面,在界面中显示有音频的平衡选项,用户可以通过触发该选项,控制终端显示调节平衡界面,终端检测到该选项的触发指令时,在显示调节平衡界面时,还可以同时播放第一预设频率范围的第一预设音频数据,后面的方式与上述在音频应用程序中设置的方式一致,此处不再赘述。
可选的,本公开实施例中,还提供了确定预设数目个频率子带中除第一频率子带之外的其它频率子带的左声道参数值和右声道参数值,相应的处理可以如下:
通过左声道和右声道同时播放第二预设频率范围的第二预设音频数据,并显示调节参数的调节滑动条,其中,第二预设音频数据为单声道音频数据;当检测到对应调节滑动条的确定指令时,根据调节滑动条上调节指针的位置,确定第二预设频率范围对应的左声道的调节参数值和右声道的调节参数值;对于预设数目个频率子带中除第一频率子带之外的其它频率子带中第二频率子带,根据第二频率子带对应的左声道的调节系数和右声道的调节系数、第二预设频率范围对应的左声道的调节参数值和右声道的调节参数值,确定第二频率子带对应的左声道校准参数值和右声道校准参数值,其中,第二频率子带为其它频率子带中的任一频率子带。
其中,第二预设频率范围一般是泛音的频率范围,如频率范围为690Hz~22050Hz。第二预设音频数据可以预设,为任一音频数据,为单声道的音频数据。
在实施中,终端检测到对应调节滑动条的确定指令后,还可以播放第二预设频率范围的第二预设音频数据,用户可以通过听第二预设音频数据,判断左声道与右声道是否平衡,如果觉得不平衡,可以拖动滑动条上的调节指针,直到用户感觉左声道和右声道的声音平衡。用户可以点击界面中显示的确认按键,终端则会检测到确认按键的点击指令,也就是检测到对应调节滑动条的确定指令,确定调节滑动条上调节指针的位置。然后使用确定出的位置,确定第 二预设频率范围对应的左声道的调节参数值和右声道的调节参数值。
对于预设数目个频率子带中除第一频率子带之外的其它频率子带中第二频率子带,终端可以获取预先存储的第二频率子带对应的左声道的调节系数和右声道的调节系数,然后根据第二频率子带对应的左声道的调节系数和右声道的调节系数、第二预设频率范围对应的左声道的调节参数值和右声道的调节参数值,确定第二频率子带对应的左声道校准参数值和右声道校准参数值。这样,就可以确定出预设数目个频率子带的左声道校准参数值和右声道校准参数值。然后对左声道校准参数值和右声道校准参数值进行存储,后续可以使用这两个校准参数值。
或者,用户在播放音频之前,可以在终端的设置选项中,进行设置,相应的处理可以如下:
终端的设置选项中,设置有声音选项,用户可以触发显示声音选项对应的界面,在界面中显示有音频的平衡选项,用户可以通过触发该选项,控制终端显示调节平衡界面,终端检测到该选项的触发指令时,在显示调节平衡界面时,还可以同时播放第二预设频率范围的第二预设音频数据,后面的方式与上述在音频应用程序中设置的方式一致,此处不再赘述。
需要说明的是,上述调节滑动条的范围一般是[-100,+100],一般调节指针的最小移动长度至少为1,也就是从-100至少要移动至-99,而不能移动至-99.5。从-100至+100中间的每个值,均可以拆分成左声道的调节参数值和右声道的调节参数值。例如,-100可以拆分成[100,0],100表示左声道的调节参数值,0表示右声道的调节参数值,-50可以拆分成[100,50],100表示左声道的调节参数值,50表示右声道的调节参数值,这样,这样只要知道当前调节指针的位置,就可以确定出左声道的调节参数值和右声道的调节参数值。
还需要说明的是,第一频率范围对应基音的频率范围,第二频率范围对应泛音的频率范围。对于大部分用户来说,对基音和泛音的感知能力不相同,所以要分别确定基音与泛音对应的左声道校准参数值和右声道校准参数值,也即分别确定第一频率子带对应的左声道校准参数值和右声道校准参数值、以及除第一频率子带之外的其它频率子带对应的左声道校准参数值和右声道校准参数值,这样,可以使确定出的左声道校准参数值和右声道校准参数值更准确。
可选的,可以使用如下方式来确定第二频率子带对应的左声道校准参数值和右声道校准参数值,相应的处理可以如下:
将第二频率子带对应的左声道的调节系数与第二预设频率范围对应的左声道的调节参数值相乘,得到第二频率子带对应的左声道校准参数值,并将第二频率子带对应的右声道的调节系数与第二预设频率范围对应的右声道的调节参数值相乘,得到第二频率子带对应的右声道校准参数值。
在实施中,终端将第二频率子带的左声道的调节系数与第二预设频率范围对应的左声道的调节参数值相乘,得到第二频率子带对应的左声道校准参数值,并将第二频率子带的右声道的调节系数与第二预设频率范围对应的右声道的调节参数值相乘,得到第二频率子带对应的右声道校准参数值。
可选的,确定第三预设频率范围对应的右声道校准参数值与左声道校准参数时,只不过是使用了第三预设频率范围内的第三预设音频数据,用户基于听第三预设音频数据进行调整,后面在计算时,使用了第三预设频率范围对应的左声道的调节系数和右声道的调节系数,其余过程与上述确定第一预设频率范围对应的左声道校准参数值和右声道校准参数值的过程相同,此处不再赘述。
另外,本公开实施例中,还给出了当音频的采样频率为44.1KHz时,预设数目为32,各频率子带的左声道的调节系数和右声道的调节系数,如表一所示:
表一
| N | 左声道的调节系数 | 右声道的调节系数 |
| 1 | 1.0 | 1.0 |
| 2 | 1.0 | 1.0 |
| 3 | 1.0 | 1.0 |
| 4 | 0.989 | 1.011 |
| 5 | 0.978 | 1.022 |
| 6 | 0.967 | 1.033 |
| 7 | 0.846 | 1.154 |
| 8 | 1.154 | 0.846 |
| 9 | 1.033 | 0.967 |
| 10 | 1.022 | 0.978 |
| 11 | 1.011 | 0.989 |
| 12 | 0.877 | 1.123 |
| 13 | 0.877 | 1.123 |
| 14 | 0.877 | 1.123 |
| 15 | 0.877 | 1.123 |
| 16 | 1.123 | 0.877 |
| 17 | 1.123 | 0.877 |
| 18 | 1.123 | 0.877 |
| 19 | 1.123 | 0.877 |
| 20 | 0.941 | 1.059 |
| 21 | 0.904 | 1.096 |
| 22 | 0.867 | 1.133 |
| 23 | 0.83 | 1.17 |
| 24 | 1.17 | 0.83 |
| 25 | 1.133 | 0.867 |
| 26 | 1.096 | 0.904 |
| 27 | 1.059 | 0.941 |
| 28 | 1.0 | 1.0 |
| 29 | 0.9999 | 0.9999 |
| 30 | 0.999 | 0.999 |
| 31 | 0.99 | 0.99 |
| 32 | 0.9 | 0.9 |
其中,在表一中,N表示频率子带的标号,每个频率子带均对应一个频率范围,且均没有交叉,每个频率子带对应的频率范围的端点值之差约等于689Hz(第二预设数值为689Hz),从N=1至N=32的频率子带的频率范围合并可得到频率范围为0~22050Hz,N越大,频率子带对应的频率范围的端点值越大,如N=1时,频率子带的频率范围为0~689Hz,N=2,频率子带的频率范围为690Hz~1379Hz,N=32,频率子带的频率范围为21361Hz~22050Hz。在采样率为88.2KHz时,频率范围为0~44100Hz,由于人能听见的声音范围一般为0~22050Hz,所以可以仅使用上述32个频率子带的左声道校准参数值和右声道校准参数对0~22050Hz的音频数据进行调整即可,22051Hz~44100Hz的音频数据由于用户听不到,不调整也没有关系。采样率为22.05KHz时,频率范围为0~11025Hz,所以可以仅使用上述32个频率子带中前16个频率子带的左声道校准参数值和右声道校准参数值,对频率范围为0~11025Hz的音频数据进行调整即可。
在本公开实施例中,仅描述了对当前缓存的左声道的音频数据和右声道的音频数据进行播放的方式,后续每次缓存到等于第一预设数值的数据量的左声道的音频数据和右声道的音频数据,都进行上述处理,就可以确定对目标音频的所有左声道的音频数据和右声道的音频数据,均进行左声道和右声道的平衡的调整,使用户听到最佳效果的立体声音频。
需要说明的是,上述过程中,通过用户预先试听音频,确定出符合自己的各频率子带的左声道校准参数值和右通道校准参数值,后续直接使用这两个校准参数值进行调整,可以使用户听到自己感觉左声道和右声道平衡的音频数 据。
需要说明的是,通过上述实施例,对于左声道或右声道,基于不同频率子带对应的校准参数值,对不同频率子带的音频数据进行调整,以使用户可以听到自己不敏感的声音。例如,用户的左耳对吉他声比较敏感,而对钢琴声音不敏感,通过钢琴声对应的频率子带的左声道校准参数值,就可以使钢琴声的声音变的高一点,而不改变左声道的其它频率的声音。
本公开实施例中,通过将音频拆分成多个频率子带,基于不同频率子带的左声道校准参数值和右声道校准参数值,分别对各频率子带下,左声道的音频数据,进行校准,并对各频率子带下,右声道的音频数据,进行校准,相对于现有技术中仅调整音量的方法,提供了一种调节左声道和右声道平衡的方法,更好的调节左声道和右声道的平衡,使播放出的音频数据有更好的效果。
基于相同的技术构思,本公开实施例还提供了一种播放音频数据的装置,如图4所示,该装置包括:
获取模块410,用于在播放目标音频的过程中,获取所述目标音频的左声道的音频数据和右声道的音频数据;
确定模块420,用于根据所述目标音频的采样频率,确定所述采样频率对应的预设数目个频率子带;
滤波模块430,用于对所述左声道的音频数据进行多相滤波处理,将所述左声道的音频数据分割到预设数目个频率子带中,并对所述右声道的音频数据进行多相滤波处理,将所述右声道的音频数据分割到所述预设数目个频率子带中;
合成模块440,用于根据所述预设数目个频率子带分别对应的左声道校准参数值,对分割到所述预设数目个频率子带中的左声道的音频数据进行合成,得到左声道待播放的音频数据,并根据所述预设数目个频率子带分别对应的右声道校准参数值,对分割到所述预设数目个频率子带中的右声道的音频数据进行合成,得到右声道待播放的音频数据;
播放模块450,用于通过所述左声道,播放所述左声道待播放的音频数据,并通过所述右声道,播放所述右声道待播放的音频数据。
可选的,所述获取模块410,用于:
缓存所述目标音频中左声道的音频数据和右声道的音频数据;
当缓存的所述目标音频中左声道的音频数据和右声道的音频数据的数据量均达到第一预设数值时,获取当前缓存的左声道的音频数据和右声道的音频数据。
可选的,所述滤波模块430,用于:
基于预设的窗函数,对所述左声道的音频数据进行加窗处理,得到加窗处理后的左声道的音频数据,并对所述右声道的音频数据进行加窗处理,得到加窗处理后的右声道的音频数据;对所述加窗处理后的左声道的音频数据进行多相滤波处理,将所述加窗处理后的左声道的音频数据分割到预设数目个频率子带中,并对所述加窗处理后的右声道的音频数据进行多相滤波处理,将所述加窗处理后的右声道的音频数据分割到所述预设数目个频率子带中;
所述合成模块440,用于:
根据所述预设数目个频率子带分别对应的左声道校准参数值,对分割到所述预设数目个频率子带中的加窗处理后的左声道的音频数据进行合成,得到合成后的左声道的音频数据,基于预设的逆窗函数,对所述合成后的左声道的音频数据,进行逆窗处理,得到左声道待播放的音频数据,并根据所述预设数目个频率子带分别对应的右声道校准参数值,对分割到所述预设数目个频率子带中的加窗处理后的右声道的音频数据进行合成,得到合成后的右声道的音频数据,基于所述预设的逆窗函数,对所述合成后的右声道的音频数据,进行逆窗处理,得到右声道待播放的音频数据。
可选的,所述合成模块440,用于:
对于所述预设数目个频率子带中的每个频率子带,将所述频率子带对应的左声道校准参数值与分割到所述频率子带的左声道的音频数据相乘,得到所述频率子带下,所述左声道的校准后的音频数据,并将所述频率子带对应的右声道校准参数值与分割到所述频率子带的右声道的音频数据相乘,得到所述频率子带下,所述右声道的校准后的音频数据;
将所述预设数目个频率子带下左声道的校准后的音频数据进行合成,得到左声道待播放的音频数据,并将所述预设数目个频率子带下右声道的校准后的音频数据进行合成,得到右声道待播放的音频数据。
可选的,所述播放模块450,还用于:
通过所述左声道和所述右声道同时播放第一预设频率范围的第一预设音频数据;
如图5所示,所述装置还包括:
显示模块460,用于显示调节参数的调节滑动条,其中,所述第一预设音频数据为单声道音频数据;
所述确定模块420,还用于:
当检测到对应所述调节滑动条的确定指令时,根据所述调节滑动条上调节指针的位置,确定所述第一预设频率范围对应的左声道的调节参数值和右声道的调节参数值;
对于所述预设数目个频率子带中,频率范围为第一预设频率范围的第一频率子带,根据所述第一频率子带对应的左声道的调节系数和右声道的调节系数、所述第一预设频率范围对应的左声道的调节参数值和右声道的调节参数值,确定所述第一频率子带对应的左声道校准参数值和右声道校准参数值。
可选的,所述播放模块450,还用于:
通过所述左声道和所述右声道同时播放第二预设频率范围的第二预设音频数据,所述显示模块,还用于显示调节参数的调节滑动条,其中,所述第二预设音频数据为单声道音频数据;
所述确定模块420,还用于:
当检测到对应所述调节滑动条的确定指令时,根据所述调节滑动条上调节指针的位置,确定所述第二预设频率范围对应的左声道的调节参数值和右声道的调节参数值;
对于所述预设数目个频率子带中除所述第一频率子带之外的其它频率子带中的第二频率子带,根据所述第二频率子带对应的左声道的调节系数和右声道的调节系数、所述第二预设频率范围对应的左声道的调节参数值和右声道的调节参数值,确定所述第二频率子带对应的左声道校准参数值和右声道校准参数值,其中,所述第二频率子带为所述其它频率子带中的任一频率子带。
可选的,所述确定模块420,还用于:
将所述第二频率子带对应的左声道的调节系数与所述第二预设频率范围对应的左声道的调节参数值相乘,得到所述第二频率子带对应的左声道校准参数值,并将所述第二频率子带对应的右声道的调节系数与所述第二预设频率范围对应的右声道的调节参数值相乘,得到所述第二频率子带对应的右声道校准参数值。
可选的,所述合成模块440,用于:
根据所述预设数目个频率子带分别对应的左声道校准参数值,对分割到所述预设数目个频率子带中的左声道的音频数据进行合成,得到合成后的左声道的音频数据,将第三预设频率范围对应的左声道校准参数值与所述合成后的左声道的音频数据相乘,得到左声道待播放的音频数据,并根据所述预设数目个频率子带分别对应的右声道校准参数值,对分割到所述预设数目个频率子带中的右声道的音频数据进行合成,得到合成后的右声道的音频数据,将所述第三预设频率范围对应的右声道校准参数值与所述合成后的右声道的音频数据相乘,得到右声道待播放的音频数据。
可选的,所述第一预设频率范围为基音的频率范围,所述第二预设频率范围为泛音的频率范围。
可选的,所述第三预设频率范围由基音的频率范围与泛音的频率范围合并得到。
可选的,所述预设数目个频率子带是基于每个频率子带对应的频率范围的端点值之差为第二预设数值划分的。
本公开实施例中,通过将音频拆分成多个频率子带,基于不同频率子带的左声道校准参数值和右声道校准参数值,分别对各频率子带下,左声道的音频数据,进行校准,并对各频率子带下,右声道的音频数据,进行校准,相对于现有技术中仅调整音量的方法,提供了一种调节左声道和右声道平衡的方法,更好的调节左声道和右声道的平衡,使播放出的音频数据有更好的效果。
需要说明的是:上述实施例提供的播放音频数据的装置在播放音频数据时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的播放音频数据的装置与播放音频数据的方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。
图6示出了本公开一个示例性实施例提供的终端600的结构框图。该终端600可以是:智能手机、平板电脑、MP3播放器(Moving Picture Experts Group Audio Layer III,动态影像专家压缩标准音频层面3)、MP4(Moving Picture Experts Group Audio Layer IV,动态影像专家压缩标准音频层面4)播放器、笔记本电脑或台式电脑。终端600还可能被称为用户设备、便携式终端、膝上型 终端、台式终端等其他名称。
通常,终端600包括有:处理器601和存储器602。
处理器601可以包括一个或多个处理核心,比如4核心处理器、8核心处理器等。处理器601可以采用DSP(Digital Signal Processing,数字信号处理)、FPGA(Field-Programmable Gate Array,现场可编程门阵列)、PLA(Programmable Logic Array,可编程逻辑阵列)中的至少一种硬件形式来实现。处理器601也可以包括主处理器和协处理器,主处理器是用于对在唤醒状态下的数据进行处理的处理器,也称CPU(Central Processing Unit,中央处理器);协处理器是用于对在待机状态下的数据进行处理的低功耗处理器。在一些实施例中,处理器601可以在集成有GPU(Graphics Processing Unit,图像处理器),GPU用于负责显示屏所需要显示的内容的渲染和绘制。一些实施例中,处理器601还可以包括AI(Artificial Intelligence,人工智能)处理器,该AI处理器用于处理有关机器学习的计算操作。
存储器602可以包括一个或多个计算机可读存储介质,该计算机可读存储介质可以是非暂态的。存储器602还可包括高速随机存取存储器,以及非易失性存储器,比如一个或多个磁盘存储设备、闪存存储设备。在一些实施例中,存储器602中的非暂态的计算机可读存储介质用于存储至少一个指令,该至少一个指令用于被处理器601所执行以实现本公开中方法实施例提供的播放音频数据的方法。
在一些实施例中,终端600还可选包括有:外围设备接口603和至少一个外围设备。处理器601、存储器602和外围设备接口603之间可以通过总线或信号线相连。各个外围设备可以通过总线、信号线或电路板与外围设备接口603相连。具体地,外围设备包括:射频电路604、触摸显示屏605、摄像头606、音频电路607、定位组件608和电源609中的至少一种。
外围设备接口603可被用于将I/O(Input/Output,输入/输出)相关的至少一个外围设备连接到处理器601和存储器602。在一些实施例中,处理器601、存储器602和外围设备接口603被集成在同一芯片或电路板上;在一些其他实施例中,处理器601、存储器602和外围设备接口603中的任意一个或两个可以在单独的芯片或电路板上实现,本实施例对此不加以限定。
射频电路604用于接收和发射RF(Radio Frequency,射频)信号,也称电磁信号。射频电路604通过电磁信号与通信网络以及其他通信设备进行通信。 射频电路604将电信号转换为电磁信号进行发送,或者,将接收到的电磁信号转换为电信号。可选地,射频电路604包括:天线系统、RF收发器、一个或多个放大器、调谐器、振荡器、数字信号处理器、编解码芯片组、用户身份模块卡等等。射频电路604可以通过至少一种无线通信协议来与其它终端进行通信。该无线通信协议包括但不限于:城域网、各代移动通信网络(2G、3G、4G及5G)、无线局域网和/或WiFi(Wireless Fidelity,无线保真)网络。在一些实施例中,射频电路604还可以包括NFC(Near Field Communication,近距离无线通信)有关的电路,本公开对此不加以限定。
显示屏605用于显示UI(User Interface,用户界面)。该UI可以包括图形、文本、图标、视频及其它们的任意组合。当显示屏605是触摸显示屏时,显示屏605还具有采集在显示屏605的表面或表面上方的触摸信号的能力。该触摸信号可以作为控制信号输入至处理器601进行处理。此时,显示屏605还可以用于提供虚拟按钮和/或虚拟键盘,也称软按钮和/或软键盘。在一些实施例中,显示屏605可以为一个,设置终端600的前面板;在另一些实施例中,显示屏605可以为至少两个,分别设置在终端600的不同表面或呈折叠设计;在再一些实施例中,显示屏605可以是柔性显示屏,设置在终端600的弯曲表面上或折叠面上。甚至,显示屏605还可以设置成非矩形的不规则图形,也即异形屏。显示屏605可以采用LCD(Liquid Crystal Display,液晶显示屏)、OLED(Organic Light-Emitting Diode,有机发光二极管)等材质制备。
摄像头组件606用于采集图像或视频。可选地,摄像头组件606包括前置摄像头和后置摄像头。通常,前置摄像头设置在终端的前面板,后置摄像头设置在终端的背面。在一些实施例中,后置摄像头为至少两个,分别为主摄像头、景深摄像头、广角摄像头、长焦摄像头中的任意一种,以实现主摄像头和景深摄像头融合实现背景虚化功能、主摄像头和广角摄像头融合实现全景拍摄以及VR(Virtual Reality,虚拟现实)拍摄功能或者其它融合拍摄功能。在一些实施例中,摄像头组件606还可以包括闪光灯。闪光灯可以是单色温闪光灯,也可以是双色温闪光灯。双色温闪光灯是指暖光闪光灯和冷光闪光灯的组合,可以用于不同色温下的光线补偿。
音频电路607可以包括麦克风和扬声器。麦克风用于采集用户及环境的声波,并将声波转换为电信号输入至处理器601进行处理,或者输入至射频电路604以实现语音通信。出于立体声采集或降噪的目的,麦克风可以为多个,分 别设置在终端600的不同部位。麦克风还可以是阵列麦克风或全向采集型麦克风。扬声器则用于将来自处理器601或射频电路604的电信号转换为声波。扬声器可以是传统的薄膜扬声器,也可以是压电陶瓷扬声器。当扬声器是压电陶瓷扬声器时,不仅可以将电信号转换为人类可听见的声波,也可以将电信号转换为人类听不见的声波以进行测距等用途。在一些实施例中,音频电路607还可以包括耳机插孔。
定位组件608用于定位终端600的当前地理位置,以实现导航或LBS(Location Based Service,基于位置的服务)。定位组件608可以是基于美国的GPS(Global Positioning System,全球定位系统)、中国的北斗系统、俄罗斯的格雷纳斯系统或欧盟的伽利略系统的定位组件。
电源609用于为终端600中的各个组件进行供电。电源609可以是交流电、直流电、一次性电池或可充电电池。当电源609包括可充电电池时,该可充电电池可以支持有线充电或无线充电。该可充电电池还可以用于支持快充技术。
在一些实施例中,终端600还包括有一个或多个传感器610。该一个或多个传感器610包括但不限于:加速度传感器611、陀螺仪传感器612、压力传感器613、指纹传感器614、光学传感器615以及接近传感器616。
加速度传感器611可以检测以终端600建立的坐标系的三个坐标轴上的加速度大小。比如,加速度传感器611可以用于检测重力加速度在三个坐标轴上的分量。处理器601可以根据加速度传感器611采集的重力加速度信号,控制触摸显示屏605以横向视图或纵向视图进行用户界面的显示。加速度传感器611还可以用于游戏或者用户的运动数据的采集。
陀螺仪传感器612可以检测终端600的机体方向及转动角度,陀螺仪传感器612可以与加速度传感器611协同采集用户对终端600的3D动作。处理器601根据陀螺仪传感器612采集的数据,可以实现如下功能:动作感应(比如根据用户的倾斜操作来改变UI)、拍摄时的图像稳定、游戏控制以及惯性导航。
压力传感器613可以设置在终端600的侧边框和/或触摸显示屏605的下层。当压力传感器613设置在终端600的侧边框时,可以检测用户对终端600的握持信号,由处理器601根据压力传感器613采集的握持信号进行左右手识别或快捷操作。当压力传感器613设置在触摸显示屏605的下层时,由处理器601根据用户对触摸显示屏605的压力操作,实现对UI界面上的可操作性控件进行控制。可操作性控件包括按钮控件、滚动条控件、图标控件、菜单控件中 的至少一种。
指纹传感器614用于采集用户的指纹,由处理器601根据指纹传感器614采集到的指纹识别用户的身份,或者,由指纹传感器614根据采集到的指纹识别用户的身份。在识别出用户的身份为可信身份时,由处理器601授权该用户执行相关的敏感操作,该敏感操作包括解锁屏幕、查看加密信息、下载软件、支付及更改设置等。指纹传感器614可以被设置终端600的正面、背面或侧面。当终端600上设置有物理按键或厂商Logo时,指纹传感器614可以与物理按键或厂商Logo集成在一起。
光学传感器615用于采集环境光强度。在一个实施例中,处理器601可以根据光学传感器615采集的环境光强度,控制触摸显示屏605的显示亮度。具体地,当环境光强度较高时,调高触摸显示屏605的显示亮度;当环境光强度较低时,调低触摸显示屏605的显示亮度。在另一个实施例中,处理器601还可以根据光学传感器615采集的环境光强度,动态调整摄像头组件606的拍摄参数。
接近传感器616,也称距离传感器,通常设置在终端600的前面板。接近传感器616用于采集用户与终端600的正面之间的距离。在一个实施例中,当接近传感器616检测到用户与终端600的正面之间的距离逐渐变小时,由处理器601控制触摸显示屏605从亮屏状态切换为息屏状态;当接近传感器616检测到用户与终端600的正面之间的距离逐渐变大时,由处理器601控制触摸显示屏605从息屏状态切换为亮屏状态。
本领域技术人员可以理解,图6中示出的结构并不构成对终端600的限定,可以包括比图示更多或更少的组件,或者组合某些组件,或者采用不同的组件布置。
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。
以上所述仅为本公开的较佳实施例,并不用以限制本公开,凡在本公开的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本公开的 保护范围之内。
Claims (18)
- 一种播放音频数据的方法,其特征在于,所述方法包括:在播放目标音频的过程中,获取所述目标音频的左声道的音频数据和右声道的音频数据;根据所述目标音频的采样频率,确定所述采样频率对应的预设数目个频率子带;对所述左声道的音频数据进行多相滤波处理,将所述左声道的音频数据分割到预设数目个频率子带中,并对所述右声道的音频数据进行多相滤波处理,将所述右声道的音频数据分割到所述预设数目个频率子带中;根据所述预设数目个频率子带分别对应的左声道校准参数值,对分割到所述预设数目个频率子带中的左声道的音频数据进行合成,得到左声道待播放的音频数据,并根据所述预设数目个频率子带分别对应的右声道校准参数值,对分割到所述预设数目个频率子带中的右声道的音频数据进行合成,得到右声道待播放的音频数据;通过所述左声道,播放所述左声道待播放的音频数据,并通过所述右声道,播放所述右声道待播放的音频数据。
- 根据权利要求1所述的方法,其特征在于,所述获取所述目标音频的左声道的音频数据和右声道的音频数据,包括:缓存所述目标音频中左声道的音频数据和右声道的音频数据;当缓存的所述目标音频中左声道的音频数据和右声道的音频数据的数据量均达到第一预设数值时,获取当前缓存的左声道的音频数据和右声道的音频数据。
- 根据权利要求1所述的方法,其特征在于,所述对所述左声道的音频数据进行多相滤波处理,将所述左声道的音频数据分割到预设数目个频率子带中,并对所述右声道的音频数据进行多相滤波处理,将所述右声道的音频数据分割到所述预设数目个频率子带中,包括:基于预设的窗函数,对所述左声道的音频数据进行加窗处理,得到加窗处理后的左声道的音频数据,并对所述右声道的音频数据进行加窗处理,得到加窗处理后的右声道的音频数据;对所述加窗处理后的左声道的音频数据进行多相滤波处理,将所述加窗处理后的左声道的音频数据分割到预设数目个频率子 带中,并对所述加窗处理后的右声道的音频数据进行多相滤波处理,将所述加窗处理后的右声道的音频数据分割到所述预设数目个频率子带中;所述根据所述预设数目个频率子带分别对应的左声道校准参数值,对分割到所述预设数目个频率子带中的左声道的音频数据进行合成,得到左声道待播放的音频数据,并根据所述预设数目个频率子带分别对应的右声道校准参数值,对分割到所述预设数目个频率子带中的右声道的音频数据进行合成,得到右声道待播放的音频数据,包括:根据所述预设数目个频率子带分别对应的左声道校准参数值,对分割到所述预设数目个频率子带中的加窗处理后的左声道的音频数据进行合成,得到合成后的左声道的音频数据,基于预设的逆窗函数,对所述合成后的左声道的音频数据,进行逆窗处理,得到左声道待播放的音频数据,并根据所述预设数目个频率子带分别对应的右声道校准参数值,对分割到所述预设数目个频率子带中的加窗处理后的右声道的音频数据进行合成,得到合成后的右声道的音频数据,基于所述预设的逆窗函数,对所述合成后的右声道的音频数据,进行逆窗处理,得到右声道待播放的音频数据。
- 根据权利要求1所述的方法,其特征在于,所述根据所述预设数目个频率子带分别对应的左声道校准参数值,对分割到所述预设数目个频率子带中的左声道的音频数据进行合成,得到左声道待播放的音频数据,并根据所述预设数目个频率子带分别对应的右声道校准参数值,对分割到所述预设数目个频率子带中的右声道的音频数据进行合成,得到右声道待播放的音频数据,包括:对于所述预设数目个频率子带中的每个频率子带,将所述频率子带对应的左声道校准参数值与分割到所述频率子带的左声道的音频数据相乘,得到所述频率子带下,所述左声道的校准后的音频数据,并将所述频率子带对应的右声道校准参数值与分割到所述频率子带的右声道的音频数据相乘,得到所述频率子带下,所述右声道的校准后的音频数据;将所述预设数目个频率子带下左声道的校准后的音频数据进行合成,得到左声道待播放的音频数据,并将所述预设数目个频率子带下右声道的校准后的音频数据进行合成,得到右声道待播放的音频数据。
- 根据权利要求1所述的方法,其特征在于,所述方法还包括:通过所述左声道和所述右声道同时播放第一预设频率范围的第一预设音频数据,并显示调节参数的调节滑动条,其中,所述第一预设音频数据为单声道 音频数据;当检测到对应所述调节滑动条的确定指令时,根据所述调节滑动条上调节指针的位置,确定所述第一预设频率范围对应的左声道的调节参数值和右声道的调节参数值;对于所述预设数目个频率子带中,频率范围为第一预设频率范围的第一频率子带,根据所述第一频率子带对应的左声道的调节系数和右声道的调节系数、所述第一预设频率范围对应的左声道的调节参数值和右声道的调节参数值,确定所述第一频率子带对应的左声道校准参数值和右声道校准参数值。
- 根据权利要求5所述的方法,其特征在于,所述方法还包括:通过所述左声道和所述右声道同时播放第二预设频率范围的第二预设音频数据,并显示调节参数的调节滑动条,其中,所述第二预设音频数据为单声道音频数据;当检测到对应所述调节滑动条的确定指令时,根据所述调节滑动条上调节指针的位置,确定所述第二预设频率范围对应的左声道的调节参数值和右声道的调节参数值;对于所述预设数目个频率子带中除所述第一频率子带之外的其它频率子带中的第二频率子带,根据所述第二频率子带对应的左声道的调节系数和右声道的调节系数、所述第二预设频率范围对应的左声道的调节参数值和右声道的调节参数值,确定所述第二频率子带对应的左声道校准参数值和右声道校准参数值,其中,所述第二频率子带为所述其它频率子带中的任一频率子带。
- 根据权利要求6所述的方法,其特征在于,所述根据所述第二频率子带对应的左声道的调节系数和右声道的调节系数、所述第二预设频率范围对应的左声道的调节参数值和右声道的调节参数值,确定所述第二频率子带对应的左声道校准参数值和右声道校准参数值,包括:将所述第二频率子带对应的左声道的调节系数与所述第二预设频率范围对应的左声道的调节参数值相乘,得到所述第二频率子带对应的左声道校准参数值,并将所述第二频率子带对应的右声道的调节系数与所述第二预设频率范围对应的右声道的调节参数值相乘,得到所述第二频率子带对应的右声道校准参数值。
- 根据权利要求1至7任一所述的方法,其特征在于,所述根据所述预设数目个频率子带分别对应的左声道校准参数值,对分割到所述预设数目个频率 子带中的左声道的音频数据进行合成,得到左声道待播放的音频数据,并根据所述预设数目个频率子带分别对应的右声道校准参数值,对分割到所述预设数目个频率子带中的右声道的音频数据进行合成,得到右声道待播放的音频数据,包括:根据所述预设数目个频率子带分别对应的左声道校准参数值,对分割到所述预设数目个频率子带中的左声道的音频数据进行合成,得到合成后的左声道的音频数据,将第三预设频率范围对应的左声道校准参数值与所述合成后的左声道的音频数据相乘,得到左声道待播放的音频数据,并根据所述预设数目个频率子带分别对应的右声道校准参数值,对分割到所述预设数目个频率子带中的右声道的音频数据进行合成,得到合成后的右声道的音频数据,将所述第三预设频率范围对应的右声道校准参数值与所述合成后的右声道的音频数据相乘,得到右声道待播放的音频数据。
- 根据权利要求6或7所述的方法,其特征在于,所述第一预设频率范围为基音的频率范围,所述第二预设频率范围为泛音的频率范围。
- 根据权利要求8所述的方法,其特征在于,所述第三预设频率范围由基音的频率范围与泛音的频率范围合并得到。
- 一种播放音频数据的装置,其特征在于,所述装置包括:获取模块,用于在播放目标音频的过程中,获取所述目标音频的左声道的音频数据和右声道的音频数据;确定模块,用于根据所述目标音频的采样频率,确定所述采样频率对应的预设数目个频率子带;滤波模块,用于对所述左声道的音频数据进行多相滤波处理,将所述左声道的音频数据分割到预设数目个频率子带中,并对所述右声道的音频数据进行多相滤波处理,将所述右声道的音频数据分割到所述预设数目个频率子带中;合成模块,用于根据所述预设数目个频率子带分别对应的左声道校准参数值,对分割到所述预设数目个频率子带中的左声道的音频数据进行合成,得到左声道待播放的音频数据,并根据所述预设数目个频率子带分别对应的右声道校准参数值,对分割到所述预设数目个频率子带中的右声道的音频数据进行合成,得到右声道待播放的音频数据;播放模块,用于通过所述左声道,播放所述左声道待播放的音频数据,并 通过所述右声道,播放所述右声道待播放的音频数据。
- 根据权利要求11所述的装置,其特征在于,所述获取模块,用于:缓存所述目标音频中左声道的音频数据和右声道的音频数据;当缓存的所述目标音频中左声道的音频数据和右声道的音频数据的数据量均达到第一预设数值时,获取当前缓存的左声道的音频数据和右声道的音频数据。
- 根据权利要求11所述的装置,其特征在于,所述滤波模块,用于:基于预设的窗函数,对所述左声道的音频数据进行加窗处理,得到加窗处理后的左声道的音频数据,并对所述右声道的音频数据进行加窗处理,得到加窗处理后的右声道的音频数据;对所述加窗处理后的左声道的音频数据进行多相滤波处理,将所述加窗处理后的左声道的音频数据分割到预设数目个频率子带中,并对所述加窗处理后的右声道的音频数据进行多相滤波处理,将所述加窗处理后的右声道的音频数据分割到所述预设数目个频率子带中;所述合成模块,用于:根据所述预设数目个频率子带分别对应的左声道校准参数值,对分割到所述预设数目个频率子带中的加窗处理后的左声道的音频数据进行合成,得到合成后的左声道的音频数据,基于预设的逆窗函数,对所述合成后的左声道的音频数据,进行逆窗处理,得到左声道待播放的音频数据,并根据所述预设数目个频率子带分别对应的右声道校准参数值,对分割到所述预设数目个频率子带中的加窗处理后的右声道的音频数据进行合成,得到合成后的右声道的音频数据,基于所述预设的逆窗函数,对所述合成后的右声道的音频数据,进行逆窗处理,得到右声道待播放的音频数据。
- 根据权利要求11所述的装置,其特征在于,所述合成模块,用于:对于所述预设数目个频率子带中的每个频率子带,将所述频率子带对应的左声道校准参数值与分割到所述频率子带的左声道的音频数据相乘,得到所述频率子带下,所述左声道的校准后的音频数据,并将所述频率子带对应的右声道校准参数值与分割到所述频率子带的右声道的音频数据相乘,得到所述频率子带下,所述右声道的校准后的音频数据;将所述预设数目个频率子带下左声道的校准后的音频数据进行合成,得到左声道待播放的音频数据,并将所述预设数目个频率子带下右声道的校准后的音频数据进行合成,得到右声道待播放的音频数据。
- 根据权利要求11所述的装置,其特征在于,所述播放模块,还用于:通过所述左声道和所述右声道同时播放第一预设频率范围的第一预设音频数据;所述装置还包括:显示模块,用于显示调节参数的调节滑动条,其中,所述第一预设音频数据为单声道音频数据;所述确定模块,还用于:当检测到对应所述调节滑动条的确定指令时,根据所述调节滑动条上调节指针的位置,确定所述第一预设频率范围对应的左声道的调节参数值和右声道的调节参数值;对于所述预设数目个频率子带中,频率范围为第一预设频率范围的第一频率子带,根据所述第一频率子带对应的左声道的调节系数和右声道的调节系数、所述第一预设频率范围对应的左声道的调节参数值和右声道的调节参数值,确定所述第一频率子带对应的左声道校准参数值和右声道校准参数值。
- 根据权利要求15所述的装置,其特征在于,所述播放模块,还用于:通过所述左声道和所述右声道同时播放第二预设频率范围的第二预设音频数据,所述显示模块,还用于显示调节参数的调节滑动条,其中,所述第二预设音频数据为单声道音频数据;所述确定模块,还用于:当检测到对应所述调节滑动条的确定指令时,根据所述调节滑动条上调节指针的位置,确定所述第二预设频率范围对应的左声道的调节参数值和右声道的调节参数值;对于所述预设数目个频率子带中除所述第一频率子带之外的其它频率子带中的第二频率子带,根据所述第二频率子带对应的左声道的调节系数和右声道的调节系数、所述第二预设频率范围对应的左声道的调节参数值和右声道的调节参数值,确定所述第二频率子带对应的左声道校准参数值和右声道校准参数值,其中,所述第二频率子带为所述其它频率子带中的任一频率子带。
- 根据权利要求16所述的装置,其特征在于,所述确定模块,还用于:将所述第二频率子带对应的左声道的调节系数与所述第二预设频率范围对应的左声道的调节参数值相乘,得到所述第二频率子带对应的左声道校准参数值,并将所述第二频率子带对应的右声道的调节系数与所述第二预设频率范围 对应的右声道的调节参数值相乘,得到所述第二频率子带对应的右声道校准参数值。
- 根据权利要求11至17任一所述的装置,其特征在于,所述合成模块,用于:根据所述预设数目个频率子带分别对应的左声道校准参数值,对分割到所述预设数目个频率子带中的左声道的音频数据进行合成,得到合成后的左声道的音频数据,将第三预设频率范围对应的左声道校准参数值与所述合成后的左声道的音频数据相乘,得到左声道待播放的音频数据,并根据所述预设数目个频率子带分别对应的右声道校准参数值,对分割到所述预设数目个频率子带中的右声道的音频数据进行合成,得到合成后的右声道的音频数据,将所述第三预设频率范围对应的右声道校准参数值与所述合成后的右声道的音频数据相乘,得到右声道待播放的音频数据。
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| US16/617,926 US11272304B2 (en) | 2018-06-12 | 2018-11-28 | Method and terminal for playing audio data, and storage medium thereof |
| EP18919405.3A EP3618459B1 (en) | 2018-06-12 | 2018-11-28 | Method and apparatus for playing audio data |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201810603069.1A CN108834037B (zh) | 2018-06-12 | 2018-06-12 | 播放音频数据的方法和装置 |
| CN201810603069.1 | 2018-06-12 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2019237667A1 true WO2019237667A1 (zh) | 2019-12-19 |
Family
ID=64143751
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2018/117916 Ceased WO2019237667A1 (zh) | 2018-06-12 | 2018-11-28 | 播放音频数据的方法和装置 |
Country Status (4)
| Country | Link |
|---|---|
| US (1) | US11272304B2 (zh) |
| EP (1) | EP3618459B1 (zh) |
| CN (1) | CN108834037B (zh) |
| WO (1) | WO2019237667A1 (zh) |
Families Citing this family (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108008930B (zh) * | 2017-11-30 | 2020-06-30 | 广州酷狗计算机科技有限公司 | 确定k歌分值的方法和装置 |
| CN108834037B (zh) | 2018-06-12 | 2019-09-13 | 广州酷狗计算机科技有限公司 | 播放音频数据的方法和装置 |
| GB201909715D0 (en) | 2019-07-05 | 2019-08-21 | Nokia Technologies Oy | Stereo audio |
| CN112333531B (zh) * | 2020-07-09 | 2024-09-17 | 深圳Tcl新技术有限公司 | 音频数据播放方法、设备及可读存储介质 |
| CN113724728B (zh) * | 2021-08-05 | 2024-01-26 | 北京信息职业技术学院 | 一种基于gmm模型的音频信号的处理方法 |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20100321216A1 (en) * | 2009-06-19 | 2010-12-23 | Conexant Systems, Inc. | Systems and Methods for Variable Rate Conversion |
| CN104168435A (zh) * | 2014-08-15 | 2014-11-26 | 北京彩云动力教育科技有限公司 | 一种音频文件批量合并和播放的方法及系统 |
| US20160183003A1 (en) * | 2014-12-19 | 2016-06-23 | Lee F. Bender | Digital Audio Processing Systems and Methods |
| CN106100777A (zh) * | 2016-05-27 | 2016-11-09 | 西华大学 | 基于语音识别技术的广播保障方法 |
| US20170223474A1 (en) * | 2015-11-10 | 2017-08-03 | Bender Technologies, Inc. | Digital audio processing systems and methods |
| CN108834037A (zh) * | 2018-06-12 | 2018-11-16 | 广州酷狗计算机科技有限公司 | 播放音频数据的方法和装置 |
Family Cites Families (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR101387195B1 (ko) * | 2009-10-05 | 2014-04-21 | 하만인터내셔날인더스트리스인코포레이티드 | 오디오 신호의 공간 추출 시스템 |
| EP2486654B1 (en) * | 2009-10-09 | 2016-09-21 | DTS, Inc. | Adaptive dynamic range enhancement of audio recordings |
| CN102623040B (zh) * | 2012-03-12 | 2014-12-10 | 四川和芯微电子股份有限公司 | 数据合成播放系统及数据合成播放方法 |
| CN102752687A (zh) * | 2012-06-28 | 2012-10-24 | 华为终端有限公司 | 终端设备音效调整方法以及终端设备 |
| CN103475248B (zh) * | 2013-08-30 | 2016-12-07 | 华为技术有限公司 | 功率变换电路和功率变换系统 |
| US9747367B2 (en) * | 2014-12-05 | 2017-08-29 | Stages Llc | Communication system for establishing and providing preferred audio |
| CN106658301B (zh) * | 2015-11-03 | 2019-12-03 | 塞舌尔商元鼎音讯股份有限公司 | 调整均衡器设定的电子装置、均衡器调整方法及声音播放装置 |
-
2018
- 2018-06-12 CN CN201810603069.1A patent/CN108834037B/zh active Active
- 2018-11-28 EP EP18919405.3A patent/EP3618459B1/en active Active
- 2018-11-28 US US16/617,926 patent/US11272304B2/en active Active
- 2018-11-28 WO PCT/CN2018/117916 patent/WO2019237667A1/zh not_active Ceased
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20100321216A1 (en) * | 2009-06-19 | 2010-12-23 | Conexant Systems, Inc. | Systems and Methods for Variable Rate Conversion |
| CN104168435A (zh) * | 2014-08-15 | 2014-11-26 | 北京彩云动力教育科技有限公司 | 一种音频文件批量合并和播放的方法及系统 |
| US20160183003A1 (en) * | 2014-12-19 | 2016-06-23 | Lee F. Bender | Digital Audio Processing Systems and Methods |
| US20170223474A1 (en) * | 2015-11-10 | 2017-08-03 | Bender Technologies, Inc. | Digital audio processing systems and methods |
| CN106100777A (zh) * | 2016-05-27 | 2016-11-09 | 西华大学 | 基于语音识别技术的广播保障方法 |
| CN108834037A (zh) * | 2018-06-12 | 2018-11-16 | 广州酷狗计算机科技有限公司 | 播放音频数据的方法和装置 |
Non-Patent Citations (1)
| Title |
|---|
| See also references of EP3618459A4 * |
Also Published As
| Publication number | Publication date |
|---|---|
| US11272304B2 (en) | 2022-03-08 |
| CN108834037B (zh) | 2019-09-13 |
| US20210274301A1 (en) | 2021-09-02 |
| EP3618459A4 (en) | 2020-11-18 |
| EP3618459A1 (en) | 2020-03-04 |
| CN108834037A (zh) | 2018-11-16 |
| EP3618459B1 (en) | 2024-10-02 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| EP3624463B1 (en) | Audio signal processing method and device, terminal and storage medium | |
| CN110764730B (zh) | 播放音频数据的方法和装置 | |
| CN111050250B (zh) | 降噪方法、装置、设备和存储介质 | |
| CN110996305B (zh) | 连接蓝牙设备的方法、装置、电子设备及介质 | |
| US12437739B2 (en) | Method and apparatus for determining volume adjustment ratio information, device, and storage medium | |
| EP3618459B1 (en) | Method and apparatus for playing audio data | |
| CN109065068B (zh) | 音频处理方法、装置及存储介质 | |
| CN112133332B (zh) | 播放音频的方法、装置及设备 | |
| CN109547848B (zh) | 响度调整方法、装置、电子设备以及存储介质 | |
| CN110618805B (zh) | 调整设备电量的方法、装置、电子设备及介质 | |
| US11315582B2 (en) | Method for recovering audio signals, terminal and storage medium | |
| US20230014836A1 (en) | Method for chorus mixing, apparatus, electronic device and storage medium | |
| CN113963707B (zh) | 音频处理方法、装置、设备和存储介质 | |
| CN109524016B (zh) | 音频处理方法、装置、电子设备及存储介质 | |
| WO2019237666A1 (zh) | 音频处理方法、装置、存储介质及电子设备 | |
| WO2021139535A1 (zh) | 播放音频的方法、装置、系统、设备及存储介质 | |
| CN110708582B (zh) | 同步播放的方法、装置、电子设备及介质 | |
| CN111984222A (zh) | 调节音量的方法、装置、电子设备及可读存储介质 | |
| CN112133319B (zh) | 音频生成的方法、装置、设备及存储介质 | |
| CN109360582B (zh) | 音频处理方法、装置及存储介质 | |
| CN109360577B (zh) | 对音频进行处理的方法、装置存储介质 | |
| CN111063364A (zh) | 生成音频的方法、装置、计算机设备和存储介质 | |
| CN115956270B (zh) | 音频处理方法、装置、设备及存储介质 | |
| CN112133267B (zh) | 音频效果处理的方法、设备及存储介质 | |
| CN120853591A (zh) | 均衡音频的方法、设备、存储介质和程序产品 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| ENP | Entry into the national phase |
Ref document number: 2018919405 Country of ref document: EP Effective date: 20191129 |
|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 18919405 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |