CN106060261B - Audio playing device and method - Google Patents

Audio playing device and method Download PDF

Info

Publication number
CN106060261B
CN106060261B CN201610460593.9A CN201610460593A CN106060261B CN 106060261 B CN106060261 B CN 106060261B CN 201610460593 A CN201610460593 A CN 201610460593A CN 106060261 B CN106060261 B CN 106060261B
Authority
CN
China
Prior art keywords
playing
audio
volume
mode
volume level
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
CN201610460593.9A
Other languages
Chinese (zh)
Other versions
CN106060261A (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.)
Nubia Technology Co Ltd
Original Assignee
Nubia Technology 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 Nubia Technology Co Ltd filed Critical Nubia Technology Co Ltd
Priority to CN201610460593.9A priority Critical patent/CN106060261B/en
Publication of CN106060261A publication Critical patent/CN106060261A/en
Application granted granted Critical
Publication of CN106060261B publication Critical patent/CN106060261B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/72442User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality for playing music files
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions

Landscapes

  • Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Telephone Function (AREA)
  • Circuit For Audible Band Transducer (AREA)

Abstract

The invention discloses an audio playing device, which comprises: the terminal comprises a determining module, a playing module and a processing module, wherein the determining module is used for determining the current playing mode of the terminal, and the playing mode comprises an earphone mode and a loudspeaker mode; the acquisition module is used for acquiring the determined playing volume corresponding to the playing mode, wherein the playing volume corresponding to different playing modes is different; and the playing module is used for playing the audio according to the acquired playing volume. The invention also discloses an audio playing method. The invention improves the flexibility and convenience of volume adjustment in the audio playing process.

Description

Audio playing device and method
Technical Field
The present invention relates to the field of audio, and in particular, to an audio playing apparatus and method.
Background
At present, when a terminal is used for making a call or listening to a song, if an earphone is just inserted, sound is particularly loud and difficult to feel, a user can manually turn down the volume, and when the earphone is pulled out and a loudspeaker is used, the volume is not changed, the sound is particularly loud at the moment, so that the sound needs to be manually turned up, when the terminal plays audio in different playing modes, the playing volume of the audio needs to be manually and continuously adjusted, and the adjustment of the volume is not flexible and convenient.
Disclosure of Invention
The invention mainly aims to provide an audio playing device and an audio playing method, and aims to solve the technical problem that the volume cannot be flexibly and conveniently adjusted in the existing audio playing process.
In order to achieve the above object, the present invention provides an audio playing device, including:
the terminal comprises a determining module, a playing module and a processing module, wherein the determining module is used for determining the current playing mode of the terminal, and the playing mode comprises an earphone mode and a loudspeaker mode;
the acquisition module is used for acquiring the determined playing volume corresponding to the playing mode, wherein the playing volume corresponding to different playing modes is different;
and the playing module is used for playing the audio according to the acquired playing volume.
Optionally, the obtaining module includes:
the determining submodule is used for determining each accumulated playing time length for playing the audio at each preset volume level in the playing mode;
the first obtaining submodule is used for obtaining the volume level with the longest accumulative playing time length when the accumulative playing time length which is not zero exists in all the accumulative playing time lengths;
and the first processing submodule is used for taking the volume corresponding to the acquired volume level as the playing volume corresponding to the playing mode.
Optionally, the determining sub-module includes:
a determining unit, configured to determine an application for playing the audio in the play mode;
and the acquisition unit is used for acquiring each accumulated playing time length for playing the audio at each preset volume level when the audio is played by the application.
Optionally, the obtaining module further includes:
the second obtaining submodule is used for obtaining a preset volume level corresponding to the playing mode based on the mapping relation between the playing mode and the preset volume level when each accumulated playing time is zero, wherein the preset volume level in the earphone mode is smaller than the preset volume level in the loudspeaker mode;
and the second processing submodule is used for taking the volume corresponding to the acquired preset volume level as the playing volume corresponding to the playing mode.
Optionally, the obtaining module is further configured to obtain the adjusted volume when receiving an instruction to adjust the volume;
the audio playing device further comprises:
and the processing module is used for playing the audio according to the adjusted volume and updating the accumulated playing time of the volume before adjustment.
In addition, in order to achieve the above object, the present invention further provides an audio playing method, where the audio playing method includes:
determining a current play mode of the terminal, wherein the play mode comprises an earphone mode and a loudspeaker mode;
acquiring the determined playing volume corresponding to the playing mode, wherein the playing volume corresponding to different playing modes is different;
and playing the audio according to the acquired playing volume.
Optionally, the step of obtaining the determined play volume corresponding to the play mode includes:
determining each accumulated playing time length for audio playing at each preset volume level in the playing mode;
acquiring the volume grade with the longest accumulative playing time when the accumulative playing time which is not zero exists in each accumulative playing time;
and taking the volume corresponding to the acquired volume level as the playing volume corresponding to the playing mode.
Optionally, the step of determining each cumulative playing time for playing the audio at each preset volume level in the playing mode includes:
determining an application for playing the audio in the play mode;
and acquiring each accumulated playing time length for playing the audio at each preset volume level when the audio is played by the application.
Optionally, after the step of determining each cumulative playing time of the audio playing at each preset volume level in the playing mode, the audio playing method further includes:
when each accumulated playing time is zero, acquiring a preset volume level corresponding to the playing mode based on the mapping relation between the playing mode and the preset volume level, wherein the preset volume level in the earphone mode is smaller than the preset volume level in the loudspeaker mode;
and taking the volume corresponding to the acquired preset volume level as the playing volume corresponding to the playing mode.
Optionally, after the step of playing the audio according to the acquired playing volume, the audio playing method further includes:
when receiving a volume adjusting instruction, acquiring the adjusted volume;
and playing the audio according to the adjusted volume, and updating the accumulated playing time of the volume before adjustment.
According to the audio playing device and method provided by the invention, the determining module firstly determines the current playing mode of the terminal in the audio playing process, the obtaining module then obtains the playing volume corresponding to the determined playing mode, and finally the playing module plays the audio according to the obtained playing volume instead of manually adjusting the volume of the audio when playing the audio in different playing modes.
Drawings
Fig. 1 is a schematic diagram of a hardware structure of an alternative mobile terminal for implementing various embodiments of the present invention;
FIG. 2 is a block diagram of an audio playback device according to a first embodiment of the present invention;
FIG. 3 is a schematic diagram of a scene of playing audio in the earphone mode according to the present invention;
FIG. 4 is a schematic diagram of a scenario of playing audio in speaker mode according to the present invention;
FIG. 5 is a schematic diagram of a first refinement module of the acquisition module of FIG. 2;
FIG. 6 is a schematic diagram of a refinement module of the determination submodule of FIG. 5;
FIG. 7 is a schematic diagram of a second refinement of the acquisition module of FIG. 2;
FIG. 8 is a block diagram of an audio playback device according to a fifth embodiment of the present invention;
FIG. 9 is a flowchart illustrating an audio playing method according to a first embodiment of the present invention;
fig. 10 is a schematic flow chart illustrating a first embodiment of obtaining the determined play volume corresponding to the play mode according to the present invention;
fig. 11 is a schematic flowchart of a first embodiment of determining each cumulative playing time for audio playing at each preset volume level in the playing mode according to the present invention;
fig. 12 is a schematic flowchart of a second embodiment of obtaining a play data corresponding to the determined play mode according to the present invention;
fig. 13 is a flowchart illustrating an audio playing method according to a fifth embodiment of the present invention.
The implementation, functional features and advantages of the present invention will be described with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
A mobile terminal implementing various embodiments of the present invention will now be described with reference to the accompanying drawings. In the following description, suffixes such as "module", "component", or "unit" used to denote elements are used only for facilitating the explanation of the present invention, and have no specific meaning in themselves. Thus, "module" and "component" may be used in a mixture.
The mobile terminal may be implemented in various forms. For example, the terminal described in the present invention may include a mobile terminal such as a mobile phone, a smart phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a navigation device, and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. In the following, it is assumed that the terminal is a mobile terminal. However, it will be understood by those skilled in the art that the configuration according to the embodiment of the present invention can be applied to a fixed type terminal in addition to elements particularly used for moving purposes.
Fig. 1 is a schematic hardware structure of an optional mobile terminal for implementing various embodiments of the present invention.
The mobile terminal 100 may include a wireless communication unit 110, an a/V (audio/video) input unit 120, a user input unit 130, a sensing unit 140, an output unit 150, a memory 160, an interface unit 170, a controller 180, and a power supply unit 190, etc. Fig. 1 illustrates a mobile terminal having various components, but it is to be understood that not all illustrated components are required to be implemented. More or fewer components may alternatively be implemented. Elements of the mobile terminal will be described in detail below.
The wireless communication unit 110 typically includes one or more components that allow radio communication between the mobile terminal 100 and a wireless communication device or network.
The a/V input unit 120 is used to receive an audio or video signal. The a/V input unit 120 includes a microphone 121, and the microphone 121 can receive sounds (audio data) via the microphone in a phone call mode, a recording mode, a voice recognition mode, or the like, and can process such sounds into audio data. The microphone 121 may implement various types of noise canceling (or suppression) algorithms to cancel (or suppress) noise or interference generated in the course of receiving and transmitting an audio signal.
The user input unit 130 may generate key input data according to a command input by a user to control various operations of the mobile terminal. The user input unit 130 allows a user to input various types of information, and may include a keyboard, dome sheet, touch pad (e.g., a touch-sensitive member that detects changes in resistance, pressure, capacitance, and the like due to being touched), scroll wheel, joystick, and the like. In particular, when the touch pad is superimposed on the display unit 151 in the form of a layer, a touch screen may be formed.
The sensing unit 140 detects a current state of the mobile terminal 100 (e.g., an open or closed state of the mobile terminal 100), a position of the mobile terminal 100, presence or absence of contact (i.e., touch input) by a user with the mobile terminal 100, an orientation of the mobile terminal 100, acceleration or jerky movement and direction of the mobile terminal 100, and the like, and generates a command or signal for controlling an operation of the mobile terminal 100. For example, when the mobile terminal 100 is implemented as a slide-type mobile phone, the sensing unit 140 may sense whether the slide-type phone is opened or closed. In addition, the sensing unit 140 can detect whether the power supply unit 190 supplies power or whether the interface unit 170 is coupled with an external device.
The interface unit 170 serves as an interface through which at least one external device is connected to the mobile terminal 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 identification module may store various information for authenticating a user using the mobile terminal 100 and may include a User Identity Module (UIM), a Subscriber Identity Module (SIM), a Universal Subscriber Identity Module (USIM), and the like. In addition, a device having an identification module (hereinafter, referred to as an "identification device") may take the form of a smart card, and thus, the identification device may be connected with the mobile terminal 100 via a port or other connection means. The interface unit 170 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 mobile terminal 100 or may be used to transmit data between the mobile terminal and the external device.
In addition, when the mobile terminal 100 is connected with an external cradle, the interface unit 170 may serve as a path through which power is supplied from the cradle to the mobile terminal 100 or may serve as a path through which various command signals input from the cradle are transmitted to the mobile terminal. Various command signals or power input from the cradle may be used as signals for recognizing whether the mobile terminal is accurately mounted on the cradle. The output unit 150 is configured to provide output signals (e.g., audio signals, video signals, alarm signals, vibration signals, etc.) in a visual, audio, and/or tactile manner. The output unit 150 may include a display unit 151 and an audio output module 152.
The display unit 151 may display information processed in the mobile terminal 100. For example, when the mobile terminal 100 is in a phone call mode, the display unit 151 may display a User Interface (UI) or a Graphical User Interface (GUI) related to a call or other communication (e.g., text messaging, multimedia file downloading, etc.). When the mobile terminal 100 is in a video call mode or an image capturing mode, the display unit 151 may display a captured image and/or a received image, a UI or GUI showing a video or an image and related functions, and the like.
Meanwhile, when the display unit 151 and the touch pad are overlapped with each other in the form of a layer to form a touch screen, the display unit 151 may serve as an input device and an output device. The display unit 151 may include at least one of a Liquid Crystal Display (LCD), a thin film transistor LCD (TFT-LCD), an Organic Light Emitting Diode (OLED) display, a flexible display, a three-dimensional (3D) display, and the like. Some of these displays may be configured to be transparent to allow a user to view from the outside, which may be referred to as transparent displays, and a typical transparent display may be, for example, a TOLED (transparent organic light emitting diode) display or the like. Depending on the particular desired implementation, the mobile terminal 100 may include two or more display units (or other display devices), for example, the mobile terminal may include an external display unit (not shown) and an internal display unit (not shown). The touch screen may be used to detect a touch input pressure as well as a touch input position and a touch input area.
The audio output module 152 may convert audio data received by the wireless communication unit 110 or stored in the memory 160 into an audio signal and output as sound when the mobile terminal is in a call signal reception mode, a call mode, a recording mode, a voice recognition mode, a broadcast reception mode, or the like. Also, the audio output module 152 may provide audio output related to a specific function performed by the mobile terminal 100 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output module 152 may include a microphone, a buzzer, and the like.
The memory 160 may store software programs and the like for processing and controlling operations performed by the controller 180, or may temporarily store data (e.g., a phonebook, messages, still images, videos, and the like) that has been or will be output. Also, the memory 160 may store data regarding various ways of vibration and audio signals output when a touch is applied to the touch screen.
The memory 160 may include at least one type of storage medium including a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, and the like. Also, the mobile terminal 100 may cooperate with a network storage device that performs a storage function of the memory 160 through a network connection.
The controller 180 generally controls the overall operation of the mobile terminal. For example, the controller 180 performs control and processing related to voice calls, data communications, video calls, and the like. In addition, the controller 180 may include a multimedia module 181 for reproducing (or playing back) multimedia data, and the multimedia module 181 may be constructed within the controller 180 or may be constructed separately from the controller 180. The controller 180 may perform a pattern recognition process to recognize a handwriting input or a picture drawing input performed on the touch screen as a character or an image.
The power supply unit 190 receives external power or internal power and provides appropriate power required to operate various elements and components under the control of the controller 180.
The various embodiments described herein may be implemented in a computer-readable medium using, for example, computer software, hardware, or any combination thereof. For a hardware implementation, the embodiments described herein may be implemented using at least one of an Application Specific Integrated Circuit (ASIC), a Digital Signal Processor (DSP), a Digital Signal Processing Device (DSPD), a Programmable Logic Device (PLD), a Field Programmable Gate Array (FPGA), a processor, a controller, a microcontroller, a microprocessor, an electronic unit designed to perform the functions described herein, and in some cases, such embodiments may be implemented in the controller 180. For a software implementation, the implementation such as a process or a function may be implemented with a separate software module that allows performing at least one function or operation. The software codes may be implemented by software applications (or programs) written in any suitable programming language, which may be stored in the memory 160 and executed by the controller 180.
Up to this point, mobile terminals have been described in terms of their functionality. Hereinafter, a slide-type mobile terminal among various types of mobile terminals, such as a folder-type, bar-type, swing-type, slide-type mobile terminal, and the like, will be described as an example for the sake of brevity. Accordingly, the present invention can be applied to any type of mobile terminal, and is not limited to a slide type mobile terminal.
Based on the above hardware structure of the mobile terminal, the present invention provides various embodiments of the audio playing device.
Referring to fig. 2, fig. 2 is a block diagram of an audio playback device according to a first embodiment of the present invention.
It should be emphasized that the block diagram of fig. 2 is merely an exemplary diagram of a preferred embodiment, and those skilled in the art can easily add new blocks around the blocks of the audio playing apparatus shown in fig. 2; the names of the modules are self-defined names which are only used for assisting in understanding the program function blocks of the audio playing device and are not used for limiting the technical scheme of the invention, and the core of the technical scheme of the invention is the functions which are achieved by the modules with the respective defined names.
This embodiment proposes an audio playback apparatus, which includes:
a determining module 10, configured to determine a current play mode of the terminal, where the play mode includes an earphone mode and a speaker mode;
an obtaining module 20, configured to obtain the determined play volume corresponding to the play mode, where the play volumes corresponding to different play modes are different;
and the playing module 30 is configured to play the audio according to the acquired playing volume.
In this embodiment, when detecting a play mode switch during an audio playing process, the determining module 10 first determines a current play mode of the terminal, and then the obtaining module 20 obtains a play volume corresponding to the determined play mode, where the obtaining module 20 obtains the play volume corresponding to the determined play mode includes:
a. determining a preset volume level corresponding to the play mode, then acquiring a volume corresponding to the preset volume level, and taking the acquired volume as the play volume corresponding to the play mode, for example, if 10 levels are divided in advance, and the preset volume level is level 5, acquiring a volume corresponding to level 5;
b. and determining the preset accumulated playing time of each volume level, and taking the volume corresponding to the volume level with the longest accumulated playing time as the playing volume corresponding to the playing mode.
Since the playing modes include the earphone mode and the speaker mode, and the playing volumes corresponding to different playing modes are different, after the determining module 10 determines the current playing mode, the obtaining module 20 may obtain the playing volume corresponding to the current playing mode, and finally the playing module 30 plays the audio according to the obtained playing volume.
It should be understood that the audio is audio in a preset application of the terminal, and the preset application includes an audio application, an audio-video application, or other applications including voice, such as a WeChat application, and the like.
For better understanding of the present embodiment, the following detailed examples are given: when the terminal is plugged into an earphone, referring to fig. 3, an earphone mode is entered, preferably, the earphone mode includes a preset number of levels of volume levels, for example, 10 levels, then, when audio is played in the earphone mode, a corresponding playing volume in the earphone mode is obtained, and if the corresponding playing volume in the earphone mode is a 4 th level of volume, at this time, the audio is played according to the 4 th level of volume.
When the terminal is not plugged into the earphone, referring to fig. 4, the terminal is in the speaker mode, and the volume levels of the preset levels are included in the speaker mode, for example, 10 levels, when the audio is played in the speaker mode, the corresponding playing volume in the speaker mode is obtained, preferably, the playing volume level corresponding to the speaker mode is 6 th level, and at this time, the audio is played according to the volume of the 6 th level.
In the audio playing device provided by this embodiment, in the audio playing process, the determining module determines the current playing mode of the terminal first, the obtaining module obtains the playing volume corresponding to the determined playing mode, and finally the playing module plays the audio according to the obtained playing volume, instead of manually adjusting the volume of the audio when playing the audio in different playing modes.
Further, a second embodiment of the audio playback device of the present invention is provided.
The second embodiment of the audio playing apparatus is different from the first embodiment of the audio playing apparatus in that, referring to fig. 5, the obtaining module 20 includes:
a determining submodule 21, configured to determine each accumulated playing time for performing audio playing at each preset volume level in the playing mode;
the first obtaining submodule 22 is configured to obtain a volume level with the longest cumulative playing time when a cumulative playing time that is not zero exists in each cumulative playing time;
the first processing submodule 23 is configured to use the volume corresponding to the acquired volume level as the play volume corresponding to the play mode.
In this embodiment, after determining the current play mode of the terminal, the determining submodule 21 determines each volume level included in the play mode. In this embodiment, different playback modes may all correspond to the same volume level, for example, the headphone mode and the speaker mode all correspond to volume levels of 1-10; of course, different playback modes may correspond to different volume levels, for example, the earphone mode corresponds to a volume level of 1-5, and the speaker mode corresponds to a volume level of 6-10; or different play modes correspond to partially same volume levels, for example, the earphone mode corresponds to a volume level of 1-8 levels, and the speaker mode corresponds to a volume level of 4-10 levels, it should be understood that the three manners listed above are merely exemplary, and other settings may be performed according to specific needs, and will not be described herein again.
After determining each volume level corresponding to the play mode, the determining submodule 21 determines each cumulative play time for playing audio at each preset volume level in the play mode, then determines whether the cumulative play time corresponding to each volume level is zero, if there is a cumulative play time that is not zero in each cumulative play time, it indicates that the audio has been played in the play mode, at this time, the first obtaining submodule 22 obtains the volume level with the longest cumulative play time, and the first processing submodule 23 takes the volume corresponding to the obtained volume level as the play volume corresponding to the play mode. In this embodiment, if the volume level with the longest accumulated playing time length includes a plurality of volume levels, prompt information can be output for the user to select; or, in the volume level with the longest accumulated playing time, obtaining the latest volume level at the playing time point, and setting the volume corresponding to the latest volume level at the playing time point to the playing volume corresponding to the playing mode.
It can be understood that each volume level in the play mode in this embodiment may be a volume level in a terminal system, such as a volume level of a system in a mobile phone, and the volume level in the system is adjusted, so that the volume level of the system is uniformly used regardless of which application is used. Of course, each volume level may also be a corresponding volume level in each application, that is, different applications correspond to their own volume levels, which is described in detail in the following embodiments.
In this embodiment, when the audio is played in the switched playback mode, the volume level with the longest accumulated playback time in the playback mode is obtained, and the volume corresponding to the volume level with the longest accumulated playback time is used as the playback volume in the playback mode, which is equivalent to recording the preferred volume level of the user, and directly using the volume corresponding to the preferred volume level as the playback volume, so that the volume does not need to be manually adjusted again, and the intelligence of audio playback is improved.
Further, a third embodiment of the audio playback device of the present invention is provided.
The third embodiment of the audio playback apparatus differs from the second embodiment of the audio playback apparatus in that, with reference to fig. 6, the determination submodule 21 comprises:
a determining unit 211, configured to determine an application for playing the audio in the play mode;
the obtaining unit 212 is configured to obtain each accumulated playing time length for playing the audio at each preset volume level when the application plays the audio.
Since the audio is the audio in the preset application of the terminal in the first embodiment, in different applications, since each application may have its own speaker, the cumulative playing time corresponding to each volume level in each application may be different, for example, in a hot dog music application, the cumulative playing time using the 6 th volume by the user is the longest, and in a thunder audiovisual application, the cumulative playing time using the 4 th volume by the user is the longest, because the audio includes 1-10 levels of volume. Therefore, after determining the play mode, the determining unit 211 further determines the application playing the audio in the play mode, and finally the obtaining unit 212 obtains each accumulated play time length for playing the audio at each preset volume level when the application plays the audio.
In this embodiment, a table is created in advance for each application in the database, and the fields of the table include: application identification (to distinguish between different applications), age of each volume level when headphones are inserted and when no headphones are inserted, for example: the volume is divided into levels 1-10 and the time the user uses the application is recorded for each level 1-10 when the headset is inserted and for each level 1-10 when the headset is not inserted. The length of time is used as a preference for volume when the user uses the application, with or without a headset inserted. Subsequently, when it is detected that audio is played, the determining unit 211 determines the application playing the audio, then the obtaining unit 212 obtains the application identifier, and compares the application identifier with the database to determine whether the table of the application is already established, if the table of the application exists, the application is not used for the first time, and the accumulated playing time corresponding to each volume level in the application is directly obtained in the database.
In this embodiment, when obtaining the cumulative playing time corresponding to each volume level in the determined playing mode, the application for playing the audio is determined first, and then the cumulative playing time corresponding to each volume level is obtained from the application, so that the obtaining of the cumulative playing time corresponding to each volume level in the determined playing mode is more accurate.
Further, a fourth embodiment of the audio playback device of the present invention is provided.
The fourth embodiment of the audio playing apparatus is different from the second embodiment of the audio playing apparatus in that, referring to fig. 7, the obtaining module 20 further includes:
the second obtaining submodule 24 is configured to, when each accumulated playing time is zero, obtain a preset volume level corresponding to the playing mode based on a mapping relationship between the playing mode and a preset volume level, where the preset volume level in the earphone mode is smaller than the preset volume level in the speaker mode;
and the second processing submodule 25 is configured to use the volume corresponding to the acquired preset volume level as the play volume corresponding to the play mode.
In this embodiment, after determining the cumulative playing time corresponding to each volume level in the playing mode, determining whether the cumulative playing time corresponding to each volume level is zero, if the cumulative playing time corresponding to each volume level is zero at this time, specifically, in the terminal system, the cumulative playing time corresponding to each volume level is zero, or in an application of playing audio, the cumulative playing time corresponding to each volume level is zero, in this embodiment, it is preferable that in the application of playing audio, the cumulative playing time corresponding to each volume level is zero. If the cumulative playing time length corresponding to each volume level is zero in the application for playing the audio, which indicates that the application has not played the audio, that is, the database has no table of the application, and the application is used for the first time, a preset value is written into the database as a set value for the first time. Subsequently, after the play mode is determined, and the cumulative play duration corresponding to each volume level in the play mode is zero, the second obtaining submodule 24 may obtain the preset volume level corresponding to the play mode according to the mapping relationship between the play mode and the preset volume level, and finally the second processing submodule 25 takes the volume corresponding to the obtained preset volume level as the play volume of the play mode.
In this embodiment, when the application is used for the first time and the cumulative play of each volume level is zero, the preset volume level corresponding to the play mode is directly obtained according to the mapping relationship between the play mode and the preset volume level, and the audio is played according to the volume of the preset volume level, so that the volume does not need to be manually adjusted by the user, and the intelligence of volume adjustment is improved.
Further, a fifth embodiment of the audio playback device of the present invention is provided.
The fifth embodiment of the audio playing apparatus is different from the second, third and fourth embodiments of the audio playing apparatus in that, referring to fig. 8, the obtaining module 20 is further configured to obtain the adjusted volume when receiving the adjustment instruction of the volume;
the audio playing device further comprises:
and the processing module 40 is configured to play the audio according to the adjusted volume, and update the accumulated playing time of the volume before adjustment.
In this embodiment, after playing the audio, considering that the user may adjust the volume according to his/her preference, the user may also obtain the running time of the application at different volume levels in real time, and then add the accumulated playing time in the state stored in the database to update the accumulated playing time corresponding to the volume level in the database.
That is to say, when receiving the adjustment instruction of the volume level, the obtaining module 20 first obtains the adjusted volume level, and the processing module 40 plays the audio according to the adjusted volume level and updates the accumulated playing duration of the volume level before adjustment, so that the volume can be manually adjusted by the user at any time during the audio playing process, thereby improving the flexibility of audio playing.
The invention also provides an audio playing method.
Referring to fig. 9, fig. 9 is a flowchart illustrating an audio playing method according to a first embodiment of the present invention.
The embodiment provides an audio playing method, which includes:
step S10, determining the current playing mode of the terminal, wherein the playing mode comprises an earphone mode and a loudspeaker mode;
step S20, acquiring the determined playing volume corresponding to the playing mode, wherein the playing volume corresponding to different playing modes is different;
and step S30, playing the audio according to the acquired playing volume.
In this embodiment, a current play mode of a terminal is determined, and then a play volume corresponding to the determined play mode is obtained, where the obtaining of the play volume corresponding to the determined play mode includes:
a. determining a preset volume level corresponding to the play mode, then acquiring a volume corresponding to the preset volume level, and taking the acquired volume as the play volume corresponding to the play mode, for example, if 10 levels are divided in advance, and the preset volume level is level 5, acquiring a volume corresponding to level 5;
b. and determining the preset accumulated playing time of each volume level, and taking the volume corresponding to the volume level with the longest accumulated playing time as the playing volume corresponding to the playing mode.
Because the playing modes comprise the earphone mode and the loudspeaker mode, and the playing volumes corresponding to different playing modes are different, after the current playing mode is determined, the playing volume corresponding to the current playing mode can be obtained, and finally the audio is played according to the obtained playing volume.
It should be understood that the audio is audio in a preset application of the terminal, and the preset application includes an audio application, an audio-video application, or other applications including voice, such as a WeChat application, and the like.
For better understanding of the present embodiment, the following detailed examples are given: when the terminal is plugged into an earphone, referring to fig. 3, an earphone mode is entered, preferably, the earphone mode includes a preset number of levels of volume levels, for example, 10 levels, then, when audio is played in the earphone mode, a corresponding playing volume in the earphone mode is obtained, and if the corresponding playing volume in the earphone mode is a 4 th level of volume, at this time, the audio is played according to the 4 th level of volume.
When the terminal is not plugged into the earphone, referring to fig. 4, the terminal is in the speaker mode, and the volume levels of the preset levels are included in the speaker mode, for example, 10 levels, when the audio is played in the speaker mode, the corresponding playing volume in the speaker mode is obtained, preferably, the playing volume level corresponding to the speaker mode is 6 th level, and at this time, the audio is played according to the volume of the 6 th level.
According to the audio playing method provided by the embodiment, when the switching of the playing modes is detected in the audio playing process, the determining module determines the current playing mode of the terminal, the obtaining module obtains the playing volume corresponding to the determined playing mode, and finally the playing module plays the audio according to the obtained playing volume instead of manually adjusting the volume of the audio when the audio is played in different playing modes.
Further, a second embodiment of the audio playing method of the present invention is provided.
The second embodiment of the audio playback method is different from the first embodiment of the audio playback method in that, referring to fig. 10, the step S20 includes:
step S21, determining each accumulated playing time length of audio playing at each preset volume level in the playing mode;
step S22, when there is a non-zero accumulated playing time length in each accumulated playing time length, obtaining the volume level with the longest accumulated playing time length;
step S23, the volume corresponding to the acquired volume level is used as the playing volume corresponding to the playing mode.
In this embodiment, after determining the current play mode of the terminal, each volume level included in the play mode is determined. In this embodiment, different playback modes may all correspond to the same volume level, for example, the headphone mode and the speaker mode all correspond to volume levels of 1-10; of course, different playback modes may correspond to different volume levels, for example, the earphone mode corresponds to a volume level of 1-5, and the speaker mode corresponds to a volume level of 6-10; or different play modes correspond to partially same volume levels, for example, the earphone mode corresponds to a volume level of 1-8 levels, and the speaker mode corresponds to a volume level of 4-10 levels, it should be understood that the three manners listed above are merely exemplary, and other settings may be performed according to specific needs, and will not be described herein again.
After determining each corresponding volume level in the play mode, determining each cumulative play time length for audio playing at each preset volume level in the play mode, then judging whether the cumulative play time length corresponding to each volume level is zero, if the cumulative play time length which is not zero exists in each cumulative play time length, indicating that the audio has been played in the play mode, at this moment, obtaining the volume level with the longest cumulative play time length, and taking the volume corresponding to the obtained volume level as the play volume corresponding to the play mode. In this embodiment, if the volume level with the longest accumulated playing time length includes a plurality of volume levels, prompt information can be output for the user to select; or, in the volume level with the longest accumulated playing time, obtaining the latest volume level at the playing time point, and setting the volume corresponding to the latest volume level at the playing time point to the playing volume corresponding to the playing mode.
It can be understood that each volume level in the play mode in this embodiment may be a volume level in a terminal system, such as a volume level of a system in a mobile phone, and the volume level in the system is adjusted, so that the volume level of the system is uniformly used regardless of which application is used. Of course, each volume level may also be a corresponding volume level in each application, that is, different applications correspond to their own volume levels, which is described in detail in the following embodiments.
In this embodiment, when the audio is played in the switched playback mode, the volume level with the longest accumulated playback time in the playback mode is obtained, and the volume corresponding to the volume level with the longest accumulated playback time is used as the playback volume in the playback mode, which is equivalent to recording the preferred volume level of the user, and directly using the volume corresponding to the preferred volume level as the playback volume, so that the volume does not need to be manually adjusted again, and the intelligence of audio playback is improved.
Further, a third embodiment of the audio playing method of the present invention is provided.
The third embodiment of the audio playback method is different from the second embodiment of the audio playback method in that, referring to fig. 11, the step S21 includes:
step S211, determining an application for playing the audio in the play mode;
step S212, obtaining each accumulated playing time length for playing the audio at each preset volume level when the application plays the audio.
Since the audio is the audio in the preset application of the terminal in the first embodiment, in different applications, since each application may have its own speaker, the cumulative playing time corresponding to each volume level in each application may be different, for example, in a hot dog music application, the cumulative playing time using the 6 th volume by the user is the longest, and in a thunder audiovisual application, the cumulative playing time using the 4 th volume by the user is the longest, because the audio includes 1-10 levels of volume. Therefore, after the play mode is determined, the application playing the audio in the play mode is further determined, and finally, each accumulated play time length of audio playing at each preset volume level is obtained when the application plays the audio.
In this embodiment, a table is created in advance for each application in the database, and the fields of the table include: application identification (to distinguish between different applications), age of each volume level when headphones are inserted and when no headphones are inserted, for example: the volume is divided into levels 1-10 and the time the user uses the application is recorded for each level 1-10 when the headset is inserted and for each level 1-10 when the headset is not inserted. The length of time is used as a preference for volume when the user uses the application, with or without a headset inserted. And subsequently, when the audio playing is detected, determining the application for playing the audio, then acquiring the application identifier, comparing the application identifier with a database, judging whether the table of the application is established, if the table of the application exists, directly using the application for the first time in the database, and acquiring the accumulated playing time corresponding to each volume level in the application.
In this embodiment, when obtaining the cumulative playing time corresponding to each volume level in the determined playing mode, the application for playing the audio is determined first, and then the cumulative playing time corresponding to each volume level is obtained from the application, so that the obtaining of the cumulative playing time corresponding to each volume level in the determined playing mode is more accurate.
Further, a fourth embodiment of the audio playing method of the present invention is provided.
The fourth embodiment of the audio playing method differs from the third embodiment of the audio playing method in that, referring to fig. 12, after the step S21, the audio playing method further includes:
step S24, when each accumulated playing time length is zero, acquiring a preset volume level corresponding to the playing mode based on the mapping relation between the playing mode and the preset volume level, wherein the preset volume level in the earphone mode is smaller than the preset volume level in the loudspeaker mode;
step S25, the volume corresponding to the acquired preset volume level is used as the playing volume corresponding to the playing mode.
In this embodiment, after determining the cumulative playing time corresponding to each volume level in the playing mode, determining whether the cumulative playing time corresponding to each volume level is zero, if the cumulative playing time corresponding to each volume level is zero at this time, specifically, in the terminal system, the cumulative playing time corresponding to each volume level is zero, or in an application of playing audio, the cumulative playing time corresponding to each volume level is zero, in this embodiment, it is preferable that in the application of playing audio, the cumulative playing time corresponding to each volume level is zero. If the cumulative playing time length corresponding to each volume level is zero in the application for playing the audio, which indicates that the application has not played the audio, that is, the database has no table of the application, and the application is used for the first time, a preset value is written into the database as a set value for the first time. And subsequently, after a play mode is determined and the accumulated play duration corresponding to each volume level in the play mode is zero, acquiring a preset volume level corresponding to the play mode according to the mapping relation between the play mode and the preset volume level, and finally taking the volume corresponding to the acquired preset volume level as the play volume of the play mode.
In this embodiment, when the application is used for the first time and the cumulative play of each volume level is zero, the preset volume level corresponding to the play mode is directly obtained according to the mapping relationship between the play mode and the preset volume level, and the audio is played according to the volume of the preset volume level, so that the volume does not need to be manually adjusted by the user, and the intelligence of volume adjustment is improved.
Further, a fifth embodiment of the audio playing method of the present invention is provided.
The fifth embodiment of the audio playback method differs from the first embodiment of the audio playback method in that, referring to fig. 13, after the step S30, the audio playback method further includes:
step S40, when receiving the adjusting instruction of the volume, obtaining the adjusted volume;
and step S50, playing the audio according to the adjusted volume, and updating the accumulated playing time of the volume before adjustment.
In this embodiment, after playing the audio, considering that the user may adjust the volume according to his/her preference, the user may also obtain the running time of the application at different volume levels in real time, and then add the accumulated playing time in the state stored in the database to update the accumulated playing time corresponding to the volume level in the database.
That is to say, when receiving the adjustment instruction of the volume level, the adjusted volume level is obtained first, the audio is played according to the adjusted volume level, and the accumulated playing duration of the volume level before adjustment is updated, so that the volume can be manually adjusted by a user at any time in the audio playing process, and the flexibility of audio playing is improved.
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 system 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 system. 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 system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
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 a terminal 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.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (8)

1. An audio playback apparatus, comprising:
the terminal comprises a determining module, a playing module and a processing module, wherein the determining module is used for determining the current playing mode of the terminal, and the playing mode comprises an earphone mode and a loudspeaker mode;
the acquisition module is used for acquiring the determined playing volume corresponding to the playing mode, wherein the playing volume corresponding to different playing modes is different;
the playing module is used for playing the audio according to the acquired playing volume, wherein the audio is the audio in a preset application of the terminal; and the number of the first and second groups,
a database for creating a table for each of said applications, said table having fields comprising: application identification, and the time of use of each volume level when the earphone is inserted and not inserted;
wherein, each volume level in each playing mode is the volume level in the terminal system and/or the corresponding volume level in each application;
the acquisition module includes:
the second obtaining submodule is used for obtaining a preset volume level corresponding to the playing mode based on the mapping relation between the playing mode and the preset volume level when each accumulated playing time is zero, wherein the preset volume level in the earphone mode is smaller than the preset volume level in the loudspeaker mode;
and the second processing submodule is used for taking the volume corresponding to the acquired preset volume level as the playing volume corresponding to the playing mode.
2. The audio playback device of claim 1, wherein the acquisition module comprises:
the determining submodule is used for determining each accumulated playing time length for playing the audio at each preset volume level in the playing mode;
the first obtaining submodule is used for obtaining the volume level with the longest accumulative playing time length when the accumulative playing time length which is not zero exists in all the accumulative playing time lengths;
and the first processing submodule is used for taking the volume corresponding to the acquired volume level as the playing volume corresponding to the playing mode.
3. The audio playback device of claim 2, wherein the determination sub-module comprises:
a determining unit, configured to determine an application for playing the audio in the play mode;
and the acquisition unit is used for acquiring each accumulated playing time length for playing the audio at each preset volume level when the audio is played by the application.
4. The audio playing apparatus according to claim 2 or 3, wherein the obtaining module is further configured to obtain the adjusted volume when receiving an instruction to adjust the volume;
the audio playing device further comprises:
and the processing module is used for playing the audio according to the adjusted volume and updating the accumulated playing time of the volume before adjustment.
5. An audio playing method, characterized in that the audio playing method comprises:
determining a current play mode of the terminal, wherein the play mode comprises an earphone mode and a loudspeaker mode;
acquiring the determined playing volume corresponding to the playing mode, wherein the playing volume corresponding to different playing modes is different;
playing the audio according to the acquired playing volume, wherein the audio is the audio in the preset application of the terminal, a table is established in a database for each application in advance, and the fields of the table comprise: application identification, and the time of use of each volume level when the earphone is inserted and not inserted;
determining each accumulated playing time length for audio playing at each preset volume level in the playing mode;
when each accumulated playing time is zero, acquiring a preset volume level corresponding to the playing mode based on the mapping relation between the playing mode and the preset volume level, wherein the preset volume level in the earphone mode is smaller than the preset volume level in the loudspeaker mode;
and taking the volume corresponding to the acquired preset volume level as the playing volume corresponding to the playing mode.
6. The audio playing method according to claim 5, wherein the step of obtaining the determined playing volume corresponding to the playing mode comprises:
determining each accumulated playing time length for audio playing at each preset volume level in the playing mode;
acquiring the volume grade with the longest accumulative playing time when the accumulative playing time which is not zero exists in each accumulative playing time;
and taking the volume corresponding to the acquired volume level as the playing volume corresponding to the playing mode.
7. The audio playing method of claim 6, wherein the step of determining each accumulated playing time of the audio playing at each preset volume level in the playing mode comprises:
determining an application for playing the audio in the play mode;
and acquiring each accumulated playing time length for playing the audio at each preset volume level when the audio is played by the application.
8. The audio playback method as claimed in claim 6 or 7, wherein after the step of playing back the audio at the playback volume obtained, the audio playback method further comprises:
when receiving a volume adjusting instruction, acquiring the adjusted volume;
and playing the audio according to the adjusted volume, and updating the accumulated playing time of the volume before adjustment.
CN201610460593.9A 2016-06-22 2016-06-22 Audio playing device and method Active CN106060261B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610460593.9A CN106060261B (en) 2016-06-22 2016-06-22 Audio playing device and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610460593.9A CN106060261B (en) 2016-06-22 2016-06-22 Audio playing device and method

Publications (2)

Publication Number Publication Date
CN106060261A CN106060261A (en) 2016-10-26
CN106060261B true CN106060261B (en) 2020-03-27

Family

ID=57168837

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610460593.9A Active CN106060261B (en) 2016-06-22 2016-06-22 Audio playing device and method

Country Status (1)

Country Link
CN (1) CN106060261B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106953972B (en) * 2017-03-15 2020-02-18 上海青橙实业有限公司 Mobile terminal and method and system for adjusting playing volume of audio file
CN107205092B (en) * 2017-06-14 2021-04-23 捷开通讯(深圳)有限公司 Storage device, mobile terminal and voice secret playing method thereof
CN108419161B (en) * 2018-02-02 2019-07-23 温州大学瓯江学院 A kind of detachable earphone based on big data
CN108429843A (en) * 2018-06-20 2018-08-21 深圳市沃特沃德股份有限公司 Control the method and device of loudspeaker working condition
CN110333841A (en) * 2019-07-05 2019-10-15 深圳市康冠技术有限公司 Method, audio processing modules, television set and the storage medium of audio output
CN110600048B (en) * 2019-08-23 2022-03-25 Oppo广东移动通信有限公司 Audio verification method and device, storage medium and electronic equipment
CN115473927A (en) * 2021-05-25 2022-12-13 Oppo广东移动通信有限公司 Volume synchronization method and device, electronic equipment and storage medium
CN114564169A (en) * 2022-02-18 2022-05-31 北京达佳互联信息技术有限公司 Multimedia file playing method and device, electronic equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102999492A (en) * 2011-09-08 2013-03-27 百度在线网络技术(北京)有限公司 Method and device for adjusting volume of media file
CN103167379A (en) * 2011-12-13 2013-06-19 富泰华工业(深圳)有限公司 Audio playing device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102325216B (en) * 2011-06-29 2015-07-15 惠州Tcl移动通信有限公司 Mobile communication equipment and volume control method thereof
US20130329903A1 (en) * 2012-06-07 2013-12-12 Shao-Chieh Ting Multifunctional bluetooth earphone device with neck speakers

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102999492A (en) * 2011-09-08 2013-03-27 百度在线网络技术(北京)有限公司 Method and device for adjusting volume of media file
CN103167379A (en) * 2011-12-13 2013-06-19 富泰华工业(深圳)有限公司 Audio playing device

Also Published As

Publication number Publication date
CN106060261A (en) 2016-10-26

Similar Documents

Publication Publication Date Title
CN106060261B (en) Audio playing device and method
KR101757779B1 (en) Method and device for making router management application compatible with router firmware
EP3174027A1 (en) Method and apparatus for connecting with controlled smart device, computer program and recording medium
CN104378485A (en) Volume adjustment method and volume adjustment device
US20170034336A1 (en) Event prompting method and device
CN106488282B (en) Multimedia information output control method and mobile terminal
KR20150144547A (en) Video display device and operating method thereof
US8818003B2 (en) Mobile terminal and control method thereof
CN109495871B (en) Bluetooth connection control method, electronic device and computer readable storage medium
CN104902059A (en) Call reminding method and device
US20200092476A1 (en) Mobile terminal-based dual camera power supply control method, system and mobile terminal
CN105094931A (en) Software upgrading method and device
US20110136479A1 (en) Mobile terminal and method of controlling the same
CN109614470B (en) Method and device for processing answer information, terminal and readable storage medium
CN103986821A (en) Method, equipment and system for carrying out parameter adjustment
CN105653236A (en) Sound volume control method and device and mobile terminal
CN104767857A (en) Telephone calling method and device based on cloud name cards
CN110221739A (en) A kind of data processing method, device and electronic equipment
CN105208089A (en) Information display method, apparatus and system
US11212020B2 (en) FM channel finding and searching method, mobile terminal and storage apparatus
CN107958038B (en) Sound box control method and device
CN105630447A (en) Method and device for adjusting word display
CN105141797A (en) Visiting processing method and device
CN107632835A (en) Using installation method and device
CN107426401B (en) Mute reminding method, device and terminal

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant