WO2023116769A1 - Audio data processing method and electronic device - Google Patents

Audio data processing method and electronic device Download PDF

Info

Publication number
WO2023116769A1
WO2023116769A1 PCT/CN2022/140715 CN2022140715W WO2023116769A1 WO 2023116769 A1 WO2023116769 A1 WO 2023116769A1 CN 2022140715 W CN2022140715 W CN 2022140715W WO 2023116769 A1 WO2023116769 A1 WO 2023116769A1
Authority
WO
WIPO (PCT)
Prior art keywords
audio
electronic device
state
charging stand
speaker module
Prior art date
Application number
PCT/CN2022/140715
Other languages
French (fr)
Chinese (zh)
Inventor
林翔
Original Assignee
维沃移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 维沃移动通信有限公司 filed Critical 维沃移动通信有限公司
Publication of WO2023116769A1 publication Critical patent/WO2023116769A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/16Sound input; Sound output
    • G06F3/167Audio in a user interface, e.g. using voice commands for navigating, audio feedback

Definitions

  • the present application belongs to the field of electronic technology, and in particular relates to an audio data processing method and electronic equipment.
  • the electronic device When wirelessly charging an electronic device, the electronic device can be connected to the charging stand in the state of a vertical screen or a horizontal screen.
  • the sound outlet of the speaker disposed on the electronic device may be blocked by the charging stand, and the blocked sound outlet may reduce the audio playback effect of the electronic device.
  • the purpose of the embodiment of the present application is to provide an audio data processing and electronic device, which can solve the problem that the audio playback effect will be affected when the sound outlet of the speaker is blocked by the charging stand.
  • the embodiment of the present application provides a method for processing audio data, which is applied to an electronic device, and the method includes:
  • the state parameter determine whether the sound outlet of the first speaker module of the electronic device is blocked
  • the audio is played in the first audio playback mode, and the pre-stored various audio parameters are selected Determine target audio parameters, and perform audio playback with the target audio parameters;
  • the audio is played in a third audio playing manner.
  • the embodiment of the present application provides an audio data processing device, which runs on electronic equipment, and the device includes:
  • a detection module configured to detect state parameters of the electronic device when the electronic device is connected to the charging stand for wireless charging
  • a first determination module configured to determine whether the sound outlet of the first speaker module of the electronic device is blocked according to the state parameter
  • the first playback module is used to perform audio playback in a first audio playback mode when the sound outlet of the first speaker module is blocked and the charging stand is not provided with a second speaker module, from Determining a target audio parameter from a variety of pre-stored audio parameters, and performing audio playback with the target audio parameter;
  • the second playback module is used to play audio in a second audio playback mode when the sound hole of the first speaker module is blocked and the charging stand is provided with the second speaker module, Play audio through the second speaker module;
  • the third playback module is configured to play audio in a third audio playback mode when the sound outlet of the first speaker module is not blocked.
  • an embodiment of the present application provides an electronic device, the electronic device includes a processor, a memory, and a program or instruction stored in the memory and operable on the processor, and the program or instruction is The processor implements the steps of the audio data processing method described in the first aspect when executed.
  • an embodiment of the present application provides a readable storage medium, on which a program or an instruction is stored, and when the program or instruction is executed by a processor, the audio data as described in the first aspect is realized. The steps of the processing method.
  • the embodiment of the present application provides a chip, the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is used to run programs or instructions, so as to implement the first aspect The processing method of the audio data.
  • the state parameters of the electronic device are detected; according to the state parameters, it is determined whether the sound outlet of the first speaker module of the electronic device is blocked; When the sound outlet of the module is blocked and the charging stand is not equipped with a second speaker module, the audio is played in the first audio playback mode, and the target audio parameters are determined from various pre-stored audio parameters, and the target audio Parameters for audio playback; when the sound outlet of the first speaker module is blocked and the charging stand is equipped with a second speaker module, the audio is played in the second audio playback mode, and the audio is played through the second speaker module Playing; in the case that the sound outlet of the first speaker module is not blocked, the audio is played in the third audio playback mode.
  • Fig. 1 is a first schematic flow chart of a method for processing audio data provided by an embodiment of the present application
  • Fig. 2 is a first physical diagram of an electronic device connected to a charging stand provided by an embodiment of the present application
  • Fig. 3 is a second physical diagram of an electronic device connected to a charging stand provided by an embodiment of the present application
  • Fig. 4 is a frequency-loudness schematic diagram of an electronic device playing audio data in different states provided by an embodiment of the present application
  • Fig. 5 is a circuit system framework diagram of an electronic device provided by an embodiment of the present application.
  • Fig. 6 is a schematic diagram of frequency-gain of the first audio parameter provided by an embodiment of the present application.
  • Fig. 7 is a third physical diagram of an electronic device connected to a charging stand provided by an embodiment of the present application.
  • Fig. 8 is a circuit system framework diagram of a charging stand provided by an embodiment of the present application.
  • FIG. 9 is a second schematic flowchart of a method for processing audio data provided by an embodiment of the present application.
  • FIG. 10 is a schematic structural diagram of an audio data processing device provided by an embodiment of the present application.
  • Fig. 11 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • Fig. 12 is a schematic diagram of a hardware structure of an electronic device provided by an embodiment of the present application.
  • FIG. 1 is a schematic flowchart of a first audio data processing method provided by an embodiment of the present application.
  • Step S102 when the electronic device is connected to the charging stand for wireless charging, detect the state parameters of the electronic device.
  • the CPU (central processing unit, central processing unit) of the electronic device can determine whether the electronic device is connected to the charging stand for wireless charging.
  • the principle is as follows: the electronic device can include a first coil, and the charging stand can include a second coil. When the electronic device is connected to the charging stand for wireless charging, the first coil and the second coil are connected in communication; when the electronic device is disconnected from the charging stand for wireless charging, the communication connection between the first coil and the second coil is stopped. Then the CPU can determine whether the electronic device is wirelessly connected to the charging stand according to whether the first coil receives the communication signal from the second coil.
  • the electronic device when the electronic device is connected to the charging stand for wireless charging, the electronic device may be in a charging state, or it may be in a non-charging state because the battery is fully charged. Regardless of whether the electronic device is in a charging state, as long as the electronic device is connected to the charging stand , the second coil will continue to send communication signals to the first coil.
  • the state parameters of the electronic device may include one or more of the following parameters: a state parameter characterizing the horizontal and vertical screen state of the electronic device, an occlusion state parameter characterizing whether the sound hole of the first speaker module of the electronic device is blocked, etc.
  • the state parameters representing the state of the horizontal and vertical screens of the electronic device can be obtained through the gravity sensor G-sensor located inside the electronic device.
  • the blocking state parameter representing whether the sound outlet of the first speaker module is blocked may be collected by sensors pre-set inside or around the sound outlet.
  • the sound outlet of the first speaker module can be arranged at the bottom of the electronic device, or at both sides of the electronic device.
  • Step S104 determine whether the sound outlet of the first speaker module of the electronic device is blocked.
  • the state parameter representing the horizontal and vertical screen state of the electronic device may reflect whether the sound outlet of the first speaker module of the electronic device is blocked.
  • the electronic device is connected to the charging stand for wireless charging, and the electronic device is determined to be placed on the charging stand with the vertical screen through the state parameters representing the horizontal and vertical screen states of the electronic device, then The bottom of the electronic device is connected to the charging stand, and the sound outlet of the first speaker module set at the bottom is blocked by the charging stand; the electronic device is connected to the charging stand for wireless charging, and the electronic device is determined by the state parameters representing the state of the horizontal and vertical screens of the electronic device.
  • the device is placed horizontally on the charging stand, one side of the electronic device is connected to the charging stand, and the sound outlet of the first speaker module arranged at the bottom is not blocked by the charging stand.
  • the state parameter includes a first state and a second state; when the electronic device is in the first state, the electronic device is placed vertically on the charging stand, and the sound outlet of the first speaker module is blocked by the charging stand; When the electronic device is in the second state, the electronic device is placed horizontally on the charging stand, and the sound outlet of the first speaker module is not blocked.
  • a commonly used mobile phone can be regarded as a cuboid with six sides, and one of the six sides of the cuboid is a mobile phone screen, which can be used to display a user interface of the mobile phone.
  • the side close to the directly below the user operation interface is the bottom of the mobile phone; the side close to the directly above the user operation interface is the top of the mobile phone; the side close to the directly left or directly right of the user operation interface
  • the side of the phone is the side of the phone.
  • the first state may be a vertical screen state, and when the electronic device is connected to the charging stand for wireless charging, the electronic device is in the vertical screen state, that is, the electronic device is placed on the charging stand with the vertical screen.
  • a first speaker module is arranged inside the electronic device, and the sound outlet of the first speaker module is located at the bottom of the electronic device. Then, when the electronic device is placed on the charging stand with a vertical screen, the bottom of the electronic device is in contact with the charging stand, and the sound hole at the bottom is blocked by the charging stand.
  • the second state may be a horizontal screen state, and when the electronic device is connected to the charging stand for wireless charging, the electronic device is in the horizontal screen state, that is, the electronic device is placed on the charging stand with a horizontal screen.
  • a first speaker module is arranged inside the electronic device, and the sound outlet of the first speaker module is located at the bottom of the electronic device. Then, when the electronic device is placed vertically on the charging stand, one side of the electronic device is in contact with the charging stand, and the sound hole at the bottom is not blocked by the charging stand.
  • FIG. 2 is a first physical diagram of an electronic device connected to a charging stand provided by an embodiment of the present application.
  • Fig. 3 is a second physical diagram of an electronic device connected to a charging stand provided by an embodiment of the present application.
  • Fig. 4 is a schematic diagram of frequency-loudness of an electronic device playing audio data in different states provided by an embodiment of the present application.
  • the electronic device 201 is connected to the charging stand 202 , and the electronic device 201 is in a horizontal screen state. As shown in FIG. 3 , the electronic device 201 is connected to the charging stand 202 , and the electronic device 201 is in a vertical screen state.
  • the sound hole of the first speaker module is located at the bottom of the electronic device 201. As shown in FIG.
  • the sound outlet of the first speaker module is blocked by the charging stand 202; as shown in Figure 2, when the electronic device 201 is connected to the charging stand 202 for wireless charging and the electronic device 201 is in a horizontal screen state, the sound outlet of the first speaker module is not blocked .
  • Curve 401 is the frequency-loudness when the electronic device is connected to the charging stand for wireless charging and the electronic device is in the horizontal screen state.
  • Curve 402 is the frequency-loudness curve when the electronic device is connected to the charging stand for wireless charging and the electronic device is in a vertical screen state.
  • the loudness corresponding to the curve 402 drops significantly. It can be understood that the high-frequency frequency response of the curve 402 is significantly reduced, so that the loudness corresponding to the curve 401 is significantly greater than the loudness corresponding to the curve 402 . Then the subjective experience of the user listening to the audio data corresponding to the curve 402 is that the sound is muffled and not clear enough.
  • the specific frequency may be 3000 Hz.
  • the sound outlet of the first speaker module may not be blocked by the charging stand, and there is no need to detect the horizontal and vertical screen status of the electronic device at this time.
  • the sound outlet of the first speaker module is arranged on one side of the electronic device, and when the electronic device is connected to the charging stand and the electronic device is in a horizontal screen state, the sound outlet is covered by the charging stand. occlusion, then in the frequency-loudness diagram shown in Figure 4, curve 401 is the frequency-loudness curve when the electronic device is connected to the charging stand and the electronic device is in a vertical screen state, and curve 402 is the frequency-loudness curve when the electronic device is connected to the charging stand and the electronic The frequency-loudness curve when the device is in the horizontal screen state is opposite to the aforementioned embodiment in which the sound outlet of the first speaker module is arranged at the bottom of the electronic device, and will not be repeated here.
  • the electronic device Before detecting the state parameter of the electronic device, the electronic device may receive a first instruction; the first instruction is used to instruct the electronic device to play audio data.
  • the execution subject performing the step of receiving the first instruction may be a user input unit. That is, the user input unit of the electronic device receives the first instruction submitted by the user, and sends the first instruction to the CPU of the electronic device.
  • the first instruction may be an instruction submitted by the user for the electronic device.
  • the first instruction is used to instruct the electronic device to play audio data through the first speaker module.
  • the audio data may be audio data of a song, or audio data of a video.
  • the audio data is played through the first speaker module, that is, the audio data is released externally.
  • the user sends an instruction to play song A to the mobile phone, or the user sends an instruction to play video B to the tablet computer.
  • the electronic device Before receiving the first instruction, the electronic device may be connected to the charging stand for wireless charging, or may not be connected to the charging stand. That is, the wireless charging connection between the electronic device and the charging stand may occur before the electronic device receives the first instruction, or after the electronic device receives the first instruction.
  • the charging stand may be a charging device for wired charging or a charging device for wireless charging.
  • the mobile phone is first connected to the charging stand with wireless charging function to wirelessly charge the mobile phone, and then the first instruction for instructing the mobile phone to play song A through the first speaker module is received.
  • the first instruction may carry a first identifier.
  • the first identifier can be used to query the first audio data to be played.
  • step S104 After performing step S104, one of step S106, step S108, and step S110 may be performed.
  • the charging stand can be a charging stand provided with a second speaker module, or a charging stand not provided with a second speaker module.
  • step S106 if it is determined that the sound output of the first speaker module of the electronic device is If the hole is not blocked, step S110 is executed.
  • step S108 if it is determined that the sound outlet of the first speaker module of the electronic device is blocked, then perform step S108; if it is determined that the sound outlet of the first speaker module of the electronic device If not blocked, execute step S110.
  • Step S106 in the case that the sound outlet of the first speaker module is blocked and the charging stand is not equipped with a second speaker module, perform audio playback in the first audio playback mode, and determine from various pre-stored audio parameters Target audio parameter, use the target audio parameter for audio playback.
  • Various pre-stored audio parameters may include target audio parameters called when the sound outlet of the first speaker module is blocked, or may be included when the sound outlet of the first speaker module is not blocked General audio parameters called.
  • Both the target audio parameter and the regular audio parameter may be audio parameters used for audio processing of the audio data when the electronic device releases the audio data.
  • the first audio playback mode may be an audio playback mode in which the audio playback effect is improved by invoking target audio parameters for audio playback when the sound outlet of the first speaker module is blocked.
  • playing audio with target audio parameters includes: acquiring the first audio data to be played; configuring an equalizer module in the electronic device according to the target audio parameters; Perform gain processing to obtain second audio data; play the second audio data.
  • the equalizer module in the electronic device is configured according to the gain data, and then the configured equalizer module is used to perform gain processing on the output loudness of each audio signal in the first audio data, and the gain processing
  • the first audio data is used as the second audio data, and the second audio data is played.
  • Fig. 5 is a block diagram of a circuit system of an electronic device provided by an embodiment of the present application.
  • the circuit system is a circuit system composed of circuit devices in an electronic device that execute each step in the aforementioned audio data processing method during specific implementation.
  • the central processing unit CPU505 includes an instruction sending module 501 and an audio data transmission module 502.
  • the audio data transmission module 502 is connected to the first intelligent power amplifier 503 in communication, and the instruction sending module 501 is connected to the first intelligent power amplifier 503.
  • the power amplifier 503 is connected to the first speaker module 504 . in:
  • CPU505 is the control center of the whole circuit system.
  • the command sending module 501 may be an I2C (Inter-Integrated Circuit, two-wire serial bus) module, and the CPU 505 controls the first intelligent power amplifier 503 to work through the command sending module 501 .
  • I2C Inter-Integrated Circuit, two-wire serial bus
  • the audio data transmission module 502 can be an I2S (Inter-IC Sound, integrated circuit built-in audio bus) module, and the CPU 505 transmits the first audio data to the first intelligent power amplifier 503 through the audio data transmission module 502.
  • I2S Inter-IC Sound, integrated circuit built-in audio bus
  • the first intelligent power amplifier 503 is used to drive the first speaker module 504 .
  • the "power amplifier” in the first smart power amplifier 503 refers to a power amplifier.
  • the interior of the first intelligent power amplifier 503 may include a DSP (Digital Signal Process, digital signal processing) module, and the DSP module may at least include an EQ (Equalizer, equalizer) module.
  • the EQ module is used to adjust the output frequency response of the audio data. It can give different gains to the audio signals of different frequency points, that is, for the audio signal of any frequency point, the audio signal is gained according to the gain data corresponding to the frequency point. deal with.
  • the first speaker module 504 is used to play the second audio data.
  • the equalizer module in the electronic device in the step of "configuring the equalizer module in the electronic device according to the target audio parameters" can be the EQ in the DSP module in the first intelligent power amplifier 503 in the circuit system.
  • module, the subject of executing the step “playing the second audio data” may be the first speaker module 504 in the circuit system.
  • the inside of the first intelligent power amplifier 503 does not contain a DSP module, and the DSP module is located inside the CPU, then in the electronic device in the step "configure the equalizer module in the electronic device according to the target audio parameters"
  • the equalizer module can be the EQ module in the DSP module in the CPU 505 in the circuit system, and the execution subject of the step of "playing the second audio data" can be the first speaker module 504 in the circuit system.
  • the EQ module after the EQ module performs audio processing on the first audio data to generate the second audio data, the EQ module sends the second audio data to the first intelligent power amplifier 503, and the first intelligent power amplifier 503 sends the second audio data to The first speaker module 504 .
  • the target audio parameters are predetermined in the following manner: when the electronic device is connected to the charging stand for wireless charging and the electronic device is in the first state, test the output frequency response of the third audio data at each frequency point to obtain the first Frequency response data; when the electronic device is in the second state, test the output frequency response of the third audio data at each frequency point to obtain the second frequency response data; according to the first frequency response data and the second frequency response data, determine The gain data of each frequency point is used as the target audio parameter.
  • the target audio parameters may be predetermined before the electronic device is put into use.
  • the sound outlet of the first speaker module located at the bottom of the electronic device is blocked by the charging stand.
  • the third audio frequency is tested.
  • the output frequency response of each frequency point of the data is obtained to obtain the first frequency response data.
  • the third audio data may include multiple frequency points located in a preset frequency band, and the multiple frequency points may be continuous or discrete.
  • the preset frequency band may be a high frequency band greater than a specific frequency.
  • the specific frequency is the same parameter as the specific frequency in the aforementioned frequency-loudness curve shown in FIG. 4 , and can be determined through the frequency-loudness curve shown in FIG. 4 .
  • the frequency response of each frequency point of the third audio data is tested to obtain the second frequency response data.
  • the gain data of each frequency point is determined, and the gain data of each frequency point is counted to obtain the target audio parameter.
  • Fig. 6 is a schematic diagram of frequency-gain of a first audio parameter provided by an embodiment of the present application.
  • the abscissa is the frequency
  • the unit is Hz
  • the ordinate is the gain
  • the unit is dB
  • the curve 601 is the frequency-gain curve of the first audio parameter.
  • the frequency from 3KHz upwards will gradually give positive gain.
  • the gain reaches 15dB, which compensates for the high-frequency signal lost due to the sound hole of the first speaker module being blocked by the charging stand.
  • the gain can be understood as amplifying the audio data of the processor according to the value of the gain.
  • the loudness of the audio data after processing is twice the loudness of the audio data before processing; when the gain is 12dB, the loudness of the audio data after processing is four times the loudness of the audio data before processing. times.
  • Step S108 in the case that the sound outlet of the first speaker module is blocked and the charging base is provided with a second speaker module, the audio is played in the second audio playback mode, and the second audio playback is performed through the second speaker module.
  • Two speaker modules The second speaker module.
  • the second audio playback mode may be an audio playback mode in which the audio playback effect is improved through the second speaker module disposed on the charging stand when the sound outlet of the first speaker module is blocked.
  • the electronic device can invoke conventional audio parameters for audio playback.
  • the conventional audio parameters may be the aforementioned prestored audio parameters that are invoked when the sound outlet of the first speaker module is not blocked.
  • Step S110 in the case that the sound outlet of the first speaker module is not blocked, perform audio playback in a third audio playback mode.
  • the third audio playing mode may be an audio playing mode in which audio is played through the first speaker module of the electronic device when the sound outlet of the first speaker module is not blocked.
  • the electronic device can call conventional audio parameters to perform audio playing.
  • the conventional audio parameters may be the aforementioned prestored audio parameters that are invoked when the sound outlet of the first speaker module is not blocked.
  • the audio playback effects caused by the first audio playback mode, the second audio playback mode and the third audio playback mode during specific implementation are the same.
  • Step S108 and step S110 can be described with reference to FIG. 7 and FIG. 8 .
  • Fig. 7 is a third physical diagram of an electronic device connected to a charging stand provided by an embodiment of the present application.
  • Fig. 8 is a frame diagram of a circuit system of a charging stand provided by an embodiment of the present application.
  • the electronic device 201 is connected to the charging stand 202, and the electronic device handles the vertical screen state.
  • the charging stand 202 includes a sound outlet 203 of the second speaker module, and the sound outlet 203 is not blocked when the electronic device 201 is connected to the charging stand 202 .
  • the charging stand includes a Bluetooth module 801 , a second smart power amplifier 802 and a second speaker module 803 .
  • the charging stand is improved by adding a Bluetooth module 801 , a second smart power amplifier 802 and a second speaker module 803 as shown in FIG. 8 .
  • the bluetooth module 801 is responsible for communicating with the electronic device, receiving audio data sent by the electronic device and transmitting the audio data to the second intelligent power amplifier 802 .
  • the second intelligent power amplifier 802 amplifies the received audio data and pushes the speaker module of the second speaker module 803 to output sound. The sound is emitted from the sound outlet of the second speaker module 803 .
  • the second intelligent power amplifier 802 the power amplifier refers to a power amplifier.
  • the mobile phone when the mobile phone is wirelessly charging, if the user wants to play music or video, first judge whether the mobile phone is in landscape mode or portrait mode through the gravity sensor G-sensor in the mobile phone. If the mobile phone is in the horizontal screen mode, the sound is broadcast from the sound outlet of the first speaker module of the mobile phone. If the mobile phone is in portrait mode, the sound outlet of the first speaker module does not output sound, but transmits the audio data to the Bluetooth module of the charging stand through the Bluetooth module of the mobile phone, and the second speaker module on the charging stand The sound hole emits sound.
  • the audio playback in the first audio playback mode is stopped , perform audio playback in the third audio playback mode;
  • the charging stand is provided with a second speaker module, and it is detected that the electronic device is disconnected from the wireless charging connection with the charging stand, stop using the second Audio playback is performed in the audio playback mode, and audio playback is performed in the third audio playback mode;
  • the charging stand is not provided with the second speaker module and it is detected that the electronic device is switched from the first state to the second state, stop using the third audio playback mode.
  • the charging stand When the electronic device is in the first state, the charging stand is not provided with a second speaker module, and it is detected that the electronic device is disconnected from the charging stand for wireless charging, the audio playback in the first audio playback mode is stopped, and the third Audio playback in the audio playback mode; when the charging stand is not provided with a second speaker module and the electronic device is detected to be switched from the first state to the second state, the audio playback in the first audio playback mode is stopped, and the second audio playback mode is used.
  • Three audio playback modes for audio playback are used.
  • the charging stand is not provided with a second speaker module, and the electronic device can use the first audio playback mode or the third audio playback mode to perform audio playback under different circumstances.
  • the electronic device and the charging stand are wirelessly If the electronic device is connected and the electronic device is in the first state, it can be determined that the electronic device performs audio playback in the first audio playback mode. Then, two things can happen:
  • the charging stand When the electronic device is in the first state, the charging stand is provided with a second speaker module, and it is detected that the electronic device and the charging stand are disconnected from the wireless charging connection, stop playing the audio in the second audio playback mode, and use the third audio Play mode for audio playback.
  • the charging stand is provided with a second speaker module, and it is detected that the electronic device is switched from the first state to the second state, the audio playback in the second audio playback mode is stopped, and the audio playback is performed in the third audio playback mode.
  • the charging stand is provided with a second speaker module, and the electronic device can adopt the second audio playback mode or the third audio playback mode under different circumstances.
  • the electronic device In the initial state, the electronic device is wirelessly connected to the charging stand, and the electronic device If the device is in the first state, it can be determined that the electronic device performs audio playback in the second audio playback mode. Then, two things can happen:
  • the electronic device stops playing audio in the first audio playing mode, and plays audio in the third audio playing mode. It can be understood that the electronic device stops calling target audio parameters for audio playing, and instead calls conventional audio parameters for audio playing.
  • the electronic device may process the audio signals corresponding to the audio data at various time points in time sequence, and play the audio signals that have been processed while performing audio processing on the audio signals.
  • the electronic device can query the target audio parameters for the frequency of each audio signal in the audio data to obtain the corresponding gain data, and according to the gain data, the audio signal Gain processing is performed on the output frequency response, and the audio signal after gain processing is played.
  • the electronic device can query the frequency of each audio signal in the audio data to obtain the corresponding gain data in the conventional audio parameters, and according to the gain data, the audio signal Gain processing is performed on the output frequency response, and the audio signal after gain processing is played.
  • the electronic device stops calling the target audio parameters for audio playback, and instead calls the conventional audio parameters for audio playback.
  • the first audio data to be played includes N audio signals arranged in chronological order, and the electronic device can target at the initial state The frequency of each audio signal in the first X audio signals in the audio data, query the corresponding gain data in the target audio parameter, perform gain processing on the output frequency response of the audio signal according to the gain data, and play the gain processing audio signal.
  • the electronic device After the electronic device finishes processing the first X audio signals, stop calling the target audio parameters for audio playback, and instead call the conventional audio parameters for audio playback, that is, the electronic device targets the (N-X)th to Nth audio signals in the audio data For the frequency of each audio signal in , query the corresponding gain data in the general audio parameters, perform gain processing on the output frequency response of the audio signal according to the gain data, and play the audio signal after gain processing.
  • the electronic device stops playing audio in the second audio playing mode, and plays audio in the third audio playing mode. It can be understood that the electronic device stops playing audio through the second speaker module installed on the charging stand, and the electronic device stops playing audio through the second A speaker module performs audio playback.
  • the audio playback mode when it is detected that the electronic device is disconnected from the charging stand for wireless charging or when the electronic device is switched from the first state to the second state, it is possible to make the electronic device in the connection relationship with the charging stand or the horizontal and vertical screen Maintain the same audio playback effect before and after the state change, which improves the stability of audio playback, so that the audio playback effect of the audio data to be played will not change with the user's operation of the electronic device, which improves the user experience .
  • the user picks up a mobile phone that is playing music.
  • the mobile phone was originally placed on the charging stand with a vertical screen and wirelessly connected to the charging stand. After picking it up, it is disconnected from the charging stand.
  • the output frequency response of the mobile phone playing music is not controlled by the user. Influence.
  • the state parameter of the electronic device when the electronic device is wirelessly charged with the charging stand, the state parameter of the electronic device is detected; according to the state parameter, the output of the first speaker module of the electronic device is determined. Whether the sound hole is blocked; when the sound hole of the first speaker module is blocked, and the charging stand is not equipped with the second speaker module, the audio is played in the first audio playback mode, and the pre-stored multiple audio Determine the target audio parameters in the parameters, and perform audio playback with the target audio parameters; when the sound outlet of the first speaker module is blocked, and the charging stand is equipped with a second speaker module, perform audio in the second audio playback mode Playing, audio playback is performed through the second speaker module; in the case that the sound outlet of the first speaker module is not blocked, audio playback is performed in the third audio playback mode.
  • FIG. 9 is a schematic flowchart of a second audio data processing method provided by an embodiment of the present application.
  • step S902 test and obtain first audio data when the electronic device is placed vertically on the charging stand.
  • step S904 the electronic device is connected to the charging stand.
  • Step S906 the electronic device receives a first signal; the first signal is used to instruct the electronic device to play audio data.
  • Step S908 judging whether the electronic device is in a vertical screen.
  • step S910 If yes, execute step S910; if not, execute step S914.
  • Step S910 calling target audio parameters.
  • Step S912 judging whether the electronic device is disconnected from the charging stand or not in the portrait mode.
  • Step S914 call the general audio parameters.
  • the audio data processing method provided by the embodiment shown in FIG. 9 can realize various processes implemented in the foregoing audio data processing method embodiment. To avoid repetition, details are not repeated here.
  • the audio data processing method provided in the embodiment of the present application may be executed by an audio data processing device, or a control module in the audio data processing device for executing the audio data processing method.
  • the audio data processing device provided in the embodiment of the present application is described by taking the method for processing the audio data performed by the audio data processing device as an example.
  • Fig. 10 is a schematic structural diagram of an audio data processing device provided by an embodiment of the present application.
  • the processing device of audio data comprises:
  • the detection module 1001 is used to detect the state parameters of the electronic device when the electronic device is connected to the charging stand for wireless charging;
  • the first determination module 1002 is configured to determine whether the sound hole of the first speaker module of the electronic device is blocked according to the state parameter;
  • the first playback module 1003 is used to perform audio playback in the first audio playback mode when the sound outlet of the first speaker module is blocked and the charging stand is not provided with the second speaker module, from the pre-stored multiple Determine the target audio parameter among the audio parameters, and perform audio playback with the target audio parameter;
  • the second playback module 1004 is used to play audio in a second audio playback mode when the sound hole of the first speaker module is blocked and the charging stand is provided with a second speaker module. group for audio playback;
  • the third playback module 1005 is configured to play audio in a third audio playback mode when the sound outlet of the first speaker module is not blocked.
  • the state parameter includes a first state and a second state
  • the electronic device When the electronic device is in the first state, the electronic device is placed vertically on the charging stand, and the sound outlet of the first speaker module is blocked by the charging stand;
  • the electronic device When the electronic device is in the second state, the electronic device is placed horizontally on the charging stand, and the sound outlet of the first speaker module is not blocked.
  • the first playing module 1003 is specifically used for:
  • the processing device for audio data also includes:
  • the fourth playback module is used to stop playing in the first audio mode when the electronic device is in the first state, the charging stand is not provided with the second speaker module, and it is detected that the electronic device and the charging stand are disconnected from the wireless charging connection. Perform audio playback, and perform audio playback in a third audio playback mode;
  • the fifth playback module is used to stop the second audio playback mode when the electronic device is in the first state, the charging stand is provided with a second speaker module, and the wireless charging connection between the electronic device and the charging stand is detected to be disconnected. Audio playback, playing audio in a third audio playback mode;
  • the sixth playback module is used to stop the audio playback in the first audio playback mode when the charging base is not provided with the second speaker module and detect that the electronic device is switched from the first state to the second state, and use the second audio playback mode Three audio playback modes for audio playback;
  • the seventh playback module is used to stop the audio playback in the second audio playback mode when the charging stand is provided with a second speaker module and detects that the electronic device is switched from the first state to the second state, and uses the third Audio playback mode for audio playback.
  • the target audio parameters are predetermined by running the following modules:
  • the test module is used to test the output frequency response of the third audio data at each frequency point to obtain the first frequency response data when the electronic device is connected to the charging stand for wireless charging and the electronic device is in the first state; In the case of the second state, test the output frequency response of the third audio data at each frequency point to obtain the second frequency response data;
  • the second determination module is configured to determine the gain data of each frequency point according to the first frequency response data and the second frequency response data, and use the gain data of each frequency point as the target audio parameter.
  • the state parameters of the electronic device are detected; according to the state parameters, it is determined whether the sound outlet of the first speaker module of the electronic device is blocked; When the sound outlet of the module is blocked and the charging stand is not equipped with a second speaker module, the audio is played in the first audio playback mode, and the target audio parameters are determined from various pre-stored audio parameters, and the target audio Parameters for audio playback; when the sound outlet of the first speaker module is blocked and the charging stand is equipped with a second speaker module, the audio is played in the second audio playback mode, and the audio is played through the second speaker module Playing; in the case that the sound outlet of the first speaker module is not blocked, the audio is played in the third audio playback mode.
  • the audio data processing device in the embodiment of the present application may be a device, or may be a component, an integrated circuit, or a chip in a terminal.
  • the device may be a mobile electronic device or a non-mobile electronic device.
  • the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a handheld computer, a vehicle electronic device, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant).
  • non-mobile electronic devices can be servers, network attached storage (NetworkAttached Storage, NAS), personal computer (personal computer, PC), television (television, TV), teller machine or self-service machine, etc., the implementation of this application Examples are not specifically limited.
  • the audio data processing device in the embodiment of the present application may be a device with an operating system.
  • the operating system may be an Android (Android) operating system, an ios operating system, or other possible operating systems, which are not specifically limited in this embodiment of the present application.
  • the audio data processing device provided in the embodiment of the present application can implement the various processes implemented in the foregoing audio data processing method embodiment, and to avoid repetition, details are not repeated here.
  • the embodiment of the present application further provides an electronic device 1100, including a processor 1101, a memory 1102, and a program or instruction stored in the memory 1102 and operable on the processor 1101.
  • the program when the instructions are executed by the processor 1101, each process of the audio data processing method embodiment described above can be realized, and the same technical effect can be achieved. To avoid repetition, details are not repeated here.
  • the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.
  • FIG. 12 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.
  • the electronic device 1200 includes, but is not limited to: a radio frequency unit 1201, a network module 1202, an audio output unit 1203, an input unit 1204, a sensor 1205, a display unit 1206, a user input unit 1207, an interface unit 1208, a memory 1209, and a processor 1210, etc. part.
  • the electronic device 1200 can also include a power supply (such as a battery) for supplying power to various components, and the power supply can be logically connected to the processor 1210 through the power management system, so that the management of charging, discharging, and function can be realized through the power management system. Consumption management and other functions.
  • a power supply such as a battery
  • the structure of the electronic device shown in FIG. 12 does not constitute a limitation to the electronic device.
  • the electronic device may include more or fewer components than shown in the figure, or combine some components, or arrange different components, and details will not be repeated here. .
  • the processor 1210 is configured to detect state parameters of the electronic device when the electronic device is connected to the charging stand for wireless charging;
  • the target audio playback mode from a variety of pre-stored audio playback modes, wherein the multiple audio playback modes include a first audio playback mode and a second audio playback mode;
  • the audio output unit 1203 is used to determine the target audio parameters from a variety of pre-stored audio parameters when the first audio playback mode is used as the target audio playback mode, and perform audio playback with the target audio parameters;
  • a first speaker module is arranged on the charging stand, and audio playback is performed through the first speaker module of the charging stand.
  • the state parameters of the electronic device are detected; according to the state parameters, it is determined whether the sound outlet of the first speaker module of the electronic device is blocked; When the sound outlet of the module is blocked and the charging stand is not equipped with a second speaker module, the audio is played in the first audio playback mode, and the target audio parameters are determined from various pre-stored audio parameters, and the target audio Parameters for audio playback; when the sound outlet of the first speaker module is blocked and the charging stand is equipped with a second speaker module, the audio is played in the second audio playback mode, and the audio is played through the second speaker module Playing; in the case that the sound outlet of the first speaker module is not blocked, the audio is played in the third audio playback mode.
  • the state parameter includes a first state and a second state
  • the electronic device When the electronic device is in the first state, the electronic device is vertically placed on the charging stand, so that the sound outlet of the second speaker module arranged at the bottom of the electronic device is blocked by the charging stand;
  • the electronic device When the electronic device is in the second state, the electronic device is placed on the charging stand horizontally, so that the sound hole is not blocked.
  • the audio output unit 1203 is also used for: performing audio playback with target audio parameters, including: acquiring the first audio data to be played; configuring the equalizer module in the electronic device according to the target audio parameters; The equalizer module performs gain processing on the first audio data to obtain second audio data; and plays the second audio data.
  • the audio output unit 1203 is further configured to: when the electronic device is in the first state and detects that the electronic device is disconnected from the charging stand for wireless charging, stop playing audio with the audio parameters corresponding to the first state, based on the Play audio with the audio parameters corresponding to the second state; or, when the electronic device switches from the first state to the second state, stop playing audio with the audio parameters corresponding to the first state, and perform audio playback based on the audio parameters corresponding to the second state Audio Player.
  • the processor 1210 is further configured to: the audio parameter corresponding to the first state is predetermined in the following manner: when the electronic device is connected to the charging stand for wireless charging and the electronic device is in the first state, test the third audio data in each The output frequency response of the frequency point is obtained to obtain the first frequency response data; when the electronic device is in the second state, the output frequency response of the third audio data at each frequency point is tested to obtain the second frequency response data; according to the first frequency response data and the second frequency response data, determine the gain data of each frequency point, and use the gain data of each frequency point as the audio parameter corresponding to the first state.
  • the corresponding audio parameter is determined according to the state parameter, and the first audio data is processed according to the audio playback parameter, and the second audio data is generated and played, and the audio parameter is adjusted when the electronic device changes to avoid This prevents user operations from interfering with the audio playback effect of the electronic device, and improves the stability of the audio playback effect.
  • the input unit 1204 may include a graphics processor (Graphics Processing Unit, GPU) 12041 and a microphone 12042, and the graphics processor 12041 is used for the image capture device (such as the image data of the still picture or video obtained by the camera) for processing.
  • the display unit 1206 may include a display panel 12061, and the display panel 12061 may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like.
  • the user input unit 1207 includes a touch panel 12071 and other input devices 12072 . Touch panel 12071, also called touch screen.
  • the touch panel 12071 may include two parts, a touch detection device and a touch controller.
  • Other input devices 12072 may include, but are not limited to, physical keyboards, function keys (such as volume control keys, switch keys, etc.), trackballs, mice, and joysticks, which will not be repeated here.
  • the memory 1209 can be used to store software programs as well as various data, including but not limited to application programs and operating systems.
  • the processor 1210 may integrate an application processor and a modem processor, wherein the application processor mainly processes operating systems, user interfaces, and application programs, and the modem processor mainly processes wireless communications. It can be understood that the foregoing modem processor may not be integrated into the processor 1210 .
  • the embodiment of the present application also provides a readable storage medium, the readable storage medium stores a program or an instruction, and when the program or instruction is executed by a processor, each process of the above audio data processing method embodiment is realized, and can To achieve the same technical effect, in order to avoid repetition, no more details are given here.
  • the processor is the processor in the electronic device described in the above embodiments.
  • the readable storage medium includes computer readable storage medium, such as computer read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk, etc.
  • the embodiment of the present application further provides a chip, the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the above audio data processing method
  • the chip includes a processor and a communication interface
  • the communication interface is coupled to the processor
  • the processor is used to run programs or instructions to implement the above audio data processing method
  • chips mentioned in the embodiments of the present application may also be called system-on-chip, system-on-chip, system-on-a-chip, or system-on-a-chip.
  • the term “comprising”, “comprising” or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article or apparatus comprising a set of elements includes not only those elements, It also includes other elements not expressly listed, or elements inherent in the process, method, article, or device. Without further limitations, an element defined by the phrase “comprising a " does not preclude the presence of additional identical elements in the process, method, article, or apparatus comprising that element.
  • the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved. Functions are performed, for example, the described methods may be performed in an order different from that described, and various steps may also be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Circuit For Audible Band Transducer (AREA)
  • Telephone Function (AREA)

Abstract

The present application belongs to the technical field of electronics. Disclosed are an audio data processing method and an electronic device. The audio data processing method comprises: when an electronic device is in wireless charging connection with a charging base, measuring a state parameter of the electronic device; determining, according to the state parameter, whether a sound output hole of a first loudspeaker module of the electronic device is blocked; when the sound output hole of the first loudspeaker module is blocked and the charging base is not provided with a second loudspeaker module, performing audio playing in a first audio playing mode, determining a target audio parameter from among a plurality of pre-stored audio parameters, and performing audio playing on the basis of the target audio parameter; when the sound output hole of the first loudspeaker module is blocked and the charging base is provided with a second loudspeaker module, performing audio playing in a second audio playing mode, and performing audio playing by means of the second loudspeaker module; and when the sound output hole of the first loudspeaker module is not blocked, performing audio playing in a third audio playing mode.

Description

音频数据的处理方法和电子设备Audio data processing method and electronic device
相关申请的交叉引用Cross References to Related Applications
本申请要求在2021年12月22日提交的中国专利申请第202111580916.5号的优先权,该中国专利申请的全部内容通过引用包含于此。This application claims priority to Chinese Patent Application No. 202111580916.5 filed on December 22, 2021, the entire content of which is hereby incorporated by reference.
技术领域technical field
本申请属于电子技术领域,具体涉及一种音频数据的处理方法和电子设备。The present application belongs to the field of electronic technology, and in particular relates to an audio data processing method and electronic equipment.
背景技术Background technique
随着电子技术的发展,电子设备的种类越来越丰富,不同种类的电子设备往往配置有不同类型的充电线,不利于用户的携带和使用,故为电子设备进行无线充电的需求日益增加。With the development of electronic technology, the types of electronic devices are becoming more and more abundant. Different types of electronic devices are often equipped with different types of charging cables, which is not conducive to the carrying and use of users. Therefore, the demand for wireless charging of electronic devices is increasing.
为电子设备无线充电时可以将电子设备以竖屏或横屏的状态与充电座连接。当电子设备与充电座连接时,设置于电子设备上的扬声器的出声孔可能被充电座所遮挡,出声孔被遮挡的出声孔可能会降低电子设备的音频播放效果。When wirelessly charging an electronic device, the electronic device can be connected to the charging stand in the state of a vertical screen or a horizontal screen. When the electronic device is connected to the charging stand, the sound outlet of the speaker disposed on the electronic device may be blocked by the charging stand, and the blocked sound outlet may reduce the audio playback effect of the electronic device.
发明内容Contents of the invention
本申请实施例的目的是提供一种音频数据的处理和电子设备,能够解决扬声器的出声孔被充电座遮挡时会影响音频播放效果的问题。The purpose of the embodiment of the present application is to provide an audio data processing and electronic device, which can solve the problem that the audio playback effect will be affected when the sound outlet of the speaker is blocked by the charging stand.
第一方面,本申请实施例提供了一种音频数据的处理方法,应用于电子设备,该方法包括:In the first aspect, the embodiment of the present application provides a method for processing audio data, which is applied to an electronic device, and the method includes:
在所述电子设备与充电座无线充电连接时,检测所述电子设备的状态参数;Detecting state parameters of the electronic device when the electronic device is connected to the charging stand for wireless charging;
根据所述状态参数,确定所述电子设备的第一扬声器模组的出声孔是否 被遮挡;According to the state parameter, determine whether the sound outlet of the first speaker module of the electronic device is blocked;
在所述第一扬声器模组的出声孔被遮挡,且所述充电座未设置有第二扬声器模组的情况下,以第一音频播放方式进行音频播放,从预存的多种音频参数中确定目标音频参数,以所述目标音频参数进行音频播放;When the sound hole of the first speaker module is blocked, and the charging stand is not provided with a second speaker module, the audio is played in the first audio playback mode, and the pre-stored various audio parameters are selected Determine target audio parameters, and perform audio playback with the target audio parameters;
在所述第一扬声器模组的出声孔被遮挡,且所述充电座设置有所述第二扬声器模组的情况下,以第二音频播放方式进行音频播放,通过所述第二扬声器模组进行音频播放;When the sound hole of the first speaker module is blocked, and the charging stand is provided with the second speaker module, the audio is played in the second audio playback mode, and the second speaker module group for audio playback;
在所述第一扬声器模组的出声孔未被遮挡的情况下,以第三音频播放方式进行音频播放。In the case that the sound outlet of the first speaker module is not blocked, the audio is played in a third audio playing manner.
第二方面,本申请实施例提供了一种音频数据的处理装置,运行于电子设备,该装置包括:In the second aspect, the embodiment of the present application provides an audio data processing device, which runs on electronic equipment, and the device includes:
检测模块,用于在所述电子设备与充电座无线充电连接时,检测所述电子设备的状态参数;A detection module, configured to detect state parameters of the electronic device when the electronic device is connected to the charging stand for wireless charging;
第一确定模块,用于根据所述状态参数,确定所述电子设备的第一扬声器模组的出声孔是否被遮挡;A first determination module, configured to determine whether the sound outlet of the first speaker module of the electronic device is blocked according to the state parameter;
第一播放模块,用于在所述第一扬声器模组的出声孔被遮挡,且所述充电座未设置有第二扬声器模组的情况下,以第一音频播放方式进行音频播放,从预存的多种音频参数中确定目标音频参数,以所述目标音频参数进行音频播放;The first playback module is used to perform audio playback in a first audio playback mode when the sound outlet of the first speaker module is blocked and the charging stand is not provided with a second speaker module, from Determining a target audio parameter from a variety of pre-stored audio parameters, and performing audio playback with the target audio parameter;
第二播放模块,用于在所述第一扬声器模组的出声孔被遮挡,且所述充电座设置有所述第二扬声器模组的情况下,以第二音频播放方式进行音频播放,通过所述第二扬声器模组进行音频播放;The second playback module is used to play audio in a second audio playback mode when the sound hole of the first speaker module is blocked and the charging stand is provided with the second speaker module, Play audio through the second speaker module;
第三播放模块,用于在所述第一扬声器模组的出声孔未被遮挡的情况下,以第三音频播放方式进行音频播放。The third playback module is configured to play audio in a third audio playback mode when the sound outlet of the first speaker module is not blocked.
第三方面,本申请实施例提供了一种电子设备,该电子设备包括处理器、存储器及存储在所述存储器上并可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如第一方面所述的音频数据的处理方法 的步骤。In a third aspect, an embodiment of the present application provides an electronic device, the electronic device includes a processor, a memory, and a program or instruction stored in the memory and operable on the processor, and the program or instruction is The processor implements the steps of the audio data processing method described in the first aspect when executed.
第四方面,本申请实施例提供了一种可读存储介质,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如第一方面所述的音频数据的处理方法的步骤。In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or an instruction is stored, and when the program or instruction is executed by a processor, the audio data as described in the first aspect is realized. The steps of the processing method.
第五方面,本申请实施例提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现如第一方面所述的音频数据的处理方法。In the fifth aspect, the embodiment of the present application provides a chip, the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is used to run programs or instructions, so as to implement the first aspect The processing method of the audio data.
在本申请实施例中,在电子设备与充电座无线充电连接时,检测电子设备的状态参数;根据状态参数,确定电子设备的第一扬声器模组的出声孔是否被遮挡;在第一扬声器模组的出声孔被遮挡,且充电座未设置有第二扬声器模组的情况下,以第一音频播放方式进行音频播放,从预存的多种音频参数中确定目标音频参数,以目标音频参数进行音频播放;在第一扬声器模组的出声孔被遮挡,且充电座设置有第二扬声器模组的情况下,以第二音频播放方式进行音频播放,通过第二扬声器模组进行音频播放;在第一扬声器模组的出声孔未被遮挡的情况下,以第三音频播放方式进行音频播放。通过本申请实施例的技术方案,能够根据电子设备的状态参数判断出声孔是否被遮挡,从而在不同的情况下灵活地采取不同的音频播放方式,进而提高了电子设备的音频播放效果。In the embodiment of the present application, when the electronic device is wirelessly charged with the charging stand, the state parameters of the electronic device are detected; according to the state parameters, it is determined whether the sound outlet of the first speaker module of the electronic device is blocked; When the sound outlet of the module is blocked and the charging stand is not equipped with a second speaker module, the audio is played in the first audio playback mode, and the target audio parameters are determined from various pre-stored audio parameters, and the target audio Parameters for audio playback; when the sound outlet of the first speaker module is blocked and the charging stand is equipped with a second speaker module, the audio is played in the second audio playback mode, and the audio is played through the second speaker module Playing; in the case that the sound outlet of the first speaker module is not blocked, the audio is played in the third audio playback mode. Through the technical solutions of the embodiments of the present application, it is possible to judge whether the sound hole is blocked according to the state parameters of the electronic device, so that different audio playback modes can be flexibly adopted in different situations, thereby improving the audio playback effect of the electronic device.
附图说明Description of drawings
图1是本申请一实施例提供的音频数据的处理方法的第一种流程示意图;Fig. 1 is a first schematic flow chart of a method for processing audio data provided by an embodiment of the present application;
图2是本申请一实施例提供的与充电座连接的电子设备的第一种实物图;Fig. 2 is a first physical diagram of an electronic device connected to a charging stand provided by an embodiment of the present application;
图3是本申请一实施例提供的与充电座连接的电子设备的第二种实物图;Fig. 3 is a second physical diagram of an electronic device connected to a charging stand provided by an embodiment of the present application;
图4是本申请一实施例提供的电子设备在不同状态下播放音频数据的频率-响度示意图;Fig. 4 is a frequency-loudness schematic diagram of an electronic device playing audio data in different states provided by an embodiment of the present application;
图5是本申请一实施例提供的电子设备的电路系统框架图;Fig. 5 is a circuit system framework diagram of an electronic device provided by an embodiment of the present application;
图6是本申请一实施例提供的第一音频参数的频率-增益示意图;Fig. 6 is a schematic diagram of frequency-gain of the first audio parameter provided by an embodiment of the present application;
图7是本申请一实施例提供的与充电座连接的电子设备的第三种实物图;Fig. 7 is a third physical diagram of an electronic device connected to a charging stand provided by an embodiment of the present application;
图8是本申请一实施例提供的充电座的电路系统框架图;Fig. 8 is a circuit system framework diagram of a charging stand provided by an embodiment of the present application;
图9是本申请一实施例提供的音频数据的处理方法的第二种流程示意图;FIG. 9 is a second schematic flowchart of a method for processing audio data provided by an embodiment of the present application;
图10是本申请一实施例提供的音频数据的处理装置的结构示意图;FIG. 10 is a schematic structural diagram of an audio data processing device provided by an embodiment of the present application;
图11是本申请一实施例提供的一种电子设备的结构示意图;Fig. 11 is a schematic structural diagram of an electronic device provided by an embodiment of the present application;
图12是本申请一实施例提供的一种电子设备的硬件结构示意图。Fig. 12 is a schematic diagram of a hardware structure of an electronic device provided by an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员获得的所有其他实施例,都属于本申请保护的范围。The following will clearly describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, but not all of them. All other embodiments obtained by persons of ordinary skill in the art based on the embodiments in this application belong to the protection scope of this application.
本申请的说明书和权利要求书中的术语“第一”、“第二”等是用于区别类似的对象,而不用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施,且“第一”、“第二”等所区分的对象通常为一类,并不限定对象的个数,例如第一对象可以是一个,也可以是多个。此外,说明书以及权利要求中“和/或”表示所连接对象的至少其中之一,字符“/”,一般表示前后关联对象是一种“或”的关系。The terms "first", "second" and the like in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific sequence or sequence. It should be understood that the terms so used are interchangeable under appropriate circumstances such that the embodiments of the application can be practiced in sequences other than those illustrated or described herein, and that references to "first," "second," etc. distinguish Objects are generally of one type, and the number of objects is not limited. For example, there may be one or more first objects. In addition, "and/or" in the specification and claims means at least one of the connected objects, and the character "/" generally means that the related objects are an "or" relationship.
下面结合附图,通过具体的实施例及其应用场景对本申请实施例提供的音频数据的处理方法进行详细地说明。The audio data processing method provided by the embodiment of the present application will be described in detail below through specific embodiments and application scenarios with reference to the accompanying drawings.
图1是本申请一实施例提供的音频数据的处理方法的第一种流程示意图。FIG. 1 is a schematic flowchart of a first audio data processing method provided by an embodiment of the present application.
步骤S102,在电子设备与充电座无线充电连接时,检测电子设备的状态参数。Step S102, when the electronic device is connected to the charging stand for wireless charging, detect the state parameters of the electronic device.
电子设备的CPU(central processing unit,中央处理器)可以确定电子设备是否与充电座无线充电连接,其原理如下所示:电子设备可以包含第一线圈,充电座可以包含第二线圈。当电子设备与充电座无线充电连接时,第一线圈 与第二线圈之间通信连接;当电子设备与充电座断开无线充电连接时,第一线圈与第二线圈之间停止通信连接。则CPU可以根据第一线圈是否接收到来自第二线圈的通信信号,判断电子设备与充电座是否无线充电连接。The CPU (central processing unit, central processing unit) of the electronic device can determine whether the electronic device is connected to the charging stand for wireless charging. The principle is as follows: the electronic device can include a first coil, and the charging stand can include a second coil. When the electronic device is connected to the charging stand for wireless charging, the first coil and the second coil are connected in communication; when the electronic device is disconnected from the charging stand for wireless charging, the communication connection between the first coil and the second coil is stopped. Then the CPU can determine whether the electronic device is wirelessly connected to the charging stand according to whether the first coil receives the communication signal from the second coil.
需要注意的是,电子设备与充电座无线充电连接时,电子设备可能处于充电状态,也可能由于电量已经充满而处于非充电状态,无论电子设备是否处于充电状态,只要电子设备与充电座保持连接,第二线圈就会持续向第一线圈发送通信信号。It should be noted that when the electronic device is connected to the charging stand for wireless charging, the electronic device may be in a charging state, or it may be in a non-charging state because the battery is fully charged. Regardless of whether the electronic device is in a charging state, as long as the electronic device is connected to the charging stand , the second coil will continue to send communication signals to the first coil.
电子设备的状态参数,可以包括以下参数中的一者或多者:表征电子设备的横竖屏状态的状态参数,表征电子设备的第一扬声器模组的出声孔是否被遮挡的遮挡状态参数,等等。The state parameters of the electronic device may include one or more of the following parameters: a state parameter characterizing the horizontal and vertical screen state of the electronic device, an occlusion state parameter characterizing whether the sound hole of the first speaker module of the electronic device is blocked, etc.
其中,表征电子设备的横竖屏状态的状态参数可以通过位于电子设备内部的重力传感器G-sensor获取。表征第一扬声器模组的出声孔是否被遮挡的遮挡状态参数可以通过预先设置于出声孔内部或环绕出声孔的传感器采集。第一扬声器模组的出声孔可以设置于电子设备的底部,也可以设置于电子设备的两侧。Wherein, the state parameters representing the state of the horizontal and vertical screens of the electronic device can be obtained through the gravity sensor G-sensor located inside the electronic device. The blocking state parameter representing whether the sound outlet of the first speaker module is blocked may be collected by sensors pre-set inside or around the sound outlet. The sound outlet of the first speaker module can be arranged at the bottom of the electronic device, or at both sides of the electronic device.
步骤S104,根据状态参数,确定电子设备的第一扬声器模组的出声孔是否被遮挡。Step S104, according to the state parameter, determine whether the sound outlet of the first speaker module of the electronic device is blocked.
在电子设备与充电座无线充电连接时,表征电子设备的横竖屏状态的状态参数可以反映电子设备的第一扬声器模组的出声孔是否被遮挡。When the electronic device is wirelessly charged and connected to the charging stand, the state parameter representing the horizontal and vertical screen state of the electronic device may reflect whether the sound outlet of the first speaker module of the electronic device is blocked.
以第一扬声器模组设置于电子设备的底部为例进行说明:电子设备与充电座无线充电连接,且通过表征电子设备的横竖屏状态的状态参数确定电子设备竖屏放置于充电座上,则电子设备的底部与充电座连接,设置于底部的第一扬声器模组的出声孔被充电座遮挡;电子设备与充电座无线充电连接,且通过表征电子设备的横竖屏状态的状态参数确定电子设备横屏放置于充电座上,则电子设备的一侧与充电座连接,设置于底部的第一扬声器模组的出声孔未被充电座遮挡。Take the first speaker module installed on the bottom of the electronic device as an example: the electronic device is connected to the charging stand for wireless charging, and the electronic device is determined to be placed on the charging stand with the vertical screen through the state parameters representing the horizontal and vertical screen states of the electronic device, then The bottom of the electronic device is connected to the charging stand, and the sound outlet of the first speaker module set at the bottom is blocked by the charging stand; the electronic device is connected to the charging stand for wireless charging, and the electronic device is determined by the state parameters representing the state of the horizontal and vertical screens of the electronic device. When the device is placed horizontally on the charging stand, one side of the electronic device is connected to the charging stand, and the sound outlet of the first speaker module arranged at the bottom is not blocked by the charging stand.
可选地,状态参数包括第一状态和第二状态;在电子设备处于第一状态 的情况下,电子设备竖屏放置于充电座上,第一扬声器模组的出声孔被充电座遮挡;在电子设备处于第二状态的情况下,电子设备横屏放置于充电座上,第一扬声器模组的出声孔未被遮挡。Optionally, the state parameter includes a first state and a second state; when the electronic device is in the first state, the electronic device is placed vertically on the charging stand, and the sound outlet of the first speaker module is blocked by the charging stand; When the electronic device is in the second state, the electronic device is placed horizontally on the charging stand, and the sound outlet of the first speaker module is not blocked.
下面以电子设备为手机为例,说明一下本申请实施例中的电子设备的底部和电子设备的一侧的定义。常用的手机可以视为一个具有六面的长方体,长方体的六面中的一面为手机屏幕,可以用于显示该手机的用户操作界面。在该长方体中与手机屏幕相邻的四面中,靠近用户操作界面正下方的一面即手机的底部;靠近用户操作界面正上方的一面即手机的顶部;靠近用户操作界面正左方或者正右方的一面即手机的一侧。Taking the electronic device as a mobile phone as an example, the definitions of the bottom of the electronic device and one side of the electronic device in the embodiment of the present application will be described below. A commonly used mobile phone can be regarded as a cuboid with six sides, and one of the six sides of the cuboid is a mobile phone screen, which can be used to display a user interface of the mobile phone. Among the four sides adjacent to the screen of the mobile phone in the cuboid, the side close to the directly below the user operation interface is the bottom of the mobile phone; the side close to the directly above the user operation interface is the top of the mobile phone; the side close to the directly left or directly right of the user operation interface The side of the phone is the side of the phone.
第一状态可以为竖屏状态,则在电子设备与充电座无线充电连接时,电子设备处于竖屏状态,即电子设备竖屏放置于充电座上。电子设备内部设置有第一扬声器模组,该第一扬声器模组的出声孔位于电子设备底部。则电子设备竖屏放置于充电座上时,电子设备底部与充电座接触,位于底部的出声孔被充电座遮挡。The first state may be a vertical screen state, and when the electronic device is connected to the charging stand for wireless charging, the electronic device is in the vertical screen state, that is, the electronic device is placed on the charging stand with the vertical screen. A first speaker module is arranged inside the electronic device, and the sound outlet of the first speaker module is located at the bottom of the electronic device. Then, when the electronic device is placed on the charging stand with a vertical screen, the bottom of the electronic device is in contact with the charging stand, and the sound hole at the bottom is blocked by the charging stand.
第二状态可以为横屏状态,则在电子设备与充电座无线充电连接时,电子设备处于横屏状态,即电子设备横屏放置于充电座上。电子设备内部设置有第一扬声器模组,该第一扬声器模组的出声孔位于电子设备底部。则电子设备竖屏放置于充电座上时,电子设备的一侧与充电座接触,位于底部的出声孔未被充电座遮挡。The second state may be a horizontal screen state, and when the electronic device is connected to the charging stand for wireless charging, the electronic device is in the horizontal screen state, that is, the electronic device is placed on the charging stand with a horizontal screen. A first speaker module is arranged inside the electronic device, and the sound outlet of the first speaker module is located at the bottom of the electronic device. Then, when the electronic device is placed vertically on the charging stand, one side of the electronic device is in contact with the charging stand, and the sound hole at the bottom is not blocked by the charging stand.
下面可以结合图2、图3、图4具体说明本实施例:图2是本申请一实施例提供的与充电座连接的电子设备的第一种实物图。图3是本申请一实施例提供的与充电座连接的电子设备的第二种实物图。图4是本申请一实施例提供的电子设备在不同状态下播放音频数据的频率-响度示意图。This embodiment can be described in detail below with reference to FIG. 2 , FIG. 3 , and FIG. 4 : FIG. 2 is a first physical diagram of an electronic device connected to a charging stand provided by an embodiment of the present application. Fig. 3 is a second physical diagram of an electronic device connected to a charging stand provided by an embodiment of the present application. Fig. 4 is a schematic diagram of frequency-loudness of an electronic device playing audio data in different states provided by an embodiment of the present application.
如图2所示,电子设备201与充电座202连接,且电子设备201处于横屏状态。如图3所示,电子设备201与充电座202连接,且电子设备201处于竖屏状态。As shown in FIG. 2 , the electronic device 201 is connected to the charging stand 202 , and the electronic device 201 is in a horizontal screen state. As shown in FIG. 3 , the electronic device 201 is connected to the charging stand 202 , and the electronic device 201 is in a vertical screen state.
第一扬声器模组的出声孔位于电子设备201的底部,则如图3所示,当 电子设备201与充电座202无线充电连接且电子设备201处于竖屏状态时,该第一扬声器模组的出声孔被充电座202遮挡;如图2所示,当电子设备201与充电座202无线充电连接且电子设备201处于横屏状态时,该第一扬声器模组的出声孔未被遮挡。The sound hole of the first speaker module is located at the bottom of the electronic device 201. As shown in FIG. The sound outlet of the first speaker module is blocked by the charging stand 202; as shown in Figure 2, when the electronic device 201 is connected to the charging stand 202 for wireless charging and the electronic device 201 is in a horizontal screen state, the sound outlet of the first speaker module is not blocked .
如图4所示,该图中以频率为横坐标,单位为赫兹Hz,以声音响度为纵坐标,曲线401为电子设备与充电座无线充电连接且电子设备处于横屏状态时的频率-响度曲线,曲线402为电子设备与充电座无线充电连接且电子设备处于竖屏状态时的频率-响度曲线。As shown in Figure 4, in this figure, the frequency is taken as the abscissa, the unit is Hertz Hz, and the sound loudness is taken as the ordinate. Curve 401 is the frequency-loudness when the electronic device is connected to the charging stand for wireless charging and the electronic device is in the horizontal screen state. Curve, curve 402 is the frequency-loudness curve when the electronic device is connected to the charging stand for wireless charging and the electronic device is in a vertical screen state.
由图4可知,当频率大于特定频率时,曲线402所对应的响度大幅度下降,可以理解为,曲线402的高频频响明显降低,使得曲线401所对应的响度明显大于曲线402所对应的响度。则用户听曲线402对应的音频数据的主观感受是声音偏闷,不够清晰。该特定频率可以是3000Hz。It can be seen from Fig. 4 that when the frequency is greater than a specific frequency, the loudness corresponding to the curve 402 drops significantly. It can be understood that the high-frequency frequency response of the curve 402 is significantly reduced, so that the loudness corresponding to the curve 401 is significantly greater than the loudness corresponding to the curve 402 . Then the subjective experience of the user listening to the audio data corresponding to the curve 402 is that the sound is muffled and not clear enough. The specific frequency may be 3000 Hz.
需要注意的是,若电子设备与充电座未连接,则第一扬声器模组的出声孔不可能被充电座遮挡,此时没有必要再检测电子设备的横竖屏状态。It should be noted that if the electronic device is not connected to the charging stand, the sound outlet of the first speaker module may not be blocked by the charging stand, and there is no need to detect the horizontal and vertical screen status of the electronic device at this time.
在另一实施例中,若第一扬声器模组的出声孔设置于电子设备的一侧,且当电子设备与充电座连接且电子设备处于横屏状态时,该出声孔被充电座所遮挡,则在如图4所示的频率-响度示意图中,曲线401为电子设备与充电座连接且电子设备处于竖屏状态时的频率-响度曲线,曲线402为电子设备与充电座连接且电子设备处于横屏状态时的频率-响度曲线,与前述的第一扬声器模组的出声孔设置在电子设备的底部的实施例相反,此处不再赘述。In another embodiment, if the sound outlet of the first speaker module is arranged on one side of the electronic device, and when the electronic device is connected to the charging stand and the electronic device is in a horizontal screen state, the sound outlet is covered by the charging stand. occlusion, then in the frequency-loudness diagram shown in Figure 4, curve 401 is the frequency-loudness curve when the electronic device is connected to the charging stand and the electronic device is in a vertical screen state, and curve 402 is the frequency-loudness curve when the electronic device is connected to the charging stand and the electronic The frequency-loudness curve when the device is in the horizontal screen state is opposite to the aforementioned embodiment in which the sound outlet of the first speaker module is arranged at the bottom of the electronic device, and will not be repeated here.
在检测电子设备的状态参数之前,电子设备可以接收第一指令;第一指令用于指示电子设备播放音频数据。Before detecting the state parameter of the electronic device, the electronic device may receive a first instruction; the first instruction is used to instruct the electronic device to play audio data.
在电子设备中,执行接收第一指令步骤的执行主体可以是用户输入单元。即电子设备的用户输入单元接收用户提交的第一指令,并将该第一指令发送至电子设备的CPU。In the electronic device, the execution subject performing the step of receiving the first instruction may be a user input unit. That is, the user input unit of the electronic device receives the first instruction submitted by the user, and sends the first instruction to the CPU of the electronic device.
第一指令可以是用户针对电子设备提交的指令。该第一指令用于指示电子设备通过第一扬声器模组播放音频数据。音频数据可以是歌曲的音频数据, 也可以是视频的音频数据。通过第一扬声器模组播放音频数据,即将音频数据外放。The first instruction may be an instruction submitted by the user for the electronic device. The first instruction is used to instruct the electronic device to play audio data through the first speaker module. The audio data may be audio data of a song, or audio data of a video. The audio data is played through the first speaker module, that is, the audio data is released externally.
例如,用户向手机发出外放歌曲甲的指令,或者,用户向平板电脑发出外放视频乙的指令。For example, the user sends an instruction to play song A to the mobile phone, or the user sends an instruction to play video B to the tablet computer.
在接收第一指令之前,电子设备可以与充电座无线充电连接,也可以与充电座未连接。即,电子设备与充电座无线充电连接可以发生在电子设备接收第一指令之前,也可以发生在电子设备接收第一指令之后。该充电座可以是有线充电的充电装置,也可以是无线充电的充电装置。Before receiving the first instruction, the electronic device may be connected to the charging stand for wireless charging, or may not be connected to the charging stand. That is, the wireless charging connection between the electronic device and the charging stand may occur before the electronic device receives the first instruction, or after the electronic device receives the first instruction. The charging stand may be a charging device for wired charging or a charging device for wireless charging.
例如,先将手机与具有无线充电功能的充电座连接,以对手机进行无线充电,再接收用于指示手机通过第一扬声器模组播放歌曲甲的第一指令。又例如,先接收用于指示手机通过第一扬声器模组播放视频乙的音频数据的第一指令,再将手机放置于无线充电的充电座上进行充电。For example, the mobile phone is first connected to the charging stand with wireless charging function to wirelessly charge the mobile phone, and then the first instruction for instructing the mobile phone to play song A through the first speaker module is received. For another example, first receive the first instruction for instructing the mobile phone to play the audio data of video B through the first speaker module, and then place the mobile phone on the wireless charging charging stand for charging.
第一指令可以携带有第一标识。第一标识可以用于查询待播放的第一音频数据。The first instruction may carry a first identifier. The first identifier can be used to query the first audio data to be played.
在执行步骤S104之后,可以执行步骤S106、步骤S108、步骤S110中的一者。After performing step S104, one of step S106, step S108, and step S110 may be performed.
充电座可以是设置有第二扬声器模组的充电座,也可以是未设置有第二扬声器模组的充电座。The charging stand can be a charging stand provided with a second speaker module, or a charging stand not provided with a second speaker module.
在充电座未设置有第二扬声器模组的情况下,若确定电子设备的第一扬声器模组的出声孔被遮挡,则执行步骤S106;若确定电子设备的第一扬声器模组的出声孔未被遮挡,则执行步骤S110。In the case that the charging base is not provided with the second speaker module, if it is determined that the sound outlet of the first speaker module of the electronic device is blocked, then perform step S106; if it is determined that the sound output of the first speaker module of the electronic device is If the hole is not blocked, step S110 is executed.
在充电座设置有第二扬声器模组的情况下,若确定电子设备的第一扬声器模组的出声孔被遮挡,则执行步骤S108;若确定电子设备的第一扬声器模组的出声孔未被遮挡,则执行步骤S110。In the case that the charging base is provided with a second speaker module, if it is determined that the sound outlet of the first speaker module of the electronic device is blocked, then perform step S108; if it is determined that the sound outlet of the first speaker module of the electronic device If not blocked, execute step S110.
步骤S106,在第一扬声器模组的出声孔被遮挡,且充电座未设置有第二扬声器模组的情况下,以第一音频播放方式进行音频播放,从预存的多种音频参数中确定目标音频参数,以目标音频参数进行音频播放。Step S106, in the case that the sound outlet of the first speaker module is blocked and the charging stand is not equipped with a second speaker module, perform audio playback in the first audio playback mode, and determine from various pre-stored audio parameters Target audio parameter, use the target audio parameter for audio playback.
预存的多种音频参数,可以包括在第一扬声器模组的出声孔被遮挡的情况下所调用的目标音频参数,也可以包括在第一扬声器模组的出声孔未被遮挡的情况下所调用的常规音频参数。Various pre-stored audio parameters may include target audio parameters called when the sound outlet of the first speaker module is blocked, or may be included when the sound outlet of the first speaker module is not blocked General audio parameters called.
目标音频参数和常规音频参数都可以是电子设备将音频数据外放的情况下对该音频数据进行音频处理所采用的音频参数。Both the target audio parameter and the regular audio parameter may be audio parameters used for audio processing of the audio data when the electronic device releases the audio data.
第一音频播放方式可以为在第一扬声器模组的出声孔被遮挡的情况下通过调用目标音频参数进行音频播放来改善音频播放效果的音频播放方式。The first audio playback mode may be an audio playback mode in which the audio playback effect is improved by invoking target audio parameters for audio playback when the sound outlet of the first speaker module is blocked.
可选地,以目标音频参数进行音频播放,包括:获取待播放的第一音频数据;根据目标音频参数对电子设备中的均衡器模块进行配置;通过配置完成的均衡器模块对第一音频数据进行增益处理,获得第二音频数据;播放第二音频数据。Optionally, playing audio with target audio parameters includes: acquiring the first audio data to be played; configuring an equalizer module in the electronic device according to the target audio parameters; Perform gain processing to obtain second audio data; play the second audio data.
按照目标音频参数对待播放的第一音频数据进行实时的音频处理,可以理解为,第一音频数据包含多个按时间顺序排列的音频信号,在第一音频参数中查找与各个音频信号的频率所对应的增益数据,根据该增益数据对电子设备中的均衡器模块进行配置,进而利用该配置完成的均衡器模块对第一音频数据中的各个音频信号的输出响度进行增益处理,将增益处理后的第一音频数据作为第二音频数据,播放该第二音频数据。Perform real-time audio processing on the first audio data to be played according to the target audio parameters. It can be understood that the first audio data includes a plurality of audio signals arranged in chronological order. According to the corresponding gain data, the equalizer module in the electronic device is configured according to the gain data, and then the configured equalizer module is used to perform gain processing on the output loudness of each audio signal in the first audio data, and the gain processing The first audio data is used as the second audio data, and the second audio data is played.
图5是本申请一实施例提供的电子设备的电路系统框架图。该电路系统是具体实施时由电子设备中执行前述的音频数据的处理方法中各步骤的电路器件构成的电路系统。如图所示,中央处理器CPU505包含指令发送模块501和音频数据传输模块502,音频数据传输模块502与第一智能功放503通信连接,指令发送模块501与第一智能功放503连接,第一智能功放503与第一扬声器模组504连接。其中:Fig. 5 is a block diagram of a circuit system of an electronic device provided by an embodiment of the present application. The circuit system is a circuit system composed of circuit devices in an electronic device that execute each step in the aforementioned audio data processing method during specific implementation. As shown in the figure, the central processing unit CPU505 includes an instruction sending module 501 and an audio data transmission module 502. The audio data transmission module 502 is connected to the first intelligent power amplifier 503 in communication, and the instruction sending module 501 is connected to the first intelligent power amplifier 503. The first intelligent power amplifier The power amplifier 503 is connected to the first speaker module 504 . in:
CPU505是整个电路系统的控制中枢。CPU505 is the control center of the whole circuit system.
指令发送模块501可以是I2C(Inter-Integrated Circuit,两线式串行总线)模块,CPU505通过指令发送模块501控制第一智能功放503工作。The command sending module 501 may be an I2C (Inter-Integrated Circuit, two-wire serial bus) module, and the CPU 505 controls the first intelligent power amplifier 503 to work through the command sending module 501 .
音频数据传输模块502可以是I2S(Inter—IC Sound,集成电路内置音频 总线)模块,CPU505通过音频数据传输模块502向第一智能功放503传输第一音频数据。The audio data transmission module 502 can be an I2S (Inter-IC Sound, integrated circuit built-in audio bus) module, and the CPU 505 transmits the first audio data to the first intelligent power amplifier 503 through the audio data transmission module 502.
第一智能功放503,用于驱动第一扬声器模组504。在第一智能功放503中的“功放”指的是功率放大器。第一智能功放503的内部可以包括DSP(Digital Signal Process,数字信号处理)模块,该DSP模块至少可以包括EQ(Equalizer,均衡器)模块。EQ模块用于调整音频数据的输出频响,可以针对不同频点的音频信号,给不同的增益,即针对任一频点的音频信号,按照该频点对应的增益数据对该音频信号进行增益处理。The first intelligent power amplifier 503 is used to drive the first speaker module 504 . The "power amplifier" in the first smart power amplifier 503 refers to a power amplifier. The interior of the first intelligent power amplifier 503 may include a DSP (Digital Signal Process, digital signal processing) module, and the DSP module may at least include an EQ (Equalizer, equalizer) module. The EQ module is used to adjust the output frequency response of the audio data. It can give different gains to the audio signals of different frequency points, that is, for the audio signal of any frequency point, the audio signal is gained according to the gain data corresponding to the frequency point. deal with.
第一扬声器模组504,用于播放第二音频数据。The first speaker module 504 is used to play the second audio data.
具体实施时,在步骤“根据目标音频参数对电子设备中的均衡器模块进行配置”中的电子设备中的均衡器模块可以是该电路系统中的第一智能功放503中的DSP模块中的EQ模块,执行步骤“播放第二音频数据”的执行主体可以是该电路系统中的第一扬声器模组504。During specific implementation, the equalizer module in the electronic device in the step of "configuring the equalizer module in the electronic device according to the target audio parameters" can be the EQ in the DSP module in the first intelligent power amplifier 503 in the circuit system. module, the subject of executing the step "playing the second audio data" may be the first speaker module 504 in the circuit system.
在另一些实施例中,第一智能功放503的内部未包含DSP模块,该DSP模块位于CPU内部,则在步骤“根据目标音频参数对电子设备中的均衡器模块进行配置”中的电子设备中的均衡器模块可以是该电路系统中的CPU505中的DSP模块中的EQ模块,执行步骤“播放第二音频数据”的执行主体可以是该电路系统中的第一扬声器模组504。其中,在EQ模块对第一音频数据进行音频处理,生成第二音频数据之后,EQ模块将该第二音频数据发送至第一智能功放503,第一智能功放503将该第二音频数据发送至第一扬声器模组504。In some other embodiments, the inside of the first intelligent power amplifier 503 does not contain a DSP module, and the DSP module is located inside the CPU, then in the electronic device in the step "configure the equalizer module in the electronic device according to the target audio parameters" The equalizer module can be the EQ module in the DSP module in the CPU 505 in the circuit system, and the execution subject of the step of "playing the second audio data" can be the first speaker module 504 in the circuit system. Wherein, after the EQ module performs audio processing on the first audio data to generate the second audio data, the EQ module sends the second audio data to the first intelligent power amplifier 503, and the first intelligent power amplifier 503 sends the second audio data to The first speaker module 504 .
可选地,目标音频参数通过如下方式预先确定:在电子设备与充电座无线充电连接且电子设备处于第一状态的情况下,测试第三音频数据在各个频点的输出频响,得到第一频响数据;在电子设备处于第二状态的情况下,测试第三音频数据在各个频点的输出频响,得到第二频响数据;根据第一频响数据和第二频响数据,确定各个频点的增益数据,将各个频点的增益数据作为目标音频参数。Optionally, the target audio parameters are predetermined in the following manner: when the electronic device is connected to the charging stand for wireless charging and the electronic device is in the first state, test the output frequency response of the third audio data at each frequency point to obtain the first Frequency response data; when the electronic device is in the second state, test the output frequency response of the third audio data at each frequency point to obtain the second frequency response data; according to the first frequency response data and the second frequency response data, determine The gain data of each frequency point is used as the target audio parameter.
目标音频参数可以在电子设备被正式投入使用之前预先确定。针对任一电子设备,在电子设备与充电座无线充电连接且电子设备处于第一状态时,位于电子设备底部的第一扬声器模组的出声孔被充电座遮挡,该情况下测试第三音频数据的各个频点的输出频响,得到第一频响数据。第三音频数据可以包含位于预设频段的多个频点,多个频点可以是连续的,也可以是离散的。预设频段可以是大于特定频率的高频频段。该特定频率与前述图4所示的频率-响度曲线中的特定频率为同一参数,可以通过如图4所示的频率-响度曲线确定。The target audio parameters may be predetermined before the electronic device is put into use. For any electronic device, when the electronic device is connected to the charging stand for wireless charging and the electronic device is in the first state, the sound outlet of the first speaker module located at the bottom of the electronic device is blocked by the charging stand. In this case, the third audio frequency is tested. The output frequency response of each frequency point of the data is obtained to obtain the first frequency response data. The third audio data may include multiple frequency points located in a preset frequency band, and the multiple frequency points may be continuous or discrete. The preset frequency band may be a high frequency band greater than a specific frequency. The specific frequency is the same parameter as the specific frequency in the aforementioned frequency-loudness curve shown in FIG. 4 , and can be determined through the frequency-loudness curve shown in FIG. 4 .
在出声孔未被遮挡的情况下,测试第三音频数据的各个频点的频响,得到第二频响数据。根据第二频响数据与第一频响数据之比,确定各个频点的增益数据,统计各个频点的增益数据,得到目标音频参数。When the sound outlet is not blocked, the frequency response of each frequency point of the third audio data is tested to obtain the second frequency response data. According to the ratio of the second frequency response data to the first frequency response data, the gain data of each frequency point is determined, and the gain data of each frequency point is counted to obtain the target audio parameter.
此处可以结合图6进行说明。图6是本申请一实施例提供的第一音频参数的频率-增益示意图。如图所示,横坐标是频率,单位为Hz,纵坐标是增益,单位是dB,曲线601为第一音频参数的频率-增益曲线。从3KHz往上的频率,会逐渐给正增益,到6KHZ时,增益达到了15dB,补偿了因为第一扬声器模组的出声孔被充电座堵住而损失的高频信号。增益可以理解为,将处理器的音频数据按照该增益的数值放大。例如,当增益为6dB时,处理后的音频数据的响度为处理前的音频数据的响度的两倍;当增益为12dB时,处理后的音频数据的响度为处理前的音频数据的响度的四倍。Here it can be described in conjunction with FIG. 6 . Fig. 6 is a schematic diagram of frequency-gain of a first audio parameter provided by an embodiment of the present application. As shown in the figure, the abscissa is the frequency, the unit is Hz, the ordinate is the gain, the unit is dB, and the curve 601 is the frequency-gain curve of the first audio parameter. The frequency from 3KHz upwards will gradually give positive gain. At 6KHZ, the gain reaches 15dB, which compensates for the high-frequency signal lost due to the sound hole of the first speaker module being blocked by the charging stand. The gain can be understood as amplifying the audio data of the processor according to the value of the gain. For example, when the gain is 6dB, the loudness of the audio data after processing is twice the loudness of the audio data before processing; when the gain is 12dB, the loudness of the audio data after processing is four times the loudness of the audio data before processing. times.
步骤S108,在第一扬声器模组的出声孔被遮挡,且充电座设置有第二扬声器模组的情况下,以第二音频播放方式进行音频播放,通过第二扬声器模组进行音频播放第二扬声器模组第二扬声器模组。Step S108, in the case that the sound outlet of the first speaker module is blocked and the charging base is provided with a second speaker module, the audio is played in the second audio playback mode, and the second audio playback is performed through the second speaker module. Two speaker modules The second speaker module.
第二音频播放方式可以为在第一扬声器模组的出声孔被遮挡的情况下通过设置于充电座的第二扬声器模组进行音频播放来改善音频播放效果的音频播放方式。The second audio playback mode may be an audio playback mode in which the audio playback effect is improved through the second speaker module disposed on the charging stand when the sound outlet of the first speaker module is blocked.
需要注意的是,在采用第二音频播放方式的情况下,第二扬声器模组显然未被遮挡,故电子设备可以调用常规音频参数进行音频播放。该常规音频 参数可以是前述的在第一扬声器模组的出声孔未被遮挡的情况下所调用的预存的音频参数。It should be noted that, in the case of using the second audio playback mode, the second speaker module is obviously not blocked, so the electronic device can invoke conventional audio parameters for audio playback. The conventional audio parameters may be the aforementioned prestored audio parameters that are invoked when the sound outlet of the first speaker module is not blocked.
步骤S110,在第一扬声器模组的出声孔未被遮挡的情况下,以第三音频播放方式进行音频播放。Step S110, in the case that the sound outlet of the first speaker module is not blocked, perform audio playback in a third audio playback mode.
第三音频播放方式可以为在第一扬声器模组的出声孔未被遮挡的情况下通过电子设备的第一扬声器模组进行音频播放的音频播放方式。在采用第三音频播放方式的情况下,电子设备可以调用常规音频参数进行音频播放。该常规音频参数可以是前述的在第一扬声器模组的出声孔未被遮挡的情况下所调用的预存的音频参数。The third audio playing mode may be an audio playing mode in which audio is played through the first speaker module of the electronic device when the sound outlet of the first speaker module is not blocked. In the case of adopting the third audio playing manner, the electronic device can call conventional audio parameters to perform audio playing. The conventional audio parameters may be the aforementioned prestored audio parameters that are invoked when the sound outlet of the first speaker module is not blocked.
第一音频播放方式、第二音频播放方式以及第三音频播放方式在具体实施时所造成的音频播放效果是相同的。The audio playback effects caused by the first audio playback mode, the second audio playback mode and the third audio playback mode during specific implementation are the same.
步骤S108和步骤S110可以结合图7、图8说明。图7是本申请一实施例提供的与充电座连接的电子设备的第三种实物图。图8是本申请一实施例提供的充电座的电路系统框架图。Step S108 and step S110 can be described with reference to FIG. 7 and FIG. 8 . Fig. 7 is a third physical diagram of an electronic device connected to a charging stand provided by an embodiment of the present application. Fig. 8 is a frame diagram of a circuit system of a charging stand provided by an embodiment of the present application.
参照图7所示,电子设备201与充电座202连接,且电子设备处理竖屏状态。充电座202包含第二扬声器模组的出声孔203,该出声孔203在电子设备201与充电座202连接的情况下未被遮挡。如图8所示,充电座包含蓝牙模块801、第二智能功放802以及第二扬声器模组803。Referring to FIG. 7, the electronic device 201 is connected to the charging stand 202, and the electronic device handles the vertical screen state. The charging stand 202 includes a sound outlet 203 of the second speaker module, and the sound outlet 203 is not blocked when the electronic device 201 is connected to the charging stand 202 . As shown in FIG. 8 , the charging stand includes a Bluetooth module 801 , a second smart power amplifier 802 and a second speaker module 803 .
本实施例中,对充电座进行改进,增加了如图8所示的蓝牙模块801、第二智能功放802以及第二扬声器模组803。蓝牙模块801负责与电子设备通信连接,接收电子设备发送的音频数据并把音频数据传输给第二智能功放802。第二智能功放802把接收到的音频数据进行放大并推动第二扬声器模组803的扬声器模组进而输出声音,该声音由第二扬声器模组803的出声孔发出。其中,第二智能功放802,功放指的是功率放大器。In this embodiment, the charging stand is improved by adding a Bluetooth module 801 , a second smart power amplifier 802 and a second speaker module 803 as shown in FIG. 8 . The bluetooth module 801 is responsible for communicating with the electronic device, receiving audio data sent by the electronic device and transmitting the audio data to the second intelligent power amplifier 802 . The second intelligent power amplifier 802 amplifies the received audio data and pushes the speaker module of the second speaker module 803 to output sound. The sound is emitted from the sound outlet of the second speaker module 803 . Wherein, the second intelligent power amplifier 802, the power amplifier refers to a power amplifier.
例如,当手机进行无线充电时,如果用户想要播放音乐或者视频,先通过手机中的重力传感器G-sensor判断手机是处于横屏模式还是竖屏模式。如果手机处于横屏模式,则声音从手机的第一扬声器模组的出声孔播出。如果 手机处于竖屏模式,则第一扬声器模组的出声孔不输出声音,而是把音频数据通过手机的蓝牙模块传输给充电座的蓝牙模块,通过充电座上的第二扬声器模组的出声孔发出声音。在播放视频、音乐的过程中,当重力传感器G-sensor检测到手机状态由竖屏转换为横屏,或者CPU检测到手机与充电座断开连接,则声音切换回手机的第一扬声器模组的出声孔输出。For example, when the mobile phone is wirelessly charging, if the user wants to play music or video, first judge whether the mobile phone is in landscape mode or portrait mode through the gravity sensor G-sensor in the mobile phone. If the mobile phone is in the horizontal screen mode, the sound is broadcast from the sound outlet of the first speaker module of the mobile phone. If the mobile phone is in portrait mode, the sound outlet of the first speaker module does not output sound, but transmits the audio data to the Bluetooth module of the charging stand through the Bluetooth module of the mobile phone, and the second speaker module on the charging stand The sound hole emits sound. In the process of playing video and music, when the gravity sensor G-sensor detects that the mobile phone status is changed from vertical screen to horizontal screen, or the CPU detects that the mobile phone is disconnected from the charging stand, the sound will switch back to the first speaker module of the mobile phone output of the sound hole.
可选地,在电子设备处于第一状态,充电座未设置有第二扬声器模组,且检测到电子设备与充电座断开无线充电连接的情况下,停止以第一音频播放方式进行音频播放,以第三音频播放方式进行音频播放;在电子设备处于第一状态,充电座设置有第二扬声器模组,且检测到电子设备与充电座断开无线充电连接的情况下,停止以第二音频播放方式进行音频播放,以第三音频播放方式进行音频播放;在充电座未设置有第二扬声器模组,且检测到电子设备从第一状态切换至第二状态的情况下,停止以第一音频播放方式进行音频播放,以第三音频播放方式进行音频播放;在充电座设置有第二扬声器模组,且检测到电子设备从第一状态切换至第二状态的情况下,停止以第二音频播放方式进行音频播放,以第三音频播放方式进行音频播放。Optionally, when the electronic device is in the first state, the charging stand is not provided with a second speaker module, and it is detected that the electronic device is disconnected from the charging stand for wireless charging, the audio playback in the first audio playback mode is stopped , perform audio playback in the third audio playback mode; when the electronic device is in the first state, the charging stand is provided with a second speaker module, and it is detected that the electronic device is disconnected from the wireless charging connection with the charging stand, stop using the second Audio playback is performed in the audio playback mode, and audio playback is performed in the third audio playback mode; when the charging stand is not provided with the second speaker module and it is detected that the electronic device is switched from the first state to the second state, stop using the third audio playback mode. Perform audio playback in the first audio playback mode, and perform audio playback in the third audio playback mode; when the charging stand is provided with a second speaker module, and it is detected that the electronic device is switched from the first state to the second state, stop using the third audio playback mode. Audio playback is performed in the second audio playback mode, and audio playback is performed in the third audio playback mode.
在电子设备处于第一状态,充电座未设置有第二扬声器模组,且检测到电子设备与充电座断开无线充电连接的情况下,停止以第一音频播放方式进行音频播放,以第三音频播放方式进行音频播放;在充电座未设置有第二扬声器模组,且检测到电子设备从第一状态切换至第二状态的情况下,停止以第一音频播放方式进行音频播放,以第三音频播放方式进行音频播放。When the electronic device is in the first state, the charging stand is not provided with a second speaker module, and it is detected that the electronic device is disconnected from the charging stand for wireless charging, the audio playback in the first audio playback mode is stopped, and the third Audio playback in the audio playback mode; when the charging stand is not provided with a second speaker module and the electronic device is detected to be switched from the first state to the second state, the audio playback in the first audio playback mode is stopped, and the second audio playback mode is used. Three audio playback modes for audio playback.
具体实施时,充电座未设置有第二扬声器模组,电子设备可以在不同的情况下采用第一音频播放方式或第三音频播放方式进行音频播放,在初始状态下,电子设备与充电座无线连接,且电子设备处于第一状态,则可以确定电子设备以第一音频播放方式进行音频播放。接着,可能发生如下两种情况:During specific implementation, the charging stand is not provided with a second speaker module, and the electronic device can use the first audio playback mode or the third audio playback mode to perform audio playback under different circumstances. In the initial state, the electronic device and the charging stand are wirelessly If the electronic device is connected and the electronic device is in the first state, it can be determined that the electronic device performs audio playback in the first audio playback mode. Then, two things can happen:
(a1)检测到电子设备与充电座断开无线充电连接,此时,尽管电子设备还处于第一状态,电子设备不再放置于充电座上,故电子设备的第一扬声器模组的出声孔不再被充电座遮挡,电子设备停止以第一音频播放方式进行 音频播放,以第三音频播放方式进行音频播放。(a1) It is detected that the wireless charging connection between the electronic device and the charging stand is disconnected. At this time, although the electronic device is still in the first state, the electronic device is no longer placed on the charging stand, so the sound of the first speaker module of the electronic device The hole is no longer blocked by the charging stand, the electronic device stops playing audio in the first audio playing mode, and plays audio in the third audio playing mode.
(a2)检测到电子设备从第一状态切换至第二状态,此时,由于电子设备的状态参数改变,电子设备的第一扬声器模组的出声孔不再被充电座遮挡,故电子设备停止以第一音频播放方式进行音频播放,以第三音频播放方式进行音频播放。(a2) It is detected that the electronic device switches from the first state to the second state. At this time, due to the change of the state parameters of the electronic device, the sound outlet of the first speaker module of the electronic device is no longer blocked by the charging stand, so the electronic device Stop performing audio playback in the first audio playback mode, and perform audio playback in a third audio playback mode.
在电子设备处于第一状态,充电座设置有第二扬声器模组,且检测到电子设备与充电座断开无线充电连接的情况下,停止以第二音频播放方式进行音频播放,以第三音频播放方式进行音频播放。在充电座设置有第二扬声器模组,且检测到电子设备从第一状态切换至第二状态的情况下,停止以第二音频播放方式进行音频播放,以第三音频播放方式进行音频播放。When the electronic device is in the first state, the charging stand is provided with a second speaker module, and it is detected that the electronic device and the charging stand are disconnected from the wireless charging connection, stop playing the audio in the second audio playback mode, and use the third audio Play mode for audio playback. When the charging stand is provided with a second speaker module, and it is detected that the electronic device is switched from the first state to the second state, the audio playback in the second audio playback mode is stopped, and the audio playback is performed in the third audio playback mode.
具体实施时,充电座设置有第二扬声器模组,电子设备可以采用在不同的情况下采用第二音频播放方式或第三音频播放方式,初始状态下,电子设备与充电座无线连接,且电子设备处于第一状态,则可以确定电子设备以第二音频播放方式进行音频播放。接着,可能发生如下两种情况:During specific implementation, the charging stand is provided with a second speaker module, and the electronic device can adopt the second audio playback mode or the third audio playback mode under different circumstances. In the initial state, the electronic device is wirelessly connected to the charging stand, and the electronic device If the device is in the first state, it can be determined that the electronic device performs audio playback in the second audio playback mode. Then, two things can happen:
(a1)检测到电子设备与充电座断开无线充电连接,此时,尽管电子设备还处于第一状态,但电子设备的第一扬声器模组的出声孔不再被充电座遮挡,故电子设备停止以第二音频播放方式进行音频播放,以第三音频播放方式进行音频播放。(a1) It is detected that the wireless charging connection between the electronic device and the charging stand is disconnected. At this time, although the electronic device is still in the first state, the sound outlet of the first speaker module of the electronic device is no longer blocked by the charging stand, so the electronic The device stops playing audio in the second audio playing manner, and plays audio in a third audio playing manner.
(a2)检测到电子设备从第一状态切换至第二状态,此时,由于电子设备的状态参数改变,电子设备的第一扬声器模组的出声孔不再被充电座遮挡,故电子设备停止以第二音频播放方式进行音频播放,以第三音频播放方式进行音频播放。(a2) It is detected that the electronic device switches from the first state to the second state. At this time, due to the change of the state parameters of the electronic device, the sound outlet of the first speaker module of the electronic device is no longer blocked by the charging stand, so the electronic device Stop performing audio playback in the second audio playback mode, and perform audio playback in the third audio playback mode.
电子设备停止以第一音频播放方式进行音频播放,以第三音频播放方式进行音频播放,可以理解为,电子设备停止调用目标音频参数进行音频播放,转而调用常规音频参数进行音频播放。The electronic device stops playing audio in the first audio playing mode, and plays audio in the third audio playing mode. It can be understood that the electronic device stops calling target audio parameters for audio playing, and instead calls conventional audio parameters for audio playing.
电子设备可以按照时间顺序处理音频数据在各个时间点所对应的音频信号,且一边对音频信号进行音频处理,一边播放已经完成音频处理的音频信 号。The electronic device may process the audio signals corresponding to the audio data at various time points in time sequence, and play the audio signals that have been processed while performing audio processing on the audio signals.
在电子设备以第一音频播放方式进行音频播放的情况下,电子设备可以针对音频数据中的各个音频信号的频率,在目标音频参数中查询得到对应的增益数据,按照该增益数据对该音频信号的输出频响进行增益处理,播放增益处理后的音频信号。在电子设备以第三音频播放方式进行音频播放的情况下,电子设备可以针对音频数据中的各个音频信号的频率,在常规音频参数中查询得到对应的增益数据,按照该增益数据对该音频信号的输出频响进行增益处理,播放增益处理后的音频信号。When the electronic device performs audio playback in the first audio playback mode, the electronic device can query the target audio parameters for the frequency of each audio signal in the audio data to obtain the corresponding gain data, and according to the gain data, the audio signal Gain processing is performed on the output frequency response, and the audio signal after gain processing is played. In the case where the electronic device performs audio playback in the third audio playback mode, the electronic device can query the frequency of each audio signal in the audio data to obtain the corresponding gain data in the conventional audio parameters, and according to the gain data, the audio signal Gain processing is performed on the output frequency response, and the audio signal after gain processing is played.
则电子设备停止调用目标音频参数进行音频播放,转而调用常规音频参数进行音频播放,例如,待播放的第一音频数据包括按照时间顺序排列的N个音频信号,电子设备在初始状态下可以针对音频数据中的前X个音频信号中的每个音频信号的频率,在目标音频参数中查询得到对应的增益数据,按照该增益数据对该音频信号的输出频响进行增益处理,播放增益处理后的音频信号。在电子设备处理完前X个音频信号之后,停止调用目标音频参数进行音频播放,转而调用常规音频参数进行音频播放,即电子设备针对音频数据中的第(N-X)个到第N个音频信号中的每个音频信号的频率,在常规音频参数中查询得到对应的增益数据,按照该增益数据对该音频信号的输出频响进行增益处理,播放增益处理后的音频信号。Then the electronic device stops calling the target audio parameters for audio playback, and instead calls the conventional audio parameters for audio playback. For example, the first audio data to be played includes N audio signals arranged in chronological order, and the electronic device can target at the initial state The frequency of each audio signal in the first X audio signals in the audio data, query the corresponding gain data in the target audio parameter, perform gain processing on the output frequency response of the audio signal according to the gain data, and play the gain processing audio signal. After the electronic device finishes processing the first X audio signals, stop calling the target audio parameters for audio playback, and instead call the conventional audio parameters for audio playback, that is, the electronic device targets the (N-X)th to Nth audio signals in the audio data For the frequency of each audio signal in , query the corresponding gain data in the general audio parameters, perform gain processing on the output frequency response of the audio signal according to the gain data, and play the audio signal after gain processing.
电子设备停止以第二音频播放方式进行音频播放,以第三音频播放方式进行音频播放,可以理解为,电子设备停止通过设置于充电座的第二扬声器模组进行音频播放,通过电子设备的第一扬声器模组进行音频播放。The electronic device stops playing audio in the second audio playing mode, and plays audio in the third audio playing mode. It can be understood that the electronic device stops playing audio through the second speaker module installed on the charging stand, and the electronic device stops playing audio through the second A speaker module performs audio playback.
通过在检测到电子设备与充电座断开无线充电连接或者检测到电子设备从第一状态切换至第二状态的情况下改变音频播放方式,可以使得电子设备在与充电座的连接关系或横竖屏状态变化前后保持相同的音频播放效果,提高了音频播放的稳定性,使得待播放的音频数据的音频播放效果不会随着用户对电子设备的操作而变得忽好忽坏,提高了用户体验。By changing the audio playback mode when it is detected that the electronic device is disconnected from the charging stand for wireless charging or when the electronic device is switched from the first state to the second state, it is possible to make the electronic device in the connection relationship with the charging stand or the horizontal and vertical screen Maintain the same audio playback effect before and after the state change, which improves the stability of audio playback, so that the audio playback effect of the audio data to be played will not change with the user's operation of the electronic device, which improves the user experience .
例如,用户将正在播放音乐的手机拿起来,该手机原本竖屏放置于充电 座上,与充电座无线连接,拿起来之后与充电座断开连接,手机播放音乐的输出频响不受用户操作影响。For example, the user picks up a mobile phone that is playing music. The mobile phone was originally placed on the charging stand with a vertical screen and wirelessly connected to the charging stand. After picking it up, it is disconnected from the charging stand. The output frequency response of the mobile phone playing music is not controlled by the user. Influence.
在如图1所示的音频数据的处理方法的实施例中,在电子设备与充电座无线充电连接时,检测电子设备的状态参数;根据状态参数,确定电子设备的第一扬声器模组的出声孔是否被遮挡;在第一扬声器模组的出声孔被遮挡,且充电座未设置有第二扬声器模组的情况下,以第一音频播放方式进行音频播放,从预存的多种音频参数中确定目标音频参数,以目标音频参数进行音频播放;在第一扬声器模组的出声孔被遮挡,且充电座设置有第二扬声器模组的情况下,以第二音频播放方式进行音频播放,通过第二扬声器模组进行音频播放;在第一扬声器模组的出声孔未被遮挡的情况下,以第三音频播放方式进行音频播放。通过本申请实施例的技术方案,能够根据电子设备的状态参数判断出声孔是否被遮挡,从而在不同的情况下灵活地采取不同的音频播放方式,进而提高了电子设备的音频播放效果。In the embodiment of the audio data processing method shown in Figure 1, when the electronic device is wirelessly charged with the charging stand, the state parameter of the electronic device is detected; according to the state parameter, the output of the first speaker module of the electronic device is determined. Whether the sound hole is blocked; when the sound hole of the first speaker module is blocked, and the charging stand is not equipped with the second speaker module, the audio is played in the first audio playback mode, and the pre-stored multiple audio Determine the target audio parameters in the parameters, and perform audio playback with the target audio parameters; when the sound outlet of the first speaker module is blocked, and the charging stand is equipped with a second speaker module, perform audio in the second audio playback mode Playing, audio playback is performed through the second speaker module; in the case that the sound outlet of the first speaker module is not blocked, audio playback is performed in the third audio playback mode. Through the technical solutions of the embodiments of the present application, it is possible to judge whether the sound hole is blocked according to the state parameters of the electronic device, so that different audio playback modes can be flexibly adopted in different situations, thereby improving the audio playback effect of the electronic device.
基于相同的技术构思,本申请还提供一种音频数据的处理方法的实施例,如图9所示。图9是本申请一实施例提供的音频数据的处理方法的第二种流程示意图。Based on the same technical idea, the present application also provides an embodiment of an audio data processing method, as shown in FIG. 9 . FIG. 9 is a schematic flowchart of a second audio data processing method provided by an embodiment of the present application.
参照图9,步骤S902,在电子设备竖屏放置于充电座的情况下测试获得第一音频数据。Referring to FIG. 9 , in step S902 , test and obtain first audio data when the electronic device is placed vertically on the charging stand.
步骤S904,电子设备与充电座连接。In step S904, the electronic device is connected to the charging stand.
步骤S906,电子设备接收第一信号;第一信号用于指示电子设备播放音频数据。Step S906, the electronic device receives a first signal; the first signal is used to instruct the electronic device to play audio data.
步骤S908,判断电子设备是否处于竖屏。Step S908, judging whether the electronic device is in a vertical screen.
若是,则执行步骤S910;若否,则执行步骤S914。If yes, execute step S910; if not, execute step S914.
步骤S910,调用目标音频参数。Step S910, calling target audio parameters.
步骤S912,判断电子设备是否与充电座断开连接或者不处于竖屏模式。Step S912, judging whether the electronic device is disconnected from the charging stand or not in the portrait mode.
若是,则执行步骤S914。If yes, execute step S914.
步骤S914,调用常规音频参数。Step S914, call the general audio parameters.
如图9所示的实施例提供的音频数据的处理方法能够实现前述的音频数据的处理方法实施例实现的各个过程,为避免重复,这里不再赘述。The audio data processing method provided by the embodiment shown in FIG. 9 can realize various processes implemented in the foregoing audio data processing method embodiment. To avoid repetition, details are not repeated here.
需要说明的是,本申请实施例提供的音频数据的处理方法,执行主体可以为音频数据的处理装置,或者该音频数据的处理装置中的用于执行音频数据的处理的方法的控制模块。本申请实施例中以音频数据的处理装置执行音频数据的处理的方法为例,说明本申请实施例提供的音频数据的处理装置。It should be noted that, the audio data processing method provided in the embodiment of the present application may be executed by an audio data processing device, or a control module in the audio data processing device for executing the audio data processing method. In the embodiment of the present application, the audio data processing device provided in the embodiment of the present application is described by taking the method for processing the audio data performed by the audio data processing device as an example.
图10是本申请一实施例提供的音频数据的处理装置的结构示意图。Fig. 10 is a schematic structural diagram of an audio data processing device provided by an embodiment of the present application.
参照图10所示,音频数据的处理装置,包括:With reference to shown in Figure 10, the processing device of audio data comprises:
检测模块1001,用于在电子设备与充电座无线充电连接时,检测电子设备的状态参数;The detection module 1001 is used to detect the state parameters of the electronic device when the electronic device is connected to the charging stand for wireless charging;
第一确定模块1002,用于根据状态参数,确定电子设备的第一扬声器模组的出声孔是否被遮挡;The first determination module 1002 is configured to determine whether the sound hole of the first speaker module of the electronic device is blocked according to the state parameter;
第一播放模块1003,用于在第一扬声器模组的出声孔被遮挡,且充电座未设置有第二扬声器模组的情况下,以第一音频播放方式进行音频播放,从预存的多种音频参数中确定目标音频参数,以目标音频参数进行音频播放;The first playback module 1003 is used to perform audio playback in the first audio playback mode when the sound outlet of the first speaker module is blocked and the charging stand is not provided with the second speaker module, from the pre-stored multiple Determine the target audio parameter among the audio parameters, and perform audio playback with the target audio parameter;
第二播放模块1004,用于在第一扬声器模组的出声孔被遮挡,且充电座设置有第二扬声器模组的情况下,以第二音频播放方式进行音频播放,通过第二扬声器模组进行音频播放;The second playback module 1004 is used to play audio in a second audio playback mode when the sound hole of the first speaker module is blocked and the charging stand is provided with a second speaker module. group for audio playback;
第三播放模块1005,用于在第一扬声器模组的出声孔未被遮挡的情况下,以第三音频播放方式进行音频播放。The third playback module 1005 is configured to play audio in a third audio playback mode when the sound outlet of the first speaker module is not blocked.
可选地,状态参数包括第一状态和第二状态;Optionally, the state parameter includes a first state and a second state;
在电子设备处于第一状态的情况下,电子设备竖屏放置于充电座上,第一扬声器模组的出声孔被充电座遮挡;When the electronic device is in the first state, the electronic device is placed vertically on the charging stand, and the sound outlet of the first speaker module is blocked by the charging stand;
在电子设备处于第二状态的情况下,电子设备横屏放置于充电座上,第一扬声器模组的出声孔未被遮挡。When the electronic device is in the second state, the electronic device is placed horizontally on the charging stand, and the sound outlet of the first speaker module is not blocked.
可选地,第一播放模块1003,具体用于:Optionally, the first playing module 1003 is specifically used for:
获取待播放的第一音频数据;Obtain the first audio data to be played;
根据目标音频参数对电子设备中的均衡器模块进行配置;Configuring an equalizer module in the electronic device according to target audio parameters;
通过配置完成的均衡器模块对第一音频数据进行增益处理,获得第二音频数据;performing gain processing on the first audio data through the configured equalizer module to obtain second audio data;
播放第二音频数据。Play the second audio data.
可选地,音频数据的处理装置还包括:Optionally, the processing device for audio data also includes:
第四播放模块,用于在电子设备处于第一状态,充电座未设置有第二扬声器模组,且检测到电子设备与充电座断开无线充电连接的情况下,停止以第一音频播放方式进行音频播放,以第三音频播放方式进行音频播放;The fourth playback module is used to stop playing in the first audio mode when the electronic device is in the first state, the charging stand is not provided with the second speaker module, and it is detected that the electronic device and the charging stand are disconnected from the wireless charging connection. Perform audio playback, and perform audio playback in a third audio playback mode;
第五播放模块,用于在电子设备处于第一状态,充电座设置有第二扬声器模组,且检测到电子设备与充电座断开无线充电连接的情况下,停止以第二音频播放方式进行音频播放,以第三音频播放方式进行音频播放;The fifth playback module is used to stop the second audio playback mode when the electronic device is in the first state, the charging stand is provided with a second speaker module, and the wireless charging connection between the electronic device and the charging stand is detected to be disconnected. Audio playback, playing audio in a third audio playback mode;
第六播放模块,用于在充电座未设置有第二扬声器模组,且检测到电子设备从第一状态切换至第二状态的情况下,停止以第一音频播放方式进行音频播放,以第三音频播放方式进行音频播放;The sixth playback module is used to stop the audio playback in the first audio playback mode when the charging base is not provided with the second speaker module and detect that the electronic device is switched from the first state to the second state, and use the second audio playback mode Three audio playback modes for audio playback;
第七播放模块,用于在充电座设置有第二扬声器模组,且检测到电子设备从第一状态切换至第二状态的情况下,停止以第二音频播放方式进行音频播放,以第三音频播放方式进行音频播放。The seventh playback module is used to stop the audio playback in the second audio playback mode when the charging stand is provided with a second speaker module and detects that the electronic device is switched from the first state to the second state, and uses the third Audio playback mode for audio playback.
可选地,目标音频参数通过运行以下模块预先确定:Optionally, the target audio parameters are predetermined by running the following modules:
测试模块,用于在电子设备与充电座无线充电连接且电子设备处于第一状态的情况下,测试第三音频数据在各个频点的输出频响,得到第一频响数据;在电子设备处于第二状态的情况下,测试第三音频数据在各个频点的输出频响,得到第二频响数据;The test module is used to test the output frequency response of the third audio data at each frequency point to obtain the first frequency response data when the electronic device is connected to the charging stand for wireless charging and the electronic device is in the first state; In the case of the second state, test the output frequency response of the third audio data at each frequency point to obtain the second frequency response data;
第二确定模块,用于根据第一频响数据和第二频响数据,确定各个频点的增益数据,将各个频点的增益数据作为目标音频参数。The second determination module is configured to determine the gain data of each frequency point according to the first frequency response data and the second frequency response data, and use the gain data of each frequency point as the target audio parameter.
在本申请实施例中,在电子设备与充电座无线充电连接时,检测电子设备的状态参数;根据状态参数,确定电子设备的第一扬声器模组的出声孔是否被遮挡;在第一扬声器模组的出声孔被遮挡,且充电座未设置有第二扬声 器模组的情况下,以第一音频播放方式进行音频播放,从预存的多种音频参数中确定目标音频参数,以目标音频参数进行音频播放;在第一扬声器模组的出声孔被遮挡,且充电座设置有第二扬声器模组的情况下,以第二音频播放方式进行音频播放,通过第二扬声器模组进行音频播放;在第一扬声器模组的出声孔未被遮挡的情况下,以第三音频播放方式进行音频播放。通过本申请实施例的技术方案,能够根据电子设备的状态参数判断出声孔是否被遮挡,从而在不同的情况下灵活地采取不同的音频播放方式,进而提高了电子设备的音频播放效果。In the embodiment of the present application, when the electronic device is wirelessly charged with the charging stand, the state parameters of the electronic device are detected; according to the state parameters, it is determined whether the sound outlet of the first speaker module of the electronic device is blocked; When the sound outlet of the module is blocked and the charging stand is not equipped with a second speaker module, the audio is played in the first audio playback mode, and the target audio parameters are determined from various pre-stored audio parameters, and the target audio Parameters for audio playback; when the sound outlet of the first speaker module is blocked and the charging stand is equipped with a second speaker module, the audio is played in the second audio playback mode, and the audio is played through the second speaker module Playing; in the case that the sound outlet of the first speaker module is not blocked, the audio is played in the third audio playback mode. Through the technical solutions of the embodiments of the present application, it is possible to judge whether the sound hole is blocked according to the state parameters of the electronic device, so that different audio playback modes can be flexibly adopted in different situations, thereby improving the audio playback effect of the electronic device.
本申请实施例中的音频数据的处理装置可以是装置,也可以是终端中的部件、集成电路、或芯片。该装置可以是移动电子设备,也可以为非移动电子设备。示例性的,移动电子设备可以为手机、平板电脑、笔记本电脑、掌上电脑、车载电子设备、可穿戴设备、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本或者个人数字助理(personal digital assistant,PDA)等,非移动电子设备可以为服务器、网络附属存储器(NetworkAttached Storage,NAS)、个人计算机(personal computer,PC)、电视机(television,TV)、柜员机或者自助机等,本申请实施例不作具体限定。The audio data processing device in the embodiment of the present application may be a device, or may be a component, an integrated circuit, or a chip in a terminal. The device may be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a handheld computer, a vehicle electronic device, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant). assistant, PDA), etc., non-mobile electronic devices can be servers, network attached storage (NetworkAttached Storage, NAS), personal computer (personal computer, PC), television (television, TV), teller machine or self-service machine, etc., the implementation of this application Examples are not specifically limited.
本申请实施例中的音频数据的处理装置可以为具有操作系统的装置。该操作系统可以为安卓(Android)操作系统,可以为ios操作系统,还可以为其他可能的操作系统,本申请实施例不作具体限定。The audio data processing device in the embodiment of the present application may be a device with an operating system. The operating system may be an Android (Android) operating system, an ios operating system, or other possible operating systems, which are not specifically limited in this embodiment of the present application.
本申请实施例提供的音频数据的处理装置能够实现前述的音频数据的处理方法实施例实现的各个过程,为避免重复,这里不再赘述。The audio data processing device provided in the embodiment of the present application can implement the various processes implemented in the foregoing audio data processing method embodiment, and to avoid repetition, details are not repeated here.
可选地,如图11所示,本申请实施例还提供一种电子设备1100,包括处理器1101,存储器1102,存储在存储器1102上并可在处理器1101上运行的程序或指令,该程序或指令被处理器1101执行时实现上述音频数据的处理方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。Optionally, as shown in FIG. 11 , the embodiment of the present application further provides an electronic device 1100, including a processor 1101, a memory 1102, and a program or instruction stored in the memory 1102 and operable on the processor 1101. The program Or, when the instructions are executed by the processor 1101, each process of the audio data processing method embodiment described above can be realized, and the same technical effect can be achieved. To avoid repetition, details are not repeated here.
需要说明的是,本申请实施例中的电子设备包括上述的移动电子设备和 非移动电子设备。It should be noted that the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.
图12是实现本申请实施例的一种电子设备的硬件结构示意图。FIG. 12 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.
该电子设备1200包括但不限于:射频单元1201、网络模块1202、音频输出单元1203、输入单元1204、传感器1205、显示单元1206、用户输入单元1207、接口单元1208、存储器1209、以及处理器1210等部件。The electronic device 1200 includes, but is not limited to: a radio frequency unit 1201, a network module 1202, an audio output unit 1203, an input unit 1204, a sensor 1205, a display unit 1206, a user input unit 1207, an interface unit 1208, a memory 1209, and a processor 1210, etc. part.
本领域技术人员可以理解,电子设备1200还可以包括给各个部件供电的电源(比如电池),电源可以通过电源管理系统与处理器1210逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。图12中示出的电子设备结构并不构成对电子设备的限定,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置,在此不再赘述。Those skilled in the art can understand that the electronic device 1200 can also include a power supply (such as a battery) for supplying power to various components, and the power supply can be logically connected to the processor 1210 through the power management system, so that the management of charging, discharging, and function can be realized through the power management system. Consumption management and other functions. The structure of the electronic device shown in FIG. 12 does not constitute a limitation to the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine some components, or arrange different components, and details will not be repeated here. .
其中,处理器1210,用于在电子设备与充电座无线充电连接时,检测电子设备的状态参数;Wherein, the processor 1210 is configured to detect state parameters of the electronic device when the electronic device is connected to the charging stand for wireless charging;
根据状态参数,从预存的多种音频播放方式中确定目标音频播放方式,其中,多种音频播放方式包括第一音频播放方式和第二音频播放方式;According to the state parameter, determine the target audio playback mode from a variety of pre-stored audio playback modes, wherein the multiple audio playback modes include a first audio playback mode and a second audio playback mode;
音频输出单元1203,用于当以第一音频播放方式作为目标音频播放方式时,在从预存的多种音频参数中确定目标音频参数,以目标音频参数进行音频播放;The audio output unit 1203 is used to determine the target audio parameters from a variety of pre-stored audio parameters when the first audio playback mode is used as the target audio playback mode, and perform audio playback with the target audio parameters;
或者,or,
当以第一音频播放方式作为目标音频播放方式时,充电座上设置有第一扬声器模组,通过充电座的第一扬声器模组进行音频播放。When the first audio playback mode is used as the target audio playback mode, a first speaker module is arranged on the charging stand, and audio playback is performed through the first speaker module of the charging stand.
在本申请实施例中,在电子设备与充电座无线充电连接时,检测电子设备的状态参数;根据状态参数,确定电子设备的第一扬声器模组的出声孔是否被遮挡;在第一扬声器模组的出声孔被遮挡,且充电座未设置有第二扬声器模组的情况下,以第一音频播放方式进行音频播放,从预存的多种音频参数中确定目标音频参数,以目标音频参数进行音频播放;在第一扬声器模组的出声孔被遮挡,且充电座设置有第二扬声器模组的情况下,以第二音频播放方式进行音频播放,通过第二扬声器模组进行音频播放;在第一扬声器模 组的出声孔未被遮挡的情况下,以第三音频播放方式进行音频播放。通过本申请实施例的技术方案,能够根据电子设备的状态参数判断出声孔是否被遮挡,从而在不同的情况下灵活地采取不同的音频播放方式,进而提高了电子设备的音频播放效果。In the embodiment of the present application, when the electronic device is wirelessly charged with the charging stand, the state parameters of the electronic device are detected; according to the state parameters, it is determined whether the sound outlet of the first speaker module of the electronic device is blocked; When the sound outlet of the module is blocked and the charging stand is not equipped with a second speaker module, the audio is played in the first audio playback mode, and the target audio parameters are determined from various pre-stored audio parameters, and the target audio Parameters for audio playback; when the sound outlet of the first speaker module is blocked and the charging stand is equipped with a second speaker module, the audio is played in the second audio playback mode, and the audio is played through the second speaker module Playing; in the case that the sound outlet of the first speaker module is not blocked, the audio is played in the third audio playback mode. Through the technical solutions of the embodiments of the present application, it is possible to judge whether the sound hole is blocked according to the state parameters of the electronic device, so that different audio playback modes can be flexibly adopted in different situations, thereby improving the audio playback effect of the electronic device.
可选地,状态参数包括第一状态和第二状态;Optionally, the state parameter includes a first state and a second state;
当电子设备处于第一状态时,电子设备竖屏放置于充电座上,使得设置于电子设备底部的第二扬声器模组的出声孔被充电座遮挡;When the electronic device is in the first state, the electronic device is vertically placed on the charging stand, so that the sound outlet of the second speaker module arranged at the bottom of the electronic device is blocked by the charging stand;
当电子设备处于第二状态时,电子设备横屏放置于充电座上,使得出声孔未被遮挡。When the electronic device is in the second state, the electronic device is placed on the charging stand horizontally, so that the sound hole is not blocked.
可选地,音频输出单元1203,还用于:以目标音频参数进行音频播放,包括:获取待播放的第一音频数据;根据目标音频参数对电子设备中的均衡器模块进行配置;通过配置完成的均衡器模块对第一音频数据进行增益处理,获得第二音频数据;播放第二音频数据。Optionally, the audio output unit 1203 is also used for: performing audio playback with target audio parameters, including: acquiring the first audio data to be played; configuring the equalizer module in the electronic device according to the target audio parameters; The equalizer module performs gain processing on the first audio data to obtain second audio data; and plays the second audio data.
可选地,音频输出单元1203,还用于:当电子设备处于第一状态且检测到电子设备与充电座断开无线充电连接时,停止以第一状态对应的音频参数进行音频播放,基于与第二状态对应的音频参数进行音频播放;或者,当电子设备从第一状态切换至第二状态时,停止以第一状态对应的音频参数进行音频播放,基于与第二状态对应的音频参数进行音频播放。Optionally, the audio output unit 1203 is further configured to: when the electronic device is in the first state and detects that the electronic device is disconnected from the charging stand for wireless charging, stop playing audio with the audio parameters corresponding to the first state, based on the Play audio with the audio parameters corresponding to the second state; or, when the electronic device switches from the first state to the second state, stop playing audio with the audio parameters corresponding to the first state, and perform audio playback based on the audio parameters corresponding to the second state Audio Player.
可选地,处理器1210,还用于:第一状态对应的音频参数通过如下方式预先确定:在电子设备与充电座无线充电连接且电子设备处于第一状态时,测试第三音频数据在各个频点的输出频响,得到第一频响数据;在电子设备处于第二状态时,测试第三音频数据在各个频点的输出频响,得到第二频响数据;根据第一频响数据和第二频响数据,确定各个频点的增益数据,将各个频点的增益数据作为第一状态对应的音频参数。Optionally, the processor 1210 is further configured to: the audio parameter corresponding to the first state is predetermined in the following manner: when the electronic device is connected to the charging stand for wireless charging and the electronic device is in the first state, test the third audio data in each The output frequency response of the frequency point is obtained to obtain the first frequency response data; when the electronic device is in the second state, the output frequency response of the third audio data at each frequency point is tested to obtain the second frequency response data; according to the first frequency response data and the second frequency response data, determine the gain data of each frequency point, and use the gain data of each frequency point as the audio parameter corresponding to the first state.
在本申请实施例中,根据状态参数确定对应的音频参数,并按照该音频播放参数对第一音频数据进行处理,生成并播放第二音频数据,且在电子设备发生改变时调节音频参数,避免了用户操作干扰电子设备的音频播放效果, 提高了音频播放效果的稳定性。In the embodiment of the present application, the corresponding audio parameter is determined according to the state parameter, and the first audio data is processed according to the audio playback parameter, and the second audio data is generated and played, and the audio parameter is adjusted when the electronic device changes to avoid This prevents user operations from interfering with the audio playback effect of the electronic device, and improves the stability of the audio playback effect.
应理解的是,本申请实施例中,输入单元1204可以包括图形处理器(Graphics Processing Unit,GPU)12041和麦克风12042,图形处理器12041对在视频捕获模式或图像捕获模式中由图像捕获装置(如摄像头)获得的静态图片或视频的图像数据进行处理。显示单元1206可包括显示面板12061,可以采用液晶显示器、有机发光二极管等形式来配置显示面板12061。用户输入单元1207包括触控面板12071以及其他输入设备12072。触控面板12071,也称为触摸屏。触控面板12071可包括触摸检测装置和触摸控制器两个部分。其他输入设备12072可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆,在此不再赘述。存储器1209可用于存储软件程序以及各种数据,包括但不限于应用程序和操作系统。处理器1210可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器1210中。It should be understood that, in the embodiment of the present application, the input unit 1204 may include a graphics processor (Graphics Processing Unit, GPU) 12041 and a microphone 12042, and the graphics processor 12041 is used for the image capture device ( Such as the image data of the still picture or video obtained by the camera) for processing. The display unit 1206 may include a display panel 12061, and the display panel 12061 may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like. The user input unit 1207 includes a touch panel 12071 and other input devices 12072 . Touch panel 12071, also called touch screen. The touch panel 12071 may include two parts, a touch detection device and a touch controller. Other input devices 12072 may include, but are not limited to, physical keyboards, function keys (such as volume control keys, switch keys, etc.), trackballs, mice, and joysticks, which will not be repeated here. The memory 1209 can be used to store software programs as well as various data, including but not limited to application programs and operating systems. The processor 1210 may integrate an application processor and a modem processor, wherein the application processor mainly processes operating systems, user interfaces, and application programs, and the modem processor mainly processes wireless communications. It can be understood that the foregoing modem processor may not be integrated into the processor 1210 .
本申请实施例还提供一种可读存储介质,所述可读存储介质上存储有程序或指令,该程序或指令被处理器执行时实现上述音频数据的处理方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。The embodiment of the present application also provides a readable storage medium, the readable storage medium stores a program or an instruction, and when the program or instruction is executed by a processor, each process of the above audio data processing method embodiment is realized, and can To achieve the same technical effect, in order to avoid repetition, no more details are given here.
其中,所述处理器为上述实施例中所述的电子设备中的处理器。所述可读存储介质,包括计算机可读存储介质,如计算机只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等。Wherein, the processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer readable storage medium, such as computer read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk, etc.
本申请实施例另提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现上述音频数据的处理方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。The embodiment of the present application further provides a chip, the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the above audio data processing method Each process of the example, and can achieve the same technical effect, in order to avoid repetition, will not repeat them here.
应理解,本申请实施例提到的芯片还可以称为系统级芯片、系统芯片、芯片系统或片上系统芯片等。It should be understood that the chips mentioned in the embodiments of the present application may also be called system-on-chip, system-on-chip, system-on-a-chip, or system-on-a-chip.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。此外,需要指出的是,本申请实施方式中的方法和装置的范围不限按示出或讨论的顺序来执行功能,还可包括根据所涉及的功能按基本同时的方式或按相反的顺序来执行功能,例如,可以按不同于所描述的次序来执行所描述的方法,并且还可以添加、省去、或组合各种步骤。另外,参照某些示例所描述的特征可在其他示例中被组合。It should be noted that, in this document, the term "comprising", "comprising" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article or apparatus comprising a set of elements includes not only those elements, It also includes other elements not expressly listed, or elements inherent in the process, method, article, or device. Without further limitations, an element defined by the phrase "comprising a ..." does not preclude the presence of additional identical elements in the process, method, article, or apparatus comprising that element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved. Functions are performed, for example, the described methods may be performed in an order different from that described, and various steps may also be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以计算机软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,或者网络设备等)执行本申请各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus a necessary general-purpose hardware platform, and of course also by hardware, but in many cases the former is better implementation. Based on such an understanding, the technical solution of the present application can be embodied in the form of computer software products, which are stored in a storage medium (such as ROM/RAM, magnetic disk, etc.) , optical disc), including several instructions to enable a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present application.
上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本申请的启示下,在不脱离本申请宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本申请的保护之内。The embodiments of the present application have been described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementations. The above-mentioned specific implementations are only illustrative and not restrictive. Those of ordinary skill in the art will Under the inspiration of this application, without departing from the purpose of this application and the scope of protection of the claims, many forms can also be made, all of which belong to the protection of this application.

Claims (10)

  1. 一种音频数据的处理方法,应用于电子设备,包括:A method for processing audio data, applied to electronic equipment, comprising:
    在所述电子设备与充电座无线充电连接时,检测所述电子设备的状态参数;Detecting state parameters of the electronic device when the electronic device is connected to the charging stand for wireless charging;
    根据所述状态参数,确定所述电子设备的第一扬声器模组的出声孔是否被遮挡;According to the state parameter, determine whether the sound outlet of the first speaker module of the electronic device is blocked;
    在所述第一扬声器模组的出声孔被遮挡,且所述充电座未设置有第二扬声器模组的情况下,以第一音频播放方式进行音频播放,从预存的多种音频参数中确定目标音频参数,以所述目标音频参数进行音频播放;When the sound hole of the first speaker module is blocked, and the charging stand is not provided with a second speaker module, the audio is played in the first audio playback mode, and the pre-stored various audio parameters are selected Determine target audio parameters, and perform audio playback with the target audio parameters;
    在所述第一扬声器模组的出声孔被遮挡,且所述充电座设置有所述第二扬声器模组的情况下,以第二音频播放方式进行音频播放,通过所述第二扬声器模组进行音频播放;When the sound hole of the first speaker module is blocked, and the charging stand is provided with the second speaker module, the audio is played in the second audio playback mode, and the second speaker module group for audio playback;
    在所述第一扬声器模组的出声孔未被遮挡的情况下,以第三音频播放方式进行音频播放。In the case that the sound outlet of the first speaker module is not blocked, the audio is played in a third audio playing manner.
  2. 根据权利要求1所述的方法,其中,所述状态参数包括第一状态和第二状态;The method according to claim 1, wherein the state parameter comprises a first state and a second state;
    在所述电子设备处于第一状态的情况下,所述电子设备竖屏放置于所述充电座上,所述第一扬声器模组的出声孔被所述充电座遮挡;When the electronic device is in the first state, the electronic device is placed vertically on the charging stand, and the sound outlet of the first speaker module is blocked by the charging stand;
    在所述电子设备处于第二状态的情况下,所述电子设备横屏放置于所述充电座上,所述第一扬声器模组的出声孔未被遮挡。When the electronic device is in the second state, the electronic device is placed horizontally on the charging stand, and the sound outlet of the first speaker module is not blocked.
  3. 根据权利要求1所述的方法,其中,所述以所述目标音频参数进行音频播放,包括:The method according to claim 1, wherein said playing audio with said target audio parameters comprises:
    获取待播放的第一音频数据;Obtain the first audio data to be played;
    根据所述目标音频参数对所述电子设备中的均衡器模块进行配置;configuring an equalizer module in the electronic device according to the target audio parameters;
    通过配置完成的均衡器模块对所述第一音频数据进行增益处理,获得第二音频数据;performing gain processing on the first audio data through the configured equalizer module to obtain second audio data;
    播放所述第二音频数据。Play the second audio data.
  4. 根据权利要求2所述的方法,其中,所述方法还包括:The method according to claim 2, wherein the method further comprises:
    在所述电子设备处于第一状态,所述充电座未设置有第二扬声器模组,且检测到所述电子设备与所述充电座断开无线充电连接的情况下,停止以第一音频播放方式进行音频播放,以第三音频播放方式进行音频播放;When the electronic device is in the first state, the charging stand is not provided with a second speaker module, and it is detected that the electronic device is disconnected from the charging stand for wireless charging, stop playing with the first audio audio playback in the third audio playback mode;
    在所述电子设备处于第一状态,所述充电座设置有第二扬声器模组,且检测到所述电子设备与所述充电座断开无线充电连接的情况下,停止以第二音频播放方式进行音频播放,以第三音频播放方式进行音频播放;When the electronic device is in the first state, the charging stand is provided with a second speaker module, and it is detected that the electronic device is disconnected from the charging stand for wireless charging, stop playing in the second audio mode Perform audio playback, and perform audio playback in a third audio playback mode;
    在所述充电座未设置有第二扬声器模组,且检测到所述电子设备从第一状态切换至所述第二状态的情况下,停止以第一音频播放方式进行音频播放,以第三音频播放方式进行音频播放;When the charging stand is not provided with a second speaker module, and it is detected that the electronic device is switched from the first state to the second state, the audio playback in the first audio playback mode is stopped, and the third audio playback mode is used. Audio playback mode for audio playback;
    在所述充电座设置有第二扬声器模组,且检测到所述电子设备从第一状态切换至所述第二状态的情况下,停止以第二音频播放方式进行音频播放,以第三音频播放方式进行音频播放。When the charging stand is provided with a second speaker module, and it is detected that the electronic device is switched from the first state to the second state, stop playing the audio in the second audio playing mode, and use the third audio Play mode for audio playback.
  5. 根据权利要求2所述的方法,其中,所述目标音频参数通过如下方式预先确定:The method according to claim 2, wherein the target audio parameters are predetermined by:
    在所述电子设备与所述充电座无线充电连接且所述电子设备处于所述第一状态的情况下,测试第三音频数据在各个频点的输出频响,得到第一频响数据;在所述电子设备处于所述第二状态的情况下,测试所述第三音频数据在各个频点的输出频响,得到第二频响数据;When the electronic device is connected to the charging stand for wireless charging and the electronic device is in the first state, test the output frequency response of the third audio data at each frequency point to obtain the first frequency response data; When the electronic device is in the second state, test the output frequency response of the third audio data at each frequency point to obtain second frequency response data;
    根据所述第一频响数据和所述第二频响数据,确定各个频点的增益数据,将所述各个频点的增益数据作为所述目标音频参数。According to the first frequency response data and the second frequency response data, gain data of each frequency point is determined, and the gain data of each frequency point is used as the target audio parameter.
  6. 一种音频数据的处理装置,运行于电子设备,包括:A processing device for audio data, running on electronic equipment, comprising:
    检测模块,用于在所述电子设备与充电座无线充电连接时,检测所述电子设备的状态参数;A detection module, configured to detect state parameters of the electronic device when the electronic device is connected to the charging stand for wireless charging;
    第一确定模块,用于根据所述状态参数,确定所述电子设备的第一扬声器模组的出声孔是否被遮挡;A first determination module, configured to determine whether the sound outlet of the first speaker module of the electronic device is blocked according to the state parameter;
    第一播放模块,用于在所述第一扬声器模组的出声孔被遮挡,且所述充 电座未设置有第二扬声器模组的情况下,以第一音频播放方式进行音频播放,从预存的多种音频参数中确定目标音频参数,以所述目标音频参数进行音频播放;The first playback module is used to perform audio playback in a first audio playback mode when the sound outlet of the first speaker module is blocked and the charging stand is not provided with a second speaker module, from Determining a target audio parameter from a variety of pre-stored audio parameters, and performing audio playback with the target audio parameter;
    第二播放模块,用于在所述第一扬声器模组的出声孔被遮挡,且所述充电座设置有所述第二扬声器模组的情况下,以第二音频播放方式进行音频播放,通过所述第二扬声器模组进行音频播放;The second playback module is used to play audio in a second audio playback mode when the sound hole of the first speaker module is blocked and the charging stand is provided with the second speaker module, Play audio through the second speaker module;
    第三播放模块,用于在所述第一扬声器模组的出声孔未被遮挡的情况下,以第三音频播放方式进行音频播放。The third playback module is configured to play audio in a third audio playback mode when the sound outlet of the first speaker module is not blocked.
  7. 根据权利要求6所述的装置,其中,所述状态参数包括第一状态和第二状态;The apparatus of claim 6, wherein the state parameters include a first state and a second state;
    在所述电子设备处于第一状态的情况下,所述电子设备竖屏放置于所述充电座上,所述第一扬声器模组的出声孔被所述充电座遮挡;When the electronic device is in the first state, the electronic device is placed vertically on the charging stand, and the sound outlet of the first speaker module is blocked by the charging stand;
    在所述电子设备处于第二状态的情况下,所述电子设备横屏放置于所述充电座上,所述第一扬声器模组的出声孔未被遮挡。When the electronic device is in the second state, the electronic device is placed horizontally on the charging stand, and the sound outlet of the first speaker module is not blocked.
  8. 根据权利要求6所述的装置,其中,所述第一播放模块,具体用于:The device according to claim 6, wherein the first playback module is specifically used for:
    获取待播放的第一音频数据;Obtain the first audio data to be played;
    根据所述目标音频参数对所述电子设备中的均衡器模块进行配置;configuring an equalizer module in the electronic device according to the target audio parameters;
    通过配置完成的均衡器模块对所述第一音频数据进行增益处理,获得第二音频数据;performing gain processing on the first audio data through the configured equalizer module to obtain second audio data;
    播放所述第二音频数据。Play the second audio data.
  9. 一种电子设备,包括处理器,存储器及存储在所述存储器上并可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如权利要求1-5任一项所述的音频数据的处理方法的步骤。An electronic device, comprising a processor, a memory, and a program or instruction stored on the memory and operable on the processor, when the program or instruction is executed by the processor, claims 1-5 are realized The step of the processing method of audio data described in any one.
  10. 一种可读存储介质,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如权利要求1-5任一项所述的音频数据的处理方法的步骤。A readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the audio data processing method according to any one of claims 1-5 are realized.
PCT/CN2022/140715 2021-12-22 2022-12-21 Audio data processing method and electronic device WO2023116769A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111580916.5A CN114253503A (en) 2021-12-22 2021-12-22 Audio data processing method and electronic equipment
CN202111580916.5 2021-12-22

Publications (1)

Publication Number Publication Date
WO2023116769A1 true WO2023116769A1 (en) 2023-06-29

Family

ID=80794260

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/140715 WO2023116769A1 (en) 2021-12-22 2022-12-21 Audio data processing method and electronic device

Country Status (2)

Country Link
CN (1) CN114253503A (en)
WO (1) WO2023116769A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114253503A (en) * 2021-12-22 2022-03-29 维沃移动通信有限公司 Audio data processing method and electronic equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105915718A (en) * 2016-05-30 2016-08-31 努比亚技术有限公司 Device and method for voice playing
CN106033676A (en) * 2015-03-13 2016-10-19 北京智谷睿拓技术服务有限公司 Audio play control method and device and electronic device
US20170060524A1 (en) * 2015-08-31 2017-03-02 Sonos, Inc. Detecting and Controlling Physical Movement of a Playback Device During Audio Playback
CN110267159A (en) * 2019-05-08 2019-09-20 努比亚技术有限公司 Audio frequency playing method, wearable device, cradle and readable storage medium storing program for executing
CN211320948U (en) * 2019-11-13 2020-08-21 江苏实亿元交通工程有限公司 Treasured charges with music instant music
CN114253503A (en) * 2021-12-22 2022-03-29 维沃移动通信有限公司 Audio data processing method and electronic equipment

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20050053931A (en) * 2003-12-03 2005-06-10 김관회 A mobile phone charging system having function of audio signal output
CN104917474B (en) * 2014-03-14 2020-04-24 联想(北京)有限公司 Method for setting gain of audio amplification module and electronic equipment
CN205725945U (en) * 2016-05-04 2016-11-23 湖州优创科技有限公司 A kind of multi-functional mobile phone charging rack
CN109089201B (en) * 2018-07-26 2020-04-17 Oppo广东移动通信有限公司 Microphone hole blockage detection method and related product
CN211830863U (en) * 2020-06-08 2020-10-30 杭州职业技术学院 Vehicle-mounted mobile phone fixing device
CN212012214U (en) * 2020-06-08 2020-11-24 江西立讯智造有限公司 Convenient wireless charging seat
CN214045705U (en) * 2020-12-22 2021-08-24 鸣扬智能科技(深圳)有限公司 Wireless charger cell phone stand of formula is inhaled to multipurpose magnetism
CN214798947U (en) * 2021-04-13 2021-11-19 深圳市创佳声学科技有限公司 Microphone device capable of being charged wirelessly

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106033676A (en) * 2015-03-13 2016-10-19 北京智谷睿拓技术服务有限公司 Audio play control method and device and electronic device
US20170060524A1 (en) * 2015-08-31 2017-03-02 Sonos, Inc. Detecting and Controlling Physical Movement of a Playback Device During Audio Playback
CN105915718A (en) * 2016-05-30 2016-08-31 努比亚技术有限公司 Device and method for voice playing
CN110267159A (en) * 2019-05-08 2019-09-20 努比亚技术有限公司 Audio frequency playing method, wearable device, cradle and readable storage medium storing program for executing
CN211320948U (en) * 2019-11-13 2020-08-21 江苏实亿元交通工程有限公司 Treasured charges with music instant music
CN114253503A (en) * 2021-12-22 2022-03-29 维沃移动通信有限公司 Audio data processing method and electronic equipment

Also Published As

Publication number Publication date
CN114253503A (en) 2022-03-29

Similar Documents

Publication Publication Date Title
WO2017121353A1 (en) Method and device for displaying control
CN111277929B (en) Wireless earphone volume control method, wireless earphone and mobile terminal
WO2020156251A1 (en) Audio playing and collection method, apparatus and device and readable storage medium
CN111459456B (en) Audio control method and electronic equipment
EP3432136A1 (en) Sound effect configuration method and related device
US8320586B2 (en) System and method for reducing volume spike in an electronic device
CN107613146B (en) Volume adjustment method and device and mobile terminal
CN110430562B (en) Bluetooth communication method and related device
WO2023131155A1 (en) Wireless earphone control method and apparatus, and electronic device
WO2022033176A1 (en) Audio play control method and apparatus, and electronic device and storage medium
WO2023116769A1 (en) Audio data processing method and electronic device
CN107911777B (en) Processing method and device for return-to-ear function and mobile terminal
CN108848267B (en) Audio playing method and mobile terminal
WO2024021736A1 (en) Transmission method, apparatus, and system for bluetooth multimedia packet, and device
JP2023514751A (en) Power adjustment method and electronic device
CN111078186A (en) Playing method and electronic equipment
TWM519370U (en) Electronic device capable of adjusting equalizer settings according to the hearing physiological condition and audio playing device
CN104349244B (en) A kind of information processing method and electronic equipment
WO2021213424A1 (en) Electronic device
WO2021098698A1 (en) Audio playback method and terminal device
EP1783600B1 (en) Method for arbitrating audio data output apparatuses
CN109348366B (en) Method for adjusting volume by using electrical parameters and mobile terminal
CN108900942B (en) Play control method and electronic equipment
WO2023051083A1 (en) Audio control method, electronic device, and audio playback system
CN103945305B (en) The method and electronic equipment of a kind of information processing

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22910081

Country of ref document: EP

Kind code of ref document: A1