WO2022242210A1 - 一种播放声音的方法及设备 - Google Patents

一种播放声音的方法及设备 Download PDF

Info

Publication number
WO2022242210A1
WO2022242210A1 PCT/CN2022/072598 CN2022072598W WO2022242210A1 WO 2022242210 A1 WO2022242210 A1 WO 2022242210A1 CN 2022072598 W CN2022072598 W CN 2022072598W WO 2022242210 A1 WO2022242210 A1 WO 2022242210A1
Authority
WO
WIPO (PCT)
Prior art keywords
sound effect
sound
application program
category
frame rate
Prior art date
Application number
PCT/CN2022/072598
Other languages
English (en)
French (fr)
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 荣耀终端有限公司
Priority to US17/758,838 priority Critical patent/US20240220186A1/en
Priority to EP22735758.9A priority patent/EP4113276A4/en
Publication of WO2022242210A1 publication Critical patent/WO2022242210A1/zh

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/165Management of the audio stream, e.g. setting of volume, audio stream path
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/50Controlling the output signals based on the game progress
    • A63F13/54Controlling the output signals based on the game progress involving acoustic signals, e.g. for simulating revolutions per minute [RPM] dependent engine sounds in a driving game or reverberation against a virtual wall
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4488Object-oriented

Definitions

  • the embodiments of the present application relate to the field of artificial intelligence, and in particular to a method and device for playing sound.
  • a mobile phone when playing sound, it can perform sound digital signal processing on the sound data according to the sound effect parameters of a certain sound effect, so that the mobile phone can achieve a specific sound effect when playing the sound through the processed sound data, that is, the mobile phone can use a specific sound effect.
  • the sound effect plays the sound. So that the sound played by the mobile phone can be more suitable for the sound playing scene of the current mobile phone, and the user experience when the mobile phone plays the sound is improved.
  • the sound effects when the mobile phone plays sound may include video sound effects, game sound effects, and music sound effects.
  • the video sound effect can be more suitable for the sound playback scene when the mobile phone plays the video.
  • the game sound effect can be more suitable for the sound playback scene when playing games on mobile phones.
  • the music sound effect can be more suitable for the sound playback scene when the mobile phone plays music or plays background sound.
  • the mobile phone queries the sound effect corresponding to the sound playing scene when the mobile phone plays the sound in the application program according to the name of the application program, so that the mobile phone plays the sound in the application program according to the sound effect.
  • the application is a comprehensive application, for example, the application can play audio such as video and music, then the mobile phone will play the sound in the application in more than one scene, and the mobile phone cannot identify the sound according to the name of the application.
  • the embodiment of the present application provides a method and device for playing sound, which solves the problem that an application layer program that can play both video and music cannot play corresponding sound according to the corresponding sound effect.
  • the embodiment of the present application provides a method for playing sound, and the method can be applied to an electronic device.
  • the method includes: when the category of the first application program satisfies a preset condition, playing the sound of the current first application program according to the sound effect parameters of the first sound effect corresponding to the category of the first application program; If the category does not satisfy the preset condition, the sound of the current first application is played according to the sound effect parameters of the second sound effect corresponding to the frame rate of the current display screen.
  • the electronic device when the user uses the application program installed on the electronic device, the electronic device can automatically select and use the sound effect parameters of the corresponding sound effect to process the sound data according to the type of the application program used by the user and the current sound playback scene.
  • the sound is played after processing, so that the sound played by the electronic device can be more suitable for the current sound playing scene, and the user experience when the electronic device plays the sound is improved.
  • playing the sound of the current first application program according to the sound effect parameters of the first sound effect corresponding to the category of the first application program includes: The corresponding relationship between the category and the sound effect determines the first sound effect corresponding to the first application program; and plays the sound of the current first application program according to the sound effect parameters of the first sound effect.
  • the first sound effect of the corresponding application program can be determined conveniently through the preset correspondence between the category of the application program and the sound effect, which is convenient for implementation.
  • the categories of application programs include games, videos, and music
  • the preset correspondence between the categories of applications and sound effects includes that the sound effects corresponding to the game category are game sound effects, and the corresponding sound effects of the video category are
  • the sound effects of the category are video sound effects, and the sound effects corresponding to the music category are audio sound effects.
  • the sound effect parameters of video sound effects, game sound effects, and audio sound effect configurations are different from each other.
  • the preset condition includes: the category of the first application program is any one of games, videos, and music; or, the category of the first application program is games or videos ; Or, the category of the first application program is a game category.
  • the sound of applications such as games, videos, and music is usually of a single type.
  • the sound of a game application program is usually a game sound
  • the sound of a video application program is usually a video sound
  • the sound of a music application program is usually an audio sound. Therefore, the sound effects required by the sounds of these types of applications are relatively clear and will not change, so these types of applications can directly determine the sound effects according to the type of the application and use the determined sound effects to play the sound.
  • the sounds of other types of application programs may include multiple types, for example, other types of application programs may play video or music. Therefore, other applications determine the sound effect and play the sound through the frame rate, and can more accurately determine the sound effect according to the scene where the application currently plays the sound.
  • playing the sound of the current first application program according to the sound effect parameters of the second sound effect corresponding to the frame rate of the current display screen includes: determining the first sound effect according to the frame rate of the current display screen.
  • the second sound effect corresponding to the application ; play the sound of the current first application according to the sound effect parameters of the second sound effect.
  • determining the second sound effect corresponding to the first application program according to the frame rate of the current display screen includes: determining that the second sound effect is a video sound effect when the frame rate is greater than or equal to the preset frame rate ; When the frame rate is less than the preset frame rate, determine that the second sound effect is an audio sound effect. Since the frame rate of the display screen is relatively low when displaying a static picture, when the frame rate is greater than the preset frame rate, it can be determined that the current picture includes a video picture, so the video sound effect can be used to play the current sound, so that the electronic device The sound played when playing a video better matches the sound scene of the video.
  • determining the second sound effect corresponding to the first application program includes: when the frame rate is greater than or equal to the preset frame rate, the current display screen is continuously refreshed When the area ratio of the area is greater than the preset ratio threshold of the screen display area, the second sound effect is determined to be a video sound effect; when the frame rate is greater than or equal to the preset frame rate, the area ratio of the continuously refreshed area in the current display screen is less than When the preset proportion threshold of the screen display area is determined, the second sound effect is determined to be an audio sound effect; when the frame rate is less than the preset frame rate, it is determined that the second sound effect is an audio sound effect.
  • the electronic device can further determine whether to play the advertisement video or The video in the information stream (for example, when the area ratio of the constantly refreshing area in the current display screen is less than the preset ratio threshold of the screen display area, it means that an advertisement video or a video in the information stream is being played), so as to determine the sound effect more accurately.
  • the preset ratio threshold is 50%
  • the preset frame rate is 24Hz.
  • the embodiment of the present application provides an apparatus for playing sound, and the apparatus can be applied to an electronic device to implement the method in the first aspect above.
  • the functions of the device can be realized by hardware, and can also be realized by executing corresponding software through hardware.
  • the hardware or software includes one or more modules corresponding to the above-mentioned functions, for example, a playback module, a processing module, and the like.
  • the playing module can be used to play the sound of the current first application program according to the sound effect parameters of the first sound effect corresponding to the category of the first application program when the category of the first application program satisfies the preset condition;
  • the sound of the current first application program is played according to the sound effect parameters of the second sound effect corresponding to the frame rate of the current display screen.
  • the processing module is configured to determine the first sound effect corresponding to the first application program according to the preset corresponding relationship between the category of the application program and the sound effect according to the category of the first application program; the playing module, It is specifically used to play the sound of the current first application program according to the sound effect parameters of the first sound effect.
  • the categories of application programs include games, videos, and music
  • the preset correspondence between the categories of applications and sound effects includes that the sound effects corresponding to the game category are game sound effects, and the corresponding sound effects of the video category are
  • the sound effects of the category are video sound effects, and the sound effects corresponding to the music category are audio sound effects.
  • the sound effect parameters of video sound effects, game sound effects, and audio sound effect configurations are different from each other.
  • the preset condition includes: the category of the first application program is any one of games, videos, and music; or, the category of the first application program is games or videos ; Or, the category of the first application program is a game category.
  • the processing module is configured to determine the second sound effect corresponding to the first application program according to the frame rate of the current display screen; the playing module is specifically configured to play the current sound effect according to the sound effect parameters of the second sound effect.
  • the first application sounds is configured to determine the second sound effect corresponding to the first application program according to the frame rate of the current display screen; the playing module is specifically configured to play the current sound effect according to the sound effect parameters of the second sound effect. The first application sounds.
  • the processing module is specifically configured to determine that the second sound effect is a video sound effect when the frame rate is greater than or equal to the preset frame rate; and determine that the second sound effect is audio when the frame rate is less than the preset frame rate sound effects.
  • the processing module is specifically used when the frame rate is greater than or equal to the preset frame rate, and the area ratio of the continuously refreshed area in the current display screen is greater than the preset ratio threshold of the screen display area , determine that the second sound effect is a video sound effect; when the frame rate is greater than or equal to the preset frame rate, and the area ratio of the area that is constantly refreshed in the current display screen is less than the preset ratio threshold of the screen display area, determine that the second sound effect is audio Sound effect; when the frame rate is lower than the preset frame rate, it is determined that the second sound effect is an audio sound effect.
  • the preset ratio threshold is 50%
  • the preset frame rate is 24Hz.
  • an embodiment of the present application provides an electronic device, including: a processor, and a memory configured to store instructions executable by the processor.
  • the electronic device implements the method for playing sound as described in any one of the first aspect or possible implementation manners of the first aspect.
  • the embodiment of the present application provides a computer-readable storage medium on which computer program instructions are stored.
  • the electronic device is made to implement the method for playing sound according to any one of the first aspect or the possible implementation manners of the first aspect.
  • the embodiment of the present application provides a computer program product, including computer readable code, when the computer readable code is run in the electronic device, the electronic device realizes the first aspect or the possible implementation manner of the first aspect The method for playing sound described in any one.
  • FIG. 1 is a schematic diagram of an application scenario of a method for playing sound provided in an embodiment of the present application
  • FIG. 2 is a schematic structural diagram of an electronic device provided in an embodiment of the present application.
  • FIG. 3 is a schematic flowchart of a method for playing sound provided in an embodiment of the present application
  • FIG. 4 is a schematic diagram of a scene when a method for playing sound provided by an embodiment of the present application is applied;
  • FIG. 5 is a schematic diagram of a scene when another method for playing sound provided by the embodiment of the present application is applied;
  • FIG. 6 is a schematic structural diagram of a device for playing sound provided by an embodiment of the present application.
  • a user may install a music application on the electronic device, and then when playing music on the electronic device using the music application, the electronic device will play the sound of the music.
  • the user may install a video application program on the electronic device, and then use the video application program to play the video on the electronic device, and at this time, the electronic device will play the sound in the video.
  • the user may install a game application program on the electronic device, and then when using the game application program to play a game on the electronic device, the electronic device will play the sound in the game.
  • the user may install a social application program on the electronic device, and then use the electronic device to publish or view information (such as blogs, updates, etc.) or chat with other people on the Internet through the social application program.
  • Electronic devices may also play sounds when a user is viewing a message or chatting with another person that has video or audio played.
  • the user can install an information application program on the electronic device, and then use the information application program to browse information (such as news, etc.) on the electronic device. If the information browsed by the user is audio or video, the electronic device will also play The corresponding audio or video sound.
  • the electronic device can determine the sound playing scene (such as video playing scene, audio playing scene, game scene, etc.) when the electronic device plays the sound of the current application program according to the name of the current application program, thereby Select the sound effect corresponding to it.
  • the electronic device can perform sound digital signal processing on the sound data according to the sound effect parameters of the selected sound effect, so that the electronic device can play the sound according to the selected sound effect corresponding to the sound playing scene.
  • the sound played by the electronic device is more suitable for the current sound playing scene, and the user experience when the electronic device plays sound is improved.
  • the sound effects of the electronic device may include video sound effects, audio sound effects, and game sound effects.
  • the electronic device can determine that the sound playback scene when playing the sound of the current application is the video playback scene according to the name of the video application program used by the user, so as to select the video sound effect .
  • the electronic device processes and plays the sound data of the video being played according to the sound effect parameters corresponding to the selected video sound effect, and then plays the sound in the video being played by using the video sound effect.
  • the sound played by the electronic device can be more suitable for the video playback scene.
  • the electronic device can determine the sound playback scene when playing the sound of the current application as the audio playback scene according to the name of the music application used by the user, so as to select the audio sound effect .
  • the electronic device processes the sound data of the music being played according to the sound effect parameters corresponding to the selected audio sound effect, and then plays the sound data of the music being played, so that the audio sound effect can be used to play the sound of the music being played. Make the sounds played by electronic devices more suitable for audio playback scenarios.
  • the electronic device can determine the sound playback scene when playing the sound of the current application program as the game scene according to the name of the game application program used by the user, so as to select the game sound effect.
  • the electronic device processes the sound data of the running game according to the sound effect parameters corresponding to the selected game sound effects, and then plays the sound data of the running game, so that the game sound effects can be used to play the sound of the running game.
  • the sound played by the electronic device can be more suitable for the game scene.
  • the electronic device determines the sound playing scene and the corresponding sound effect when playing the application program according to the name of the application program.
  • the application is a comprehensive application, for example, the application can play audio such as video and music, then the electronic device will play the sound in more than one scene when playing the sound in the application, and the electronic device will not be able to
  • the name of the application is used to determine the sound playback scene when the application is played, and only the default sound effect can be used to play the sound of the video or the sound of the music in the application.
  • an embodiment of the present application provides a method for playing sound.
  • the method can be applied to a scenario where the electronic device plays the sound in the application program installed on the electronic device during the user's use of the application program.
  • FIG. 1 shows a schematic diagram of an application scenario of a method for playing sound provided by an embodiment of the present application.
  • the electronic device can display the picture of the video and play the sound in the video.
  • the electronic device can use the method for playing sound provided by the embodiment of the present application to play the sound in the video using the sound effect suitable for the video playing scene.
  • the method for playing sound may include, when the category of the application program (such as the first application program) satisfies a preset condition, playing the sound of the current application program according to the sound effect parameters of the first sound effect corresponding to the category of the application program; If the category of the application program does not satisfy the preset condition, the sound of the current first application program is played according to the sound effect parameters of the second sound effect corresponding to the frame rate of the current display screen. For example, when the user opens an application program (such as the first application program) installed on the electronic device, the electronic device can determine the default Sound effect (or called the first sound effect).
  • the electronic device can determine the sound effect (or called the second sound effect) corresponding to the current sound playback scene according to the frame rate of the display screen, so that the electronic device can play the application program opened by the user.
  • the sound in the application program is selected, the sound can be played according to the determined first sound effect or the second sound effect corresponding to the application program.
  • the electronic device can directly use the first sound effect to play the sound in the current sound playing scene without loading the corresponding sound effect again.
  • the sound playing scene refers to an application scene of the electronic device when the electronic device plays sound.
  • the electronic device only plays audio sounds (such as music, podcasts, radio, audiobooks, etc.)
  • the current sound playing scene of the electronic device is an audio playing scene.
  • the electronic device plays the sound in the video (such as short video, movie, TV program, etc.)
  • the current sound playing scene of the electronic device is the video playing scene.
  • the electronic device plays the sound in the game when running the game application program, the current sound playback scene of the electronic device is the game scene.
  • sound effects may include audio sound effects, video sound effects, game sound effects, etc.
  • Different sound effects have different sound effect parameters (that is, different sound effect configurations have different sound effect parameters).
  • sound effects There is a one-to-one correspondence between sound effects and sound playback scenes. For example, an audio playing scene corresponds to an audio sound effect, a video playing scene corresponds to a video sound effect, and a game scene corresponds to a game sound effect.
  • the electronic device can determine the corresponding sound effect according to the sound playing scene according to the corresponding relationship.
  • the electronic device can automatically select and use the sound effect parameters of the corresponding sound effect to process the sound data according to the type of the application program used by the user and the current sound playback scene.
  • the sound is played, so that the sound played by the electronic device can be more suitable for the current sound playing scene, and the user experience when the electronic device plays the sound is improved.
  • the above-mentioned electronic devices may be mobile phones, tablet computers, handheld computers, PCs, cellular phones, personal digital assistants (personal digital assistant, PDA), wearable devices (such as: smart watches, smart bracelets) ), smart home equipment (such as: TV), car machine (such as: car computer), smart screen, game console, smart speaker, smart projector, smart TV box, and augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) equipment, etc.
  • PDA personal digital assistant
  • wearable devices such as: smart watches, smart bracelets
  • smart home equipment such as: TV
  • car machine such as: car computer
  • smart screen such as: game console
  • smart speaker smart projector
  • smart TV box smart TV box
  • augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) equipment etc.
  • the embodiment of the present application does not impose special restrictions on the specific device form of the electronic device.
  • FIG. 2 shows a schematic structural diagram of an electronic device provided by an embodiment of the present application. That is, for example, the electronic device shown in FIG. 2 may be a mobile phone.
  • the electronic device can include a processor 210, an external memory interface 220, an internal memory 221, a universal serial bus (universal serial bus, USB) interface 230, a charging management module 240, a power management module 241, and a battery 242 , antenna 1, antenna 2, mobile communication module 250, wireless communication module 260, audio module 270, speaker 270A, receiver 270B, microphone 270C, earphone jack 270D, sensor module 280, button 290, motor 291, indicator 292, camera 293 , a display screen 294, and a subscriber identification module (subscriber identification module, SIM) card interface 295, etc.
  • SIM subscriber identification module
  • the sensor module 280 may include a pressure sensor 280A, a gyroscope sensor 280B, an air pressure sensor 280C, a magnetic sensor 280D, an acceleration sensor 280E, a distance sensor 280F, a proximity light sensor 280G, a fingerprint sensor 280H, a temperature sensor 280J, a touch sensor 280K, an environment Light sensor 280L, bone conduction sensor 280M, etc.
  • the structure shown in this embodiment does not constitute a specific limitation on the electronic device.
  • the electronic device may include more or fewer components than shown, or combine certain components, or separate certain components, or arrange different components.
  • the illustrated components can be realized in hardware, software or a combination of software and hardware.
  • the processor 210 may include one or more processing units, for example: the processor 210 may include an application processor (application processor, AP), a modem processor, a graphics processing unit (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, memory, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural network processor (neural-network processing unit, NPU) Wait. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
  • application processor application processor, AP
  • modem processor graphics processing unit
  • graphics processing unit graphics processing unit
  • ISP image signal processor
  • controller memory
  • video codec digital signal processor
  • DSP digital signal processor
  • baseband processor baseband processor
  • neural network processor neural-network processing unit, NPU
  • a controller can be the nerve center and command center of an electronic device.
  • the controller can generate an operation control signal according to the instruction operation code and the timing signal, and complete the control of obtaining and executing the instruction.
  • a memory may also be provided in the processor 210 for storing instructions and data.
  • the memory in processor 210 is a cache memory.
  • the memory may hold instructions or data that the processor 210 has just used or recycled. If the processor 210 needs to use the instruction or data again, it can be called directly from the memory. Repeated access is avoided, and the waiting time of the processor 210 is reduced, thereby improving the efficiency of the system.
  • processor 210 may include one or more interfaces.
  • the interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous transmitter (universal asynchronous receiver/transmitter, UART) interface, mobile industry processor interface (mobile industry processor interface, MIPI), general-purpose input and output (general-purpose input/output, GPIO) interface, subscriber identity module (subscriber identity module, SIM) interface, and /or universal serial bus (universal serial bus, USB) interface, etc.
  • I2C integrated circuit
  • I2S integrated circuit built-in audio
  • PCM pulse code modulation
  • PCM pulse code modulation
  • UART universal asynchronous transmitter
  • MIPI mobile industry processor interface
  • GPIO general-purpose input and output
  • subscriber identity module subscriber identity module
  • SIM subscriber identity module
  • USB universal serial bus
  • the charging management module 240 is configured to receive charging input from the charger.
  • the charger may be a wireless charger or a wired charger.
  • the charging management module 240 can receive the charging input of the wired charger through the USB interface 230 .
  • the charging management module 240 may receive wireless charging input through a wireless charging coil of the electronic device. While the charging management module 240 is charging the battery 242 , it can also supply power to the electronic device through the power management module 241 .
  • the power management module 241 is used for connecting the battery 242 , the charging management module 240 and the processor 210 .
  • the power management module 241 receives the input of the battery 242 and/or the charging management module 240, and supplies power for the processor 210, the internal memory 221, the external memory, the display screen 294, the camera 293, and the wireless communication module 260, etc.
  • the power management module 241 can also be used to monitor parameters such as battery capacity, battery cycle times, and battery health status (leakage, impedance).
  • the power management module 241 can also be set in the processor 210 .
  • the power management module 241 and the charging management module 240 may also be set in the same device.
  • the wireless communication function of the electronic device can be realized by the antenna 1, the antenna 2, the mobile communication module 250, the wireless communication module 260, the modem processor and the baseband processor.
  • Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in an electronic device can be used to cover a single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization of the antennas.
  • Antenna 1 can be multiplexed as a diversity antenna of a wireless local area network.
  • the antenna may be used in conjunction with a tuning switch.
  • the mobile communication module 250 can provide wireless communication solutions including 2G/3G/4G/5G applied to electronic devices.
  • the mobile communication module 250 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA) and the like.
  • the mobile communication module 250 can receive electromagnetic waves through the antenna 1, filter and amplify the received electromagnetic waves, and send them to the modem processor for demodulation.
  • the mobile communication module 250 can also amplify the signal modulated by the modem processor, convert it into electromagnetic wave and radiate it through the antenna 1 .
  • at least part of the functional modules of the mobile communication module 250 may be set in the processor 210 .
  • at least part of the functional modules of the mobile communication module 250 and at least part of the modules of the processor 210 may be set in the same device.
  • the wireless communication module 260 can provide wireless local area networks (wireless local area networks, WLAN) (such as wireless fidelity (Wi-Fi) network), bluetooth (bluetooth, BT), global navigation satellite system, etc. (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication solutions.
  • the wireless communication module 260 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 260 receives electromagnetic waves via the antenna 2 , frequency-modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 210 .
  • the wireless communication module 260 can also receive the signal to be sent from the processor 210 , frequency-modulate it, amplify it, and convert it into electromagnetic waves through the antenna 2 to radiate out.
  • the antenna 1 of the electronic device is coupled to the mobile communication module 250, and the antenna 2 is coupled to the wireless communication module 260, so that the electronic device can communicate with the network and other devices through wireless communication technology.
  • the wireless communication technology may include global system for mobile communications (GSM), general packet radio service (general packet radio service, GPRS), code division multiple access (code division multiple access, CDMA), broadband Code division multiple access (wideband code division multiple access, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (long term evolution, LTE), BT, GNSS, WLAN, NFC , FM, and/or IR techniques, etc.
  • GSM global system for mobile communications
  • GPRS general packet radio service
  • code division multiple access code division multiple access
  • CDMA broadband Code division multiple access
  • WCDMA wideband code division multiple access
  • time division code division multiple access time-division code division multiple access
  • TD-SCDMA time-division code division multiple access
  • LTE
  • the GNSS may include a global positioning system (global positioning system, GPS), a global navigation satellite system (global navigation satellite system, GLONASS), a Beidou navigation satellite system (beidou navigation satellite system, BDS), a quasi-zenith satellite system (quasi -zenith satellite system (QZSS) and/or satellite based augmentation systems (SBAS).
  • GPS global positioning system
  • GLONASS global navigation satellite system
  • Beidou navigation satellite system beidou navigation satellite system
  • BDS Beidou navigation satellite system
  • QZSS quasi-zenith satellite system
  • SBAS satellite based augmentation systems
  • the electronic device realizes the display function through the GPU, the display screen 294, and the application processor.
  • the GPU is a microprocessor for image processing, and is connected to the display screen 294 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering.
  • Processor 210 may include one or more GPUs that execute program instructions to generate or change display information.
  • the display screen 294 is used to display images, videos and the like.
  • Display 294 includes a display panel.
  • the display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active matrix organic light emitting diode or an active matrix organic light emitting diode (active-matrix organic light emitting diode, AMOLED), flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light emitting diodes (quantum dot light emitting diodes, QLED), etc.
  • the electronic device may include 1 or N display screens 294, where N is a positive integer greater than 1.
  • the electronic device can realize the shooting function through ISP, camera 293 , video codec, GPU, display screen 294 and application processor.
  • Digital signal processors are used to process digital signals. In addition to digital image signals, they can also process other digital signals. For example, when an electronic device selects a frequency point, a digital signal processor is used to perform Fourier transform on the frequency point energy, etc.
  • Video codecs are used to compress or decompress digital video.
  • An electronic device may support one or more video codecs.
  • the electronic device can play or record video in multiple encoding formats, for example: moving picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
  • the NPU is a neural-network (NN) computing processor.
  • NPU neural-network
  • Applications such as intelligent cognition of electronic devices can be realized through NPU, such as: image recognition, face recognition, speech recognition, text understanding, etc.
  • the internal memory 221 may be used to store computer-executable program codes including instructions.
  • the processor 210 executes various functional applications and data processing of the electronic device by executing instructions stored in the internal memory 221 .
  • the internal memory 221 may include an area for storing programs and an area for storing data.
  • the stored program area can store an operating system, at least one application program required by a function (such as a sound playing function, an image playing function, etc.) and the like.
  • the storage data area can store data (such as audio data, phone book, etc.) created during the use of the electronic device.
  • the internal memory 221 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (universal flash storage, UFS) and the like.
  • the electronic device can realize the audio function through the audio module 270, the speaker 270A, the receiver 270B, the microphone 270C, the earphone interface 270D, and the application processor. Such as music playback, recording, etc.
  • the audio module 270 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signal.
  • the audio module 270 may also be used to encode and decode audio signals.
  • the audio module 270 can be set in the processor 210 , or some functional modules of the audio module 270 can be set in the processor 210 .
  • Speaker 270A also referred to as a "horn" is used to convert audio electrical signals into sound signals.
  • the electronic device can listen to music through speaker 270A, or listen to hands-free calls.
  • Receiver 270B also called “earpiece” is used to convert audio electrical signals into audio signals.
  • the receiver 270B can be placed close to the human ear to listen to the voice.
  • the microphone 270C also called “microphone” or “microphone” is used to convert sound signals into electrical signals.
  • the user can make a sound by approaching the microphone 270C through the human mouth, and input the sound signal into the microphone 270C.
  • the electronic device may be provided with at least one microphone 270C.
  • the electronic device can be provided with two microphones 270C, which can also implement a noise reduction function in addition to collecting sound signals.
  • the electronic device can also be provided with three, four or more microphones 270C to realize the collection of sound signals, noise reduction, identification of sound sources, and realization of directional recording functions, etc.
  • Touch sensor 280K also known as "touch panel”.
  • the touch sensor 280K can be arranged on the display screen 294, and the touch sensor 280K and the display screen 294 form a touch screen, also called “touch screen”.
  • the touch sensor 280K is used to detect a touch operation on or near it.
  • the touch sensor can pass the detected touch operation to the application processor to determine the type of touch event.
  • Visual output related to touch operations can be provided through the display screen 294 .
  • the touch sensor 280K may also be disposed on the surface of the electronic device, which is different from the position of the display screen 294 .
  • the keys 290 include a power key, a volume key and the like.
  • the key 290 may be a mechanical key. It can also be a touch button.
  • the electronic device can receive key input and generate key signal input related to user settings and function control of the electronic device.
  • the motor 291 can generate a vibrating reminder.
  • the motor 291 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback.
  • touch operations applied to different applications may correspond to different vibration feedback effects.
  • the motor 291 can also correspond to different vibration feedback effects for touch operations acting on different areas of the display screen 294 .
  • Different application scenarios for example: time reminder, receiving information, alarm clock, games, etc.
  • the touch vibration feedback effect can also support customization.
  • FIG. 2 is only an exemplary description when the form of the electronic device is a mobile phone.
  • the electronic device is a tablet computer, handheld computer, PC, PDA, wearable device (such as: smart watch, smart bracelet), smart home equipment (such as: TV), car machine (such as: vehicle computer), smart screen , game consoles, AR/VR devices, and other device forms
  • the structure of the electronic device may include fewer structures than those shown in Figure 2, or may include more structures than those shown in Figure 2, and there is no limitation here .
  • FIG. 3 shows a schematic flowchart of a method and device for playing sound provided by an embodiment of the present application.
  • the method for playing sound may include the following steps S301 to S303.
  • the electronic device When the user opens (or starts) a certain application program (such as the first application program) and is ready to use, the electronic device (such as a mobile phone) can determine the default sound effect corresponding to the application program according to the category of the application program opened by the user . For example, taking a mobile phone as an example, the mobile phone may perform the following S301.
  • the mobile phone determines a default sound effect (or called the first sound effect) corresponding to the application program according to the type of the application program started by the user.
  • different application programs may be classified, and different sound effects (that is, default sound effects) are correspondingly determined for different types of application programs.
  • the corresponding relationship between the category of the application program and the default sound effect of the application program may be preset.
  • the mobile phone can obtain the package name (or name) of the application program, and then determine the category to which the application program belongs according to the package name (or name) of the application program. Therefore, the default sound effect corresponding to the application program is determined according to the determined category of the application program and the above-mentioned preset correspondence relationship.
  • the mobile phone determines the category of the application program, which may be a preset list of application program categories including the application package name (or name), so that the mobile phone can determine the application program according to the package name (or name) of the application program by querying the list. category. It is also possible to obtain the attribute information (such as the file size, category, developer information, version information, etc.) of the application program in the application market according to the package name (or name) of the application program according to the mobile phone, and determine according to the attribute information The category of the application. Or the mobile phone can also intelligently identify the category of the application program according to the package name (or name) of the application program.
  • the attribute information such as the file size, category, developer information, version information, etc.
  • the sound effects may include game sound effects, audio sound effects (or called music sound effects), video sound effects, and the like.
  • the categories of application programs may include game category (that is, the category to which various game applications belong), music category (that is, the category to which applications mainly used to play music belong), video category (that is, the category to which applications mainly used to play videos belong categories) and other categories (that is, categories other than the above categories belong to other applications, such as news applications, chat applications, etc.).
  • the correspondence between the category of the application program and the default sound effect of the application program may be that the default sound effect corresponding to the application program whose category is game is the game sound effect.
  • the default sound effect corresponding to an application whose category is music is audio sound effect.
  • the default sound effect corresponding to the video application is video sound effect.
  • the default sound effect corresponding to applications whose category is other is audio sound effect.
  • the mobile phone obtains the package names (or names) of the applications, it can directly The application program package name (or name) determines the default sound effect corresponding to the application program according to the above correspondence.
  • the electronic device can determine the sound effect (or called the second sound effect) corresponding to the current sound playing scene of the electronic device according to the frame rate of the display screen. For example, taking a mobile phone as an example, the mobile phone may perform the following S302.
  • the mobile phone determines the sound effect (or called the second sound effect) corresponding to the current sound playing scene of the mobile phone according to the frame rate of the current display image.
  • the frame rate of the display screen is the number of frames refreshed within one second of the current display screen of the mobile phone.
  • the frame rate of the current display image may also be acquired first.
  • the corresponding relationship between the frame rate of the display screen and the sound effect can be preset, so that the mobile phone can determine the corresponding sound effect for the current sound playing scene of the mobile phone according to the above corresponding relationship according to the frame rate of the current display screen.
  • the frame rate of the display screen is higher than or equal to the preset frame rate, such as 24Hz, 30Hz, etc. (usually the frame rate of the video is higher than or equal to 24Hz, so when the frame rate of the display screen is higher than or equal to 24Hz, it means The video is currently being displayed, that is, the video is being played, and the current sound playing scene of the mobile phone is a video playing scene), then the mobile phone can determine that the sound effect corresponding to the current sound playing scene (ie, the video playing scene) is a video sound effect.
  • the preset frame rate such as 24Hz, 30Hz, etc.
  • the frame rate of the display screen is less than 24Hz (usually the frame rate of the video is higher than or equal to 24Hz, so when the frame rate of the display screen is less than 24Hz, it means that there is no video in the screen currently being displayed on the mobile phone, and the mobile phone is only playing audio and sound, that is, the mobile phone If the current sound playing scene is an audio playing scene), the mobile phone may determine that the sound effect corresponding to the current sound playing scene (ie, the audio playing scene) is an audio sound effect.
  • the frame rate of the displayed screen is the highest frame rate supported by the current performance of the mobile phone (usually the frame rate of the game screen of the game application is the highest frame rate supported by the current performance of the mobile phone, so when the frame rate of the displayed screen is the highest frame rate supported by the current performance of the mobile phone
  • the highest frame rate indicates that the mobile phone is currently displaying the game screen, that is, the mobile phone is running a game application, and the current sound playback scene is the game scene)
  • the mobile phone can determine that the sound effect corresponding to the current sound playback scene is the game sound effect.
  • the mobile phone can also determine the size of the area that is constantly refreshed in the current display screen (that is, the dynamic area in the display screen) based on the frame rate of the current display screen. The sound of the scene plays the corresponding sound effect.
  • the frame rate of the display screen is higher than or equal to the preset frame rate, such as 24Hz (or 30Hz), and the area ratio of the constantly refreshed area in the display screen is greater than the preset ratio threshold of the screen display area of the mobile phone (for example, 50 %)) (when the frame rate is higher than 24Hz, it means that the mobile phone is currently playing video, and the constantly refreshing area in the display screen is the area where the video is displayed, so at this time, it means that the user is likely to be watching the video in full screen or focusing on it), Then the mobile phone can determine that the sound effect corresponding to the current sound playback scene is the video sound effect.
  • the preset frame rate such as 24Hz (or 30Hz)
  • the frame rate of the display screen is higher than or equal to 24Hz and the area of the constantly refreshed area in the display screen is less than half of the screen display area of the mobile phone (when the frame rate is higher than 24Hz, it means that the mobile phone is currently playing a video
  • the constantly refreshing area is the area where the video is displayed, so it means that the video currently playing on the mobile phone is likely to be the video in the information stream when the user uses the application to browse the information stream.
  • the mobile phone can determine that the sound effect corresponding to the current sound playback scene is the default sound effect (that is, the default sound effect determined in S301), that is, the mobile phone determines that the default sound effect is used to play the current sound, that is, the mobile phone determines that the sound effect corresponding to the current sound playback scene
  • the sound effect is the same as the default sound effect (ie, the first sound effect).
  • the mobile phone can determine the sound effect corresponding to the current sound playing scene It can also be determined as the default sound effect for the video sound effect. It should be noted that, in some other embodiments, when the area of the continuously refreshed area in the display screen is less than half of the display area of the screen, the mobile phone may also directly determine that the current corresponding sound effect is an audio sound effect.
  • the mobile phone displays the video being played in full screen.
  • the frame rate of the display screen of the mobile phone is equal to 24 Hz, and the area of the constantly refreshed area in the display screen is larger than half of the screen display area of the mobile phone. Therefore, at this time, the mobile phone can determine that the sound effect corresponding to the current sound playback scene is a video sound effect.
  • the mobile phone is displaying an information flow, and the information flow includes a video being played.
  • the frame rate of the mobile phone display screen is equal to 24Hz, and the area of the display area occupied by the video is less than Half of the display area of the mobile phone screen. Therefore, at this time, the mobile phone can determine that the sound effect corresponding to the current sound playback scene is the default sound effect, that is, the same as the default sound effect, or the mobile phone can directly determine that the audio sound effect is used for playback.
  • the mobile phone processes the sound data according to the determined sound effect parameters of the first sound effect or the determined sound effect parameters of the second sound effect, and then plays the sound data.
  • the sound effect parameters are control parameters of different frequency bands in the sound data.
  • the sound effect parameters may include subwoofer parameters used to control the loudness of the subwoofer range of the sound, bass parameters used to control the loudness of the middle and low frequency range of the sound, midrange parameters used to control the loudness of the mid-range range of the sound, Treble parameters that control the loudness of the high-frequency range in the sound and super-treble parameters that control the loudness of the super-high-frequency range in the sound, etc.
  • the higher the value of a parameter in the sound effect parameters the higher the loudness of the corresponding frequency band it controls.
  • corresponding sound effect parameters can be set for different sound effects according to professional sound effect tuning knowledge, or can be set according to the normal values of sound effect parameters of different sound effects, which will not be done here limit.
  • the values of treble and super treble parameters in the video sound effect are lower than other parameters, so that the loudness of the treble and super treble parts in the sound played by the video sound effect is lower, avoiding the noise in the video.
  • the treble and super treble ranges are amplified to reduce noise and reduce playback power consumption (saving power consumed by playback noise).
  • the mobile phone determines the default sound effect (i.e. the first sound effect) through S301, the sound effect can be loaded first. sound effects) are the same, the mobile phone can directly use the first sound effect to play the current sound (that is, use the second sound effect to play the current sound), without reloading the sound effect once. This saves the time required for sound effect loading and prevents the current sound from being interrupted by switching sound effects. If the determined second sound effect is different from the first sound effect, the second sound effect can be used to play the current sound, so as to improve the matching degree between the sound effect used by the current sound and the current sound playing scene.
  • the default sound effect i.e. the first sound effect
  • the mobile phone can directly use the first sound effect to play the current sound (that is, use the second sound effect to play the current sound), without reloading the sound effect once. This saves the time required for sound effect loading and prevents the current sound from being interrupted by switching sound effects. If the determined second sound effect is different from the first sound effect, the second sound effect can be used
  • the mobile phone when the mobile phone determines the sound effect corresponding to the current sound playing scene through S302 and the mobile phone uses the sound effect to play the sound, the mobile phone may not continue to determine the corresponding sound effect according to S302 until the sound content is played. sound effects. Therefore, when the frame rate of the display screen or the area of the constantly refreshed area in the display screen changes, the mobile phone is prevented from switching sound effects. It can also prevent the mobile phone from acquiring the frame rate of the display screen in real time when the mobile phone is playing the sound and increasing the power consumption.
  • the mobile phone may directly execute S303 instead of executing S302.
  • the mobile phone determines that the application program is a game application program according to the package name (or name) of the application program opened by the user, the mobile phone directly determines to use the game sound effect to play the sound in the application program (that is, to use the first sound effect to play the sound).
  • the sound effect corresponding to the current sound playback scene of the mobile phone is no longer determined in real time according to the frame rate of the display screen.
  • the mobile phone determines that the application program is a video application program according to the package name (or name) of the application program opened by the user, the mobile phone directly determines that the sound in the application program is played using video and sound effects, and no longer depends on the frame of the display screen.
  • the rate determines the sound effect corresponding to the current sound playback scene of the mobile phone in real time. In this way, the data processing pressure when the mobile phone runs game applications or video applications is reduced, the impact on mobile game and video performance is reduced, and power consumption is reduced.
  • the mobile phone can directly execute S302 instead of S301, that is, according to The frame rate of the current display screen of the mobile phone determines the corresponding sound effect (that is, the second sound effect), so that the current sound of the application program is played through the second sound effect.
  • the electronic device can automatically select and use the sound effect parameters of the corresponding sound effect according to the category of the application program used by the user and the current sound playback scene Playing the sound after processing the sound data, so that the sound played by the electronic device can be more suitable for the current sound playing scene, and improve the user experience when the electronic device plays the sound.
  • the embodiments of the present application further provide an apparatus for playing sound.
  • the apparatus can be applied to electronic equipment to implement the methods in the foregoing embodiments.
  • the functions of the device can be realized by hardware, and can also be realized by executing corresponding software by hardware.
  • Hardware or software includes one or more modules corresponding to the above-mentioned functions.
  • FIG. 6 shows a schematic structural diagram of an apparatus for playing sound. As shown in FIG. 6, the apparatus includes: a playback module 601, a processing module 602, and the like.
  • the playing module 601 can be used to play the sound of the current first application program according to the sound effect parameters of the first sound effect corresponding to the category of the first application program when the category of the first application program satisfies the preset condition;
  • the sound of the current first application program is played according to the sound effect parameters of the second sound effect corresponding to the frame rate of the current display screen.
  • the processing module 602 is configured to determine the first sound effect corresponding to the first application according to the category of the first application according to the preset correspondence between the category of the application and the sound effect; the playback module 601, specifically for playing the sound of the current first application program according to the sound effect parameters of the first sound effect.
  • the categories of application programs include games, videos, and music
  • the preset correspondence between the categories of applications and sound effects includes that the sound effects corresponding to the game category are game sound effects, and the corresponding sound effects of the video category are
  • the sound effects of the category are video sound effects, and the sound effects corresponding to the music category are audio sound effects.
  • the sound effect parameters of video sound effects, game sound effects, and audio sound effect configurations are different from each other.
  • the preset condition includes: the category of the first application program is any one of games, videos, and music; or, the category of the first application program is games or videos ; Or, the category of the first application program is a game category.
  • the processing module 602 is configured to determine the second sound effect corresponding to the first application program according to the frame rate of the current display screen; the playback module 601 is specifically configured to determine the second sound effect according to the sound effect parameters of the second sound effect Play the sound of the current first application.
  • the processing module 602 is specifically configured to determine that the second sound effect is a video sound effect when the frame rate is greater than or equal to the preset frame rate; Audio sound effects.
  • the processing module 602 is specifically configured to, when the frame rate is greater than or equal to the preset frame rate, and the area ratio of the continuously refreshed area in the current display screen is greater than the preset ratio threshold of the screen display area , determine that the second sound effect is a video sound effect; when the frame rate is greater than or equal to the preset frame rate, and the area ratio of the area that is constantly refreshed in the current display screen is less than the preset ratio threshold of the screen display area, determine that the second sound effect is Audio sound effect; when the frame rate is less than the preset frame rate, determine that the second sound effect is an audio sound effect.
  • the preset ratio threshold is 50%
  • the preset frame rate is 24Hz.
  • units in the above device is only a division of logical functions, and may be fully or partially integrated into a physical entity or physically separated during actual implementation.
  • the units in the device can all be implemented in the form of software called by the processing element; they can also be implemented in the form of hardware; some units can also be implemented in the form of software called by the processing element, and some units can be implemented in the form of hardware.
  • each unit can be a separate processing element, or it can be integrated in a certain chip of the device. In addition, it can also be stored in the memory in the form of a program, which is called and executed by a certain processing element of the device. Function. In addition, all or part of these units can be integrated together, or implemented independently.
  • the processing element described here may also be referred to as a processor, and may be an integrated circuit with a signal processing capability. In the process of implementation, each step of the above method or each unit above may be implemented by an integrated logic circuit of hardware in the processor element or implemented in the form of software called by the processing element.
  • the units in the above device may be one or more integrated circuits configured to implement the above method, for example: one or more ASICs, or, one or more DSPs, or, one or more FPGAs, Or a combination of at least two of these integrated circuit forms.
  • the processing element can be a general-purpose processor, such as a CPU or other processors that can call programs.
  • these units can be integrated together and implemented in the form of a system-on-a-chip (SOC).
  • the units of the above apparatus for implementing each corresponding step in the above method may be implemented in the form of a processing element scheduler.
  • the apparatus may include a processing element and a storage element, and the processing element invokes a program stored in the storage element to execute the methods described in the above method embodiments.
  • the storage element may be a storage element on the same chip as the processing element, that is, an on-chip storage element.
  • the program for executing the above method may be stored in a storage element on a different chip from the processing element, that is, an off-chip storage element.
  • the processing element invokes or loads a program from the off-chip storage element to the on-chip storage element, so as to invoke and execute the methods described in the above method embodiments.
  • an embodiment of the present application may also provide an apparatus, such as an electronic device, which may include a processor, and a memory configured to store instructions executable by the processor.
  • an electronic device which may include a processor, and a memory configured to store instructions executable by the processor.
  • the processor When the processor is configured to execute the above instructions, the electronic device implements the method for playing sound as described in the foregoing embodiments.
  • the memory can be located inside the electronic device or outside the electronic device.
  • the processor includes one or more.
  • the unit of the apparatus that implements each step in the above method may be configured as one or more processing elements, and these processing elements may be set on the corresponding electronic equipment described above, where the processing elements may be integrated circuits , for example: one or more ASICs, or one or more DSPs, or one or more FPGAs, or a combination of these types of integrated circuits. These integrated circuits can be integrated together to form a chip.
  • an embodiment of the present application further provides a chip, and the chip can be applied to the above-mentioned electronic device.
  • the chip includes one or more interface circuits and one or more processors; the interface circuits and processors are interconnected through lines; the processor receives and executes computer instructions from the memory of the electronic device through the interface circuits, so as to implement the method described in the above embodiment Methods.
  • An embodiment of the present application further provides a computer program product, including computer instructions executed by an electronic device, such as the above-mentioned electronic device.
  • the disclosed devices and methods may be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components can be Incorporation or may be integrated into another device, or some features may be omitted, or not implemented.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
  • the unit described as a separate component may or may not be physically separated, and the component displayed as a unit may be one physical unit or multiple physical units, that is, it may be located in one place, or may be distributed to multiple different places . Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
  • the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a readable storage medium.
  • the software product is stored in a program product, such as a computer-readable storage medium, and includes several instructions to make a device (which may be a single-chip microcomputer, a chip, etc.) or a processor (processor) execute all of the methods described in various embodiments of the present application. or partial steps.
  • the aforementioned storage medium includes: various media capable of storing program codes such as U disk, mobile hard disk, ROM, RAM, magnetic disk or optical disk.
  • the embodiments of the present application may also provide a computer-readable storage medium on which computer program instructions are stored.
  • the computer program instructions are executed by the electronic device, the electronic device is made to implement the method for playing sound as described in the foregoing method embodiments.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Human Computer Interaction (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Acoustics & Sound (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Telephone Function (AREA)

Abstract

一种播放声音的方法及设备,涉及人工智能领域,解决了无法对既可以播放视频又可以播放音乐的应用层程序按照对应音效播放相应声音的问题。具体方案为:手机根据用户启动的应用程序的类别确定该应用程序对应的默认音效(S301);手机根据当前的显示画面的帧率确定与手机当前的声音播放场景对应的音效(S302);手机根据确定出的第一音效的音效参数或者第二音效的音效参数对声音数据进行处理后播放(S303)。

Description

一种播放声音的方法及设备
本申请要求于2021年05月21日提交国家知识产权局、申请号为202110560657.3、申请名称为“一种播放声音的方法及设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请实施例涉及人工智能领域,尤其涉及一种播放声音的方法及设备。
背景技术
通常手机在播放声音时,可以根据某个音效的音效参数来对声音数据进行声音数字信号处理,从而使手机通过处理后的声音数据播放声音时能够达到特定的音效,即能够使手机采用特定的音效播放声音。以使手机播放的声音能够更加适合当前手机的声音播放场景,提升手机播放声音时的用户体验。
一般手机播放声音时的音效可以包括视频音效,游戏音效以及音乐音效等。其中,视频音效能够更加适合手机播放视频时的声音播放场景。游戏音效能够更加适合手机玩游戏时的声音播放场景。音乐音效能够更加适合手机播放音乐或播放背景声音时的声音播放场景。
目前手机在播放声音时,手机是根据应用程序的名称来查询手机播放该应用程序中的声音时的声音播放场景对应的音效,以使手机根据该音效播放应用程序中的声音。但是,若应用程序为综合类应用程序,如应用程序既可以播放视频也可以播放音乐等音频,则手机播放应用程序中的声音时的声音播放场景不止一种,手机无法根据应用程序的名称来查询出手机播放该应用程序中的声音时的声音播放场景对应的音效,只能使用默认的音效既播放该应用程序中视频的声音还播放音乐的声音。
发明内容
本申请实施例提供一种播放声音的方法及设备,解决了无法对既可以播放视频又可以播放音乐的应用层程序按照对应音效播放相应声音的问题。
为了达到上述目的,本申请实施例采用如下技术方案:
第一方面,本申请实施例提供一种播放声音的方法,该方法可以应用于电子设备。该方法包括:在第一应用程序的类别满足预设条件的情况下,根据与第一应用程序的类别对应的第一音效的音效参数播放当前第一应用程序的声音;在第一应用程序的类别不满足预设条件情况下,根据与当前的显示画面的帧率对应的第二音效的音效参数播放当前第一应用程序的声音。
采用上述技术方案,在用户使用电子设备上安装的应用程序的过程中,电子设备可根据用户使用的应用程序的类别以及当前的声音播放场景,自动选择并使用相应的音效的音效参数对声音数据进行处理后播放声音,从而使电子设备播放的声音能够更加适合当前的声音播放场景,提高电子设备播放声音时的用户体验。
在一种可能的实现方式中,根据与第一应用程序的类别对应的第一音效的音效参数播放当前第一应用程序的声音,包括:根据第一应用程序的类别按照预设的应用程序的类别与音效间的对应关系,确定第一应用程序对应的第一音效;根据第一音效的音效参数播放当前第一应用程序的声音。
如此,能够通过预设的应用程序的类别与音效间的对应关系,便捷的确定出相应的应用程序的第一音效,便于实施。
在另一种可能的实现方式中,应用程序的类别包括游戏类、视频类以及音乐类,预设的应用程序的类别与音效间的对应关系包括游戏类对应的音效为游戏音效,视频类对应的音效为视频音效,音乐类对应的音效为音频音效,其中,视频音效、游戏音效以及音频音效配置的音效参数互不相同。
如此,能够使不同类别的应用程序可以根据相应的音效的音效参数播放声音,提高应用程序的声音播放时的效果。
在另一种可能的实现方式中,预设条件包括:第一应用程序的类别为游戏类、视频类、音乐类中的任一种;或,第一应用程序的类别为游戏类或视频类;或,第一应用程序的类别为游戏类。
由于游戏类、视频类以及音乐类的应用程序的声音通常为单一类型。如,游戏类应用程序的声音通常为游戏声音,视频类应用程序的声音通常为视频声音,音乐类应用程序的声音通常为音频声音。因此,这些类型的应用程序的声音所需的音效相对明确且不会改变,所以这些类别的应用程序可直接根据应用程序的类别来确定音效并采用确定出的音效播放声音。而其他类型的应用程序的声音可能包括多种类型,如,其他类型的应用程序可以播放视频也可以播放音乐。因此,其他应用程序通过帧率确定音效并播放声音,能够根据应用程序当前播放声音的场景更准确的确定音效。
在另一种可能的实现方式中,根据与当前的显示画面的帧率对应的第二音效的音效参数播放当前第一应用程序的声音,包括:根据当前的显示画面的帧率,确定第一应用程序对应的第二音效;根据第二音效的音效参数播放当前第一应用程序的声音。
在另一种可能的实现方式中,根据当前的显示画面的帧率,确定第一应用程序对应的第二音效,包括:当帧率大于或等于预设帧率时确定第二音效为视频音效;当帧率小于预设帧率时确定第二音效为音频音效。由于显示画面在显示静态画面时帧率相对较低,因此当帧率大于预设帧率时,则可以确定当前的画面包括视频画面,因此可采用视频音效来播放当前的声音,从而使电子设备播放视频时播放的声音能够与视频声音场景更匹配。
在另一种可能的实现方式中,根据当前的显示画面的帧率,确定第一应用程序对应的第二音效,包括:当帧率大于或等于预设帧率,当前的显示画面中不断刷新的区域的面积占比大于屏幕显示面积的预设比例阈值时,确定第二音效为视频音效;当帧率大于或等于预设帧率,当前的显示画面中不断刷新的区域的面积占比小于屏幕显示面积的预设比例阈值时,确定第二音效为音频音效;当帧率小于预设帧率时确定第二音效为音频音效。
由于广告视频或信息流中的视频的声音用户并不会有较高的播放效果要求,因此,电子设备可以根据不断刷新的区域(即视频显示区域)的大小进一步确定出当前是否播放广告视频或信息流中的视频(如当前的显示画面中不断刷新的区域的面积占比小于屏幕显示面积的预设比例阈值时说明正在播放广告视频或信息流中的视频),从而更加准确的确定音效。
在另一种可能的实现方式中,预设比例阈值为50%,预设帧率为24Hz。
第二方面,本申请实施例提供一种播放声音的装置,该装置可以应用于电子设备,用于实现上述第一方面中的方法。该装置的功能可以通过硬件实现,也可以通过硬件执 行相应的软件实现。硬件或软件包括一个或多个与上述功能相对应的模块,例如,播放模块,处理模块等。
其中,播放模块,可用于在第一应用程序的类别满足预设条件的情况下,根据与第一应用程序的类别对应的第一音效的音效参数播放当前第一应用程序的声音;在第一应用程序的类别不满足预设条件情况下,根据与当前的显示画面的帧率对应的第二音效的音效参数播放当前第一应用程序的声音。
在一种可能的实现方式中,处理模块,用于根据第一应用程序的类别按照预设的应用程序的类别与音效间的对应关系,确定第一应用程序对应的第一音效;播放模块,具体用于根据第一音效的音效参数播放当前第一应用程序的声音。
在另一种可能的实现方式中,应用程序的类别包括游戏类、视频类以及音乐类,预设的应用程序的类别与音效间的对应关系包括游戏类对应的音效为游戏音效,视频类对应的音效为视频音效,音乐类对应的音效为音频音效,其中,视频音效、游戏音效以及音频音效配置的音效参数互不相同。
在另一种可能的实现方式中,预设条件包括:第一应用程序的类别为游戏类、视频类、音乐类中的任一种;或,第一应用程序的类别为游戏类或视频类;或,第一应用程序的类别为游戏类。
在另一种可能的实现方式中,处理模块,用于根据当前的显示画面的帧率,确定第一应用程序对应的第二音效;播放模块,具体用于根据第二音效的音效参数播放当前第一应用程序的声音。
在另一种可能的实现方式中,处理模块,具体用于当帧率大于或等于预设帧率时确定第二音效为视频音效;当帧率小于预设帧率时确定第二音效为音频音效。
在另一种可能的实现方式中,处理模块,具体用于当帧率大于或等于预设帧率,当前的显示画面中不断刷新的区域的面积占比大于屏幕显示面积的预设比例阈值时,确定第二音效为视频音效;当帧率大于或等于预设帧率,当前的显示画面中不断刷新的区域的面积占比小于屏幕显示面积的预设比例阈值时,确定第二音效为音频音效;当帧率小于预设帧率时确定第二音效为音频音效。
在另一种可能的实现方式中,预设比例阈值为50%,预设帧率为24Hz。
第三方面,本申请实施例提供一种电子设备,包括:处理器,用于存储该处理器可执行指令的存储器。该处理器被配置为执行上述指令时,使得该电子设备实现如第一方面或第一方面的可能的实现方式中任一项所述的播放声音的方法。
第四方面,本申请实施例提供一种计算机可读存储介质,其上存储有计算机程序指令。当计算机程序指令被电子设备执行时,使得电子设备实现如第一方面或第一方面的可能的实现方式中任一项所述的播放声音的方法。
第五方面,本申请实施例提供一种计算机程序产品,包括计算机可读代码,当计算机可读代码在电子设备中运行时,使得电子设备实现如第一方面或第一方面的可能的实现方式中任一项所述的播放声音的方法。
应当理解的是,上述第二方面至第五方面的有益效果可以参见上述第一方面中的相关描述,在此不再赘述。
附图说明
图1为本申请实施例提供的一种播放声音的方法的应用场景示意图;
图2为本申请实施例提供的一种电子设备的结构示意图;
图3为本申请实施例提供的一种播放声音的方法的流程示意图;
图4为本申请实施例提供的一种播放声音的方法应用时的场景示意图;
图5为本申请实施例提供的另一种播放声音的方法应用时的场景示意图;
图6为本申请实施例提供的一种播放声音的装置的结构示意图。
具体实施方式
随着互联网的快速发展,可在电子设备(如,手机、平板、笔记本电脑等)上安装以供用户使用的应用程序(application,APP)越来越丰富。各种各样的应用程序为电子设备提供了丰富的功能。当用户通过应用程序在电子设备上看视频或听音乐又或者玩游戏时,通常电子设备会伴随用户的使用而播放声音。
例如,用户可以在电子设备上安装音乐类应用程序,然后使用音乐类应用程序在电子设备上播放音乐时,电子设备会播放音乐的声音。或者,用户可以在电子设备上安装视频类应用程序,然后使用视频类应用程序在电子设备上播放视频,此时电子设备会播放视频中的声音。又或者,用户可以在电子设备上安装游戏类应用程序,然后使用游戏类应用程序在电子设备上游玩游戏时,电子设备会播放游戏中的声音。又或者,用户可以在电子设备上安装社交类应用程序,然后使用电子设备通过社交类应用程序在网络发布或查看信息(如,博客、动态等)或与其他人聊天。当用户查看的信息或与其他人聊天的内容中有播放的视频或音频时,电子设备也会播放声音。又或者,用户可以在电子设备上安装资讯类应用程序,然后使用资讯类应用程序在电子设备上浏览资讯(如新闻等)时,若用户浏览的资讯为音频或视频时,电子设备也会播放相应的音频或视频的声音。
通常电子设备在播放声音时,电子设备可以根据当前的应用程序的名称来确定电子设备播放当前应用程序的声音时的声音播放场景(如,视频播放场景,音频播放场景,游戏场景等),从而选择与其相对应的音效。电子设备可以根据选择的音效的音效参数来对声音数据进行声音数字信号处理,从而使电子设备根据选择的与声音播放场景对应的音效来播放声音。使电子设备播放的声音更加适合当前的声音播放场景,提升电子设备播放声音时的用户体验。例如,电子设备的音效可以包括视频音效,音频音效和游戏音效等。当用户使用电子设备上安装的视频类应用程序观看视频时,电子设备可以根据用户使用的视频类应用程序的名称确定播放当前应用程序的声音时的声音播放场景为视频播放场景,从而选择视频音效。电子设备根据选择的视频音效对应的音效参数对正在播放的视频的声音数据进行处理后播放,便能够采用视频音效来播放正在播放的视频中的声音。使电子设备播放的声音能够更加适合视频播放场景。当用户使用电子设备上安装的音乐类应用程序听音乐时,电子设备可以根据用户使用的音乐类应用程序的名称确定播放当前应用程序的声音时的声音播放场景为音频播放场景,从而选择音频音效。电子设备根据选择的音频音效对应的音效参数对正在播放的音乐的声音数据进行处理后播放,便能够采用音频音效来播放正在播放的音乐的声音。使电子设备播放的声音能够更加适合音频播放场景。当用户使用电子设备上安装的游戏类应用程序游玩游戏时,电子设备可以根据用户使用的游戏类应用程序的名称确定播放当前应用程序的声音时的声音播放场景为游戏场景,从而选择游戏音效。电子设备根据选择的游戏音效对应的音效参数对正在运行的游戏的声音数据进行处理后播放,便能够采用游戏音效来播放正在运行的游戏的声音。使电子设备播放的声音能够更加适合游戏场景。
由以上可以看到,目前电子设备在播放声音时,电子设备是根据应用程序的名称来 确定播放该应用程序时的声音播放场景及对应的音效的。但是,若应用程序为综合类应用程序,如应用程序既可以播放视频也可以播放音乐等音频,则电子设备播放应用程序中的声音时的声音播放场景不止一种,电子设备将无法根据应用程序的名称来确定出播放该应用程序时的声音播放场景,只能使用默认的音效播放该应用程序中视频的声音或音乐的声音。
为了解决上述问题,本申请实施例提供了一种播放声音的方法。该方法可以应用于用户在使用电子设备上安装的应用程序的过程中电子设备播放应用程序中的声音的场景中。例如,图1示出了本申请实施例提供的一种播放声音的方法的应用场景示意图。如图1所示,当用户在使用电子设备(如,图中所示的手机)上安装的视频类应用程序观看视频时,电子设备可显示视频的画面并播放视频中的声音。在该场景中,电子设备便可以采用本申请实施例提供的播放声音的方法来采用与视频播放场景相适应的音效播放视频中的声音。
该播放声音的方法可以包括,在应用程序(如第一应用程序)的类别满足预设条件的情况下,根据与该应用程序的类别对应的第一音效的音效参数播放当前应用程序的声音;在应用程序的类别不满足预设条件情况下,根据与当前的显示画面的帧率对应的第二音效的音效参数播放当前第一应用程序的声音。例如,当用户打开电子设备上安装的某个应用程序(如,第一应用程序)时,电子设备可以根据用户打开的该应用程序的类别来确定电子设备播放该应用程序中的声音时的默认音效(或称为第一音效)。当电子设备正在运行用户打开的应用程序时,电子设备可以根据显示画面的帧率来确定与当前的声音播放场景对应的音效(或称为第二音效),以使电子设备在播放用户打开的应用程序中的声音时,能够根据确定出的该应用程序对应的第一音效或第二音效来播放声音。其中,当确定出的第二音效与第一音效相同时,则电子设备可以直接采用第一音效来播放当前声音播放场景下的声音,不需要再次加载相应的音效。
需要说明的是,声音播放场景即电子设备播放声音时电子设备的应用场景。如,电子设备仅播放音频声音(如音乐、播客、广播、有声书等)时,电子设备当前的声音播放场景为音频播放场景。电子设备播放视频(如短视频、电影、电视节目等)中的声音时,电子设备当前的声音播放场景为视频播放场景。电子设备运行游戏类应用程序时播放游戏中的声音时,电子设备当前的声音播放场景为游戏场景。
通常音效可以包括音频音效、视频音效和游戏音效等,不同的音效其音效参数不同(即不同的音效配置的音效参数不同)。音效和声音播放场景之间可以一一对应。如,音频播放场景与音频音效对应,视频播放场景与视频音效对应,游戏场景与游戏音效对应。电子设备可以按照该对应关系根据声音播放场景来确定相应的音效。
如此,在用户使用电子设备上安装的应用程序的过程中,电子设备可根据用户使用的应用程序的类别以及当前的声音播放场景,自动选择并使用相应的音效的音效参数对声音数据进行处理后播放声音,从而使电子设备播放的声音能够更加适合当前的声音播放场景,提高电子设备播放声音时的用户体验。
以下,将结合附图对本申请实施例提供的播放声音的方法进行说明。
在本申请实施例中,上述电子设备,可以是手机、平板电脑、手持计算机,PC,蜂窝电话,个人数字助理(personal digital assistant,PDA),可穿戴式设备(如:智能手表、智能手环),智能家居设备(如:电视机),车机(如:车载电脑),智慧屏,游戏机,智能音箱,智能投影仪,智能电视盒,以及增强现实(augmented reality,AR)/ 虚拟现实(virtual reality,VR)设备等。本申请实施例对于电子设备的具体设备形态不作特殊限制。
示例地,以电子设备为手机为例,图2示出了本申请实施例提供的一种电子设备的结构示意图。也即,示例性的,图2所示的电子设备可以是手机。
如图2所示,该电子设备可以包括处理器210,外部存储器接口220,内部存储器221,通用串行总线(universal serial bus,USB)接口230,充电管理模块240,电源管理模块241,电池242,天线1,天线2,移动通信模块250,无线通信模块260,音频模块270,扬声器270A,受话器270B,麦克风270C,耳机接口270D,传感器模块280,按键290,马达291,指示器292,摄像头293,显示屏294,以及用户标识模块(subscriber identification module,SIM)卡接口295等。其中,传感器模块280可以包括压力传感器280A,陀螺仪传感器280B,气压传感器280C,磁传感器280D,加速度传感器280E,距离传感器280F,接近光传感器280G,指纹传感器280H,温度传感器280J,触摸传感器280K,环境光传感器280L,骨传导传感器280M等。
可以理解的是,本实施例示意的结构并不构成对电子设备的具体限定。在另一些实施例中,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
处理器210可以包括一个或多个处理单元,例如:处理器210可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。
控制器可以是电子设备的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成获取指令和执行指令的控制。
处理器210中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器210中的存储器为高速缓冲存储器。该存储器可以保存处理器210刚用过或循环使用的指令或数据。如果处理器210需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器210的等待时间,因而提高了系统的效率。
在一些实施例中,处理器210可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。
充电管理模块240用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块240可以通过USB接口230接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块240可以通过电子设备的无线充电线圈接收无线充电输入。充电管理模块240为电池242充电的同时,还可以通过电源管理模块241为电子设备供电。
电源管理模块241用于连接电池242,充电管理模块240与处理器210。电源管理模 块241接收电池242和/或充电管理模块240的输入,为处理器210,内部存储器221,外部存储器,显示屏294,摄像头293,和无线通信模块260等供电。电源管理模块241还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块241也可以设置于处理器210中。在另一些实施例中,电源管理模块241和充电管理模块240也可以设置于同一个器件中。
电子设备的无线通信功能可以通过天线1,天线2,移动通信模块250,无线通信模块260,调制解调处理器以及基带处理器等实现。
天线1和天线2用于发射和接收电磁波信号。电子设备中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。
移动通信模块250可以提供应用在电子设备上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块250可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块250可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块250还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块250的至少部分功能模块可以被设置于处理器210中。在一些实施例中,移动通信模块250的至少部分功能模块可以与处理器210的至少部分模块被设置在同一个器件中。
无线通信模块260可以提供应用在电子设备上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块260可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块260经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器210。无线通信模块260还可以从处理器210接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。
在一些实施例中,电子设备的天线1和移动通信模块250耦合,天线2和无线通信模块260耦合,使得电子设备可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(code division multiple access,CDMA),宽带码分多址(wideband code division multiple access,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。所述GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。
电子设备通过GPU,显示屏294,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏294和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器210可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。
显示屏294用于显示图像,视频等。显示屏294包括显示面板。显示面板可以采用 液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,电子设备可以包括1个或N个显示屏294,N为大于1的正整数。
电子设备可以通过ISP,摄像头293,视频编解码器,GPU,显示屏294以及应用处理器等实现拍摄功能。
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当电子设备在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。
视频编解码器用于对数字视频压缩或解压缩。电子设备可以支持一种或多种视频编解码器。这样,电子设备可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现电子设备的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。
内部存储器221可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。处理器210通过运行存储在内部存储器221的指令,从而执行电子设备的各种功能应用以及数据处理。内部存储器221可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器221可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。
电子设备可以通过音频模块270,扬声器270A,受话器270B,麦克风270C,耳机接口270D,以及应用处理器等实现音频功能。例如音乐播放,录音等。
音频模块270用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块270还可以用于对音频信号编码和解码。在一些实施例中,音频模块270可以设置于处理器210中,或将音频模块270的部分功能模块设置于处理器210中。
扬声器270A,也称“喇叭”,用于将音频电信号转换为声音信号。电子设备可以通过扬声器270A收听音乐,或收听免提通话。
受话器270B,也称“听筒”,用于将音频电信号转换成声音信号。当电子设备接听电话或语音信息时,可以通过将受话器270B靠近人耳接听语音。
麦克风270C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息或需要通过语音助手触发电子设备执行某些事件时,用户可以通过人嘴靠近麦克风270C发声,将声音信号输入到麦克风270C。电子设备可以设置至少一个麦克风270C。在另一些实施例中,电子设备可以设置两个麦克风270C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,电子设备还可以设置三个,四个或更多麦克风270C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能 等。
触摸传感器280K,也称“触控面板”。触摸传感器280K可以设置于显示屏294,由触摸传感器280K与显示屏294组成触摸屏,也称“触控屏”。触摸传感器280K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏294提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器280K也可以设置于电子设备的表面,与显示屏294所处的位置不同。
按键290包括开机键,音量键等。按键290可以是机械按键。也可以是触摸式按键。电子设备可以接收按键输入,产生与电子设备的用户设置以及功能控制有关的键信号输入。
马达291可以产生振动提示。马达291可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏294不同区域的触摸操作,马达291也可对应不同的振动反馈效果。不同的应用场景(例如:时间提醒,接收信息,闹钟,游戏等)也可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。
当然,可以理解的,上述图2所示仅仅为电子设备的形态为手机时的示例性说明。若电子设备是平板电脑,手持计算机,PC,PDA,可穿戴式设备(如:智能手表、智能手环),智能家居设备(如:电视机),车机(如:车载电脑),智慧屏,游戏机以及AR/VR设备等其他设备形态时,电子设备的结构中可以包括比图2中所示更少的结构,也可以包括比图2中所示更多的结构,在此不作限制。
以下实施例中的方法均可以在具有上述硬件结构的电子设备中实现。下面将结合附图对本申请实施例进行举例说明。
以电子设备为手机为例,图3示出了本申请实施例提供的一种播放声音的方法及设备的流程示意图。如图3所示,该播放声音的方法可以包括以下S301至S303。
当用户打开(或者说启动)某个应用程序(如第一应用程序)准备使用时,电子设备(如,手机)可以根据用户打开的该应用程序的类别确定出对应于该应用程序的默认音效。例如以手机为例,手机可以执行以下S301。
S301、手机根据用户启动的应用程序的类别确定该应用程序对应的默认音效(或称为第一音效)。
在一些可能地实施方式中,可以对不同的应用程序进行归类,并对不同类别的应用程序对应确定不同的音效(即默认音效)。例如,可以预设应用程序的类别和应用程序的默认音效的对应关系。手机可以获取应用程序的包名(或名称),然后根据应用程序的包名(或名称)确定应用程序所属的类别。从而根据确定出的应用程序的类别和预设的上述对应关系确定应用程序对应的默认音效。其中,手机确定应用程序的类别,可以是预设包括应用程序包名(或名称)的应用程序类别名单,使手机可以通过查询该名单的方式根据应用程序的包名(或名称)确定应用程序的类别。还可以是根据手机根据应用程序的包名(或名称)在应用市场中获取该应用程序的属性信息(如,应用程序的文件大小、类别、开发者信息、版本信息等),根据属性信息确定该应用程序的类别。又或者手机还可以根据应用程序的包名(或名称)智能识别该应用程序的类别。
示例地,音效可以包括游戏音效、音频音效(或称为音乐音效)和视频音效等。应用程序的类别可以包括游戏类(即各种游戏应用程序所属的类别)、音乐类(即主要用 于播放音乐的应用程序所属的类别)、视频类(即主要用于播放视频的应用程序所属的类别)以及其他类(即除以上类别外的其他应用程序所属的类别,如新闻应用程序,聊天应用程序等)。应用程序的类别和应用程序的默认音效间的对应关系可以是,类别为游戏类的应用程序对应的默认音效为游戏音效。类别为音乐类的应用程序对应的默认音效为音频音效。类别为视频类的应用程序对应的默认音效为视频音效。类别为其他类的应用程序对应的默认音效为音频音效。
在另一些可能的实施方式中,还可以直接预设不同应用程序的包名(或名称)和应用程序的默认音效的对应关系,手机获取应用程序的包名(或名称)后,可以直接根据该应用程序包名(或名称)按照上述对应关系确定出该应用程序对应的默认音效。
当用户使用其启动的应用程序时,电子设备可以根据显示画面的帧率确定与电子设备当前的声音播放场景对应的音效(或称为第二音效)。例如以手机为例,手机可以执行以下S302。
S302、手机根据当前的显示画面的帧率确定与手机当前的声音播放场景对应的音效(或称为第二音效)。
其中,显示画面的帧率即为手机当前显示画面一秒钟内刷新的帧数。可选地,在S302之前,还可以先获取当前的显示画面的帧率。
示例地,可以预设显示画面的帧率与音效之间的对应关系,以使手机能够根据当前的显示画面的帧率按照上述对应关系确定出于手机当前的声音播放场景对应的音效。
例如,显示画面的帧率高于或等于预设帧率,如,24Hz、30Hz等时(通常视频的帧率高于或等于24Hz,因此当显示画面的帧率高于或等于24Hz时说明手机当前正在显示视频,即正在播放视频,手机当前的声音播放场景为视频播放场景),则手机可以确定与当前的声音播放场景(即视频播放场景)对应的音效为视频音效。显示画面的帧率小于24Hz时(通常视频的帧率高于或等于24Hz,因此当显示画面的帧率小于24Hz时说明手机当前正在显示的画面中没有视频,手机仅在播放音频声音,即手机当前的声音播放场景为音频播放场景),则手机可以确定与当前的声音播放场景(即音频播放场景)对应的音效为音频音效。显示画面的帧率为手机当前性能下支持的最高帧率时(通常游戏应用程序的游戏画面的帧率为手机当前性能下支持的最高帧率,因此当显示画面的帧率为手机当前性能的最高帧率时说明手机当前正在显示游戏画面,即手机正在运行游戏应用,当前的声音播放场景为游戏场景),则手机可以确定与当前的声音播放场景对应的音效为游戏音效。
在一些可能的实施方式中,基于上述示例,手机还可以在当前显示画面的帧率的基础上结合当前显示画面中不断刷新的区域(即显示画面中的动态区域)的尺寸大小来确定与当前的声音播放场景对应的音效。
例如,当显示画面的帧率高于或等于预设帧率,如24Hz(或30Hz)且显示画面中不断刷新的区域的面积占比大于手机的屏幕显示面积的预设比例阈值(如,50%)时(当帧率高于24Hz时则说明手机当前正在播放视频,显示画面中不断刷新的区域即为显示视频的区域,因此此时说明用户很有可能正在全屏或专注于观看视频),则手机可以确定与当前的声音播放场景对应的音效为视频音效。而当显示画面的帧率高于或等于24Hz且显示画面中不断刷新的区域的面积小于手机的屏幕显示面积的一半时(当帧率高于24Hz时则说明手机当前正在播放视频,显示画面中不断刷新的区域即为显示视频的区域,因此说明手机当前正在播放的视频很可能是用户使用应用程序在浏览信息流时信息流中 的视频,此时用户浏览较快且对视频音效要求不高;或者,一般应用程序中的广告视频的显示区域会很小,因此当显示画面中不断刷新的区域的面积小于手机屏幕显示面积的一半时,说明当前显示的视频很有可能是广告视频),则手机可以确定与当前的声音播放场景对应的音效为默认音效(即S301中确定的默认音效),即手机确定后续采用默认音效播放当前的声音,也即手机确定与当前的声音播放场景对应的音效与默认音效(即第一音效)相同。其中,当显示画面的帧率高于或等于24Hz(或30Hz)且当显示画面中不断刷新的区域的面积等于手机的屏幕显示面积的一半时,手机可以确定与当前的声音播放场景对应的音效为视频音效也可以确定为默认音效。需要说明的是,在一些其他实施例中,当显示画面中不断刷新的区域的面积小于屏幕显示面积的一半时,手机也可以直接确定当前对应的音效为音频音效。
示例地,如图4所示,手机全屏显示正在播放的视频。此时手机的显示画面的帧率等于24Hz,且显示画面中不断刷新的区域的面积大于手机的屏幕显示面积的一半。所以此时手机可以确定当前的声音播放场景对应的音效为视频音效。
又例如,如图5所示,手机在显示信息流,该信息流中包括有一个正在播放的视频,此时,手机显示画面的帧率等于24Hz,且该视频所占的显示区域的面积小于手机屏幕的显示面积的一半。所以此时手机可以确定当前的声音播放场景对应的音效为默认音效,即与默认音效相同,或者手机可以直接确定采用音频音效播放。
S303、手机根据确定出的第一音效的音效参数或者第二音效的音效参数对声音数据进行处理后播放。
其中,音效参数即声音数据中不同频段的控制参数。通过调整音效参数能够使电子设备播放出的声音中不同频段的响度得到调整。例如,音效参数可以包括用于控制声音中重低音频段响度高低的重低音参数、用于控制声音中低音频段响度高低的低音参数、用于控制声音中音频段响度高低的中音参数、用于控制声音中高音频段响度高低的高音参数以及用于控制声音中超高音频段响度高低的超高音参数等,通常音效参数中的某个参数的值越高则其控制的相应的频段的响度越高。不同的音效对应有不同的音效参数,在本申请实施例中可以根据专业的音效调音知识来对不同音效设置相应的音效参数,或根据不同音效的音效参数常规值来设置,此处不做限制。例如,视频音效中高音参数和超高音参数的值相比于其他参数的值较低,使采用视频音效播放的声音中高音频段和超高音频段的部分响度较低,避免视频中噪音占多数的高音频段和超高音频段被放大,从而减小噪音并降低播放功耗(节省了播放噪音消耗的功耗)。
作为一种示例,手机通过S301确定出默认音效(即第一音效)后可以先加载该音效,若手机确定出的默认音效和通过S302确定出的与当前声音播放场景对应的音效(即第二音效)相同时,手机可以直接采用第一音效来播放当前声音(也即采用第二音效播放当前声音),不需要重新加载一次音效。从而节省音效加载所需的时间,避免当前声音因为切换音效而中断。若确定出的第二音效与第一音效不同时,则可以采用第二音效来播放当前声音,提高当前声音采用的音效与当前的声音播放场景的匹配度。
在一些可能的实施方式中,当手机通过S302确定出了与当前的声音播放场景对应的音效且手机采用该音效播放声音后,直到该声音内容播放完之前,手机可以不再继续按照S302确定相应的音效。从而避免因显示画面的帧率或显示画面中不断刷新的区域的面积发生变化时,手机切换音效。也能够避免手机播放声音时手机还在实时获取显示画面的帧率而增加功耗。
需要说明的是,在其他一些实施例中,当S301确定出的默认音效为游戏音效或视频音效时(即应用程序的类别为游戏类或视频类时),或者当应用程序的类别不是其他类时,或者当应用程序的类别为游戏类时,手机可以不再执行S302而直接执行S303。例如,当手机根据用户打开的应用程序的包名(或名称)确定出应用程序为游戏类应用程序时,手机直接确定采用游戏音效来播放该应用程序中的声音(也即采用第一音效播放当前的声音),不再根据显示画面的帧率实时确定与手机当前的声音播放场景对应的音效。或者,当手机根据用户打开的应用程序的包名(或名称)确定出应用程序为视频类应用程序时,手机直接确定采用视频音效来播放该应用程序中的声音,不再根据显示画面的帧率实时确定与手机当前的声音播放场景对应的音效。从而减小手机运行游戏类应用程序或视频类应用程序时的数据处理压力,减小对手机游戏和视频性能的影响,降低功耗。相应地,当应用程序的类别不是游戏类或视频类时,或者当应用程序的类别为其他类时,或者当应用程序的类别不是游戏类时,手机可以直接执行S302而不执行S301,即根据手机当前的显示画面的帧率确定出相应的音效(即第二音效),从而通过第二音效来播放应用程序当前的声音。
采用以上实施例中的方法,在用户使用电子设备上安装的应用程序的过程中,电子设备可根据用户使用的应用程序的类别以及当前的声音播放场景,自动选择并使用相应的音效的音效参数对声音数据进行处理后播放声音,从而使电子设备播放的声音能够更加适合当前的声音播放场景,提高电子设备播放声音时的用户体验。
对应于前述实施例中的方法,本申请实施例还提供一种播放声音的装置。该装置可应用于电子设备,用于实现前述实施例中的方法。该装置的功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。硬件或软件包括一个或多个与上述功能相对应的模块。例如,图6示出了一种播放声音的装置的结构示意图,如图6所示,该装置包括:播放模块601、和处理模块602等。
其中,播放模块601,可用于在第一应用程序的类别满足预设条件的情况下,根据与第一应用程序的类别对应的第一音效的音效参数播放当前第一应用程序的声音;在第一应用程序的类别不满足预设条件情况下,根据与当前的显示画面的帧率对应的第二音效的音效参数播放当前第一应用程序的声音。
在一种可能的实现方式中,处理模块602,用于根据第一应用程序的类别按照预设的应用程序的类别与音效间的对应关系,确定第一应用程序对应的第一音效;播放模块601,具体用于根据第一音效的音效参数播放当前第一应用程序的声音。
在另一种可能的实现方式中,应用程序的类别包括游戏类、视频类以及音乐类,预设的应用程序的类别与音效间的对应关系包括游戏类对应的音效为游戏音效,视频类对应的音效为视频音效,音乐类对应的音效为音频音效,其中,视频音效、游戏音效以及音频音效配置的音效参数互不相同。
在另一种可能的实现方式中,预设条件包括:第一应用程序的类别为游戏类、视频类、音乐类中的任一种;或,第一应用程序的类别为游戏类或视频类;或,第一应用程序的类别为游戏类。
在另一种可能的实现方式中,处理模块602,用于根据当前的显示画面的帧率,确定第一应用程序对应的第二音效;播放模块601,具体用于根据第二音效的音效参数播放当前第一应用程序的声音。
在另一种可能的实现方式中,处理模块602,具体用于当帧率大于或等于预设帧率 时确定第二音效为视频音效;当帧率小于预设帧率时确定第二音效为音频音效。
在另一种可能的实现方式中,处理模块602,具体用于当帧率大于或等于预设帧率,当前的显示画面中不断刷新的区域的面积占比大于屏幕显示面积的预设比例阈值时,确定第二音效为视频音效;当帧率大于或等于预设帧率,当前的显示画面中不断刷新的区域的面积占比小于屏幕显示面积的预设比例阈值时,确定第二音效为音频音效;当帧率小于预设帧率时确定第二音效为音频音效。
在另一种可能的实现方式中,预设比例阈值为50%,预设帧率为24Hz。
应理解以上装置中单元或模块(以下均称为单元)的划分仅仅是一种逻辑功能的划分,实际实现时可以全部或部分集成到一个物理实体上,也可以物理上分开。且装置中的单元可以全部以软件通过处理元件调用的形式实现;也可以全部以硬件的形式实现;还可以部分单元以软件通过处理元件调用的形式实现,部分单元以硬件的形式实现。
例如,各个单元可以为单独设立的处理元件,也可以集成在装置的某一个芯片中实现,此外,也可以以程序的形式存储于存储器中,由装置的某一个处理元件调用并执行该单元的功能。此外这些单元全部或部分可以集成在一起,也可以独立实现。这里所述的处理元件又可以称为处理器,可以是一种具有信号的处理能力的集成电路。在实现过程中,上述方法的各步骤或以上各个单元可以通过处理器元件中的硬件的集成逻辑电路实现或者以软件通过处理元件调用的形式实现。
在一个例子中,以上装置中的单元可以是被配置成实施以上方法的一个或多个集成电路,例如:一个或多个ASIC,或,一个或多个DSP,或,一个或者多个FPGA,或这些集成电路形式中至少两种的组合。
再如,当装置中的单元可以通过处理元件调度程序的形式实现时,该处理元件可以是通用处理器,例如CPU或其它可以调用程序的处理器。再如,这些单元可以集成在一起,以片上系统(system-on-a-chip,SOC)的形式实现。
在一种实现中,以上装置实现以上方法中各个对应步骤的单元可以通过处理元件调度程序的形式实现。例如,该装置可以包括处理元件和存储元件,处理元件调用存储元件存储的程序,以执行以上方法实施例所述的方法。存储元件可以为与处理元件处于同一芯片上的存储元件,即片内存储元件。
在另一种实现中,用于执行以上方法的程序可以在与处理元件处于不同芯片上的存储元件,即片外存储元件。此时,处理元件从片外存储元件调用或加载程序于片内存储元件上,以调用并执行以上方法实施例所述的方法。
例如,本申请实施例还可以提供一种装置,如:电子设备,可以包括:处理器,用于存储该处理器可执行指令的存储器。该处理器被配置为执行上述指令时,使得该电子设备实现如前述实施例所述的播放声音的方法。该存储器可以位于该电子设备之内,也可以位于该电子设备之外。且该处理器包括一个或多个。
在又一种实现中,该装置实现以上方法中各个步骤的单元可以是被配置成一个或多个处理元件,这些处理元件可以设置于对应上述的电子设备上,这里的处理元件可以为集成电路,例如:一个或多个ASIC,或,一个或多个DSP,或,一个或者多个FPGA,或者这些类集成电路的组合。这些集成电路可以集成在一起,构成芯片。
例如,本申请实施例还提供一种芯片,该芯片可以应用于上述电子设备。芯片包括一个或多个接口电路和一个或多个处理器;接口电路和处理器通过线路互联;处理器通过接口电路从电子设备的存储器接收并执行计算机指令,以实现以上方法实施例中所述 的方法。
本申请实施例还提供一种计算机程序产品,包括电子设备,如上述电子设备,运行的计算机指令。
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个装置,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是一个物理单元或多个物理单元,即可以位于一个地方,或者也可以分布到多个不同地方。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,如:程序。该软件产品存储在一个程序产品,如计算机可读存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。
例如,本申请实施例还可以提供一种计算机可读存储介质,其上存储有计算机程序指令。当计算机程序指令被电子设备执行时,使得电子设备实现如前述方法实施例中所述的播放声音的方法。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何在本申请揭露的技术范围内的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。

Claims (10)

  1. 一种播放声音的方法,其特征在于,包括:
    在第一应用程序的类别满足预设条件的情况下,根据与所述第一应用程序的类别对应的第一音效的音效参数播放当前所述第一应用程序的声音;
    在所述第一应用程序的类别不满足所述预设条件情况下,根据与当前的显示画面的帧率对应的第二音效的音效参数播放当前所述第一应用程序的声音。
  2. 根据权利要求1所述的方法,其特征在于,所述根据与所述第一应用程序的类别对应的第一音效的音效参数播放当前所述第一应用程序的声音,包括:
    根据所述第一应用程序的类别按照预设的应用程序的类别与音效间的对应关系,确定所述第一应用程序对应的第一音效;
    根据所述第一音效的音效参数播放当前所述第一应用程序的声音。
  3. 根据权利要求2所述的方法,其特征在于,应用程序的类别包括游戏类、视频类以及音乐类,所述预设的应用程序的类别与音效间的对应关系包括所述游戏类对应的音效为游戏音效,所述视频类对应的音效为视频音效,所述音乐类对应的音效为音频音效,其中,所述视频音效、所述游戏音效以及所述音频音效配置的音效参数互不相同。
  4. 根据权利要求3所述的方法,其特征在于,所述预设条件包括:
    所述第一应用程序的类别为所述游戏类、视频类、音乐类中的任一种;或,
    所述第一应用程序的类别为所述游戏类或视频类;或,
    所述第一应用程序的类别为所述游戏类。
  5. 根据权利要求3或4所述的方法,其特征在于,所述根据与当前的显示画面的帧率对应的第二音效的音效参数播放当前所述第一应用程序的声音,包括:
    根据当前的显示画面的帧率,确定所述第一应用程序对应的第二音效;
    根据所述第二音效的音效参数播放当前所述第一应用程序的声音。
  6. 根据权利要求5所述的方法,其特征在于,所述根据当前的显示画面的帧率,确定所述第一应用程序对应的第二音效,包括:
    当所述帧率大于或等于预设帧率时确定所述第二音效为所述视频音效;
    当所述帧率小于预设帧率时确定所述第二音效为所述音频音效。
  7. 根据权利要求5所述的方法,其特征在于,所述根据当前的显示画面的帧率,确定所述第一应用程序对应的第二音效,包括:
    当所述帧率大于或等于预设帧率,当前的显示画面中不断刷新的区域的面积占比大于屏幕显示面积的预设比例阈值时,确定所述第二音效为所述视频音效;
    当所述帧率大于或等于预设帧率,当前的显示画面中不断刷新的区域的面积占比小于屏幕显示面积的所述预设比例阈值时,确定所述第二音效与所述第一音效相同;
    当所述帧率小于预设帧率时确定所述第二音效为所述音频音效。
  8. 根据权利要求7所述的方法,其特征在于,所述预设比例阈值为50%,所述预设帧率为24Hz。
  9. 一种电子设备,其特征在于,包括:处理器,用于存储所述处理器可执行指令的存储器;
    所述处理器被配置为执行所述指令时,使得所述电子设备实现如权利要求1至8任一项所述的方法。
  10. 一种计算机可读存储介质,其上存储有计算机程序指令;其特征在于,当所述计算机程序指令被电子设备执行时,使得电子设备实现如权利要求1至8任一项所述的方法。
PCT/CN2022/072598 2021-05-21 2022-01-18 一种播放声音的方法及设备 WO2022242210A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
US17/758,838 US20240220186A1 (en) 2021-05-21 2022-01-18 Sound Playing Method and Device
EP22735758.9A EP4113276A4 (en) 2021-05-21 2022-01-18 SOUND PLAYBACK METHOD AND DEVICE

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110560657.3 2021-05-21
CN202110560657.3A CN114489556B (zh) 2021-05-21 2021-05-21 一种播放声音的方法及设备

Publications (1)

Publication Number Publication Date
WO2022242210A1 true WO2022242210A1 (zh) 2022-11-24

Family

ID=81491775

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/072598 WO2022242210A1 (zh) 2021-05-21 2022-01-18 一种播放声音的方法及设备

Country Status (4)

Country Link
US (1) US20240220186A1 (zh)
EP (1) EP4113276A4 (zh)
CN (2) CN115904303A (zh)
WO (1) WO2022242210A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104090766A (zh) * 2014-07-17 2014-10-08 广东欧珀移动通信有限公司 一种移动终端的音效切换方法及系统
CN105959481A (zh) * 2016-06-16 2016-09-21 广东欧珀移动通信有限公司 一种场景音效的控制方法、及电子设备
CN106126174A (zh) * 2016-06-16 2016-11-16 广东欧珀移动通信有限公司 一种场景音效的控制方法、及电子设备
US20180373489A1 (en) * 2016-06-16 2018-12-27 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Audio stream processing method, mobile terminal and storage medium
CN109165005A (zh) * 2018-09-04 2019-01-08 Oppo广东移动通信有限公司 音效增强方法、装置、电子设备及存储介质

Family Cites Families (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008125582A1 (en) * 2007-04-17 2008-10-23 Massimiliano Ciccone Real-time continuous digital control of parameters and settings of analogue sound effects
JP5302516B2 (ja) * 2007-07-03 2013-10-02 任天堂株式会社 音再生プログラム、音再生装置、音再生システムおよび音再生方法
KR20120067826A (ko) * 2010-12-16 2012-06-26 주식회사 굿맨 효과음 노트 타격 게임 방법 및 그 장치와 그를 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체
JP2014090386A (ja) * 2012-10-31 2014-05-15 Sony Corp 情報処理システム、情報処理装置、およびプログラム
US20160277244A1 (en) * 2015-03-18 2016-09-22 ThePlatform, LLC. Methods And Systems For Content Presentation Optimization
CN106126172B (zh) * 2016-06-16 2017-11-14 广东欧珀移动通信有限公司 一种音效处理方法及移动终端
CN106325321A (zh) * 2016-08-23 2017-01-11 苏州佳世达电通有限公司 电子设备及其控制方法
CN106354471A (zh) * 2016-09-29 2017-01-25 北京小米移动软件有限公司 音频播放控制方法、装置及电子设备
CN106933587B (zh) * 2017-03-10 2019-12-31 Oppo广东移动通信有限公司 一种图层绘制控制方法、装置及移动终端
CN109196865B (zh) * 2017-03-27 2021-03-30 华为技术有限公司 一种数据处理方法、终端以及存储介质
GB201709199D0 (en) * 2017-06-09 2017-07-26 Delamont Dean Lindsay IR mixed reality and augmented reality gaming system
CN109388367B (zh) * 2018-09-04 2021-03-02 Oppo广东移动通信有限公司 音效调整方法、装置、电子设备以及存储介质
CN112449229B (zh) * 2019-09-04 2022-01-28 海信视像科技股份有限公司 一种音画同步处理方法及显示设备
CN110572720A (zh) * 2019-09-12 2019-12-13 深圳创维-Rgb电子有限公司 电视机及其电视控制方法、控制装置和可读存储介质
CN110989961A (zh) * 2019-10-30 2020-04-10 华为终端有限公司 一种声音处理方法及其装置
CN111770416B (zh) * 2020-06-22 2022-08-02 维沃移动通信有限公司 扬声器控制方法、装置及电子设备

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104090766A (zh) * 2014-07-17 2014-10-08 广东欧珀移动通信有限公司 一种移动终端的音效切换方法及系统
CN105959481A (zh) * 2016-06-16 2016-09-21 广东欧珀移动通信有限公司 一种场景音效的控制方法、及电子设备
CN106126174A (zh) * 2016-06-16 2016-11-16 广东欧珀移动通信有限公司 一种场景音效的控制方法、及电子设备
US20180373489A1 (en) * 2016-06-16 2018-12-27 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Audio stream processing method, mobile terminal and storage medium
CN109165005A (zh) * 2018-09-04 2019-01-08 Oppo广东移动通信有限公司 音效增强方法、装置、电子设备及存储介质

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP4113276A4

Also Published As

Publication number Publication date
CN114489556B (zh) 2022-12-09
EP4113276A1 (en) 2023-01-04
CN115904303A (zh) 2023-04-04
US20240220186A1 (en) 2024-07-04
EP4113276A4 (en) 2023-08-16
CN114489556A (zh) 2022-05-13

Similar Documents

Publication Publication Date Title
WO2021164554A1 (zh) 通知处理系统、方法以及电子设备
WO2021000876A1 (zh) 一种语音控制方法、电子设备及系统
WO2021213120A1 (zh) 投屏方法、装置和电子设备
WO2020098437A1 (zh) 一种播放多媒体数据的方法及电子设备
WO2021078284A1 (zh) 一种内容接续方法及电子设备
US11683850B2 (en) Bluetooth reconnection method and related apparatus
WO2022257977A1 (zh) 电子设备的投屏方法和电子设备
WO2023029967A1 (zh) 一种播放音频的方法及电子设备
WO2020143380A1 (zh) 一种数据传输方法及电子设备
JP7468830B2 (ja) エネルギー効率の良い表示処理方法およびデバイス
CN110543289A (zh) 控制音量的方法和电子设备
WO2020073288A1 (zh) 一种触发电子设备执行功能的方法及电子设备
WO2021143314A1 (zh) 一种降低移动终端功耗的方法及移动终端
WO2021083128A1 (zh) 一种声音处理方法及其装置
WO2021017909A1 (zh) 一种通过nfc标签实现功能的方法、电子设备及系统
WO2021052204A1 (zh) 基于通讯录的设备发现方法、音视频通信方法及电子设备
WO2020029094A1 (zh) 一种语音控制命令生成方法及终端
WO2021052170A1 (zh) 马达振动控制方法及电子设备
WO2021104259A1 (zh) 一种快应用与原生应用间数据共享的方法及终端
WO2022017474A1 (zh) 任务处理方法及相关装置
WO2020077508A1 (zh) 一种对内部存储器动态调频的方法及电子设备
WO2020051852A1 (zh) 一种通信过程中信息的记录及显示方法及终端
WO2023088209A1 (zh) 一种跨设备音频数据传输的方法和电子设备
US20240224357A1 (en) Data Download Method, Apparatus, and Terminal Device
WO2023071502A1 (zh) 音量控制方法、装置及电子设备

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 17758838

Country of ref document: US

ENP Entry into the national phase

Ref document number: 2022735758

Country of ref document: EP

Effective date: 20220714

NENP Non-entry into the national phase

Ref country code: DE