CN110809226A - Audio playing method and electronic equipment - Google Patents

Audio playing method and electronic equipment Download PDF

Info

Publication number
CN110809226A
CN110809226A CN201910995616.XA CN201910995616A CN110809226A CN 110809226 A CN110809226 A CN 110809226A CN 201910995616 A CN201910995616 A CN 201910995616A CN 110809226 A CN110809226 A CN 110809226A
Authority
CN
China
Prior art keywords
audio file
channels
sound
target audio
loudspeaker
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910995616.XA
Other languages
Chinese (zh)
Inventor
马子平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN201910995616.XA priority Critical patent/CN110809226A/en
Publication of CN110809226A publication Critical patent/CN110809226A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04SSTEREOPHONIC SYSTEMS 
    • H04S3/00Systems employing more than two channels, e.g. quadraphonic
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04SSTEREOPHONIC SYSTEMS 
    • H04S7/00Indicating arrangements; Control arrangements, e.g. balance control
    • H04S7/30Control circuits for electronic adaptation of the sound field

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Acoustics & Sound (AREA)
  • Signal Processing (AREA)
  • Stereophonic System (AREA)

Abstract

The embodiment of the invention provides an audio playing method and electronic equipment, relates to the technical field of communication, and aims to solve the problem that the playing quality of audio is influenced because the conventional electronic equipment cannot give full play to the effect of a loudspeaker. The audio playing method comprises the following steps: under the condition of playing a target audio file, identifying the number of sound channels of the target audio file; distributing a corresponding loudspeaker for each sound channel according to the number of the sound channels of the target audio file; and playing the target audio file through the loudspeaker corresponding to each sound channel. The audio playing method in the embodiment of the invention is applied to the electronic equipment.

Description

Audio playing method and electronic equipment
Technical Field
The embodiment of the invention relates to the technical field of communication, in particular to an audio playing method and electronic equipment.
Background
In the era of mobile internet, along with the popularization of intelligent terminals, the terminals meet the basic requirements of users, and meanwhile, the terminals pursue the extreme multimedia audio-visual experience, High-Fidelity (High-Fidelity, short for HiFi) sound source and stereo sound effect experience, so that the playing quality of audio is merged into the aspect of daily life.
Generally, an electronic device includes two speakers, one on top of the electronic device, for receiving a call; and the other is positioned at the bottom of the electronic equipment and is used for playing audio files such as music and the like. The audio files such as music are played by one loudspeaker, so that more integral sound effect can be brought, but the playing quality completely depends on the audio files, and the efficacy of the loudspeaker cannot be fully exerted.
Therefore, the conventional electronic equipment cannot fully exert the efficacy of the loudspeaker, so that the playing quality of the audio is influenced.
Disclosure of Invention
The embodiment of the invention provides an audio playing method and electronic equipment, and aims to solve the problem that the playing quality of audio is influenced because the conventional electronic equipment cannot fully exert the effect of a loudspeaker.
In order to solve the technical problem, the invention is realized as follows:
the embodiment of the invention provides an audio playing method, which is applied to electronic equipment, wherein the electronic equipment comprises a plurality of loudspeakers, and the method comprises the following steps: under the condition of playing a target audio file, identifying the number of sound channels of the target audio file; distributing a corresponding loudspeaker for each sound channel according to the number of the sound channels of the target audio file; and playing the target audio file through a loudspeaker corresponding to each sound channel.
An embodiment of the present invention further provides an electronic device, where the electronic device includes a plurality of speakers, and is characterized by further including: the identification module is used for identifying the number of sound channels of a target audio file under the condition of playing the target audio file; the distribution module is used for distributing a corresponding loudspeaker for each sound channel according to the number of the sound channels of the target audio file; and the playing module is used for playing the target audio file through the loudspeaker corresponding to each sound channel.
The embodiment of the present invention further provides an electronic device, which includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor, where the computer program implements the steps of the audio playing method when executed by the processor.
An embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the audio playing method are implemented.
Therefore, in the embodiment of the invention, the difference of sound wave phases is brought by the difference of the distances from the plurality of loudspeakers to the listener, so that the three-dimensional sound effect is realized, the number of the sound channels of the target audio file can be firstly identified, the corresponding loudspeakers are allocated to different sound channels, and then when the target audio file is played, the different loudspeakers output the audio data of the corresponding sound channels, so that the target audio file is played through the loudspeakers corresponding to each sound channel, and the audio file achieves the effect of surround sound. Meanwhile, the loudspeaker corresponding to each sound channel can be changed during playing, and even if the audio file is a single-channel audio file, the loudspeakers can be circularly switched to play, so that the sound effect of surround sound is achieved. Therefore, the embodiment of the invention fully utilizes the effects of the plurality of loudspeakers to improve the playing quality of the audio, thereby realizing the high-quality audio playing effect.
Drawings
Fig. 1 is one of the flow charts of the audio playing method of the embodiment of the present invention;
FIG. 2 is a schematic structural diagram of a folding screen electronic device according to an embodiment of the invention;
FIG. 3 is a second flowchart of an audio playing method according to an embodiment of the present invention;
FIG. 4 is a third flowchart of an audio playing method according to an embodiment of the present invention;
FIG. 5 is a fourth flowchart of an audio playing method according to an embodiment of the present invention;
FIG. 6 is a fifth flowchart of an audio playing method according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of a screen display of an electronic device according to an embodiment of the invention;
FIG. 8 is one of the block diagrams of an electronic device of an embodiment of the invention;
fig. 9 is a second block diagram of the electronic device according to the embodiment of the invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, a flowchart of an audio playing method according to an embodiment of the present invention is shown, and is applied to an electronic device, where the electronic device includes a plurality of speakers, and includes:
step S1: in the case of playing a target audio file, the number of channels of the target audio file is identified.
In this step, in the case of playing the target audio file, the target audio file is acquired, the target audio file is parsed, and the number of channels of the target audio file is identified and denoted as n.
Illustratively, after the header information of the playing file is analyzed, a file demultiplexer is started, and if the playing file contains a video track and an audio track, the audio track is separated and analyzed to obtain a target audio file; if the playing file only contains the audio file, only the audio track needs to be analyzed, and the target audio file is obtained. Further, the number of the audio channels of the obtained target audio file is identified and recorded as n.
Step S2: and allocating a corresponding loudspeaker to each sound channel according to the number of the sound channels of the target audio file.
In the step, the characteristics of multiple loudspeakers are fully utilized, and corresponding loudspeakers are allocated to each sound channel according to the number of the sound channels of the target audio file.
Preferably, the present embodiment is more suitable for multi-channel audio files, such as audio files in the AC3 format. For a plurality of sound channels included in the target audio file, corresponding speakers can be respectively allocated to each sound channel, and furthermore, the speakers corresponding to each sound channel can be switched in a time-sharing manner, so that a user can hear stereo sound effects.
Preferably, the present embodiment is also applicable to mono audio files. For a sound channel included in the target audio file, the loudspeaker corresponding to the sound channel can be switched in time, so that the user can hear the stereo sound effect.
Wherein in this step, the speaker array may be polled to obtain the number of available speakers before assigning a corresponding speaker to each channel.
Illustratively, the system sends out a silent audio signal to cycle through each loudspeaker, and the system can judge whether each loudspeaker function is stable according to the output feedback state of the loudspeaker, thereby recording the number m of available loudspeakers.
Step S3: and playing the target audio file through the loudspeaker corresponding to each sound channel.
In this step, according to the allocation result in step S2, the corresponding speakers are respectively enabled, and the audio data of the corresponding channels have been output, thereby realizing that the target audio file is played through the speaker corresponding to each channel. Wherein the audio data for each channel may be distributively decoded before the audio data is output by the respective speakers.
Specifically, since the audio data of each channel is independently encoded, the audio decoder enables the corresponding decoder to distributively decode the audio data of each channel for sound output according to the type of encoder employed for each independent channel.
Therefore, in the embodiment of the invention, the difference of sound wave phases is brought by the difference of the distances from the plurality of loudspeakers to the listener, so that the three-dimensional sound effect is realized, the number of the sound channels of the target audio file can be firstly identified, the corresponding loudspeakers are allocated to different sound channels, and then when the target audio file is played, the different loudspeakers output the audio data of the corresponding sound channels, so that the target audio file is played through the loudspeakers corresponding to each sound channel, and the audio file achieves the effect of surround sound. Meanwhile, the loudspeaker corresponding to each sound channel can be changed during playing, and even if the audio file is a single-channel audio file, the loudspeakers can be circularly switched to play, so that the sound effect of surround sound is achieved. Therefore, the embodiment of the invention fully utilizes the effects of the plurality of loudspeakers to improve the playing quality of the audio, thereby realizing the high-quality audio playing effect.
Preferably, the electronic device comprises two screens arranged in a folded manner, and the top and the bottom of each screen are respectively provided with a loudspeaker.
Referring to fig. 2, the embodiment of the present invention is preferably applied to a folding screen electronic device, where the folding screen electronic device includes two screens, a main screen is denoted as an a screen, and an auxiliary screen is denoted as a B screen. The speakers at the bottom and the top of the a screen are respectively recorded as Ma1 and Ma2, and the speakers at the bottom and the top of the B screen are respectively recorded as Mb1 and Mb2, so that when the audio playing method in the embodiment of the present invention is implemented, the corresponding number of speakers are respectively enabled adaptively according to the number of channels of the target audio file, and different speakers are switched circularly.
Further, as shown in fig. 2, when playing an audio file, it is preferable to unfold the folding screen, the unfolding angle of the folding screen is α, i.e. the included angle between the a screen and the B screen, wherein 0 ° < α <180 °. according to the acoustic principle, the unfolding angle of the folding screen is different, the position of each speaker from the ear is different, the phases of the sound waves output from different positions are different, and the difference can bring the stereo sound effect.
Therefore, in the process of playing the audio file, a plurality of loudspeakers of the folding screen electronic equipment are started according to the acoustic principle, so that a loudspeaker array is formed, and a method for switching different loudspeakers in a time-sharing surrounding mode can be provided.
In further embodiments, not limited to forming 4 speakers at the top and bottom of the folding screen electronic device, more locations may be provided, and more than 4 speakers may be formed, and the embodiments provided by the present invention may also be implemented.
In further embodiments, the embodiments provided by the present invention can be implemented not only in a folding screen electronic device, but also in an electronic device with not less than 2 speakers, such as a double-sided screen, a multi-sided screen, or a flexible screen.
In order to achieve a better stereo sound effect, the multiple speakers are preferably respectively located at different positions of the electronic device, so that the distances between the multiple speakers and a listener are different.
On the basis of the embodiment shown in fig. 1, fig. 3 shows a flowchart of an audio playing method according to another embodiment of the present invention, where the number of the plurality of speakers is m, the number of the channels is n, where m and n are both positive integers, and m > 1.
It should be noted that m may represent the number of speakers, and in this embodiment, it is default that all of the m speakers are available in the case of playing the target audio file.
Step S2 includes:
step S21: in the case of n ≧ m, m channels are determined among the n channels.
And when n ≧ m, enabling m loudspeakers to output audio data of the front m sound channels, and discarding the rest n-m sound channels.
Step S22: and respectively allocating m loudspeakers corresponding to one another to the m sound channels.
In this step, the audio channels are indexed with the speakers.
Preferably, when N ≧ m, the speaker array is in a full operation mode, and the sound channel N1Sound channel N2Sound channel N3A sound channel NmOne-to-one loudspeaker M1、M2、M3、...Mm
In this embodiment, for the case that the number of channels is greater than or equal to the number of speakers, part of the channels may be discarded, and the front channels are preferably acquired, so as to allocate speakers to the remaining channels one by one, and further, the speakers corresponding to each channel may be switched in a time-sharing manner, so as to switch in a time-sharing surround cycle according to the full operation mode of different speakers, thereby creating a stereo sound effect.
On the basis of the embodiment shown in fig. 1, fig. 4 shows a flowchart of an audio playing method according to another embodiment of the present invention, where the number of the plurality of speakers is m, the number of the channels is n, where m and n are both positive integers, and m > 1.
Step S2 includes:
step S23: in the case of n < m, n speakers are determined among the m speakers.
When n < m, then n speakers are enabled to output n channels of audio data.
Step S24: and respectively distributing n loudspeakers corresponding to one for the n sound channels.
In this step, the audio channels are indexed with the speakers.
Preferably, when n<m hours, the loudspeaker array is in a half-operation mode, channel N1Sound channel N2Sound channel N3A sound channel NnOne-to-one loudspeaker M1、M2、M3、...Mn
In this embodiment, when the number of channels is smaller than the number of speakers, the speakers are allocated to all the channels one by one, and further, the speakers corresponding to each channel can be switched in a time-sharing manner, so that a stereoscopic sound effect can be created according to the time-sharing surround cycle switching of the half-operation modes of different speakers.
On the basis of the embodiment shown in fig. 1, fig. 5 shows a flowchart of an audio playing method according to another embodiment of the present invention, and step S2 includes:
step S25: and according to the number of the sound channels of the target audio file, distributing a corresponding loudspeaker for each sound channel at a plurality of target moments in the playing of the target audio file.
And in the playing of the target audio file, the loudspeaker corresponding to each channel can be switched in time.
Preferably, a plurality of target moments can be set in the playing of the target audio file; the target time can also be set according to a preset time length, namely every other preset time length is one target time.
Preferably, in the playing of the target audio file, the allocation policy may be changed cyclically at a plurality of target times, or one allocation policy may be randomly applied at a certain target time.
Illustratively, N-2 (corresponding channels are each N)1And N2) M is 4 (M is the corresponding loudspeaker respectively)1、M2、M3And M4Preferably, the corresponding speakers are Ma1, Ma2, Mb1, Mb2) as described above, respectively. At time t1Sound channel N1And N2Respectively output by Ma1, Ma 2; at time t2, channel N1And N2Respectively output by Mb1, Mb 2; at time t3, channel N1And N2Respectively output by Ma1, Mb 1; at time t4, channel N1And N2Respectively output by Ma2, Mb 2; at time t5, channel N1And N2Respectively output by Ma1, Mb 2; at time t6, channel N1And N2Respectively by Ma2, Mb1, and so on.
Illustratively, N-3 (corresponding channels are each N)1、N2And N3) M is 4 (M is the corresponding loudspeaker respectively)1、M2、M3And M4Preferably, the corresponding speakers are Ma1, Ma2, Mb1, Mb2) as described above, respectively. At time t1, channel N1、N2And N3Respectively output by Ma1, Ma2, Mb 1; at time t2, channel N1、N2And N3Respectively output by Ma1, Ma2, Mb 2; at time t3, channel N1、N2And N3Is output by Mb1, Mb2, Ma1, respectively; at time t4, channel N1、N2And N3Is output by Mb1, Mb2, Ma2, respectively, and so on.
Illustratively, N is 1 (the corresponding channels are N, respectively)1) M is 4 (M is the corresponding loudspeaker respectively)1、M2、M3And M4Preferably, the corresponding speakers are Ma1, Ma2, Mb1, Mb2) as described above, respectively. At time t1, channel N1Is output by Ma 1; at time t2, channel N1Is output by Ma 2; at time t3, channel N1Is output by Mb 1; sound channel N1Is output by Mb2, and so on.
In this embodiment, the corresponding speakers are allocated to each sound channel, so as to achieve a stereoscopic sound effect, and further, the time-sharing surround cycle switching is combined to enrich the stereoscopic sound effect, so as to further improve the audio playing tone quality.
On the basis of the embodiment shown in fig. 1, fig. 6 shows a flowchart of an audio playing method according to another embodiment of the present invention, and after step S3, the method further includes:
step S4: in the case where any speaker plays the target audio file, an indication color corresponding to any speaker is displayed on the screen.
Referring to fig. 7, during the playing of the target audio file, a dynamic annular color separation map is displayed on the screen, and the dynamic annular color separation map can present a speaker which is working.
Preferably, colors of different color systems are selected by self-definition, and small circles on the circular arc are colored respectively.
Illustratively, when M is 4, (the corresponding speakers are M, respectively1、M2、M3And M4Preferably, the corresponding speakers are the aforementioned Ma1, Ma2, Mb1, Mb2), respectively, when Ma1 is in the working state, 4 small circles at the lower left corner are bright, and 4 small circles at the lower left corner display the first color; when Ma2 is in working condition, the 4 small circles on the top left corner are bright, and the 4 small circles on the top left corner display a second color; when Mb1 is in operation, the 4 small circles in the lower right corner are bright, and the 4 small circles in the lower right corner display a third color; when Mb2 is in operation, the top right-hand 4 small circles are bright and the top right-hand 4 small circles display a fourth color.
In this embodiment, when different speakers are in working states, different indication colors are displayed on the screen, and preferably, the indication colors are dynamically displayed in a time-sharing manner by using the ring light, so that the visual effect of the working of the speakers is dynamically displayed by using the sound effect ring light, and the effect that the sound is applied to the environment of the user is provided.
To sum up, the above embodiments of the present invention provide an audio playing method based on multiple speakers of an electronic device, aiming at the problem that the existing electronic device cannot achieve better audio playing tone quality by using the efficacy of the speakers, and particularly cannot play multi-channel audio files. The embodiment of the invention is particularly suitable for folding screen electronic equipment, when the folding screen electronic equipment is unfolded, the multi-loudspeaker mode of the folding screen electronic equipment is switched, the plurality of loudspeakers of the main screen and the auxiliary screen are started, the sound wave phase difference can be brought by the difference of the distances between the loudspeakers and a listener according to the number of sound channels of the sound source file and the dynamic output of the plurality of loudspeakers, and the three-dimensional sound effect is realized. Wherein, surround and switch different speakers in a dynamic timesharing to present the speaker that is having sound output with the audio annular lamp developments, reach the visual effect of cool dazzling. Therefore, the effect of the plurality of loudspeakers is fully exerted, the three-dimensional playing effect is realized, and the playing experience of music is enriched.
Fig. 8 shows a block diagram of an electronic device according to another embodiment of the invention, the electronic device comprising a plurality of speakers, further comprising:
the identification module 10 is used for identifying the number of sound channels of the target audio file under the condition of playing the target audio file;
the distribution module 20 is configured to distribute a corresponding speaker to each channel according to the number of channels of the target audio file;
and the playing module 30 is configured to play the target audio file through the speaker corresponding to each channel.
Therefore, in the embodiment of the invention, the difference of sound wave phases is brought by the difference of the distances from the plurality of loudspeakers to the listener, so that the three-dimensional sound effect is realized, the number of the sound channels of the target audio file can be firstly identified, the corresponding loudspeakers are allocated to different sound channels, and then when the target audio file is played, the different loudspeakers output the audio data of the corresponding sound channels, so that the target audio file is played through the loudspeakers corresponding to each sound channel, and the audio file achieves the effect of surround sound. Meanwhile, the loudspeaker corresponding to each sound channel can be changed during playing, and even if the audio file is a single-channel audio file, the loudspeakers can be circularly switched to play, so that the sound effect of surround sound is achieved. Therefore, the embodiment of the invention fully utilizes the effects of the plurality of loudspeakers to improve the playing quality of the audio, thereby realizing the high-quality audio playing effect.
Preferably, the number of the plurality of loudspeakers is m, the number of the sound channels is n, wherein m and n are positive integers, and m > 1;
the dispensing module 20 comprises:
a channel determination unit configured to determine m channels from among the N channels when N ≧ m;
and the first loudspeaker distribution unit is used for distributing m loudspeakers corresponding to each other one by one for the m sound channels.
Preferably, the number of the plurality of loudspeakers is m, the number of the sound channels is N, wherein m and N are positive integers, and m > 1;
the dispensing module 20 comprises:
a speaker determining unit for determining n speakers among the m speakers in a case where n < m;
and the second loudspeaker distribution unit is used for distributing n loudspeakers corresponding to the n sound channels one by one respectively.
Preferably, the distribution module 20 comprises:
and the time sharing unit is used for distributing a corresponding loudspeaker to each sound channel at a plurality of target moments in the playing of the target audio file according to the number of the sound channels of the target audio file.
Preferably, the electronic device further comprises:
and the display module is used for displaying the indication color corresponding to any loudspeaker on the screen under the condition that any loudspeaker plays the target audio file.
Preferably, the electronic device comprises two screens arranged in a folded manner, and the top and the bottom of each screen are respectively provided with a loudspeaker.
The electronic device provided in the embodiment of the present invention can implement each process implemented by the electronic device in the method embodiments of fig. 1 to fig. 7, and is not described herein again to avoid repetition.
Fig. 9 is a schematic diagram of a hardware structure of an electronic device 100 for implementing various embodiments of the present invention, where the electronic device 100 includes, but is not limited to: radio frequency unit 101, network module 102, audio output unit 103, input unit 104, sensor 105, display unit 106, user input unit 107, interface unit 108, memory 109, processor 110, and power supply 111. Those skilled in the art will appreciate that the electronic device configuration shown in fig. 9 does not constitute a limitation of the electronic device, and that the electronic device may include more or fewer components than shown, or some components may be combined, or a different arrangement of components. In the embodiment of the present invention, the electronic device includes, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted electronic device, a wearable device, a pedometer, and the like.
Wherein, the processor 110 is configured to identify the number of channels of a target audio file in a case that the target audio file is played; distributing a corresponding loudspeaker for each sound channel according to the number of the sound channels of the target audio file;
and the audio output unit 103 is used for playing the target audio file through a loudspeaker corresponding to each channel.
Therefore, in the embodiment of the invention, the difference of sound wave phases is brought by the difference of the distances from the plurality of loudspeakers to the listener, so that the three-dimensional sound effect is realized, the number of the sound channels of the target audio file can be firstly identified, the corresponding loudspeakers are allocated to different sound channels, and then when the target audio file is played, the different loudspeakers output the audio data of the corresponding sound channels, so that the target audio file is played through the loudspeakers corresponding to each sound channel, and the audio file achieves the effect of surround sound. Meanwhile, the loudspeaker corresponding to each sound channel can be changed during playing, and even if the audio file is a single-channel audio file, the loudspeakers can be circularly switched to play, so that the sound effect of surround sound is achieved. Therefore, the embodiment of the invention fully utilizes the effects of the plurality of loudspeakers to improve the playing quality of the audio, thereby realizing the high-quality audio playing effect.
It should be understood that, in the embodiment of the present invention, the radio frequency unit 101 may be used for receiving and sending signals during a message transmission or call process, and specifically, after receiving downlink data from a base station, the downlink data is processed by the processor 110; in addition, the uplink data is transmitted to the base station. Typically, radio frequency unit 101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 101 can also communicate with a network and other devices through a wireless communication system.
The electronic device provides wireless broadband internet access to the user via the network module 102, such as assisting the user in sending and receiving e-mails, browsing web pages, and accessing streaming media.
The audio output unit 103 may convert audio data received by the radio frequency unit 101 or the network module 102 or stored in the memory 109 into an audio signal and output as sound. Also, the audio output unit 103 may also provide audio output related to a specific function performed by the electronic apparatus 100 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 103 includes a speaker, a buzzer, a receiver, and the like.
The input unit 104 is used to receive an audio or video signal. The input Unit 104 may include a Graphics Processing Unit (GPU) 1041 and a microphone 1042, and the Graphics processor 1041 processes image data of a still picture or video obtained by an image capturing device (e.g., a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 106. The image frames processed by the graphic processor 1041 may be stored in the memory 109 (or other storage medium) or transmitted via the radio frequency unit 101 or the network module 102. The microphone 1042 may receive sound and may be capable of processing such sound into audio data. The processed audio data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 101 in case of a phone call mode.
The electronic device 100 also includes at least one sensor 105, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor that can adjust the brightness of the display panel 1061 according to the brightness of ambient light, and a proximity sensor that can turn off the display panel 1061 and/or the backlight when the electronic device 100 is moved to the ear. As one type of motion sensor, an accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), detect the magnitude and direction of gravity when stationary, and can be used to identify the posture of an electronic device (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), and vibration identification related functions (such as pedometer, tapping); the sensors 105 may also include fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., which are not described in detail herein.
The display unit 106 is used to display information input by a user or information provided to the user. The Display unit 106 may include a Display panel 1061, and the Display panel 1061 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 107 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the electronic device. Specifically, the user input unit 107 includes a touch panel 1071 and other input devices 1072. Touch panel 1071, also referred to as a touch screen, may collect touch operations by a user on or near the touch panel 1071 (e.g., operations by a user on or near touch panel 1071 using a finger, stylus, or any suitable object or attachment). The touch panel 1071 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 110, and receives and executes commands sent by the processor 110. In addition, the touch panel 1071 may be implemented in various types, such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. In addition to the touch panel 1071, the user input unit 107 may include other input devices 1072. Specifically, other input devices 1072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described in detail herein.
Further, the touch panel 1071 may be overlaid on the display panel 1061, and when the touch panel 1071 detects a touch operation thereon or nearby, the touch panel 1071 transmits the touch operation to the processor 110 to determine the type of the touch event, and then the processor 110 provides a corresponding visual output on the display panel 1061 according to the type of the touch event. Although in fig. 9, the touch panel 1071 and the display panel 1061 are two independent components to implement the input and output functions of the electronic device, in some embodiments, the touch panel 1071 and the display panel 1061 may be integrated to implement the input and output functions of the electronic device, and is not limited herein.
The interface unit 108 is an interface for connecting an external device to the electronic apparatus 100. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 108 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the electronic apparatus 100 or may be used to transmit data between the electronic apparatus 100 and the external device.
The memory 109 may be used to store software programs as well as various data. The memory 109 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 109 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 110 is a control center of the electronic device, connects various parts of the entire electronic device using various interfaces and lines, performs various functions of the electronic device and processes data by operating or executing software programs and/or modules stored in the memory 109 and calling data stored in the memory 109, thereby performing overall monitoring of the electronic device. Processor 110 may include one or more processing units; preferably, the processor 110 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 110.
The electronic device 100 may further include a power source 111 (such as a battery) for supplying power to each component, and preferably, the power source 111 may be logically connected to the processor 110 through a power management system, so as to implement functions of managing charging, discharging, and power consumption through the power management system.
In addition, the electronic device 100 includes some functional modules that are not shown, and are not described in detail herein.
Preferably, an embodiment of the present invention further provides an electronic device, which includes a processor 110, a memory 109, and a computer program stored in the memory 109 and capable of being executed on the processor 110, where the computer program, when executed by the processor 110, implements each process of the above-mentioned embodiment of the audio playing method, and can achieve the same technical effect, and in order to avoid repetition, details are not described here again.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements each process of the above-mentioned audio playing method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here. The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling an electronic device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (12)

1. An audio playing method applied to an electronic device, the electronic device including a plurality of speakers, the audio playing method comprising:
under the condition of playing a target audio file, identifying the number of sound channels of the target audio file;
distributing a corresponding loudspeaker for each sound channel according to the number of the sound channels of the target audio file;
and playing the target audio file through a loudspeaker corresponding to each sound channel.
2. The method of claim 1, wherein the number of the plurality of speakers is m, the number of the channels is n, wherein m and n are both positive integers, and m > 1;
the allocating a corresponding speaker to each channel according to the number of channels of the target audio file includes:
in the case that n ≧ m, m channels are determined among the n channels;
and respectively distributing m loudspeakers corresponding to one for the m sound channels.
3. The method of claim 1, wherein the number of the plurality of speakers is m, the number of the channels is n, wherein m and n are both positive integers, and m > 1;
the allocating a corresponding speaker to each channel according to the number of channels of the target audio file includes:
in the case of n < m, determining n speakers among the m speakers;
and respectively distributing the n loudspeakers in one-to-one correspondence to the n sound channels.
4. The method of claim 1, wherein the assigning a corresponding speaker to each channel according to the number of channels of the target audio file comprises:
and according to the number of the sound channels of the target audio file, distributing a corresponding loudspeaker for each sound channel at a plurality of target moments in the playing of the target audio file.
5. The method of claim 1, wherein after the target audio file is played through the speaker corresponding to each channel, the method further comprises:
and displaying an indication color corresponding to any loudspeaker on a screen under the condition that the target audio file is played by the any loudspeaker.
6. An electronic device, the electronic device comprising a plurality of speakers, further comprising:
the identification module is used for identifying the number of sound channels of a target audio file under the condition of playing the target audio file;
the distribution module is used for distributing a corresponding loudspeaker for each sound channel according to the number of the sound channels of the target audio file;
and the playing module is used for playing the target audio file through the loudspeaker corresponding to each sound channel.
7. The electronic device of claim 6, wherein the number of the plurality of speakers is m, the number of the sound channels is n, wherein m and n are positive integers, and m > 1;
the distribution module includes:
a channel determination unit configured to determine m channels from among the N channels when N ≧ m;
and the first loudspeaker distribution unit is used for distributing m loudspeakers corresponding to each other for the m sound channels.
8. The electronic device of claim 6, wherein the number of the plurality of speakers is m, the number of the sound channels is n, wherein m and n are positive integers, and m > 1;
the distribution module includes:
a speaker determining unit for determining n speakers among the m speakers in a case where n < m;
and the second loudspeaker distribution unit is used for distributing the n loudspeakers which are in one-to-one correspondence to the n sound channels respectively.
9. The electronic device of claim 6, wherein the assignment module comprises:
and the time sharing unit is used for distributing a corresponding loudspeaker to each sound channel at a plurality of target moments in the playing of the target audio file according to the number of the sound channels of the target audio file.
10. The electronic device of claim 6, further comprising:
and the display module is used for displaying the indication color corresponding to any loudspeaker on a screen under the condition that the target audio file is played by any loudspeaker.
11. An electronic device, comprising a processor, a memory, a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing the steps of the audio playback method as claimed in any one of claims 1 to 5.
12. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, carries out the steps of the audio playback method as claimed in any one of claims 1 to 5.
CN201910995616.XA 2019-10-18 2019-10-18 Audio playing method and electronic equipment Pending CN110809226A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910995616.XA CN110809226A (en) 2019-10-18 2019-10-18 Audio playing method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910995616.XA CN110809226A (en) 2019-10-18 2019-10-18 Audio playing method and electronic equipment

Publications (1)

Publication Number Publication Date
CN110809226A true CN110809226A (en) 2020-02-18

Family

ID=69488642

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910995616.XA Pending CN110809226A (en) 2019-10-18 2019-10-18 Audio playing method and electronic equipment

Country Status (1)

Country Link
CN (1) CN110809226A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111756893A (en) * 2020-05-29 2020-10-09 维沃移动通信有限公司 Audio output method, electronic device, and medium
CN111866668A (en) * 2020-07-17 2020-10-30 头领科技(昆山)有限公司 Multichannel bluetooth headset with earphone amplifier
CN112261180A (en) * 2020-10-12 2021-01-22 维沃移动通信有限公司 Electronic device, control method of electronic device, and computer-readable storage medium
CN112312298A (en) * 2020-11-19 2021-02-02 北京小米松果电子有限公司 Audio playing method and device, electronic equipment and storage medium
CN113630695A (en) * 2021-08-06 2021-11-09 维沃移动通信有限公司 Sound channel switching method and device and electronic equipment
WO2024065945A1 (en) * 2022-09-27 2024-04-04 瑞声科技(南京)有限公司 Sound channel determination method and apparatus, storage medium, and computer device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030125095A1 (en) * 2001-12-29 2003-07-03 Samsung Electronics Co., Ltd. Sound output system and method of a mobile communication terminal
CN103167381A (en) * 2011-12-16 2013-06-19 三星电子株式会社 Terminal having a plurality of speakers and method of operating the same
CN104238990A (en) * 2013-06-14 2014-12-24 联想(北京)有限公司 Electronic device and audio output method
CN104867507A (en) * 2014-02-24 2015-08-26 三星电子(中国)研发中心 Audio file playing method and device
CN108319445A (en) * 2018-02-02 2018-07-24 维沃移动通信有限公司 A kind of audio frequency playing method and mobile terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030125095A1 (en) * 2001-12-29 2003-07-03 Samsung Electronics Co., Ltd. Sound output system and method of a mobile communication terminal
CN103167381A (en) * 2011-12-16 2013-06-19 三星电子株式会社 Terminal having a plurality of speakers and method of operating the same
CN104238990A (en) * 2013-06-14 2014-12-24 联想(北京)有限公司 Electronic device and audio output method
CN104867507A (en) * 2014-02-24 2015-08-26 三星电子(中国)研发中心 Audio file playing method and device
CN108319445A (en) * 2018-02-02 2018-07-24 维沃移动通信有限公司 A kind of audio frequency playing method and mobile terminal

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111756893A (en) * 2020-05-29 2020-10-09 维沃移动通信有限公司 Audio output method, electronic device, and medium
CN111866668A (en) * 2020-07-17 2020-10-30 头领科技(昆山)有限公司 Multichannel bluetooth headset with earphone amplifier
CN112261180A (en) * 2020-10-12 2021-01-22 维沃移动通信有限公司 Electronic device, control method of electronic device, and computer-readable storage medium
CN112312298A (en) * 2020-11-19 2021-02-02 北京小米松果电子有限公司 Audio playing method and device, electronic equipment and storage medium
CN113630695A (en) * 2021-08-06 2021-11-09 维沃移动通信有限公司 Sound channel switching method and device and electronic equipment
WO2024065945A1 (en) * 2022-09-27 2024-04-04 瑞声科技(南京)有限公司 Sound channel determination method and apparatus, storage medium, and computer device

Similar Documents

Publication Publication Date Title
CN110809226A (en) Audio playing method and electronic equipment
CN108551636B (en) Loudspeaker control method and mobile terminal
CN108319445B (en) Audio playing method and mobile terminal
CN111835488B (en) Method for determining mapping of antenna port and terminal
US10824277B2 (en) Electrical device with piezoelectric elements communicating haptically and audibly with user
CN109918039B (en) Volume adjusting method and mobile terminal
CN111459456B (en) Audio control method and electronic equipment
CN109086027B (en) Audio signal playing method and terminal
CN108810860B (en) Audio transmission method, terminal equipment and main earphone
JP7168671B2 (en) Service processing method and mobile communication terminal
CN110568926B (en) Sound signal processing method and terminal equipment
CN110891217B (en) Earphone, earphone control method and electronic equipment
CN111147919A (en) Play adjustment method, electronic equipment and computer readable storage medium
CN110851220A (en) Information output method and electronic equipment
CN109194827B (en) Terminal device, audio signal output method and system
CN110990172A (en) Application sharing method, first electronic device and computer-readable storage medium
CN110597478A (en) Audio output method and electronic equipment
CN111078186A (en) Playing method and electronic equipment
CN108683980B (en) Audio signal transmission method and mobile terminal
CN111093137B (en) Volume control method, volume control equipment and computer readable storage medium
CN108319440B (en) Audio output method and mobile terminal
CN108540659B (en) Method, terminal and computer readable storage medium for reducing TDD noise influence
WO2021057733A1 (en) Listen before talk (lbt) subband partitioning method and apparatus, device, and medium
JP7332688B2 (en) Receiving method, transmitting method, terminal and network equipment
CN108040311B (en) Audio playing method, terminal and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200218