CN106886388B - Method and terminal for playing audio data - Google Patents

Method and terminal for playing audio data Download PDF

Info

Publication number
CN106886388B
CN106886388B CN201710095937.5A CN201710095937A CN106886388B CN 106886388 B CN106886388 B CN 106886388B CN 201710095937 A CN201710095937 A CN 201710095937A CN 106886388 B CN106886388 B CN 106886388B
Authority
CN
China
Prior art keywords
playing
data
terminal
volume
earphone
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.)
Active
Application number
CN201710095937.5A
Other languages
Chinese (zh)
Other versions
CN106886388A (en
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
Vivo Mobile Communication Co Ltd Beijing Branch
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, Vivo Mobile Communication Co Ltd Beijing Branch filed Critical Vivo Mobile Communication Co Ltd
Priority to CN201710095937.5A priority Critical patent/CN106886388B/en
Publication of CN106886388A publication Critical patent/CN106886388A/en
Application granted granted Critical
Publication of CN106886388B publication Critical patent/CN106886388B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/162Interface to dedicated audio devices, e.g. audio drivers, interface to CODECs
    • 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

Landscapes

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

Abstract

The embodiment of the invention provides a method and a terminal for playing audio data, wherein the method comprises the following steps: when a playing instruction of audio data is received, judging whether the playing mode of the terminal is an earphone playing mode; if the playing mode of the terminal is an earphone playing mode, performing data processing on the audio data to obtain first playing data output to an earphone connected with the terminal and second playing data output to a loudspeaker of the terminal; wherein the first playing data is different from the second playing data; and playing the first playing data through the earphone, and simultaneously playing the second playing data through the loudspeaker to form the playing of the audio data. The embodiment of the invention can improve the sound surrounding sense when the audio data is played through the earphone.

Description

Method and terminal for playing audio data
Technical Field
The present invention relates to the field of electronic devices, and in particular, to a method and a terminal for playing audio data.
Background
At present, when a terminal is used for listening to music and watching videos, the terminal plays audio data through a loudspeaker of the terminal under the condition that an earphone is not inserted, and when the earphone is inserted, the terminal plays the audio data through the earphone.
Wherein when audio data is played through headphones, the sound sounds relatively occluded, resulting in a poor surround sound sensation.
Disclosure of Invention
The embodiment of the invention aims to provide a method and a terminal for playing audio data, so as to solve the problem that when the audio data is played through an earphone, sound is blocked, and the sound surrounding sense is poor.
In order to achieve the above object, an embodiment of the present invention provides a method of playing audio data, the method including:
when a playing instruction of audio data is received, judging whether the playing mode of the terminal is an earphone playing mode;
if the playing mode of the terminal is an earphone playing mode, performing data processing on the audio data to obtain first playing data output to an earphone connected with the terminal and second playing data output to a loudspeaker of the terminal; wherein the first playing data is different from the second playing data;
and playing the first playing data through the earphone, and simultaneously playing the second playing data through the loudspeaker to form the playing of the audio data.
An embodiment of the present invention further provides a terminal, including:
the judgment module is used for judging whether the playing mode of the terminal is an earphone playing mode or not when a playing instruction of the audio data is received, and triggering the processing module if the playing mode of the terminal is the earphone playing mode;
the processing module is used for carrying out data processing on the audio data according to the triggering of the judging module to obtain first playing data output to an earphone connected with the terminal and second playing data output to a loudspeaker of the terminal; wherein the first playing data is different from the second playing data;
and the playing module is used for playing the first playing data through the earphone and playing the second playing data through the loudspeaker at the same time to form the playing of the audio data.
The scheme of the invention at least comprises the following beneficial effects:
in the embodiment of the invention, when the playing instruction of the audio data is received, whether the playing mode of the terminal is the earphone playing mode is judged, if the playing mode of the terminal is the earphone playing mode, the audio data is subjected to data processing to obtain first playing data output to an earphone connected with the terminal and second playing data output to a loudspeaker of the terminal (the second playing data is different from the first playing data), the first playing data is finally played through the earphone, and the second playing data is played through the loudspeaker at the same time to form the playing of the audio data, so that the problem that when the audio data is played through the earphone, sound is blocked in a listening mode, the sound surrounding sense is poor is solved, and the effect of improving the sound surrounding sense when the audio data is played through the earphone is achieved.
Drawings
FIG. 1 is a flowchart illustrating a method for playing audio data according to a first embodiment of the present invention;
FIG. 2 is a flowchart illustrating a method for playing audio data according to a second embodiment of the present invention;
FIG. 3 is a flow chart of a method for playing audio data according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a terminal according to a third embodiment of the present invention;
fig. 5 is a schematic structural diagram of a terminal according to a fourth embodiment of the present invention;
fig. 6 is a schematic structural diagram of a terminal according to a fifth embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
First embodiment
As shown in fig. 1, a first embodiment of the present invention provides a method of playing audio data, the method including:
step 101, when receiving a playing instruction of audio data, determining whether a playing mode of a terminal is an earphone playing mode.
In an embodiment of the present invention, the play mode of the terminal includes: a headphone play mode and/or a speaker play mode. And as an example, the terminal may be a smart phone, a tablet computer, or the like.
After the step 101 is executed, the method further includes the following steps: and if the playing mode of the terminal is the loudspeaker playing mode, playing the audio data through the loudspeaker of the terminal. That is, when the play mode of the terminal is the speaker play mode, the audio data may be normally played through the speaker of the terminal.
And 102, if the playing mode of the terminal is the earphone playing mode, performing data processing on the audio data to obtain first playing data output to an earphone connected with the terminal and second playing data output to a loudspeaker of the terminal.
The first playing data is different from the second playing data, so that the sound surrounding sense can be improved when the subsequent earphone and the loudspeaker play the audio data at the same time.
In the embodiment of the present invention, when the play mode of the terminal is the earphone play mode, a specific implementation manner of performing data processing on the audio data to obtain the first play data output to the earphone connected to the terminal and the second play data output to the speaker of the terminal may be: whether the terminal receives the sound effect enhancing instruction is detected, and if the terminal receives the sound effect enhancing instruction, data processing is carried out on the audio data to obtain first playing data output to an earphone connected with the terminal and second playing data output to a loudspeaker of the terminal. Certainly, after the step of detecting whether the terminal receives the sound effect enhancement instruction, the method further comprises the following steps: and if the terminal does not receive the sound effect enhancing instruction, playing the audio data through the earphone. That is, when audio data that need not play to the earphone carries out the audio enhancement in other words, directly play audio data through the earphone can to make the user can not cause noise interference to the environment at terminal place when listening to the audio data that the earphone broadcast.
As an example, the sound enhancement can be turned on or off by setting a switch for controlling the sound enhancement on the setting interface of the terminal. Specifically, when the switch is turned on, it is determined that the terminal has received the sound-effect enhancement instruction, and when the switch is turned off, it is determined that the terminal has not received the sound-effect enhancement instruction.
And 103, playing the first playing data through the earphone, and simultaneously playing the second playing data through the loudspeaker to form the playing of the audio data.
In the embodiment of the present invention, the earphone plays the first playing data and the loudspeaker is turned on to play the second playing data at the same time, that is, the earphone and the loudspeaker play the audio data at the same time. Therefore, in the embodiment of the invention, the effect of improving the sound surrounding sense when the audio data is played through the earphone is achieved by increasing the sounding points.
Therefore, in the embodiment of the invention, when the playing instruction of the audio data is received, whether the playing mode of the terminal is the earphone playing mode is judged, and if the playing mode of the terminal is the earphone playing mode, the audio data is subjected to data processing to obtain the first playing data output to the earphone connected with the terminal and the second playing data output to the loudspeaker of the terminal (the second playing data is different from the first playing data), the first playing data is finally played through the earphone, and the second playing data is played through the loudspeaker at the same time to form the playing of the audio data.
Second embodiment
As shown in fig. 2, a second embodiment of the present invention provides a method of playing audio data, the method including:
step 201, when receiving a playing instruction of audio data, determining whether a playing mode of a terminal is an earphone playing mode.
In an embodiment of the present invention, the play mode of the terminal includes: a headphone play mode and/or a speaker play mode. And as an example, the terminal may be a smart phone, a tablet computer, or the like.
After the step 201 is executed, the method further includes the following steps: and if the playing mode of the terminal is the loudspeaker playing mode, playing the audio data through the loudspeaker of the terminal. That is, when the play mode of the terminal is the speaker play mode, the audio data may be normally played through the speaker of the terminal.
Step 202, if the playing mode of the terminal is the earphone playing mode, acquiring the binaural data of the audio data.
In an embodiment of the present invention, the binaural data may be left channel data and right channel data, which are channel data played by a general earphone. In the embodiment of the present invention, the present method for acquiring binaural data may be adopted to acquire binaural data of audio data, and therefore, the specific method for acquiring binaural data is not described herein.
In addition, in the embodiment of the invention, when the playing mode of the terminal is the earphone playing mode, the dual-channel data of the audio data can be acquired only when the terminal receives the sound effect enhancing instruction; and when the terminal does not receive the sound effect enhancing instruction, the terminal plays the audio data through the earphone.
Step 203, according to the two-channel data, obtaining first playing data output to an earphone connected with the terminal and second playing data output to a loudspeaker of the terminal.
The first playing data is data output to an earphone connected with the terminal, the second playing data is data output to a loudspeaker of the terminal, and the first playing data is different from the second playing data. It should be noted that, in the embodiment of the present invention, the first playing data and the second playing data are obtained to enable the earphone and the speaker to play the audio data at the same time, so as to achieve the effect of enhancing the surround sound.
And step 204, playing the first playing data through the earphone, and simultaneously playing the second playing data through the loudspeaker to form the playing of the audio data.
In the embodiment of the present invention, the terminal may store a corresponding relationship between the playback mode and the playback volume in advance. The corresponding relationship specifically includes: when the playing mode of the terminal is an earphone playing mode, the playing volume of the earphone is increased; when the playing mode of the terminal is a loudspeaker playing mode, the playing volume of the loudspeaker is increased; and when the playing mode of the terminal is an earphone playing mode and a loudspeaker playing mode, the playing volume of the earphone and the playing volume of the loudspeaker are controlled. In addition, in order to improve the sound surrounding effect, the playing volume of the speaker when the playing mode of the terminal is the earphone playing mode and the speaker playing mode should be larger than that of the speaker when the playing mode of the terminal is the speaker playing mode.
In the embodiment of the present invention, the step 203 includes two specific implementation manners. Wherein, the first specific implementation manner of step 203 comprises the following steps: firstly, taking dual-channel data as first playing data, and carrying out filtering processing on a preset frequency band of the dual-channel data to obtain filtered channel data; and then taking the channel data after the filtering processing as second playing data. The preset frequency band may be a low frequency or a high frequency. It should be noted that the filtering processing on the preset frequency band of the binaural data may be implemented by a software algorithm, or may be implemented by hardware filtering. However, it is common knowledge to those skilled in the art to implement filtering by either of these two filtering methods. Therefore, the specific filtering method is not described herein in detail.
The second specific implementation manner of step 203 includes the following steps: firstly, converting the dual-channel data to obtain at least three channel data of audio data in different channels; then, two channel data of the at least three channel data are used as first playing data, and channel data of the at least three channel data except the two channel data are used as second playing data.
It should be noted that, if the first implementation manner is adopted in step 203, the audio data played in step 204 should be 2.1 channel sound, and if the second implementation manner is adopted in step 203, the audio data played in step 204 should be a.0(a is an integer greater than or equal to three, and a is the number of channels of the at least three channel data) channel sound, which is equivalent to the surround sound effect.
In an embodiment of the present invention, after the step 204 is executed, the method further includes the following steps: receiving a first volume adjusting instruction for adjusting the volume of the first playing data, and adjusting the volume of the first playing data according to the first volume adjusting instruction; and/or receiving a second volume adjusting instruction for adjusting the volume of the second playing data, and adjusting the volume of the second playing data according to the second volume adjusting instruction. Therefore, in the embodiment of the present invention, the volume of the first playing data and the volume of the second playing data can be separately and respectively adjusted, so as to make the sound surrounding effect better.
The method is further described herein in an implementation, as shown in fig. 3, in which case the method includes the steps of:
step 301, when receiving a playing instruction of audio data, determining whether a playing mode of a terminal is an earphone playing mode, if the playing mode of the terminal is a speaker playing mode, executing step 302, and if the playing mode of the terminal is the earphone playing mode, executing step 303;
step 302, playing audio data through a loudspeaker of a terminal;
step 303, detecting whether the terminal receives the sound effect enhancing instruction, if not, executing step 304, and if so, executing step 305.
Step 304, playing audio data through an earphone;
step 305, audio data is played simultaneously with the speaker through the earphone.
It can be seen that, in the embodiment of the present invention, when a play instruction of audio data is received, whether a play mode of a terminal is an earphone play mode is determined, and if the play mode of the terminal is the earphone play mode, dual-channel data of the audio data is obtained, according to the dual-channel data, first play data and second play data different from the first play data are obtained, and finally the first play data is played through an earphone, and the second play data is played through a speaker, so as to form a play of the audio data.
Third embodiment
As shown in fig. 4, a third embodiment of the present invention provides a terminal 400, which includes:
the determining module 401 is configured to determine whether a playing mode of the terminal is an earphone playing mode when receiving a playing instruction of the audio data, and trigger the processing module 402 if the playing mode of the terminal is the earphone playing mode;
a processing module 402, configured to perform data processing on the audio data according to the trigger of the determining module 401, to obtain first playing data output to an earphone connected to the terminal and second playing data output to a speaker of the terminal; wherein the first playing data is different from the second playing data;
the playing module 403 is configured to play the first playing data through the earphone, and simultaneously play the second playing data through the speaker, so as to form playing of the audio data.
The terminal 400 may be a smart phone, a tablet computer, or the like.
Optionally, the processing module 402 is specifically configured to detect whether the terminal receives a sound effect enhancement instruction, and if the terminal receives the sound effect enhancement instruction, perform data processing on the audio data to obtain first playing data output to an earphone connected to the terminal and second playing data output to a speaker of the terminal.
Optionally, the processing module 402 includes:
the first processing submodule is used for acquiring the two-channel data of the audio data;
and the second processing submodule is used for obtaining first playing data output to an earphone connected with the terminal and second playing data output to a loudspeaker of the terminal according to the two-channel data.
Optionally, the second processing sub-module includes:
the first processing unit is used for taking the binaural data as first playing data and carrying out filtering processing on a preset frequency band of the binaural data to obtain the filtered binaural data;
and the second processing unit is used for taking the channel data after the filtering processing as second playing data.
Optionally, the second processing sub-module includes:
the third processing unit is used for carrying out conversion processing on the two-channel data to obtain at least three channel data of the audio data in different channels;
and the fourth processing unit is used for taking two channel data in the at least three channel data as the first playing data and taking the channel data except the two channel data in the at least three channel data as the second playing data.
Optionally, the terminal further includes:
the first adjusting module is used for receiving a first volume adjusting instruction for adjusting the volume of the first playing data and adjusting the volume of the first playing data according to the first volume adjusting instruction; and/or
And the second adjusting module is used for receiving a second volume adjusting instruction for adjusting the volume of the second playing data and adjusting the volume of the second playing data according to the second volume adjusting instruction. In the embodiment of the invention, when the terminal receives the playing instruction of the audio data, whether the playing mode of the terminal is the earphone playing mode is judged, and if the playing mode of the terminal is the earphone playing mode, the audio data is subjected to data processing to obtain first playing data output to an earphone connected with the terminal and second playing data output to a loudspeaker of the terminal (the second playing data is different from the first playing data), the first playing data is finally played through the earphone, and the second playing data is played through the loudspeaker to form the playing of the audio data.
It should be noted that the terminal provided in the third embodiment of the present invention is a terminal applying the method, that is, all embodiments of the method are applicable to the terminal, and can achieve the same or similar beneficial effects.
Fourth embodiment
As shown in fig. 5, a fourth embodiment of the present invention provides a terminal 500, including: at least one processor 501, memory 502, at least one network interface 504, and other user interfaces 503. The various components in terminal 500 are coupled together by a bus system 505. It is understood that the bus system 505 is used to enable connection communications between these components. The bus system 505 includes a power bus, a control bus, and a status signal bus in addition to a data bus. For clarity of illustration, however, the various buses are labeled as bus system 505 in FIG. 5.
The user interface 503 may include, among other things, a display, a keyboard, or a pointing device (e.g., a mouse, trackball, touch pad, or touch screen, among others.
It is to be understood that the memory 502 in embodiments of the present invention may be either volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. The non-volatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable PROM (EEPROM), or a flash Memory. Volatile Memory can be Random Access Memory (RAM), which acts as external cache Memory. By way of illustration and not limitation, many forms of RAM are available, such as Static random access memory (Static RAM, SRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic random access memory (Synchronous DRAM, SDRAM), Double Data rate Synchronous Dynamic random access memory (ddr SDRAM), Enhanced Synchronous SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and direct memory bus RAM (DRRAM). The memory 502 of the systems and methods described herein is intended to comprise, without being limited to, these and any other suitable types of memory.
In some embodiments, memory 502 stores elements, executable modules or data structures, or a subset thereof, or an expanded set thereof as follows: an operating system 5021 and application programs 5022.
The operating system 5021 includes various system programs, such as a framework layer, a core library layer, a driver layer, and the like, and is used for implementing various basic services and processing hardware-based tasks. The application 5022 includes various applications, such as a Media Player (Media Player), a Browser (Browser), and the like, for implementing various application services. The program for implementing the method according to the embodiment of the present invention may be included in the application program 5022.
In the embodiment of the present invention, by calling a program or an instruction stored in the memory 502, specifically, a program or an instruction stored in the application 5022, the processor 501 is configured to determine whether a play mode of the terminal is an earphone play mode when receiving a play instruction of audio data; if the playing mode of the terminal is an earphone playing mode, performing data processing on the audio data to obtain first playing data output to an earphone connected with the terminal and second playing data output to a loudspeaker of the terminal; wherein the first playing data is different from the second playing data; and playing the first playing data through the earphone, and simultaneously playing the second playing data through the loudspeaker to form the playing of the audio data.
The method disclosed by the above-mentioned embodiments of the present invention may be applied to the processor 501, or implemented by the processor 501. The processor 501 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 501. The Processor 501 may be a general-purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable Gate Array (FPGA) or other programmable logic device, discrete Gate or transistor logic device, or discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in the memory 502, and the processor 501 reads the information in the memory 502 and completes the steps of the method in combination with the hardware.
It is to be understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or any combination thereof. For a hardware implementation, the Processing units may be implemented within one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), general purpose processors, controllers, micro-controllers, microprocessors, other electronic units configured to perform the functions described herein, or a combination thereof.
For a software implementation, the techniques described herein may be implemented with modules (e.g., procedures, functions, and so on) that perform the functions described herein. The software codes may be stored in a memory and executed by a processor. The memory may be implemented within the processor or external to the processor.
Optionally, the processor 501 is further configured to: detecting whether the terminal receives a sound effect enhancement instruction; and if the terminal receives the sound effect enhancing instruction, performing data processing on the audio data to obtain first playing data output to an earphone connected with the terminal and second playing data output to a loudspeaker of the terminal.
Optionally, the processor 501 is further configured to: acquiring dual-channel data of audio data; according to the two-channel data, first playing data output to an earphone connected with the terminal and second playing data output to a loudspeaker of the terminal are obtained.
Optionally, the processor 501 is further configured to: taking the dual-channel data as first playing data, and carrying out filtering processing on a preset frequency band of the dual-channel data to obtain filtered channel data; and taking the channel data after the filtering processing as second playing data.
Optionally, the processor 501 is further configured to: converting the two-channel data to obtain at least three channel data of the audio data in different channels; and taking two channel data of the at least three channel data as first playing data, and taking the channel data except the two channel data of the at least three channel data as second playing data.
Optionally, the processor 501 is further configured to: receiving a first volume adjusting instruction for adjusting the volume of the first playing data, and adjusting the volume of the first playing data according to the first volume adjusting instruction; and/or receiving a second volume adjusting instruction for adjusting the volume of the second playing data, and adjusting the volume of the second playing data according to the second volume adjusting instruction.
The terminal 500 can implement the processes implemented by the terminal in the foregoing embodiments, and in order to avoid repetition, the detailed description is omitted here.
In the fourth embodiment of the present invention, when receiving a play instruction of audio data, the terminal determines whether the play mode of the terminal is an earphone play mode, and if the play mode of the terminal is the earphone play mode, performs data processing on the audio data to obtain first play data output to an earphone connected to the terminal and second play data output to a speaker of the terminal (the second play data is different from the first play data), and finally plays the first play data through the earphone, and simultaneously plays the second play data through the speaker to form playing of the audio data.
Fifth embodiment
As shown in fig. 6, a fifth embodiment of the present invention provides a terminal, and the terminal 600 may be a mobile phone, a tablet computer, a Personal Digital Assistant (PDA), or a vehicle-mounted computer.
The terminal 600 in fig. 6 includes a Radio Frequency (RF) circuit 610, a memory 620, an input unit 630, a display unit 640, a processor 660, an audio circuit 670, a wifi (wireless fidelity) module 680, and a power supply 690.
The input unit 630 may be used, among other things, to receive numeric or character information input by a user and to generate signal inputs related to user settings and function control of the terminal 600. Specifically, in the embodiment of the present invention, the input unit 630 may include a touch panel 631. The touch panel 631, also referred to as a touch screen, may collect touch operations of a user (e.g., operations of the user on the touch panel 631 by using a finger, a stylus, or any other suitable object or accessory) thereon or nearby, and drive the corresponding connection device according to a preset program. Alternatively, the touch panel 631 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 660, and can receive and execute commands sent by the processor 660. In addition, the touch panel 631 may be implemented using various types, such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 631, the input unit 630 may also include other input devices 632, and the other input devices 632 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
Among other things, the display unit 640 may be used to display information input by a user or information provided to the user and various menu interfaces of the terminal 600. The display unit 640 may include a display panel 641, and optionally, the display panel 641 may be configured in the form of an LCD or an Organic Light-Emitting Diode (OLED).
It should be noted that the touch panel 631 may cover the display panel 641 to form a touch display screen, and when the touch display screen detects a touch operation thereon or nearby, the touch display screen is transmitted to the processor 660 to determine the type of the touch event, and then the processor 660 provides a corresponding visual output on the touch display screen according to the type of the touch event.
The touch display screen comprises an application program interface display area and a common control display area. The arrangement modes of the application program interface display area and the common control display area are not limited, and can be an arrangement mode which can distinguish two display areas, such as vertical arrangement, left-right arrangement and the like. The application interface display area may be used to display an interface of an application. Each interface may contain at least one interface element such as an icon and/or widget desktop control for an application. The application interface display area may also be an empty interface that does not contain any content. The common control display area is used for displaying controls with high utilization rate, such as application icons like setting buttons, interface numbers, scroll bars, phone book icons and the like.
The processor 660 is a control center of the terminal 600, connects various parts of the entire mobile phone by using various interfaces and lines, and performs various functions of the terminal 600 and processes data by operating or executing software programs and/or modules stored in the first memory 621 and calling data stored in the second memory 622, thereby integrally monitoring the terminal 600. Optionally, processor 660 may include one or more processing units.
In the embodiment of the present invention, the processor 660 is configured to determine whether the play mode of the terminal is the earphone play mode when receiving a play instruction of audio data by calling a software program and/or a module stored in the first memory 621 and/or data stored in the second memory 622; if the playing mode of the terminal is an earphone playing mode, performing data processing on the audio data to obtain first playing data output to an earphone connected with the terminal and second playing data output to a loudspeaker of the terminal; wherein the first playing data is different from the second playing data; and playing the first playing data through the earphone, and simultaneously playing the second playing data through the loudspeaker to form the playing of the audio data.
Optionally, the processor 660 is further configured to: detecting whether the terminal receives a sound effect enhancement instruction; and if the terminal receives the sound effect enhancing instruction, performing data processing on the audio data to obtain first playing data output to an earphone connected with the terminal and second playing data output to a loudspeaker of the terminal.
Optionally, the processor 660 is further configured to: acquiring dual-channel data of audio data; according to the two-channel data, first playing data output to an earphone connected with the terminal and second playing data output to a loudspeaker of the terminal are obtained.
Optionally, the processor 660 is further configured to: taking the dual-channel data as first playing data, and carrying out filtering processing on a preset frequency band of the dual-channel data to obtain filtered channel data; and taking the channel data after the filtering processing as second playing data.
Optionally, the processor 660 is further configured to: converting the two-channel data to obtain at least three channel data of the audio data in different channels; and taking two channel data of the at least three channel data as first playing data, and taking the channel data except the two channel data of the at least three channel data as second playing data.
Optionally, the processor 660 is further configured to: receiving a first volume adjusting instruction for adjusting the volume of the first playing data, and adjusting the volume of the first playing data according to the first volume adjusting instruction; and/or receiving a second volume adjusting instruction for adjusting the volume of the second playing data, and adjusting the volume of the second playing data according to the second volume adjusting instruction.
It can be seen that, in the fifth embodiment of the present invention, when receiving a play instruction of audio data, a terminal determines whether a play mode of the terminal is an earphone play mode, and if the play mode of the terminal is the earphone play mode, performs data processing on the audio data to obtain first play data output to an earphone connected to the terminal and second play data output to a speaker of the terminal (the second play data is different from the first play data), and finally plays the first play data through the earphone, and simultaneously plays the second play data through the speaker to form playing of the audio data.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (6)

1. A method of playing audio data, the method comprising:
when a playing instruction of audio data is received, judging whether the playing mode of the terminal is an earphone playing mode;
if the playing mode of the terminal is an earphone playing mode, performing data processing on the audio data to obtain first playing data output to an earphone connected with the terminal and second playing data output to a loudspeaker of the terminal; wherein the first playback data is different from the second playback data;
playing the first playing data through the earphone, and simultaneously playing the second playing data through the loudspeaker to form the playing of the audio data;
wherein, data processing is performed on the audio data to obtain first playing data output to an earphone connected to the terminal and second playing data output to a speaker of the terminal, including:
acquiring the two-channel data of the audio data;
according to the two-channel data, first playing data output to an earphone connected with the terminal and second playing data output to a loudspeaker of the terminal are obtained;
wherein, according to the binaural data, obtaining first playing data output to an earphone connected to the terminal and second playing data output to a speaker of the terminal, includes:
taking the two-channel data as the first playing data, and carrying out filtering processing on a preset frequency band of the two-channel data to obtain filtered channel data;
taking the filtered channel data as the second playing data;
the terminal stores a corresponding relationship between a playing mode and playing volume in advance, wherein the corresponding relationship comprises:
when the playing mode of the terminal is an earphone playing mode, the playing volume is the playing volume of the earphone;
when the playing mode of the terminal is a loudspeaker playing mode, the playing volume is the playing volume of a loudspeaker;
when the playing mode of the terminal is an earphone playing mode and a loudspeaker playing mode, the playing volume is the playing volume of the earphone and the playing volume of the loudspeaker; the playing mode of the terminal is the playing volume of the loudspeaker when the playing mode of the earphone and the playing mode of the loudspeaker are larger than each other, and the playing mode of the terminal is the playing volume of the loudspeaker when the playing mode of the loudspeaker is the playing mode of the loudspeaker.
2. The method according to claim 1, wherein the step of performing data processing on the audio data to obtain first playback data output to a headset connected to the terminal and second playback data output to a speaker of the terminal comprises:
detecting whether the terminal receives a sound effect enhancement instruction;
and if the terminal receives the sound effect enhancing instruction, performing data processing on the audio data to obtain first playing data output to an earphone connected with the terminal and second playing data output to a loudspeaker of the terminal.
3. The method of claim 1, wherein after the step of playing the first playback data through the headphones and simultaneously playing the second playback data through the speaker to form the playback of the audio data, the method further comprises:
receiving a first volume adjusting instruction for adjusting the volume of the first playing data, and adjusting the volume of the first playing data according to the first volume adjusting instruction; and/or
And receiving a second volume adjusting instruction for adjusting the volume of the second playing data, and adjusting the volume of the second playing data according to the second volume adjusting instruction.
4. A terminal, characterized in that the terminal comprises:
the system comprises a judging module, a processing module and a processing module, wherein the judging module is used for judging whether a playing mode of a terminal is an earphone playing mode when a playing instruction of audio data is received, and triggering the processing module if the playing mode of the terminal is the earphone playing mode;
the processing module is used for carrying out data processing on the audio data according to the triggering of the judging module to obtain first playing data output to an earphone connected with the terminal and second playing data output to a loudspeaker of the terminal; wherein the first playback data is different from the second playback data;
the playing module is used for playing the first playing data through the earphone and playing the second playing data through the loudspeaker at the same time to form the playing of the audio data;
wherein the processing module comprises:
the first processing submodule is used for acquiring the two-channel data of the audio data;
the second processing submodule is used for obtaining first playing data output to an earphone connected with the terminal and second playing data output to a loudspeaker of the terminal according to the two-channel data;
wherein the second processing sub-module comprises:
the first processing unit is used for taking the binaural data as the first playing data and carrying out filtering processing on a preset frequency band of the binaural data to obtain filtered vocal data;
a second processing unit, configured to use the channel data after the filtering processing as the second playing data;
the terminal stores a corresponding relationship between a playing mode and playing volume in advance, wherein the corresponding relationship comprises:
when the playing mode of the terminal is an earphone playing mode, the playing volume is the playing volume of the earphone;
when the playing mode of the terminal is a loudspeaker playing mode, the playing volume is the playing volume of a loudspeaker;
when the playing mode of the terminal is an earphone playing mode and a loudspeaker playing mode, the playing volume is the playing volume of the earphone and the playing volume of the loudspeaker; the playing mode of the terminal is the playing volume of the loudspeaker when the playing mode of the earphone and the playing mode of the loudspeaker are larger than each other, and the playing mode of the terminal is the playing volume of the loudspeaker when the playing mode of the loudspeaker is the playing mode of the loudspeaker.
5. The terminal according to claim 4, wherein the processing module is specifically configured to detect whether the terminal receives a sound effect enhancement instruction, and if the terminal receives the sound effect enhancement instruction, perform data processing on the audio data to obtain first playing data output to an earphone connected to the terminal and second playing data output to a speaker of the terminal.
6. The terminal of claim 4, further comprising:
the first adjusting module is used for receiving a first volume adjusting instruction used for adjusting the volume of the first playing data and adjusting the volume of the first playing data according to the first volume adjusting instruction; and/or
And the second adjusting module is used for receiving a second volume adjusting instruction used for adjusting the volume of the second playing data and adjusting the volume of the second playing data according to the second volume adjusting instruction.
CN201710095937.5A 2017-02-22 2017-02-22 Method and terminal for playing audio data Active CN106886388B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710095937.5A CN106886388B (en) 2017-02-22 2017-02-22 Method and terminal for playing audio data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710095937.5A CN106886388B (en) 2017-02-22 2017-02-22 Method and terminal for playing audio data

Publications (2)

Publication Number Publication Date
CN106886388A CN106886388A (en) 2017-06-23
CN106886388B true CN106886388B (en) 2019-12-20

Family

ID=59178892

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710095937.5A Active CN106886388B (en) 2017-02-22 2017-02-22 Method and terminal for playing audio data

Country Status (1)

Country Link
CN (1) CN106886388B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114567840B (en) * 2020-11-27 2024-02-06 北京小米移动软件有限公司 Audio output method and device, mobile terminal and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN204090123U (en) * 2014-06-13 2015-01-07 深圳Tcl新技术有限公司 Audio output control circuit and audio-frequence player device
CN105898503A (en) * 2016-04-25 2016-08-24 乐视控股(北京)有限公司 Playing control method, device and system for mobile terminal
CN106060719A (en) * 2016-05-31 2016-10-26 维沃移动通信有限公司 Terminal audio output control method and terminal
CN106210312A (en) * 2016-07-11 2016-12-07 深圳天珑无线科技有限公司 A kind of played in stereo method based on mobile terminal, mobile terminal and system

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9002026B2 (en) * 2011-10-21 2015-04-07 Merry Electronics Co., Ltd. Headphone with speaker function
CN103929694A (en) * 2014-04-14 2014-07-16 杨璐馨 Earphone effect 3D sound hearing ring
CN106209130B (en) * 2016-07-26 2019-01-04 维沃移动通信有限公司 A kind of wireless headset and the method using wireless headset output audio data
CN106341719A (en) * 2016-09-12 2017-01-18 王海 Synchronized audio play method simultaneously using various kinds of play modules of equipment and apparatus thereof

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN204090123U (en) * 2014-06-13 2015-01-07 深圳Tcl新技术有限公司 Audio output control circuit and audio-frequence player device
CN105898503A (en) * 2016-04-25 2016-08-24 乐视控股(北京)有限公司 Playing control method, device and system for mobile terminal
CN106060719A (en) * 2016-05-31 2016-10-26 维沃移动通信有限公司 Terminal audio output control method and terminal
CN106210312A (en) * 2016-07-11 2016-12-07 深圳天珑无线科技有限公司 A kind of played in stereo method based on mobile terminal, mobile terminal and system

Also Published As

Publication number Publication date
CN106886388A (en) 2017-06-23

Similar Documents

Publication Publication Date Title
CN107105367B (en) Audio signal processing method and terminal
KR101785323B1 (en) Method and apparatus for providing a user interface in a portable terminal
US10168797B2 (en) Terminal apparatus, audio system, and method for controlling sound volume of external speaker thereof
CN107277268B (en) Audio playing method and mobile terminal
KR102217641B1 (en) Electronic device and method for controlling audio input/output
CN107122161B (en) Audio data playing control method and terminal
US10067666B2 (en) User terminal device and method for controlling the same
CN106341535B (en) A kind of audio play control method and mobile terminal
US20140086434A1 (en) Method and apparatus for customizing audio signal processing for a user
US9798512B1 (en) Context-based volume adjustment
CN106993097B (en) Music playing method and mobile terminal
CN107071174A (en) A kind of method of speech processing and mobile terminal
CN106817656B (en) A kind of outer method and mobile terminal for putting sound system audio calibration
CN107369459A (en) A kind of audio-frequency processing method and mobile terminal
CN107105342B (en) Video playing control method and mobile terminal
US10140086B2 (en) Electronic device and audio ouputting method thereof
CN106303841B (en) Audio playing mode switching method and mobile terminal
CN106161776B (en) Volume adjusting method and mobile terminal
CN106407027B (en) Information display method of mobile terminal and mobile terminal
CN106101409A (en) A kind of mobile terminal and control method
CN107707742B (en) Audio file playing method and mobile terminal
CN107145331B (en) Charging and audio data processing method and terminal
CN107370660B (en) Information perception method and mobile terminal
CN107690032B (en) Call control method and mobile terminal
US9402129B2 (en) Audio control method and audio player using audio control method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20171109

Address after: 283 No. 523860 Guangdong province Dongguan city Changan town usha BBK Avenue

Applicant after: VIVO MOBILE COMMUNICATION CO., LTD.

Applicant after: Wewo Mobile Communication Co. Ltd. Beijing branch

Address before: 283 No. 523860 Guangdong province Dongguan city Changan town usha BBK Avenue

Applicant before: VIVO MOBILE COMMUNICATION CO., LTD.

GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20200512

Address after: 283 No. 523860 Guangdong province Dongguan city Changan town usha BBK Avenue

Patentee after: VIVO MOBILE COMMUNICATION Co.,Ltd.

Address before: 283 No. 523860 Guangdong province Dongguan city Changan town usha BBK Avenue

Co-patentee before: Wewo Mobile Communication Co. Ltd. Beijing branch

Patentee before: VIVO MOBILE COMMUNICATION Co.,Ltd.