CN113746982A - Audio playing control method and device, electronic equipment and readable storage medium - Google Patents

Audio playing control method and device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN113746982A
CN113746982A CN202110985237.XA CN202110985237A CN113746982A CN 113746982 A CN113746982 A CN 113746982A CN 202110985237 A CN202110985237 A CN 202110985237A CN 113746982 A CN113746982 A CN 113746982A
Authority
CN
China
Prior art keywords
speaker
target
speakers
loudspeaker
main
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.)
Granted
Application number
CN202110985237.XA
Other languages
Chinese (zh)
Other versions
CN113746982B (en
Inventor
林翔
游利文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Vivo Mobile Communication Hangzhou Co Ltd
Original Assignee
Vivo Mobile Communication Hangzhou Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Vivo Mobile Communication Hangzhou Co Ltd filed Critical Vivo Mobile Communication Hangzhou Co Ltd
Priority to CN202110985237.XA priority Critical patent/CN113746982B/en
Publication of CN113746982A publication Critical patent/CN113746982A/en
Application granted granted Critical
Publication of CN113746982B publication Critical patent/CN113746982B/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/72427User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality for supporting games or graphical animations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/16Sound input; Sound output
    • G06F3/165Management of the audio stream, e.g. setting of volume, audio stream path
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/02Constructional features of telephone sets
    • H04M1/21Combinations with auxiliary equipment, e.g. with clocks or memoranda pads
    • 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/72409User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by interfacing with external accessories
    • 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/72409User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by interfacing with external accessories
    • H04M1/72412User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by interfacing with external accessories using two-way short-range wireless interfaces
    • 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

Abstract

The application discloses an audio playing control method and device, electronic equipment and a readable storage medium, and belongs to the technical field of electronic equipment control. Wherein the method is applied to a master device, the method comprising: under the condition that the communication connection with the auxiliary operation equipment is detected, determining the number of first loudspeakers of the main equipment and the number of second loudspeakers of the auxiliary operation equipment; determining at least two target speakers from the first speaker of the main device and the second speaker of the auxiliary operation device according to the first speaker number and the second speaker number; and controlling the target loudspeaker to cooperatively play the audio data output by the main equipment.

Description

Audio playing control method and device, electronic equipment and readable storage medium
Technical Field
The application belongs to the technical field of electronic equipment control, and particularly relates to an audio playing control method and device, electronic equipment and a readable storage medium.
Background
Currently, as the functions of mobile phones become more and more powerful, more and more mobile games are also in motion.
The playing effect in the game process not only influences the effect of bringing sound to the game environment and increases the game experience, but also assists the user in positioning the sound source, for example, the enemy direction in the game can be judged through stereo sound.
However, at present, many mobile phones still only support single-speaker playing, which cannot achieve the effect of stereo sound and achieve better impression experience.
Disclosure of Invention
An object of the embodiments of the present application is to provide an audio playing control method, an audio playing control device, an electronic device, and a readable storage medium, which can solve the problem in the prior art that an external stereo effect is not good due to the fact that a mobile phone only supports single-speaker playing.
In order to solve the technical problem, the present application is implemented as follows:
in a first aspect, an embodiment of the present application provides an audio playing control method, where the method is applied to a master device, and the method includes:
under the condition that the communication connection with the auxiliary operation equipment is detected, determining the number of first loudspeakers of the main equipment and the number of second loudspeakers of the auxiliary operation equipment;
determining at least two target speakers from the first speaker of the main device and the second speaker of the auxiliary operation device according to the first speaker number and the second speaker number;
and controlling the target loudspeaker to cooperatively play the audio data output by the main equipment.
In a second aspect, an embodiment of the present application provides an audio playing control apparatus, where the apparatus is applied to a host device, and the apparatus includes:
the device comprises a first determining module, a second determining module and a control module, wherein the first determining module is used for determining the first loudspeaker number of the main device and the second loudspeaker number of the auxiliary operating device under the condition that the communication connection with the auxiliary operating device is detected;
a second determining module, configured to determine at least two target speakers from the first speaker of the main device and the second speaker of the auxiliary operating device according to the first number of speakers and the second number of speakers;
and the control module is used for controlling the target loudspeaker to cooperatively play the audio data output by the main equipment.
In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instructions stored on the memory and executable on the processor, and when executed by the processor, the program or instructions implement the steps of the method according to the first aspect.
In a fourth aspect, embodiments of the present application provide a readable storage medium, on which a program or instructions are stored, which when executed by a processor implement the steps of the method according to the first aspect.
In a fifth aspect, an embodiment of the present application provides a chip, where the chip includes a processor and a communication interface, where the communication interface is coupled to the processor, and the processor is configured to execute a program or instructions to implement the method according to the first aspect.
In the embodiment of the application, under the condition that the communication connection with the auxiliary operation equipment is detected, the number of first loudspeakers of the main equipment and the number of second loudspeakers of the auxiliary operation equipment are determined; determining at least two target speakers from the first speaker of the main device and the second speaker of the auxiliary operation device according to the number of the first speakers and the number of the second speakers; and controlling the target loudspeaker to cooperatively play the audio data output by the main equipment. In the control process, under the condition that the main equipment detects that the communication connection with the auxiliary operation equipment is established, the number of the loudspeakers of the main equipment and the number of the loudspeakers of the auxiliary operation equipment are obtained, at least two target loudspeakers are determined from the number of the loudspeakers, then the target loudspeakers are controlled to cooperatively output stereo sound, and audio data required to be played by the main equipment are played, so that the stereo sound playing effect is achieved, and the problem that in the prior art, the playing effect of the stereo sound is poor due to the fact that a mobile phone only supports single-loudspeaker playing is solved.
Drawings
Fig. 1 is a flowchart illustrating steps of an audio playing control method according to an embodiment of the present application;
FIG. 2 is a schematic view of a game pad without a speaker according to an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of a game pad with 1 speaker according to an embodiment of the present invention;
FIG. 4 is a schematic structural diagram of a game pad with 2 speakers according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of a control logic of an audio playback control method in an embodiment of the present application;
FIG. 6 is a schematic diagram of a game pad playing audio in cooperation with a mobile phone according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of an audio playback control apparatus according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of an electronic device provided in an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms first, second and the like in the description and in the claims of the present application are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application are capable of operation in sequences other than those illustrated or described herein. In addition, "and/or" in the specification and claims means at least one of connected objects, a character "/" generally means that a preceding and succeeding related objects are in an "or" relationship.
The following describes the audio playing control method provided by the embodiment of the present application in detail through specific embodiments and application scenarios thereof with reference to the accompanying drawings.
Referring to fig. 1, a flowchart illustrating steps of an audio playing control method according to an embodiment of the present application is shown, where the method may include steps 100 to 300.
In this embodiment, the method is applied to a main device, the main device is an electronic device, and the electronic device may be a mobile electronic device such as a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a Personal Digital Assistant (PDA), or may be a non-mobile electronic device such as a Personal Computer (PC), a Television (TV), a teller machine, or a self-service machine, as long as the electronic device can establish a communication connection with an auxiliary operating device.
Step 100, under the condition that the communication connection with the auxiliary operation equipment is detected, determining the number of first loudspeakers of the main equipment and the number of second loudspeakers of the auxiliary operation equipment.
In step 100, the auxiliary operating device is a device that assists the user in performing an input operation on the main device, and may specifically be a joystick, a motion sensing operating device, or the like. Because the existing smart phone is basically in a touch screen or full screen mode, the operation experience of controlling directions, keys and the like in the game is still deficient, so that more and more qualified and professional game players can select an additional game handle to play the game.
The auxiliary operation equipment can be in communication connection with the main equipment in a wireless mode such as Bluetooth and WIFI, and can also be in communication connection with the main equipment through plugging or a data line.
In this step, when the main device detects that a communication connection is established with the auxiliary operating device, the number of speakers provided by the main device, that is, the number of the first speakers, is obtained; meanwhile, since the communication connection has already been established, the number of speakers included in the auxiliary operating device, that is, the above-described second speaker number, can be acquired through the established communication link.
Step 200, determining at least two target speakers from the first speaker of the main device and the second speaker of the auxiliary operation device according to the number of the first speakers and the number of the second speakers.
In step 200, the target speaker is used as a speaker for outputting stereo sound. Wherein, because to realize the stereo effect replaceably, need two loudspeakers to participate in at least, and under the situation that the sum of first loudspeaker quantity and second loudspeaker quantity is greater than or equal to 2, explain the first loudspeaker that the main equipment includes and the second loudspeaker that the auxiliary operating equipment includes total number is at least 2, therefore can choose two loudspeakers at least as the goal loudspeaker from it.
And step 300, controlling the target loudspeaker to cooperatively play the audio data output by the main equipment.
In the step 300, since the target speakers at least include 2 speakers, the target speakers can be controlled to cooperatively play audio data output by the host device in stereo, so that a stereo effect is realized by using the target speakers.
In the above step 300, when the target speaker belongs to the master device, the master device directly controls the target speaker to play the audio data output by the master device; and when the target loudspeaker belongs to the auxiliary operation equipment, the main equipment sends the audio data output by the main equipment to the auxiliary operation equipment, and then the auxiliary operation equipment controls the target loudspeaker to play the corresponding audio data.
According to the audio playing control method provided by the embodiment of the application, under the condition that the communication connection with the auxiliary operation equipment is detected, the number of first loudspeakers of the main equipment and the number of second loudspeakers of the auxiliary operation equipment are determined; determining at least two target speakers from the first speaker of the main device and the second speaker of the auxiliary operation device according to the number of the first speakers and the number of the second speakers; and controlling the target loudspeaker to cooperatively play the audio data output by the main equipment. In the control process, under the condition that the main equipment detects that the communication connection with the auxiliary operation equipment is established, the number of the loudspeakers of the main equipment and the number of the loudspeakers of the auxiliary operation equipment are obtained, at least two target loudspeakers are determined from the number of the loudspeakers, then the target loudspeakers are controlled to cooperatively output stereo sound, and audio data required to be played by the main equipment are played, so that the stereo sound playing effect is achieved, and the problem that in the prior art, the playing effect of the stereo sound is poor due to the fact that a mobile phone only supports single-loudspeaker playing is solved.
Optionally, in an implementation manner, in the audio playing control method provided in the embodiment of the present application, the target speakers include a first target speaker and a second target speaker, and the step 300 includes steps 301 to 302.
In this embodiment, the number of the first target speakers is the same as that of the second target speakers, so as to achieve a better stereo effect.
Step 301, playing first channel data of the audio data through the first target speaker.
In step 301, the audio data includes left channel data and right channel data, and the first channel data is channel data of one of the left channel data and the right channel data in the audio data. By sending the first channel data of the audio data to the first target speaker, the first speaker can then play the portion of the audio data.
Step 302, playing second channel data of the audio data through the second target speaker.
In step 302, the second channel data is the other one of the left channel data and the right channel data in the audio data. By sending the second channel data of the audio data to the second target speaker, the second speaker can then play the portion of the audio data.
It should be noted that the number of speakers included in the first target speaker and the number of speakers included in the second target speaker may be multiple, that is, the multiple speakers together form the first target speaker or the second target speaker.
In the above embodiment, at least two target speakers are divided into a first target speaker and a second target speaker, and the first target speaker plays the first channel data in the audio data, and the second target speaker plays the second channel data in the audio data, so that the audio data output by the host device is cooperatively played according to stereo, and the stereo effect is realized.
Optionally, in an implementation manner, in the audio playing control method provided in this embodiment of the present application, the step 200 includes a step 201.
Step 201, when the number of the first speakers and the number of the second speakers are both equal to 1, determining the first speaker of the main device as the first target speaker, and determining the second speaker of the auxiliary operating device as the second target speaker.
In step 201, when the number of the first speakers and the number of the second speakers are equal to 1, it is determined that both the main device and the auxiliary operating device have speakers, at this time, the first speaker of the main device is used as the first target speaker, and the second speaker of the auxiliary operating device is used as the second target speaker, and then the main device transmits the first channel data of the audio data to the first speaker of the main device for playing, and transmits the second channel data of the audio data to the auxiliary operating device for the auxiliary operating device to transmit to the second speaker of the auxiliary operating device for playing, thereby implementing the stereo effect.
Optionally, in an implementation manner, in the audio playing control method provided in this embodiment of the present application, the step 200 further includes steps 202 to 203.
Step 202, determining the first target speaker and the second target speaker from the second speakers of the auxiliary operating device when the number of the second speakers is greater than or equal to 2.
In step 202, when the number of the second speakers is greater than or equal to 2, the auxiliary operating device initiates an audio connection request to the main device, and then the speakers of the auxiliary operating device are used as the first target speaker and the second target speaker to respectively play the first channel data and the second channel data in the audio data output by the main device, that is, the auxiliary operating device only plays the audio data, thereby implementing the stereo effect.
Wherein, all the second speakers can be equally divided into a first target speaker and a second target speaker, and then participate in the playing of the audio data; or part of the second speakers may be equally divided into the first target speaker and the second target speaker, and then participate in the playing of the audio data.
Step 203, determining the first target speaker and the second target speaker from the first speakers of the master device when the number of the second speakers is less than or equal to 1 and the number of the first speakers is greater than or equal to 2.
In step 203, when the number of the first speakers is greater than or equal to 2 and the number of the second speaker data is 0, the auxiliary operating device does not initiate an audio connection request to the main device, and the speakers of the main device are used as the first target speaker and the second target speaker to respectively play the first channel data and the second channel data in the audio data output by the main device, that is, only the main device plays the audio data, thereby implementing the stereo effect.
Wherein, all the first loudspeakers can be equally divided into a first target loudspeaker and a second target loudspeaker, and then participate in the playing of audio data; or, part of the first speakers may be divided into the first target speaker and the second target speaker, and then participate in the playing of the audio data.
In the above embodiment, when the number of speakers included in the auxiliary operating device is greater than or equal to 2, the audio data output by the main device is directly played by the auxiliary operating device, and when the auxiliary operating device does not include speakers or only includes 1 speaker and the number of speakers included in the main device is greater than or equal to 2, the audio data output by the main device is directly played by the main device, thereby ensuring the stereo effect.
Optionally, when the number of the second speakers is 0 and the number of the first speakers is equal to 1, the first speaker of the host device directly plays the audio data output by the host device, that is, the first speaker directly plays the first channel data or the second channel data, so as to implement normal audio playing.
Optionally, in an implementation manner, the audio playing control method provided in this embodiment of the present application, before the step 300, further includes a step 204:
synchronizing the volume of the primary device with the volume of the secondary operating device.
In this embodiment, after the secondary operation device establishes a communication connection with the main device and before the audio data is played, the volume of the main device is controlled to be the same as the volume of the secondary operation device, and the synchronous adjustment is performed, that is, when the volume of the secondary operation device changes, the volume of the main device is controlled to be adjusted accordingly.
The main device can acquire the current first volume of the auxiliary operation device at regular time or in real time, and after acquiring the first volume, the first volume is compared with the current second volume of the main device per se; when the second volume is different from the first volume, the main device adjusts the current volume of the main device to the first volume, so that the volume of the main device is always consistent with that of the auxiliary operation device, and a better stereo playing effect is achieved.
Optionally, in a specific implementation manner, in the control method provided in the embodiment of the present application, the step 204 includes steps 2041 to 2042.
Step 2041, the volume of the auxiliary operating device is obtained at regular time.
In step 2041, when the preset time interval is reached, the synchronization signal is triggered, and then the volume of the auxiliary operating device is obtained according to the top signal.
Step 2042, controlling the volume of the main device to be the same as the volume of the auxiliary operating device.
In step 2042, after the volume of the auxiliary operating device is obtained, the volume of the main device is controlled to be the same as the volume of the auxiliary operating device.
In the above embodiment, after the auxiliary operating device establishes communication connection with the main device, the volume of the main device is controlled to be the same as the audio frequency of the auxiliary operating device according to the preset timing task, so that the volume of the main device is always consistent with that of the auxiliary operating device, thereby ensuring the stereo playing effect.
Optionally, a register bit a is preset in the main device to define the number of speakers carried by the main device, and when it is detected that the communication connection with the auxiliary operating device is established, the number of the first speakers may be determined by reading the value of the register bit. For example, if the host device itself has 1 speaker, the register a is set to 0; if the handset itself has 2 or more speakers, such as 4 speakers, the register bit a is set to 1.
Optionally, adding one bit of information bit b to the device identification ID of the auxiliary operating device to define the number of speakers of the auxiliary operating device; when the main device detects that the communication connection with the auxiliary operation device is established, the number of the second loudspeakers can be determined by reading the value of the information bit b. For example, in the case where the auxiliary operating device is a joystick, if the joystick does not have a speaker therein, as shown in fig. 2, the information bit b of the joystick is set to 0; when the number of the loudspeakers of the game handle is 1, as shown in fig. 3, the information bit b in the game handle is set to 1; if the game pad has 2 or more speakers, as shown in fig. 4, the information bit b is set to 2.
Referring to fig. 5, a schematic diagram of a control logic of the audio playback control method provided in the embodiment of the present application is shown.
As shown in fig. 5, in step 501, after the mobile phone and the gamepad establish a communication connection, the mobile phone determines the number of speakers of the mobile phone through a register a and determines the number of speakers of the gamepad through an information bit b;
in step 502, if the information bit of the gamepad is 0, that is, the gamepad does not have a speaker, the gamepad does not send an audio connection request to the mobile phone, and at this time, the control audio is sent by the speaker of the mobile phone;
in step 503, if the information bit b is 1, that is, the number of speakers of the gamepad is 1, the gamepad will send an audio connection request to the mobile phone, and it is necessary to further determine the number of speakers of the mobile phone, so as to confirm the value a of the speaker register of the mobile phone;
in step 504, when the register a is 1, that is, the mobile phone has 2 or more than 2 speakers, at this time, the mobile phone rejects the audio connection request of the game pad, and controls the audio to be sent out by the speaker of the mobile phone;
in step 505, if the register a is 0, that is, the mobile phone has 1 speaker, then the mobile phone will agree with the audio connection request of the gamepad, and control the audio to be played by the speaker of the mobile phone and the speaker of the gamepad in a coordinated manner, as shown in fig. 6;
in step 506, specifically, the mobile phone refuses the audio connection request of the game pad, the left channel data of the audio data is transmitted to the speaker of the game pad for playing by the mobile phone, and the right channel data of the audio data is played by the speaker of the mobile phone, so that the stereo playing effect is realized;
in step 507, if the information bit b is 2, that is, the number of the speakers of the game pad is 2 or more than 2, the mobile phone will agree with the audio connection request of the game pad at this time, and control the audio data output by the mobile phone to be directly sent out by the speakers of the game pad.
It should be noted that, in the control method provided in the embodiment of the present application, the execution main body may be an electronic device, or a control module used for executing the loading control method in the electronic device. In the embodiment of the present application, an electronic device is taken as an example to execute a loaded audio playing control method, and the audio playing control method provided in the embodiment of the present application is described.
Referring to fig. 7, a schematic structural diagram of an audio playing control apparatus according to an embodiment of the present application is shown, and as shown in fig. 7, a control apparatus 70 according to an embodiment of the present application is applied to a host device, where the apparatus includes:
a first determining module 71, configured to determine, when it is detected that a communication connection is established with a secondary operating device, a first number of speakers of the primary device and a second number of speakers of the secondary operating device;
a second determining module 72, configured to determine at least two target speakers from the first speaker of the main device and the second speaker of the auxiliary operating device according to the first number of speakers and the second number of speakers;
and a control module 73, configured to control the target speaker to cooperatively play the audio data output by the host device.
Optionally, in the control device, the target speakers include at least one first target speaker and at least one second target speaker;
the control module 73 includes:
a first control unit for playing first channel data of the audio data through the first target speaker;
a second control unit for playing second channel data of the audio data through the second target speaker.
Optionally, in the control apparatus, the second determining module 72 includes:
a first determination unit configured to determine a first speaker of the main apparatus as the first target speaker and a second speaker of the auxiliary operation apparatus as the second target speaker according to a determination that the first speaker and the second speaker are both equal to 1.
Optionally, the apparatus further comprises:
and the synchronization module is used for synchronizing the volume of the main equipment and the volume of the auxiliary operation equipment before controlling the target loudspeaker to cooperatively play the audio data output by the main equipment.
Optionally, in the control apparatus, the synchronization module includes:
the acquisition unit is used for acquiring the volume of the auxiliary operation equipment at regular time;
and the synchronizing unit is used for controlling the volume of the main equipment to be the same as that of the auxiliary operation equipment.
Optionally, in the control apparatus, the control module 72 further includes:
a second control unit configured to determine the first target speaker and the second target speaker from among the second speakers of the auxiliary operating device, in a case where the number of the second speakers is greater than or equal to 2;
a third control unit, configured to determine the first target speaker and the second target speaker from the first speakers of the master device if the number of the second speakers is less than or equal to 1 and the number of the first speakers is greater than or equal to 2.
The audio playback control device 70 in the embodiment of the present application may be a device, or may be a component, an integrated circuit, or a chip in the terminal. The device can be mobile electronic equipment or non-mobile electronic equipment. By way of example, the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palm top computer, a vehicle-mounted electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a Personal Digital Assistant (PDA), and the like, and the non-mobile electronic device may be a server, a Network Attached Storage (NAS), a Personal Computer (PC), a Television (TV), a teller machine or a self-service machine, and the like, and the embodiments of the present application are not particularly limited.
The audio playback control device 70 in the embodiment of the present application may be a device having an operating system. The operating system may be an Android (Android) operating system, an ios operating system, or other possible operating systems, and embodiments of the present application are not limited specifically.
The audio playing control device 70 provided in this embodiment of the application can implement each process implemented by the audio playing control device in the method embodiments of fig. 1 to 6, and is not described herein again to avoid repetition.
In the embodiment of the application, under the condition that the communication connection with the auxiliary operation equipment is detected, the number of the speakers of the main equipment and the number of the speakers of the auxiliary operation equipment are obtained, at least two target speakers are determined, then the target speakers are controlled to cooperatively output stereo sound, and audio data required to be played by the main equipment are played, so that a stereo sound playing effect is achieved, and the problem that in the prior art, the playing of the mobile phone only supports single-speaker playing, so that the effect of playing the external stereo sound is poor in the game process is solved.
Optionally, an embodiment of the present application further provides an electronic device, which includes a processor, a memory, and a program or an instruction stored in the memory and capable of running on the processor, where the program or the instruction is executed by the processor to implement each process of the above-mentioned audio playing control method embodiment, and can achieve the same technical effect, and details are not repeated here to avoid repetition.
It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and the non-mobile electronic devices described above.
Fig. 8 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.
The electronic device 800 includes, but is not limited to: a radio frequency unit 8001, a network block 8002, an audio output unit 8003, an input unit 8004, a sensor 8005, a display unit 8006, a user input unit 8007, an interface unit 8008, a memory 8009, and a processor 8010.
Those skilled in the art will appreciate that the electronic device 80 may further include a power source (e.g., a battery) for supplying power to the various components, and the power source may be logically connected to the processor 8010 via a power management system, so as to manage charging, discharging, and power consumption via the power management system. The electronic device structure shown in fig. 8 does not constitute a limitation of the electronic device, and the electronic device may include more or less components than those shown, or combine some components, or arrange different components, and thus, the description is omitted here.
The audio output unit 8003, in the embodiment of the present application, includes a first speaker;
a processor 8010 configured to determine a first number of speakers of the main device and a second number of speakers of the auxiliary operating device, when it is detected that a communication connection is established with the auxiliary operating device; determining at least two target speakers from the first speaker of the main device and the second speaker of the auxiliary operation device according to the first speaker number and the second speaker number; and controlling the target loudspeaker to cooperatively play the audio data output by the main equipment.
The electronic equipment that this application embodiment provided, under the main equipment detected the condition of establishing communication connection with the auxiliary operation equipment, obtain the speaker quantity that the main equipment possessed promptly and the speaker quantity that this auxiliary operation equipment possesses, and confirm two at least target speakers therefrom, then control each target speaker and carry out stereo output in coordination, the audio data that the main equipment needs to be broadcast is broadcast, thereby realize stereo broadcast effect, solved prior art because the cell-phone only supports single loudspeaker broadcast, lead to the not good problem of external stereo effect in the recreation process.
Optionally, the target speakers comprise at least one first target speaker and at least one second target speaker; the processor 8010 is specifically configured to play the first channel data of the audio data through the first target speaker; playing second channel data of the audio data through the second target speaker.
Optionally, the processor 8010 is specifically configured to determine the first speaker of the main device as the first target speaker and determine the second speaker of the auxiliary operating device as the second target speaker when both the number of the first speakers and the number of the second speakers are equal to 1.
Optionally, the processor 8010 is further configured to synchronize the volume of the main device and the volume of the auxiliary operating device before controlling the target speakers to cooperatively play the audio data output by the main device.
Optionally, the processor 8010 acquires the volume of the auxiliary operating device at specific timing; and controlling the volume of the main equipment to be the same as that of the auxiliary operation equipment.
Optionally, the processor 8010 has a function of determining the first target speaker and the second target speaker from the second speakers of the auxiliary operating device, in case that the number of the second speakers is greater than or equal to 2; and determining the first target loudspeaker and the second target loudspeaker from the first loudspeaker of the main equipment under the condition that the number of the second loudspeakers is less than or equal to 1 and the number of the first loudspeakers is greater than or equal to 2.
The embodiment of the present application further provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or the instruction is executed by a processor, the program or the instruction implements each process of the above-mentioned audio playing control method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and so on.
The embodiment of the present application further provides a chip, where the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to run a program or an instruction to implement each process of the above-mentioned audio playing control method embodiment, and can achieve the same technical effect, and in order to avoid repetition, the description is omitted here.
It should be understood that the chips mentioned in the embodiments of the present application may also be referred to as system-on-chip, system-on-chip or system-on-chip, etc.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element. Further, it should be noted that the scope of the methods and apparatus of the embodiments of the present application is not limited to performing the functions in the order illustrated or discussed, but may include performing the functions in a substantially simultaneous manner or in a reverse order based on the functions involved, e.g., the methods described may be performed in an order different than that described, and various steps may be added, omitted, or combined. In addition, features described with reference to certain examples may be combined in other examples.
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 application 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 (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 application.
While the present embodiments have been described with reference to the accompanying drawings, it is to be understood that the invention is not limited to the precise embodiments described above, which are meant to be illustrative and not restrictive, and that various changes may be made therein by those skilled in the art without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (10)

1. An audio playing control method, applied to a master device, the method comprising:
under the condition that the communication connection with the auxiliary operation equipment is detected, determining the number of first loudspeakers of the main equipment and the number of second loudspeakers of the auxiliary operation equipment;
determining at least two target speakers from the first speaker of the main device and the second speaker of the auxiliary operation device according to the first speaker number and the second speaker number;
and controlling the target loudspeaker to cooperatively play the audio data output by the main equipment.
2. The control method according to claim 1, wherein the target speaker includes a first target speaker and a second target speaker;
controlling each target loudspeaker to cooperatively play audio data output by the main device, including:
playing first channel data of the audio data through the first target speaker;
playing second channel data of the audio data through the second target speaker.
3. The control method according to claim 2, wherein determining at least two target speakers from the first speaker of the main device and the second speaker of the auxiliary operation device based on the first speaker number and the second speaker number comprises:
and under the condition that the number of the first loudspeakers and the number of the second loudspeakers are equal to 1, determining a first loudspeaker of the main device as the first target loudspeaker, and determining a second loudspeaker of the auxiliary operation device as the second target loudspeaker.
4. The control method according to claim 1, wherein before controlling the target speakers to cooperatively play the audio data output by the host device, the method further comprises:
synchronizing the volume of the primary device with the volume of the secondary operating device.
5. The control method of claim 4, wherein synchronizing the volume of the primary device with the volume of the secondary operating device comprises:
acquiring the volume of the auxiliary operation equipment at regular time;
and controlling the volume of the main equipment to be the same as that of the auxiliary operation equipment.
6. The control method according to claim 3, wherein at least two target speakers are determined from the first speaker of the main apparatus and the second speaker of the auxiliary operation apparatus in accordance with the first speaker number and the second speaker number, further comprising:
determining the first target speaker and the second target speaker from among second speakers of the auxiliary operating device in a case where the number of second speakers is greater than or equal to 2;
and determining the first target loudspeaker and the second target loudspeaker from the first loudspeaker of the main equipment under the condition that the number of the second loudspeakers is less than or equal to 1 and the number of the first loudspeakers is greater than or equal to 2.
7. An audio playback control apparatus, applied to a host device, the apparatus comprising:
the device comprises a first determining module, a second determining module and a control module, wherein the first determining module is used for determining the first loudspeaker number of the main device and the second loudspeaker number of the auxiliary operating device under the condition that the communication connection with the auxiliary operating device is detected;
a second determining module, configured to determine at least two target speakers from the first speaker of the main device and the second speaker of the auxiliary operating device according to the first number of speakers and the second number of speakers;
and the control module is used for controlling the target loudspeaker to cooperatively play the audio data output by the main equipment.
8. The control device of claim 7, wherein the target speakers comprise at least one first target speaker and at least one second target speaker;
the control module includes:
a first control unit for playing first channel data of the audio data through the first target speaker;
a second control unit for playing second channel data of the audio data through the second target speaker.
9. An electronic device comprising an antenna, a processor, a memory, and a program or instructions stored on the memory and executable on the processor, the program or instructions when executed by the processor implementing the steps of the audio playback control method of claims 1-6.
10. A readable storage medium, on which a program or instructions are stored, which when executed by a processor, implement the steps of the audio playback control method according to claims 1-6.
CN202110985237.XA 2021-08-25 2021-08-25 Audio playing control method and device, electronic equipment and readable storage medium Active CN113746982B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110985237.XA CN113746982B (en) 2021-08-25 2021-08-25 Audio playing control method and device, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110985237.XA CN113746982B (en) 2021-08-25 2021-08-25 Audio playing control method and device, electronic equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN113746982A true CN113746982A (en) 2021-12-03
CN113746982B CN113746982B (en) 2023-02-28

Family

ID=78733048

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110985237.XA Active CN113746982B (en) 2021-08-25 2021-08-25 Audio playing control method and device, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN113746982B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103929691A (en) * 2014-03-20 2014-07-16 联想(北京)有限公司 Information processing method and electronic equipment
CN108419183A (en) * 2018-03-29 2018-08-17 联想(北京)有限公司 The audio-frequency processing method and electronic equipment of a kind of electronic equipment
CN111641916A (en) * 2020-04-29 2020-09-08 维沃移动通信有限公司 Audio sharing method and electronic equipment
CN111770416A (en) * 2020-06-22 2020-10-13 维沃移动通信有限公司 Loudspeaker control method and device and electronic equipment
CN111857473A (en) * 2020-07-17 2020-10-30 维沃移动通信有限公司 Audio playing method and device and electronic equipment
CN112291672A (en) * 2020-10-30 2021-01-29 维沃移动通信有限公司 Speaker control method, control device and electronic equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103929691A (en) * 2014-03-20 2014-07-16 联想(北京)有限公司 Information processing method and electronic equipment
CN108419183A (en) * 2018-03-29 2018-08-17 联想(北京)有限公司 The audio-frequency processing method and electronic equipment of a kind of electronic equipment
CN111641916A (en) * 2020-04-29 2020-09-08 维沃移动通信有限公司 Audio sharing method and electronic equipment
CN111770416A (en) * 2020-06-22 2020-10-13 维沃移动通信有限公司 Loudspeaker control method and device and electronic equipment
CN111857473A (en) * 2020-07-17 2020-10-30 维沃移动通信有限公司 Audio playing method and device and electronic equipment
CN112291672A (en) * 2020-10-30 2021-01-29 维沃移动通信有限公司 Speaker control method, control device and electronic equipment

Also Published As

Publication number Publication date
CN113746982B (en) 2023-02-28

Similar Documents

Publication Publication Date Title
US20210243831A1 (en) Method for establishing classic bluetooth connection between dual-mode bluetooth devices, and dual-mode bluetooth device
CN110166877B (en) Audio playing method and device of TWS earphone and charging box
US9762317B2 (en) Playing synchronized mutichannel media on a combination of devices
CN110166794B (en) Live broadcast audio processing method, device and system
CN111770416B (en) Loudspeaker control method and device and electronic equipment
US10140086B2 (en) Electronic device and audio ouputting method thereof
CN110830970B (en) Audio transmission method, device, equipment and storage medium between Bluetooth equipment
CN105072537A (en) Bluetooth connection-based audio play method and device
CN106506437B (en) Audio data processing method and device
CN106878915B (en) Control method, device and the playback equipment and mobile terminal of playback equipment
CN111641916A (en) Audio sharing method and electronic equipment
US9843879B2 (en) Apparatus and method for reproducing multi-sound channel contents using DLNA in mobile terminal
CN107911777B (en) Processing method and device for return-to-ear function and mobile terminal
CN112689172B (en) Program playing method and device, set top box and storage medium
CN111857473B (en) Audio playing method and device and electronic equipment
CN106506646A (en) The control method of playback equipment, device, mobile terminal and Play System
CN113489844A (en) Volume gear adjusting method and electronic equipment
CN113038273A (en) Video frame processing method and device, storage medium and electronic equipment
CN113746982B (en) Audio playing control method and device, electronic equipment and readable storage medium
CN107071655B (en) Method and device for configuring stereo output, audio playing equipment and mobile terminal
CN111491278B (en) Method and terminal for playing audio through Bluetooth device
CN115278626A (en) Method, device, equipment, system and storage medium for transmitting Bluetooth multimedia packet
CN113268210A (en) Screen projection method, equipment and storage medium
CN113014998B (en) Audio output method, device, television and computer readable storage medium
JP5137745B2 (en) Data reproduction system

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