CN109408025B - Audio playing method, device and storage medium - Google Patents
Audio playing method, device and storage medium Download PDFInfo
- Publication number
- CN109408025B CN109408025B CN201811252039.7A CN201811252039A CN109408025B CN 109408025 B CN109408025 B CN 109408025B CN 201811252039 A CN201811252039 A CN 201811252039A CN 109408025 B CN109408025 B CN 109408025B
- Authority
- CN
- China
- Prior art keywords
- contact
- contacts
- playing
- audio data
- mobile terminal
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/16—Sound input; Sound output
- G06F3/162—Interface to dedicated audio devices, e.g. audio drivers, interface to CODECs
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)
- Telephone Function (AREA)
- Circuit For Audible Band Transducer (AREA)
Abstract
The disclosure relates to an audio playing method, an audio playing device and a storage medium, and belongs to the field of electronic technology application. The method is applied to a mobile terminal, the mobile terminal comprises at least two contacts, and the contacts are used for connecting an external loudspeaker, and the method comprises the following steps: acquiring an instruction for playing audio data; determining a target contact point of the at least two contact points, wherein the target contact point is connected with an external loudspeaker; and controlling an external loudspeaker connected with the target contact to play the audio data. This is disclosed through in carrying audio data to the external speaker of connecting on the target contact for this external speaker can play the audio frequency, has solved in the correlation technique, and the external speaker of contact connection only is used for realizing pronunciation function of talkbacking, thereby leads to the problem of external speaker function singleness, has richened the function of the external speaker who is connected with mobile terminal.
Description
Technical Field
The present disclosure relates to the field of electronic technology application, and in particular, to an audio playing method, an audio playing device, and a storage medium.
Background
Mobile terminals are usually provided with built-in speakers and earphones, which can be used to implement the voice playing function of the mobile terminal. With the rapid development of the application field of electronic technology, more and more functions are integrated on the mobile terminal, wherein some functions can be realized by external expansion equipment, so that the internal space of the mobile terminal is saved, and more other functions can be arranged inside the mobile terminal. In the related art, a contact can be added in the mobile terminal, an external speaker is connected with the mobile terminal through the contact, and the voice talkback function of the mobile terminal can be realized through the external speaker.
Disclosure of Invention
The embodiment of the disclosure provides an audio playing method, an audio playing device and a storage medium, which can solve the problems in the related art. The technical scheme is as follows:
according to a first aspect of the embodiments of the present disclosure, there is provided an audio playing method applied in a mobile terminal, where the mobile terminal includes at least two contacts, and the contacts are used to connect an external speaker, and the audio playing method includes:
acquiring an instruction for playing audio data;
determining a target contact point of the at least two contact points, wherein the target contact point is connected with an external loudspeaker;
and controlling an external loudspeaker connected with the target contact to play the audio data.
Optionally, the audio playing method further includes: and outputting the audio data to a built-in loudspeaker and/or a receiver.
Optionally, the audio playing method further includes:
acquiring an enabling state of the at least two contacts before determining a target contact of the at least two contacts, wherein the enabling state comprises enabled or not enabled;
the determining a target contact of the at least two contacts comprises:
when the activation status of the at least two contacts is activated, the step of determining a target contact of the at least two contacts is performed.
Optionally, the audio playing method further includes:
acquiring an enabling state of each of the at least two contacts before determining a target contact of the at least two contacts, wherein the enabling state comprises enabled or not enabled;
the determining a target contact of the at least two contacts comprises:
and determining the contact point, of the at least two contact points, which is activated and connected with an external loudspeaker, as the target contact point.
Optionally, the at least two contacts are distributed on the back side of the mobile terminal.
Optionally, the mobile terminal includes two contacts, one of the two contacts is disposed at a first position on the back side of the mobile terminal, the first position is a position corresponding to a built-in speaker of the mobile terminal, and the other of the two contacts is disposed at a second position on the back side of the mobile terminal, the second position is a position corresponding to an earpiece of the mobile terminal.
Optionally, the target contact includes a first contact and a second contact, and the volume of the external speaker connected to the first contact is greater than the volume of the external speaker connected to the second contact;
the external speaker for controlling the target contact to be connected to play the audio data comprises:
acquiring the playing volume of the audio data;
when the playing volume of the audio data is lower than a first volume threshold, playing the audio data through an external loudspeaker connected with the first contact;
when the playing volume of the audio data is higher than a second volume threshold, playing the audio data through an external loudspeaker connected with the second contact;
wherein the first volume threshold is lower than the second volume threshold.
According to a second aspect of the embodiments of the present disclosure, there is provided an audio playing apparatus applied in a mobile terminal, where the mobile terminal includes at least two contacts, and the contacts are used for connecting an external speaker, the apparatus includes:
the first acquisition module is used for acquiring an instruction for playing audio data;
the determining module is used for determining a target contact point of the at least two contact points, and the target contact point is connected with an external loudspeaker;
and the control module is used for controlling the external loudspeaker connected with the target contact to play the audio data.
Optionally, the apparatus further comprises:
and the output module is used for outputting the audio data to a built-in loudspeaker and/or a receiver.
Optionally, the apparatus further comprises:
a second obtaining module, configured to obtain enabling statuses of the at least two contacts before determining a target contact of the at least two contacts, where the enabling statuses include enabled or disabled;
the determining module is configured to:
when the activation status of the at least two contacts is activated, the step of determining a target contact of the at least two contacts is performed.
Optionally, the apparatus further comprises:
a third obtaining module, configured to obtain an enabling status of each of the at least two contacts before determining a target contact of the at least two contacts, where the enabling status includes enabled or not enabled;
the determining module is configured to:
and determining the contact point, of the at least two contact points, which is activated and connected with an external loudspeaker, as the target contact point.
Optionally, the at least two contacts are distributed on the back side of the mobile terminal.
Optionally, the mobile terminal includes two contacts, one of the two contacts is disposed at a first position on the back side of the mobile terminal, the first position is a position corresponding to a built-in speaker of the mobile terminal, and the other of the two contacts is disposed at a second position on the back side of the mobile terminal, the second position is a position corresponding to an earpiece of the mobile terminal.
Optionally, the target contact includes a first contact and a second contact, and the volume of the external speaker connected to the first contact is greater than the volume of the external speaker connected to the second contact;
the control module is configured to:
acquiring the playing volume of the audio data;
when the playing volume of the audio data is lower than a first volume threshold, playing the audio data through an external loudspeaker connected with the first contact;
when the playing volume of the audio data is higher than a second volume threshold, playing the audio data through an external loudspeaker connected with the second contact;
wherein the first volume threshold is lower than the second volume threshold.
According to a third aspect of the embodiments of the present disclosure, there is provided an audio playing apparatus applied in a mobile terminal, where the mobile terminal includes at least two contacts, and the contacts are used for connecting an external speaker, including:
a processor;
a memory for storing executable instructions of the processor;
wherein the processor is configured to:
acquiring an instruction for playing audio data;
determining a target contact point of the at least two contact points, wherein the target contact point is connected with an external loudspeaker;
and controlling an external loudspeaker connected with the target contact to play the audio data.
According to a fourth aspect of embodiments of the present disclosure, there is provided a non-transitory computer-readable storage medium having stored therein instructions, which, when run on a processing component, cause the processing component to execute the audio playback method according to the first aspect.
According to a fifth aspect of embodiments of the present disclosure, there is provided a computer program product having instructions stored therein, which when run on a computer, causes the computer to perform the audio playing method according to the first aspect.
According to a sixth aspect of embodiments of the present disclosure, there is provided a chip comprising programmable logic circuits and/or program instructions, which when run, is configured to implement the audio playing method according to the first aspect.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: according to the audio playing method provided by the embodiment of the disclosure, the audio data is transmitted to the external speaker connected to the target contact, so that the external speaker can play audio, the problem that the external speaker connected to the contact is only used for realizing a voice talkback function in the related art, so that the external speaker has a single function is solved, and the function of the external speaker connected to the mobile terminal is enriched.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure, the drawings that are needed to be used in the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present disclosure, and that other drawings can be obtained by those skilled in the art without inventive effort.
Fig. 1 is a flow chart illustrating an audio playback method according to an exemplary embodiment.
Fig. 2 is a flow chart illustrating another audio playback method according to an example embodiment.
FIG. 3 is a schematic diagram illustrating a switch disposed in a user interface according to an exemplary embodiment.
Fig. 4 is a flowchart illustrating an external speaker connected to a control target contact of an audio playback device playing back audio data according to an exemplary embodiment.
Fig. 5 is a schematic diagram illustrating two contacts distributed on a back side of a mobile terminal according to an exemplary embodiment.
Fig. 6 is a side view of the mobile terminal shown in fig. 5.
Fig. 7 is a flowchart illustrating a method for an audio playback device to determine a target touch point according to an exemplary embodiment.
FIG. 8 is a schematic diagram illustrating another switch arrangement in a user interface according to an exemplary embodiment.
Fig. 9 is a block diagram illustrating an audio playback device according to an example embodiment.
Fig. 10 is a block diagram illustrating another audio playback device in accordance with an example embodiment.
Fig. 11 is a block diagram illustrating yet another audio playback device according to an example embodiment.
Fig. 12 is a block diagram illustrating yet another audio playback device according to an example embodiment.
Fig. 13 is a block diagram illustrating a mobile terminal according to an example embodiment.
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
Detailed Description
To make the objects, technical solutions and advantages of the present disclosure more clear, the present disclosure will be described in further detail with reference to the accompanying drawings, and it is apparent that the described embodiments are only a part of the embodiments of the present disclosure, not all of the embodiments. All other embodiments, which can be derived by one of ordinary skill in the art from the embodiments disclosed herein without making any creative effort, shall fall within the scope of protection of the present disclosure.
Referring to fig. 1, a flowchart of an audio playing method provided by an embodiment of the present disclosure is shown, where the method is applied in a mobile terminal, and may be executed by an audio playing apparatus in the mobile terminal, where the mobile terminal may include a portable electronic device such as a mobile phone, a tablet computer, and a notebook computer, and the mobile terminal may include at least two contacts, where the contacts are used to connect an external speaker, and the method may include:
And 102, the audio playing device determines a target contact point of the at least two contact points, wherein the target contact point is connected with an external loudspeaker.
And 103, controlling the external loudspeaker connected with the target contact to play audio data by the audio playing device.
In summary, according to the audio playing method provided by the embodiment of the present disclosure, audio data is transmitted to the external speaker connected to the target contact, so that the external speaker can play audio, thereby solving the problem that in the related art, the external speaker connected to the contact is only used for implementing a voice intercom function, which results in a single function of the external speaker, and enriching the functions of the external speaker connected to the mobile terminal.
Optionally, the method further includes: and outputting the audio data to a built-in loudspeaker and/or a receiver.
Optionally, the method further includes: acquiring an enabling state of the at least two contacts before determining a target contact of the at least two contacts, wherein the enabling state comprises enabled or not enabled;
the determining a target contact of the at least two contacts comprises:
when the activation status of the at least two contacts is activated, the step of determining a target contact of the at least two contacts is performed.
Optionally, the method further includes: acquiring an enabling state of each of the at least two contacts before determining a target contact of the at least two contacts, wherein the enabling state comprises enabled or not enabled;
the determining a target contact of the at least two contacts comprises:
and determining the contact point, of the at least two contact points, which is activated and connected with an external loudspeaker, as the target contact point.
Optionally, the at least two contacts are distributed on the back side of the mobile terminal.
Optionally, the mobile terminal includes two contacts, one of the two contacts is disposed at a first position on the back side of the mobile terminal, the first position is a position corresponding to a built-in speaker of the mobile terminal, and the other of the two contacts is disposed at a second position on the back side of the mobile terminal, the second position is a position corresponding to an earpiece of the mobile terminal.
Optionally, the target contact includes a first contact and a second contact, and the volume of the external speaker connected to the first contact is greater than the volume of the external speaker connected to the second contact;
the external speaker for controlling the target contact to be connected to play the audio data comprises:
acquiring the playing volume of the audio data;
when the playing volume of the audio data is lower than a first volume threshold, playing the audio data through an external loudspeaker connected with the first contact;
when the playing volume of the audio data is higher than a second volume threshold, playing the audio data through an external loudspeaker connected with the second contact;
wherein the first volume threshold is lower than the second volume threshold.
Fig. 2 is a flowchart illustrating another audio playing method provided by the embodiment of the present disclosure, which is applied to a mobile terminal and can be executed by an audio playing apparatus in the mobile terminal, and the mobile terminal can include at least two contacts, where the contacts are used for connecting an external speaker.
The external speaker can be electrically connected with the mobile terminal through the contact connected with the external speaker, so that the mobile terminal can transmit signal data to the external speaker.
The external loudspeaker is an external expansion device which can be detachably connected with the contact. The contact can have various structural modes, optionally, the contact can be a section of bare wire on a circuit board arranged in the mobile terminal, and the external speaker can be electrically connected with the mobile terminal through the section of wire; or, the contact may be a connection terminal, one end of the connection terminal is electrically connected to a circuit board disposed in the mobile terminal, and the other end of the connection terminal may be electrically connected to the external speaker.
Of course, the contact may also be used to connect other external expansion devices such as an external backup battery, and the embodiment of the present disclosure takes the example of the contact being connected with an external speaker as an example.
As shown in fig. 2, the method may include:
The audio data may be sound data in an audio file, and the audio file may be a local file stored in the mobile terminal or a network file obtained from a network in real time. When the user triggers an instruction to play the audio file, the audio playing device can correspondingly acquire the instruction to play the audio data corresponding to the audio file.
The mode of the user triggering the instruction to play the audio file may be various, and optionally, the instruction to play the audio file may be triggered by clicking a play button of the audio file, or the instruction to play the audio file may be automatically triggered by opening the audio file (opening the audio file is an instruction to play the audio file), which is not limited in this disclosure.
If the starting state is started, the mobile terminal can transmit audio data to the external speakers connected with the at least two contacts through the at least two contacts; if the enabled state is not enabled, it indicates that the mobile terminal cannot transmit audio data to the external speakers connected with the at least two contacts through the at least two contacts.
In the embodiment of the present disclosure, the audio playing apparatus may be integrated in an application installed in the mobile terminal, and the application may be an application carried by the mobile terminal when the mobile terminal leaves a factory, or may be a third-party application. The audio playing device can be provided with a switch capable of changing the starting states of the at least two contacts, the switch can be arranged in a User Interface (UI) of an application program, the switching state of the switch can correspond to the starting states of the contacts, and the starting states of the contacts can be changed by triggering the switch. For example, when the switch is in the on state, the contacts are in the enabled state; when the switch is in the off state, the contacts are in the inactive state. Fig. 3 schematically shows a schematic diagram of a switch 31 disposed in a user interface 30 of an XX application, the XX application corresponds to a name of an application in which an audio playing device is integrated, and the embodiment of the disclosure is not limited herein, and the switch 31 may include a trigger button 32, and an on state and an off state of the switch 31 may be set by pressing the trigger button 32. Of course, the switch may also be presented in other forms in the user interface of the application program, and the disclosed embodiment is not limited herein.
When the audio playing device obtains the enabling states of the at least two contacts and determines that the enabling states of the at least two contacts are enabled, the contact connected with the external speaker in the at least two contacts can be determined as a target contact. Optionally, the audio playing device may determine the enabling state of the at least two contacts according to the on state and the off state of the switch.
And step 204, the audio playing device controls the external loudspeaker connected with the target contact to play audio data.
The audio playing device outputs audio data to an external loudspeaker connected with the target contact point through the target contact point in the enabled state, so that the external loudspeaker plays the audio data.
Alternatively, the target contact may be multiple, that is, multiple external speakers may be electrically connected to the mobile terminal through the multiple target contacts, respectively.
For example, the target contact may include a first contact and a second contact, and a volume of the external speaker connected to the first contact is greater than a volume of the external speaker connected to the second contact.
Then, as shown in fig. 4, step 204 may include several sub-steps as follows:
The playing volume of the audio data may be determined by the player volume and/or the system volume control in the mobile terminal, and optionally, the external speaker may also have a function of adjusting the playing volume: and adjusting the playing volume of the audio data played by the external loudspeaker. Optionally, the external speaker may be provided with a key or a knob for adjusting the playing volume, and the playing volume of the audio data played by the external speaker is controlled by adjusting the key or the knob. In the embodiment of the disclosure, the volume of the external speaker connected to the first contact is adjusted to be greater than the volume of the external speaker connected to the second contact.
And a substep 2042, when the playing volume of the audio data is lower than a first volume threshold, playing the audio data by the audio playing device through the external speaker connected with the first contact.
The external speaker connected with the first contact point can have larger playing volume of the audio data, and when the playing volume of the audio data is lower than the first volume threshold, the audio playing device can play the audio data through the external speaker with the larger playing volume of the audio data, so that the situation that the playing sound of the played audio data is too small can be avoided.
Under the certain circumstances of broadcast volume and/or system volume in mobile terminal, can adjust the size of the broadcast volume of audio data through the broadcast volume of control external speaker, practiced thrift mobile terminal's energy consumption: compared with the prior art that the playing volume and/or the system volume of the mobile terminal need to be increased to achieve the effect of playing outside, the method provided by the embodiment of the disclosure saves the energy consumption of the mobile terminal.
And a substep 2043, when the playing volume of the audio data is higher than the second volume threshold, playing the audio data by the audio playing device through the external speaker connected with the second contact.
The external speaker connected to the second contact may have a smaller audio data playing volume, and when the audio data playing volume is higher than the second volume threshold, the audio playing device may play the audio data through the external speaker having the smaller audio data playing volume, so that the external speaker may adjust the audio data playing volume, and the situation that the playing sound of the played audio data is too large to affect the use of the user is avoided.
When the playing volume of the audio data is between the first volume threshold and the second volume threshold, the audio playing device may select to play the audio data without through the external speaker or through any external speaker, which is not limited herein in the embodiments of the present disclosure.
For example, the first volume threshold is 65 db, the second volume threshold is 80 db, and when the audio playing device obtains the playing volume of the audio data as 40 db, the audio playing device plays the audio data through the external speaker connected to the first contact; when the audio playing device obtains that the playing volume of the audio data is greater than 90 decibels, the audio playing device plays the audio data through the external loudspeaker connected with the second contact; when the audio playing device obtains the playing volume of the audio data as 70 db, the audio playing device may not play the audio data through any external speaker.
The playing volume of the external speaker connected to the first contact and the playing volume of the external speaker connected to the second contact can be adjusted in advance by the user, so as to implement the method described in the sub-step 2042 and the sub-step 2043.
Wherein the first volume threshold is lower than the second volume threshold. The first volume threshold and the second volume threshold may be automatically set according to the playing volume of the external speaker, for example, the first volume threshold may be set as the volume value of the external speaker connected to the second contact, and the second volume threshold may be set as the volume value of the external speaker connected to the first contact.
For another example, in order to better meet the requirement of the volume of the audio data that the user wants to play, it may be configured that, when the difference between the playing volumes of the external speaker connected to the first contact and the external speaker connected to the second contact is greater than the preset threshold, the determining that the playing volume of the audio data is lower than the first volume threshold or higher than the second volume threshold as described in the foregoing sub-step 2042 and sub-step 2043 is performed.
In the embodiment of the present disclosure, in addition to the audio data that can be output from the external speaker, the audio data can also be output to an internal speaker and/or an earpiece of the mobile terminal, so as to achieve a better sound playing effect of the mobile terminal.
Optionally, the at least two contacts may be distributed on the back of the mobile terminal, and a user may freely select to connect the external speaker with any one of the at least two contacts. Alternatively, as shown in fig. 5, which shows a schematic diagram of the back side of the mobile terminal M, when the mobile terminal M includes two contacts a1 and a2, the external speaker C1 and the external speaker C2 may be disposed in connection with the contact a1 and the contact a2, respectively, one contact a1 of the two contacts may be disposed at a first position B1 on the back side of the mobile terminal M, the first position B1 is a position corresponding to the internal speaker of the mobile terminal M, the other contact a2 of the two contacts is disposed at a second position B2 on the back side of the mobile terminal M, and the second position B2 is a position corresponding to the earpiece of the mobile terminal M.
Fig. 6 shows a schematic side view of a mobile terminal M, from which it can be seen more clearly that a contact a1 is arranged in a first position B1 in which a built-in speaker E is arranged, an external speaker C1 is arranged on a contact a1, a contact a2 is arranged in a first position B2 in which an earpiece D is arranged, and an external speaker C2 is arranged on a contact a 2.
When the target contact point is A1, the playing effect of the built-in loudspeaker E of the mobile terminal M can be enhanced; when the target contact point is A2, the playing effect of a receiver D of the mobile terminal M can be enhanced; when the target contacts are a1 and a2, the playing effect of the built-in speaker E and the earpiece D of the mobile terminal M can be enhanced at the same time. The target contact point can be freely selected by a user (by changing the starting states of at least two contact points and the position where the external loudspeaker is arranged), and the flexibility of playing audio data by the mobile terminal is improved.
By the arrangement, when the mobile terminal plays audio, the audio data can be played from the built-in loudspeaker and/or the receiver and the external loudspeaker at the same time, so that the playing volume of the mobile terminal playing the audio data is enhanced, the stereoscopic playing effect of playing the audio frequency by the mobile terminal can be enhanced, and the function of the external loudspeaker is further expanded.
It should be noted that, in the embodiments shown in fig. 5 and fig. 6, the built-in speaker E and the handset D of the mobile terminal are respectively located at the lower and upper positions of the mobile terminal M in the figures, and in other possible embodiments, the built-in speaker and the handset may be located at other positions. Correspondingly, the two contacts may also be located at other corresponding positions, and details of the embodiments of the disclosure are not described herein.
In summary, according to the audio playing method provided by the embodiment of the present disclosure, audio data is transmitted to the external speaker connected to the target contact, so that the external speaker can play audio, thereby solving the problem that in the related art, the external speaker connected to the contact is only used for implementing a voice intercom function, which results in a single function of the external speaker, and enriching the functions of the external speaker connected to the mobile terminal.
Alternatively, step 203 and step 204 describe a method for determining the target contact, in which the at least two contacts correspond to a switch, and the activation state of the at least two contacts can be changed simultaneously by activating the switch. Of course, in other possible embodiments, each of the at least two contacts may correspond to a switch, and the audio playing device may obtain the enabled states of the at least two contacts, respectively, and fig. 7 shows a method for the audio playing device to determine the target contact in this case, which may be used to replace the above step 203 and step 204, and the method for determining the target contact further includes:
It should be noted that, when each of the at least two contacts corresponds to a switch, the audio playing apparatus obtains the respective enabling states of the at least two contacts, and then step 203 may further be: and when the switches of all the at least two contacts are closed, the enabling states of the at least two contacts are determined to be the non-enabling states. Of course, the audio playing apparatus may have other configurations, and the embodiment of the disclosure is not limited herein.
Alternatively, when the audio playing device is integrated into an application installed in the mobile terminal, the switch may be disposed in a user interface of the application, and the enabling state of each contact may be controlled by one switch, for example, fig. 8 shows that in the user interface 30 of the XX application, two switches 31 are disposed, and the enabling states of the first contact and the second contact may be controlled by pressing a trigger button 32 in each switch.
In other possible embodiments, the audio playing device may determine the target contact of the at least two contacts without acquiring the activation status of the at least two contacts: the audio playback device may be set to default to which contact the external speaker is connected, and then automatically set that contact as the target contact. After the audio playing device obtains the instruction for playing the audio data, the audio data can be directly input to the external speaker connected to the target contact for playing. The user connects the external speaker with any one of the at least two contacts through free selection, so that the playing function of the external speaker on the contact can be realized, and the flexibility of playing audio data by the mobile terminal is improved.
In summary, according to the audio playing method provided by the embodiment of the present disclosure, audio data is transmitted to the external speaker connected to the target contact, so that the external speaker can play audio, thereby solving the problem that in the related art, the external speaker connected to the contact is only used for implementing a voice intercom function, which results in a single function of the external speaker, and enriching the functions of the external speaker connected to the mobile terminal.
Fig. 9 shows an audio playing apparatus provided in an embodiment of the present disclosure, which is applied in a mobile terminal, where the mobile terminal includes at least two contacts, and the contacts are used for connecting an external speaker, as shown in fig. 9, the apparatus 900 includes:
a first obtaining module 901, configured to obtain an instruction for playing audio data.
A determining module 902, configured to determine a target contact of the at least two contacts, where the target contact is connected to an external speaker.
And the control module 903 is used for controlling the external speaker connected with the target contact to play the audio data.
To sum up, the audio playing device provided by the embodiment of the present disclosure, through carrying audio data to the external speaker connected on the target contact, makes this external speaker play audio, and solves the problem that in the related art, the external speaker connected through the contact is only used for realizing the voice intercom function, thereby leading to the problem of single function of the external speaker, and enriches the functions of the external speaker connected with the mobile terminal.
Optionally, the apparatus further comprises: and the output module is used for outputting the audio data to a built-in loudspeaker and/or a receiver.
Optionally, the apparatus further comprises:
a second obtaining module, configured to obtain enabling statuses of the at least two contacts before determining a target contact of the at least two contacts, where the enabling statuses include enabled or disabled;
the determining module is configured to:
when the activation status of the at least two contacts is activated, the step of determining a target contact of the at least two contacts is performed.
Optionally, the apparatus further comprises:
a third obtaining module, configured to obtain an enabling status of each of the at least two contacts before determining a target contact of the at least two contacts, where the enabling status includes enabled or not enabled;
the determining module is configured to:
and determining the contact point, of the at least two contact points, which is activated and connected with an external loudspeaker, as the target contact point.
Optionally, the at least two contacts are distributed on the back side of the mobile terminal.
Optionally, the mobile terminal includes two contacts, one of the two contacts is disposed at a first position on the back side of the mobile terminal, the first position is a position corresponding to a built-in speaker of the mobile terminal, and the other of the two contacts is disposed at a second position on the back side of the mobile terminal, the second position is a position corresponding to an earpiece of the mobile terminal.
Optionally, the target contact includes a first contact and a second contact, and the volume of the external speaker connected to the first contact is greater than the volume of the external speaker connected to the second contact;
the control module is configured to:
acquiring the playing volume of the audio data;
when the playing volume of the audio data is lower than a first volume threshold, playing the audio data through an external loudspeaker connected with the first contact;
when the playing volume of the audio data is higher than a second volume threshold, playing the audio data through an external loudspeaker connected with the second contact;
wherein the first volume threshold is lower than the second volume threshold.
In summary, according to the audio playing method provided by the embodiment of the present disclosure, audio data is transmitted to the external speaker connected to the target contact, so that the external speaker can play audio, thereby solving the problem that in the related art, the external speaker connected to the contact is only used for implementing a voice intercom function, which results in a single function of the external speaker, and enriching the functions of the external speaker connected to the mobile terminal.
As shown in fig. 10, the apparatus 900 further comprises:
and an output module 904, configured to output the audio data to a built-in speaker and/or an earphone.
As shown in fig. 11, the apparatus 900 further comprises:
a second obtaining module 905, configured to obtain enabling states of the at least two contacts before determining a target contact of the at least two contacts, where the enabling states include enabled or disabled.
A determining module 902 for:
when the activation status of the at least two contacts is activated, the step of determining a target contact of the at least two contacts is performed.
As shown in fig. 12, the apparatus 900 further comprises:
a third obtaining module 906, configured to obtain an enabling status of each of the at least two contacts before determining a target contact of the at least two contacts, where the enabling status includes enabled or not enabled.
A determining module 902 for:
and determining the contact point, of the at least two contact points, which is activated and connected with an external loudspeaker, as the target contact point.
Optionally, the at least two contacts are distributed on the back side of the mobile terminal.
Optionally, the mobile terminal includes two contacts, one of the two contacts is disposed at a first position on the back side of the mobile terminal, the first position is a position corresponding to a built-in speaker of the mobile terminal, and the other of the two contacts is disposed at a second position on the back side of the mobile terminal, the second position is a position corresponding to an earpiece of the mobile terminal.
Optionally, the target contact includes a first contact and a second contact, and a volume of an external speaker connected to the first contact is greater than a volume of an external speaker connected to the second contact.
The control module 903 is configured to:
acquiring the playing volume of the audio data;
when the playing volume of the audio data is lower than a first volume threshold, playing the audio data through an external loudspeaker connected with the first contact;
when the playing volume of the audio data is higher than a second volume threshold, playing the audio data through an external loudspeaker connected with the second contact;
wherein the first volume threshold is lower than the second volume threshold.
To sum up, the audio playing device provided by the embodiment of the present disclosure, through carrying audio data to the external speaker connected on the target contact, makes this external speaker play audio, and solves the problem that in the related art, the external speaker connected through the contact is only used for realizing the voice intercom function, thereby leading to the problem of single function of the external speaker, and enriches the functions of the external speaker connected with the mobile terminal.
Fig. 13 is a block diagram illustrating a mobile terminal 100 according to an example embodiment. For example, the mobile terminal 100 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, and the like.
Referring to fig. 13, the mobile terminal 100 may include one or more of the following components: processing components 102, memory 104, power components 106, multimedia components 108, audio components 110, input/output (I/O) interfaces 112, sensor components 114, and communication components 116.
The processing component 102 generally controls overall operation of the mobile terminal 100, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 102 may include one or more processors 120 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the process component 102 can include one or more modules that facilitate interaction between the process component 102 and other components. For example, the processing component 102 can include a multimedia module to facilitate interaction between the multimedia component 108 and the processing component 102.
The memory 104 is configured to store various types of data to support operation at the mobile terminal 100. Examples of such data include instructions for any application or method operating on the mobile terminal 100, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 104 may be implemented by any type or combination of volatile or non-volatile memory devices, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The power supply component 106 provides power to the various components of the mobile terminal 100. The power components 106 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the mobile terminal 100.
The multimedia component 108 includes a screen that provides an output interface between the mobile terminal 100 and the user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 108 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the mobile terminal 100 is in an operation mode, such as a photographing mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 110 is configured to output and/or input audio data. For example, the audio component 110 includes a Microphone (MIC) configured to receive external audio data when the mobile terminal 100 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio data may further be stored in the memory 104 or transmitted via the communication component 116. In some embodiments, the audio component 110 also includes a built-in speaker and earpiece for outputting audio data.
The I/O interface 112 provides an interface between the processing component 102 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor component 114 includes one or more sensors for providing various aspects of state assessment for the mobile terminal 100. For example, the sensor component 114 may detect an open/closed state of the mobile terminal 100, the relative positioning of components, such as a display and keypad of the mobile terminal 100, the sensor component 114 may also detect a change in the position of the mobile terminal 100 or one of the components of the mobile terminal 100, the presence or absence of user contact with the mobile terminal 100, orientation or acceleration/deceleration of the mobile terminal 100, and a change in the temperature of the mobile terminal 100. The sensor assembly 114 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 114 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 114 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 116 is configured to facilitate communications between the mobile terminal 100 and other devices in a wired or wireless manner. The mobile terminal 100 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 116 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 116 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the mobile terminal 100 may be implemented by 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), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer readable storage medium comprising instructions, such as the memory 104 comprising instructions, executable by the processor 120 of the mobile terminal 100 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
A non-transitory computer readable storage medium having instructions stored thereon that, when executed by a processor of a mobile terminal 100, enable the mobile terminal 100 to perform an audio playback method, the mobile terminal 100 including at least two contacts for connecting an external speaker, the method comprising:
acquiring an instruction for playing audio data;
determining a target contact point of the at least two contact points, wherein the target contact point is connected with an external loudspeaker;
and controlling an external loudspeaker connected with the target contact to play audio data.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims (15)
1. An audio playing method is applied to a mobile terminal, wherein the mobile terminal comprises at least two contacts, and the contacts are used for connecting an external speaker, and the method comprises the following steps:
acquiring an instruction for playing audio data;
determining a target contact point of the at least two contact points, wherein the target contact point is connected with an external loudspeaker;
controlling an external loudspeaker connected with the target contact to play the audio data;
the target contact comprises a first contact and a second contact, and the volume of the external loudspeaker connected with the first contact is larger than that of the external loudspeaker connected with the second contact;
the external speaker for controlling the target contact to be connected to play the audio data comprises:
acquiring the playing volume of the audio data;
when the playing volume of the audio data is lower than a first volume threshold, playing the audio data through an external loudspeaker connected with the first contact;
when the playing volume of the audio data is higher than a second volume threshold, playing the audio data through an external loudspeaker connected with the second contact;
wherein the first volume threshold is lower than the second volume threshold.
2. The audio playing method according to claim 1, further comprising:
and outputting the audio data to a built-in loudspeaker and/or a receiver.
3. The audio playing method according to claim 1, further comprising:
acquiring an enabling state of the at least two contacts before determining a target contact of the at least two contacts, wherein the enabling state comprises enabled or not enabled;
the determining a target contact of the at least two contacts comprises:
when the activation status of the at least two contacts is activated, the step of determining a target contact of the at least two contacts is performed.
4. The audio playing method according to claim 1, further comprising:
acquiring an enabling state of each of the at least two contacts before determining a target contact of the at least two contacts, wherein the enabling state comprises enabled or not enabled;
the determining a target contact of the at least two contacts comprises:
and determining the contact point, of the at least two contact points, which is activated and connected with an external loudspeaker, as the target contact point.
5. The audio playing method according to claim 1, wherein the at least two contacts are distributed on a back surface of the mobile terminal.
6. The method of claim 5, wherein the mobile terminal comprises two contacts, one of the two contacts being disposed at a first location on a back side of the mobile terminal, the first location corresponding to a built-in speaker of the mobile terminal, the other of the two contacts being disposed at a second location on the back side of the mobile terminal, the second location corresponding to an earpiece of the mobile terminal.
7. An audio playing device, applied to a mobile terminal, wherein the mobile terminal includes at least two contacts, and the contacts are used for connecting an external speaker, the device includes:
the first acquisition module is used for acquiring an instruction for playing audio data;
the determining module is used for determining a target contact point of the at least two contact points, and the target contact point is connected with an external loudspeaker;
the control module is used for controlling the external loudspeaker connected with the target contact to play the audio data;
the target contact comprises a first contact and a second contact, and the volume of the external loudspeaker connected with the first contact is larger than that of the external loudspeaker connected with the second contact;
the control module is configured to:
acquiring the playing volume of the audio data;
when the playing volume of the audio data is lower than a first volume threshold, playing the audio data through an external loudspeaker connected with the first contact;
when the playing volume of the audio data is higher than a second volume threshold, playing the audio data through an external loudspeaker connected with the second contact;
wherein the first volume threshold is lower than the second volume threshold.
8. The apparatus of claim 7, further comprising:
and the output module is used for outputting the audio data to a built-in loudspeaker and/or a receiver.
9. The apparatus of claim 7, further comprising:
a second obtaining module, configured to obtain enabling statuses of the at least two contacts before determining a target contact of the at least two contacts, where the enabling statuses include enabled or disabled;
the determining module is configured to:
when the activation status of the at least two contacts is activated, the step of determining a target contact of the at least two contacts is performed.
10. The apparatus of claim 7, further comprising:
a third obtaining module, configured to obtain an enabling status of each of the at least two contacts before determining a target contact of the at least two contacts, where the enabling status includes enabled or not enabled;
the determining module is configured to:
and determining the contact point, of the at least two contact points, which is activated and connected with an external loudspeaker, as the target contact point.
11. The apparatus of claim 7, wherein the at least two contacts are distributed on a back side of the mobile terminal.
12. The apparatus of claim 11, wherein the mobile terminal comprises two contacts, one of the two contacts being disposed at a first location on a back side of the mobile terminal, the first location corresponding to a built-in speaker of the mobile terminal, the other of the two contacts being disposed at a second location on the back side of the mobile terminal, the second location corresponding to an earpiece of the mobile terminal.
13. An audio playing device, applied to a mobile terminal, wherein the mobile terminal includes at least two contacts, and the contacts are used for connecting an external speaker, and the audio playing device includes:
a processor;
a memory for storing executable instructions of the processor;
wherein the processor is configured to:
acquiring an instruction for playing audio data;
determining a target contact point of the at least two contact points, wherein the target contact point is connected with an external loudspeaker;
controlling an external loudspeaker connected with the target contact to play the audio data;
the target contact comprises a first contact and a second contact, and the volume of the external loudspeaker connected with the first contact is larger than that of the external loudspeaker connected with the second contact;
the external speaker for controlling the target contact to be connected to play the audio data comprises:
acquiring the playing volume of the audio data;
when the playing volume of the audio data is lower than a first volume threshold, playing the audio data through an external loudspeaker connected with the first contact;
when the playing volume of the audio data is higher than a second volume threshold, playing the audio data through an external loudspeaker connected with the second contact;
wherein the first volume threshold is lower than the second volume threshold.
14. A non-transitory computer-readable storage medium having stored therein instructions that, when executed on a processing component, cause the processing component to perform the audio playback method of any of claims 1 to 6.
15. A chip comprising programmable logic circuits and/or program instructions for implementing the audio playback method as claimed in any one of claims 1 to 6 when said chip is operated.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811252039.7A CN109408025B (en) | 2018-10-25 | 2018-10-25 | Audio playing method, device and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811252039.7A CN109408025B (en) | 2018-10-25 | 2018-10-25 | Audio playing method, device and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109408025A CN109408025A (en) | 2019-03-01 |
CN109408025B true CN109408025B (en) | 2021-10-22 |
Family
ID=65469250
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811252039.7A Active CN109408025B (en) | 2018-10-25 | 2018-10-25 | Audio playing method, device and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109408025B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111263272B (en) * | 2020-01-19 | 2022-05-20 | 深圳巴金科技有限公司 | Audio signal shunting and returning method and system |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103533270A (en) * | 2013-09-27 | 2014-01-22 | 青岛海信电器股份有限公司 | Audio playing equipment and video control method |
CN106125880A (en) * | 2016-06-14 | 2016-11-16 | 乐视控股(北京)有限公司 | The method for controlling volume of a kind of intelligent terminal and device and storage medium |
CN106161781A (en) * | 2016-06-22 | 2016-11-23 | 北京小米移动软件有限公司 | Method for regulation of sound volume and device |
CN106210970A (en) * | 2016-08-31 | 2016-12-07 | 上海青橙实业有限公司 | There is the mobile terminal of detachable sound equipment |
CN106936991A (en) * | 2017-03-03 | 2017-07-07 | 深圳市金立通信设备有限公司 | The method and terminal of a kind of automatic regulating volume |
CN107391078A (en) * | 2017-07-14 | 2017-11-24 | 维沃移动通信有限公司 | A kind of sound adjusting method and mobile terminal |
CN107506168A (en) * | 2017-08-18 | 2017-12-22 | 广东欧珀移动通信有限公司 | volume adjusting method, device, terminal device and storage medium |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI514258B (en) * | 2014-02-17 | 2015-12-21 | Hooloop Corp | Methods and systems for voice management, and related computer program products |
US9971561B1 (en) * | 2016-11-15 | 2018-05-15 | Oath Inc. | Volume control |
-
2018
- 2018-10-25 CN CN201811252039.7A patent/CN109408025B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103533270A (en) * | 2013-09-27 | 2014-01-22 | 青岛海信电器股份有限公司 | Audio playing equipment and video control method |
CN106125880A (en) * | 2016-06-14 | 2016-11-16 | 乐视控股(北京)有限公司 | The method for controlling volume of a kind of intelligent terminal and device and storage medium |
CN106161781A (en) * | 2016-06-22 | 2016-11-23 | 北京小米移动软件有限公司 | Method for regulation of sound volume and device |
CN106210970A (en) * | 2016-08-31 | 2016-12-07 | 上海青橙实业有限公司 | There is the mobile terminal of detachable sound equipment |
CN106936991A (en) * | 2017-03-03 | 2017-07-07 | 深圳市金立通信设备有限公司 | The method and terminal of a kind of automatic regulating volume |
CN107391078A (en) * | 2017-07-14 | 2017-11-24 | 维沃移动通信有限公司 | A kind of sound adjusting method and mobile terminal |
CN107506168A (en) * | 2017-08-18 | 2017-12-22 | 广东欧珀移动通信有限公司 | volume adjusting method, device, terminal device and storage medium |
Non-Patent Citations (2)
Title |
---|
Point-to-Multipoint Stereo Audio Transmitting System Based on Bluetooth;Jian He等;《2010 International Conference on Communications and Mobile Computing》;20100414;第323-328页 * |
一种混合信号型时分复用上电复位及模拟音量控制电路;陈铖颖等;《固体电子学研究与进展》;20171025;第350-354页 * |
Also Published As
Publication number | Publication date |
---|---|
CN109408025A (en) | 2019-03-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106454644B (en) | Audio playing method and device | |
CN109890021A (en) | Bluetooth headset switching method, bluetooth headset and terminal | |
US8390666B2 (en) | Terminal and control method thereof | |
CN109525881A (en) | Sound draws synchronous method, device and equipment | |
CN105187594A (en) | Echo canceling method and device | |
CN105407433A (en) | Method and device for controlling sound output equipment | |
CN103986821A (en) | Method, equipment and system for carrying out parameter adjustment | |
CN105407368A (en) | Multimedia playing method, device and system | |
CN104636110A (en) | Method and device for controlling volume | |
CN109151619A (en) | Data communications method and device | |
CN109429152A (en) | Speaker unit, electronic equipment, effect adjusting method and device | |
CN111885255A (en) | Audio playback control method, audio playback control device, and storage medium | |
CN114416015A (en) | Audio adjusting method and device, electronic equipment and readable storage medium | |
CN104682908A (en) | Method and device for controlling volume | |
CN207117943U (en) | Speaker unit and electronic equipment | |
CN109408025B (en) | Audio playing method, device and storage medium | |
CN105450861A (en) | Information prompt method and information prompt device | |
CN112882622A (en) | Data processing method and device, terminal and storage medium | |
CN112243142A (en) | Method, device and storage medium for processing audio data | |
CN109474744B (en) | Alarm clock processing method, device and storage medium | |
CN106936972B (en) | Method, device and system for controlling audio channel | |
CN111694539B (en) | Method, device and medium for switching between earphone and loudspeaker | |
WO2018058331A1 (en) | Method and apparatus for controlling volume | |
CN112040059B (en) | Application control method, application control device and storage medium | |
CN107766280A (en) | Terminal communicating method and device |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |