CN110661916A - Audio playing method, device, terminal and computer readable storage medium - Google Patents

Audio playing method, device, terminal and computer readable storage medium Download PDF

Info

Publication number
CN110661916A
CN110661916A CN201810713428.9A CN201810713428A CN110661916A CN 110661916 A CN110661916 A CN 110661916A CN 201810713428 A CN201810713428 A CN 201810713428A CN 110661916 A CN110661916 A CN 110661916A
Authority
CN
China
Prior art keywords
terminal
audio
determining
motion
current
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.)
Withdrawn
Application number
CN201810713428.9A
Other languages
Chinese (zh)
Inventor
周洪梅
李凯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN201810713428.9A priority Critical patent/CN110661916A/en
Publication of CN110661916A publication Critical patent/CN110661916A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

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

Abstract

The embodiment of the invention provides an audio playing method, an audio playing device, a terminal and a computer readable storage medium, which are applied to a terminal with at least two audio players, wherein in some implementation processes, the information of the audio players corresponding to the sound channels of the audio to be played is determined according to the current space state of the terminal by acquiring the current space state of the terminal; and playing the audio from the corresponding audio player. Therefore, the channel information corresponding to the audio to be played is determined by the current space state of the terminal, and then the audio of the corresponding channel is played by the corresponding audio player in the direction of the channel, so that the self-adaptive adjustment of the audio playing channel is realized, and the user experience is improved.

Description

Audio playing method, device, terminal and computer readable storage medium
Technical Field
The embodiment of the invention relates to the technical field of terminals, in particular to but not limited to an audio playing method, an audio playing device, a terminal and a computer-readable storage medium.
Background
The video and game functions of intelligent terminals such as smart phones and tablet computers are enhanced more and more, and after the terminals rotate by a certain angle, the display interfaces of the terminals can rotate along with the terminals to adapt to the postures of operators, so that the operation of users is facilitated. The intelligent terminals have self-adaptive posture switching on the visual function and are deficient on the auditory function. General smart mobile phone and panel computer have two or more speakers or earphone, explain with two speakers as an example, two fixed output left sound channels of speaker or right sound channels, and after the terminal rotated certain angle, the output of left and right sound channels was not the best position to the people's ear, and user's sense of hearing experience worsened, say that the speaker of left sound channel is located the right side of terminal, and the speaker of right sound channel is located the left side of terminal, and this will influence the user and normally watch video, play recreation etc..
Disclosure of Invention
The embodiment of the invention provides an audio playing method, an audio playing device, a terminal and a computer readable storage medium, and mainly solves the technical problem that in the related art, the audio playing mode of the terminal is fixed and cannot be adjusted in a self-adaptive mode according to the motion of the terminal.
In order to solve the above technical problem, an embodiment of the present invention provides an audio playing method, which is applied to a terminal having at least two audio players; the audio playing method comprises the following steps:
acquiring a current space state of a terminal;
determining audio player information corresponding to the sound channels of the audio to be played according to the current space state of the terminal;
and playing the audio from the corresponding audio player.
An embodiment of the present invention further provides an audio playing apparatus, including:
the state acquisition module is used for acquiring the current space state of the terminal;
the playing confirmation module is used for determining audio player information corresponding to the sound channel of the audio to be played according to the current space state of the terminal;
and the audio playing module is used for playing the audio from the corresponding audio player.
The embodiment of the invention also provides a terminal, which comprises a processor, a memory and a communication bus;
the communication bus is used for realizing connection communication between the processor and the memory;
the processor is configured to execute the computer program stored in the memory to implement the steps of the audio playing method described above.
Embodiments of the present invention further provide a computer-readable storage medium, in which one or more computer programs are stored, and the computer programs can be executed by one or more processors to implement the steps of the audio playing method described above.
The embodiment of the invention has the beneficial effects that:
the embodiment of the invention provides an audio playing method, an audio playing device, a terminal and a computer readable storage medium, which are applied to a terminal with at least two audio players, wherein the information of the audio players corresponding to the sound channels of audio to be played is determined according to the current space state of the terminal by acquiring the current space state of the terminal; playing the audio from the corresponding audio player; in some implementation processes, the channel information corresponding to the audio to be played can be determined according to the current space state of the terminal, and then the audio player corresponding to the direction in which the channel is located plays the audio of the corresponding channel, so that the adaptive adjustment of the audio playing channel is realized, and the user experience is improved.
Additional features and corresponding advantages of embodiments of the invention are set forth in the description that follows, and it is to be understood that at least some of the advantages will be apparent from the description of the invention herein.
Drawings
Fig. 1 is a flowchart of an audio playing method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a dual audio player terminal according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of four audio player terminals according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a three-dimensional coordinate system according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of an audio playback channel in a vertical screen state of the terminal according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of an audio playback channel in a landscape state of a terminal according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of an audio playback channel in a landscape state of a terminal according to an embodiment of the present invention;
FIG. 8 is a diagram illustrating a terminal approaching a user according to an embodiment of the present invention;
FIG. 9 is a diagram illustrating a terminal being away from a user in an embodiment of the present invention;
FIG. 10 is a flow chart of channel adaptation in audio playback according to an embodiment of the present invention;
FIG. 11 is a flow chart illustrating volume adjustment during audio playback according to an embodiment of the present invention;
FIG. 12 is a schematic diagram of an audio playback device according to an embodiment of the present invention;
fig. 13 is a schematic diagram of a terminal according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention are described in detail below with reference to the accompanying drawings. It should be understood that the embodiments described herein are merely illustrative of the present invention and are not intended to limit the present invention.
First embodiment
Referring to fig. 1, fig. 1 is a flowchart of an audio playing method according to a first embodiment of the present invention, the audio playing method is applied to a terminal having at least two audio players, and specifically, the audio playing method includes:
s101, acquiring a current space state of a terminal;
s102, determining audio player information corresponding to each sound channel of audio to be played according to the current space state of the terminal;
s103, playing the audio from the corresponding audio player.
The audio player of the terminal, including the speaker, the receiver, etc., is usually disposed on the top or the bottom of the front surface of the terminal, or on the bottom surface or the back surface of the terminal, etc., which is different according to the design requirements of various manufacturers. Generally, at least two audio players are provided on the terminal, which are respectively a top receiver through which a user can receive a call and a bottom speaker for playing sound. However, the earpiece and speaker differ only in function and appearance, and their substantial hardware components may be the same. Referring to fig. 2 and 3, fig. 2 shows a schematic structure of a terminal with two audio players, and fig. 3 shows a schematic structure of a terminal with four audio players.
When a video file or an audio file is to be played on the terminal, taking a terminal with two audio players as an example, the two players can play the audio in pure audio or video respectively. A terminal with four audio players is similar to a terminal with two audio players, except that it has a better stereoscopic effect, since it can play audio from four different orientations.
In S101, the current spatial state of the terminal is obtained, which means that the current spatial orientation, motion situation, and other information of the terminal are determined, so as to determine what way the user uses the terminal. Generally, a user can use the terminal through roughly two terminal gestures, namely a vertical screen gesture and a horizontal screen gesture, in the vertical screen gesture, because audio players of the terminal are arranged at the top and the bottom, the audio channels are not needed to be distinguished, the same audio can be played through the two audio players, or one of the two audio players is selected to play the audio; if the user uses the terminal in the landscape mode, there is a necessity of channel differentiation, and the user can play different channels, i.e. a left channel and a right channel, through the audio players at the top and the bottom of the terminal to play the audio to be played. Whereas if the terminal has four audio players as shown in fig. 3, which are usually two in a group playing audio of one channel, in the terminal configuration of fig. 3, the terminal has audio players at different positions in the lateral direction, regardless of whether it is landscape or portrait, so that the channels can be distinguished.
In S102, after determining the current spatial state of the terminal, the audio player information corresponding to the played audio may be determined according to the spatial state. The audio player information may include channel selection of the audio player, and information such as playing volume of the audio player. In particular, channel selection is to select which one or more audio players to play the audio of the corresponding channel. Generally, an audio can be divided into at least a left channel and a right channel, the left channel and the right channel play different audios, and the different audios need to be played through the current space state of the terminal, when a user uses the terminal, in the horizontal screen state, the audio player located on the left side plays the audio of the left channel, the audio player located on the right side plays the audio of the right channel, and according to the change of the space state of the terminal, the selection process is adjusted correspondingly.
In some embodiments, obtaining the current spatial state of the terminal may include:
acquiring current motion data of the terminal through a motion sensor arranged in the terminal;
and determining the current space state of the terminal according to the current motion data of the terminal.
The motion sensor built in the terminal may include at least one of a gyroscope sensor and an acceleration sensor. Referring to fig. 4, fig. 4 shows a three-dimensional coordinate system of the terminal, wherein the x-axis and the y-axis are parallel to the plane of the display screen of the terminal, the x-axis is the width direction of the terminal, the y-axis is the length direction of the terminal, and the z-axis is perpendicular to the terminal screen, and the forward direction thereof is the direction facing the user, i.e. the display direction facing the terminal screen. The above definition of the x, y, and z axes is only an optional solution, and the corresponding three-dimensional coordinate system may be defined in any other manner, and this embodiment does not limit this, but only takes this as an example to perform the corresponding description.
The gyroscope and the acceleration sensor are used for detecting the motion state of the terminal, for example, the gyroscope sensor can measure information such as rotation angular velocity and angle of the terminal, and the transverse screen direction of the terminal can be judged according to the direction of the angular velocity or the angle information, wherein the transverse screen direction takes the bottom of the terminal as a reference, and when the top of the terminal is positioned on the left side of the bottom of the terminal in the transverse screen state, the terminal is considered to be transversely screened leftwards; when the top of the terminal is located at the right side of the bottom of the terminal in the landscape state, it is considered to be landscape to the right.
In some embodiments, when the motion sensor includes a gyroscope sensor, acquiring the current motion data of the terminal through the motion sensor built in the terminal may include: acquiring a rotation angle of the terminal based on an initial state through a gyro sensor; determining the current space state of the terminal according to the current motion data of the terminal comprises the following steps: and determining the attitude information in the current space state of the terminal according to the rotation angle. The explanation is made with four audio player terminals, and the three-dimensional coordinate system refers to fig. 4. When the terminal normally displays in a vertical screen mode, as shown in fig. 5, the terminal is kept in a static state, the angle of the gyroscope in a reference state is 0 ° according to the calibrated gyroscope data, and then the audio channels are configured through the analog switches, the left channel of the audio is output from the audio players 1 and 4, and the right channel of the audio is output from the audio players 2 and 3. When the panel is switched to landscape display by rotating the panel to the left, as shown in fig. 6, the gyro Z-axis angle data is rotated 90 ° counterclockwise, and the audio channels are configured by the analog switches, the left channel of the audio is output from the audio players 1 and 2, and the right channel of the audio is output from the audio players 3 and 4. When the panel is switched to the landscape display by rotating it to the right as shown in fig. 7, the gyro Z-axis angle data is now rotated 90 ° clockwise, and the audio channels are configured by the analog switches, the left channel of the audio is output from the audio players 3 and 4, and the right channel of the audio is output from the audio players 1 and 2. In general, the calibration of the gyroscope is based on the gyroscope angle data when the terminal is displayed on the vertical screen, that is, the direction shown in fig. 5, but of course, other display directions may be used as the reference calibration directions.
In some embodiments, determining, according to the current spatial state of the terminal, audio player information corresponding to each of the channels of the audio to be played may include: and according to the attitude information in the current space state of the terminal, determining an audio player corresponding to the sound channel of the audio to be played from the audio players on the terminal.
In some embodiments, when the motion sensor includes an acceleration sensor, acquiring the current motion data of the terminal through a motion sensor built in the terminal may include: acquiring the motion acceleration of the terminal based on the initial state through an acceleration sensor; determining the current space state of the terminal according to the current motion data of the terminal comprises the following steps: and determining the motion information in the current space state of the terminal according to the motion acceleration. Determining, according to the current spatial state of the terminal, audio player information corresponding to each channel of the audio to be played may include: and determining the volume adjustment information of the terminal audio player according to the motion information in the current space state of the terminal. The acceleration sensor can then measure the linear acceleration of the terminal. The acceleration sensor can measure acceleration values of an object in three directions based on a micro-mechanical structure that converts acceleration into a change in capacitance value. Generally, the acceleration sensor does not distinguish between the acceleration of gravity and the acceleration of motion, that is, the measured acceleration value is a composite value of the two. Taking the z-axis as an example, in the initial state, the acceleration value of the z-axis is the decomposition value of the gravitational acceleration in the z-axis, Az ═ g × cos θ, and θ represents the included angle between the plane of the mobile phone and the horizontal plane. From rest to motion, the acceleration value of the Z axis is the resultant of the gravitational acceleration Az and the motion acceleration a (t), a ═ g × cos θ + a (t). The measured values of the Z-axis acceleration in the motion state and the static state are subtracted by A-Az to obtain the value a (t) of the motion acceleration. Defining the Z-axis positive direction in the three-dimensional coordinate system as the direction facing the user, and when the terminal is close to the user, the value of the motion acceleration is positive, as shown in FIG. 8; when the terminal is far from the user, the value of the acceleration of motion is negative as shown in fig. 9. The Z-axis relative displacement can be calculated by quadratic integration by using the motion acceleration value of the Z-axis
Figure BDA0001717063180000081
Where a (t) is the Z-axis motion acceleration value. If a (t)>And 0, judging that the user holds the terminal close, reducing the volume of the system, and judging the level of reduction of the volume according to the calculated relative displacement Z (t). Such asFruit a (t)<And 0, judging that the user holds the terminal far away, the system needs to increase the volume, and judging the level of the volume increase according to the calculated relative displacement Z (t). The initial state of the terminal may specifically include that the terminal is in a static state. The stationary state is a state in which the terminal is not displaced within a certain time, and may be determined in real time according to a motion condition of the terminal, for example, if the terminal moves from a stationary point a to a stationary point b, for the point b, the initial state is a stationary state of the terminal at the point a; and if the terminal is stationary at point b for a period of time and then moves to point c, then the initial state for point c is the state stationary at point b.
In some embodiments, determining the volume change information of the audio player of the terminal according to the motion information in the current spatial state of the terminal may include: determining the displacement condition of the terminal relative to a user according to the motion information in the current space state of the terminal; and determining the volume adjustment information of the audio player on the terminal according to the displacement condition. The motion information of the terminal is mainly used for determining the relative displacement between the terminal and the user so as to provide the optimal hearing experience for the user; when the user is far away from the terminal, the sound heard by the user is reduced by the audio played at the original volume, so that the volume of the terminal is increased for the user experience to adapt to the far-away user; when the user approaches the terminal, the sound heard by the user becomes larger according to the audio played at the original volume, and the volume of the terminal can be reduced in order to protect the hearing of the user.
The embodiment provides an audio playing method, which is applied to a terminal with at least two audio players, and determines audio player information corresponding to a sound channel of an audio to be played respectively according to the current space state of the terminal by acquiring the current space state of the terminal; and playing the audio from the corresponding audio player. Therefore, the channel information corresponding to the audio to be played is determined by the current space state of the terminal, and then the audio of the corresponding channel is played by the corresponding audio player in the direction of the channel, so that the self-adaptive adjustment of the audio playing channel is realized, and the user experience is improved.
Second embodiment
Referring to fig. 10, fig. 10 is a flowchart illustrating adaptive channel change in an audio playing method according to a second embodiment of the present invention, including:
s1001, during vertical screen display, the terminal is kept in a static state, gyroscope data are calibrated, integrated and cleared, left and right channels of the loudspeaker are configured according to the graph 5, the left channel of the audio is output from the loudspeakers 1 and 4, and the right channel of the audio is output from the loudspeakers 2 and 3.
S1002, displaying to the left turn screen and the horizontal screen, rotating the Z-axis angle data of the gyroscope by 90 degrees anticlockwise, configuring left and right channels of the loudspeaker according to the figure 6, outputting the left channel of the audio from the loudspeakers 1 and 2, and outputting the right channel of the audio from the loudspeakers 3 and 4. The rotation direction may be determined according to the direction of the angular velocity of the gyroscope, and the rotation angle may be determined according to the integrated value of the angular velocity. In order to ensure the detection effect, an error range of +/-5 degrees can be set, and the error range is adjusted according to the required detection sensitivity effect.
S1003, turning to the right, displaying in a vertical screen mode, enabling the gyroscope to rotate 90 degrees clockwise in Z-axis angle data, setting an error range of +/-5 degrees, configuring left and right sound channels of the loudspeaker according to the figure 5, enabling the left sound channel of the audio to be output from the loudspeakers 1 and 4, and enabling the right sound channel of the audio to be output from the loudspeakers 2 and 3.
S1004, turning to the right for horizontal screen display, rotating the gyroscope Z-axis angle data clockwise by 90 degrees, setting an error range of +/-5 degrees, configuring the left and right channels of the loudspeaker according to the figure 7, outputting the left channel of the audio from the loudspeakers 3 and 4, and outputting the right channel of the audio from the loudspeakers 1 and 2.
Third embodiment
Referring to fig. 11, fig. 11 is a flowchart illustrating adaptive volume adjustment in an audio playing method according to this embodiment, and the flowchart includes:
and S1111, sampling the numerical value of the Z axis of the acceleration sensor, and taking a multiple average value.
S1102 calculates a difference Δ Az between the Z-axis accelerations at a predetermined time interval as a-Az.
And S1103, determining that the user approaches the terminal and the system needs to reduce the volume, and determining the number of stages of volume reduction according to the relative displacement calculated by quadratic integration, wherein the delta Az is greater than 0. In order to ensure the detection effect, a detection threshold value can be set, and the threshold value is adjusted according to the required detection sensitivity effect.
And S1104, when the delta Az is less than 0, judging that the user holds the terminal far away, the system needs to increase the volume, and judging the number of stages of volume increase according to the relative displacement calculated by quadratic integration. In order to ensure the detection effect, a detection threshold value can be set, and the threshold value is adjusted according to the required detection sensitivity effect.
Fourth embodiment
Referring to fig. 12, fig. 12 is a schematic diagram illustrating an audio playing device according to a fourth embodiment of the present invention, including:
a state obtaining module 121, configured to obtain a current spatial state of the terminal;
a playing confirmation module 122, configured to determine, according to a current spatial state of the terminal, audio player information corresponding to each of the channels of the audio to be played;
and the audio playing module 123 is configured to play audio from a corresponding audio player.
The current space state of the terminal is obtained, and the information such as the current space orientation and the motion situation of the terminal is determined to judge the way in which the user uses the terminal. Generally, a user can use the terminal through roughly two terminal gestures, namely a vertical screen gesture and a horizontal screen gesture, in the vertical screen gesture, because audio players of the terminal are arranged at the top and the bottom, the audio channels are not needed to be distinguished, the same audio can be played through the two audio players, or one of the two audio players is selected to play the audio; if the user uses the terminal in the landscape mode, there is a necessity of channel differentiation, and the user can play different channels, i.e. a left channel and a right channel, through the audio players at the top and the bottom of the terminal to play the audio to be played. Whereas if the terminal has four audio players as shown in fig. 3, which are usually two in a group playing audio of one channel, in the terminal configuration of fig. 3, the terminal has audio players at different positions in the lateral direction, regardless of whether it is landscape or portrait, so that the channels can be distinguished.
After the current space state of the terminal is determined, the audio player information corresponding to the played audio can be determined according to the space state. The audio player information may include channel selection of the audio player, and information such as playing volume of the audio player. In particular, channel selection is to select which one or more audio players to play the audio of the corresponding channel. Generally, an audio can be divided into at least a left channel and a right channel, the left channel and the right channel play different audios, and the different audios need to be played through the current space state of the terminal, when a user uses the terminal, in the horizontal screen state, the audio player located on the left side plays the audio of the left channel, the audio player located on the right side plays the audio of the right channel, and according to the change of the space state of the terminal, the selection process is adjusted correspondingly.
In some embodiments, obtaining the current spatial state of the terminal may include:
acquiring current motion data of the terminal through a motion sensor arranged in the terminal;
and determining the current space state of the terminal according to the current motion data of the terminal.
The motion sensor built in the terminal may include at least one of a gyroscope sensor and an acceleration sensor. Referring to fig. 4, fig. 4 shows a three-dimensional coordinate system of the terminal, wherein the x-axis and the y-axis are parallel to the plane of the display screen of the terminal, the x-axis is the width direction of the terminal, the y-axis is the length direction of the terminal, and the z-axis is perpendicular to the terminal screen, and the forward direction thereof is the direction facing the user, i.e. the display direction facing the terminal screen. The above definition of the x, y, and z axes is only an optional solution, and the corresponding three-dimensional coordinate system may be defined in any other manner, and this embodiment does not limit this, but only takes this as an example to perform the corresponding description.
The gyroscope and the acceleration sensor are used for detecting the motion state of the terminal, for example, the gyroscope sensor can measure information such as rotation angular velocity and angle of the terminal, and the transverse screen direction of the terminal can be judged according to the direction of the angular velocity or the angle information, wherein the transverse screen direction takes the bottom of the terminal as a reference, and when the top of the terminal is positioned on the left side of the bottom of the terminal in the transverse screen state, the terminal is considered to be transversely screened leftwards; when the top of the terminal is located at the right side of the bottom of the terminal in the landscape state, it is considered to be landscape to the right.
In some embodiments, when the motion sensor includes a gyroscope sensor, acquiring the current motion data of the terminal through the motion sensor built in the terminal may include: acquiring a rotation angle of the terminal based on an initial state through a gyro sensor; determining the current space state of the terminal according to the current motion data of the terminal comprises the following steps: and determining the attitude information in the current space state of the terminal according to the rotation angle. The explanation is made with four audio player terminals, and the three-dimensional coordinate system refers to fig. 4. When the terminal normally displays in a vertical screen mode, as shown in fig. 5, the terminal is kept in a static state, the angle of the gyroscope in a reference state is 0 ° according to the calibrated gyroscope data, and then the audio channels are configured through the analog switches, the left channel of the audio is output from the audio players 1 and 4, and the right channel of the audio is output from the audio players 2 and 3. When the panel is switched to landscape display by rotating the panel to the left, as shown in fig. 6, the gyro Z-axis angle data is rotated 90 ° counterclockwise, and the audio channels are configured by the analog switches, the left channel of the audio is output from the audio players 1 and 2, and the right channel of the audio is output from the audio players 3 and 4. When the panel is switched to the landscape display by rotating it to the right as shown in fig. 7, the gyro Z-axis angle data is now rotated 90 ° clockwise, and the audio channels are configured by the analog switches, the left channel of the audio is output from the audio players 3 and 4, and the right channel of the audio is output from the audio players 1 and 2. In general, the calibration of the gyroscope is based on the gyroscope angle data when the terminal is displayed on the vertical screen, that is, the direction shown in fig. 5, but of course, other display directions may be used as the reference calibration directions.
In some embodiments, determining, according to the current spatial state of the terminal, audio player information corresponding to each of the channels of the audio to be played may include: and according to the attitude information in the current space state of the terminal, determining an audio player corresponding to the sound channel of the audio to be played from the audio players on the terminal.
In some embodiments, when the motion sensor includes an acceleration sensor, acquiring the current motion data of the terminal through a motion sensor built in the terminal may include: acquiring the motion acceleration of the terminal based on the initial state through an acceleration sensor; determining the current space state of the terminal according to the current motion data of the terminal comprises the following steps: and determining the motion information in the current space state of the terminal according to the motion acceleration. Determining, according to the current spatial state of the terminal, audio player information corresponding to each channel of the audio to be played may include: and determining the volume adjustment information of the terminal audio player according to the motion information in the current space state of the terminal. The acceleration sensor can then measure the linear acceleration of the terminal. The acceleration sensor can measure acceleration values of an object in three directions based on a micro-mechanical structure that converts acceleration into a change in capacitance value. Generally, the acceleration sensor does not distinguish between the acceleration of gravity and the acceleration of motion, that is, the measured acceleration value is a composite value of the two. Taking the z-axis as an example, in the initial state, the acceleration value of the z-axis is the decomposition value of the gravitational acceleration in the z-axis, Az ═ g × cos θ, and θ represents the included angle between the plane of the mobile phone and the horizontal plane. From rest to motion, the acceleration value of the Z axis is the resultant of the gravitational acceleration Az and the motion acceleration a (t), a ═ g × cos θ + a (t). The measured values of the Z-axis acceleration in the motion state and the static state are subtracted by A-Az to obtain the value a (t) of the motion acceleration. Defining the Z-axis positive direction in the three-dimensional coordinate system as the direction facing the user, and when the terminal is close to the user, the value of the motion acceleration is positive, as shown in FIG. 8; when the terminal is far from the user, the value of the acceleration of motion is negative as shown in fig. 9. The Z-axis relative displacement can be calculated by quadratic integration by using the motion acceleration value of the Z-axis
Figure BDA0001717063180000141
Wherein a (t) is the Z-axis motion plusThe speed value. If a (t)>And 0, judging that the user holds the terminal close, reducing the volume of the system, and judging the level of reduction of the volume according to the calculated relative displacement Z (t). If a (t)<And 0, judging that the user holds the terminal far away, the system needs to increase the volume, and judging the level of the volume increase according to the calculated relative displacement Z (t). The initial state of the terminal may specifically include that the terminal is in a static state. The stationary state is a state in which the terminal is not displaced within a certain time, and may be determined in real time according to a motion condition of the terminal, for example, if the terminal moves from a stationary point a to a stationary point b, for the point b, the initial state is a stationary state of the terminal at the point a; and if the terminal is stationary at point b for a period of time and then moves to point c, then the initial state for point c is the state stationary at point b.
In some embodiments, determining the volume change information of the audio player of the terminal according to the motion information in the current spatial state of the terminal may include: determining the displacement condition of the terminal relative to a user according to the motion information in the current space state of the terminal; and determining the volume adjustment information of the audio player on the terminal according to the displacement condition. The motion information of the terminal is mainly used for determining the relative displacement between the terminal and the user so as to provide the optimal hearing experience for the user; when the user is far away from the terminal, the sound heard by the user is reduced by the audio played at the original volume, so that the volume of the terminal is increased for the user experience to adapt to the far-away user; when the user approaches the terminal, the sound heard by the user becomes larger according to the audio played at the original volume, and the volume of the terminal can be reduced in order to protect the hearing of the user.
The embodiment provides an audio playing device, which is applied to a terminal with at least two audio players, and determines audio player information corresponding to each channel of audio to be played according to the current space state of the terminal by acquiring the current space state of the terminal; and playing the audio from the corresponding audio player. Therefore, the channel information corresponding to the audio to be played is determined by the current space state of the terminal, and then the audio of the corresponding channel is played by the corresponding audio player in the direction of the channel, so that the self-adaptive adjustment of the audio playing channel is realized, and the user experience is improved.
Fifth embodiment
Referring to fig. 13, fig. 13 is a schematic diagram illustrating a terminal assembly according to a fifth embodiment of the present invention, including a first processor 131, a memory 132 and a communication bus 133;
the communication bus 133 is used for realizing connection communication between the processor 131 and the memory 132;
the processor 131 is configured to execute the computer program stored in the memory 132 to implement the flow of the audio playing method in the above embodiments of the present invention, which is not described herein again.
Sixth embodiment
The present embodiments also provide a computer-readable storage medium including volatile or non-volatile, removable or non-removable media implemented in any method or technology for storage of information such as computer-readable instructions, data structures, computer program modules or other data. Computer-readable storage media include, but are not limited to, RAM (Random Access Memory), ROM (Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory), flash Memory or other Memory technology, CD-ROM (Compact disk Read-Only Memory), Digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by a computer.
The computer-readable storage medium in this embodiment stores one or more computer programs, and the computer programs may be executed by one or more processors to implement the audio playing method in the foregoing embodiments, which is not described herein again.
The present embodiment further provides a computer program (or computer software), which can be distributed on a computer readable medium and executed by a computing device to implement the audio playing method in the foregoing embodiments; and in some cases at least one of the steps shown or described may be performed in an order different than that described in the embodiments above.
The present embodiments also provide a computer program product comprising a computer readable means on which a computer program as shown above is stored. The computer readable means in this embodiment may include a computer readable storage medium as shown above.
It will be apparent to those skilled in the art that all or some of the steps of the methods, systems, functional modules/units in the devices disclosed above may be implemented as software (which may be implemented in program code executable by a computing device), firmware, hardware, and suitable combinations thereof. In a hardware implementation, the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be performed by several physical components in cooperation. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit.
In addition, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media as known to those skilled in the art. Thus, the present invention is not limited to any specific combination of hardware and software.
The foregoing is a more detailed description of the present invention that is presented in conjunction with specific embodiments, and the practice of the invention is not to be considered limited to those descriptions. For those skilled in the art to which the invention pertains, several simple deductions or substitutions can be made without departing from the spirit of the invention, and all shall be considered as belonging to the protection scope of the invention.

Claims (11)

1. An audio playing method is applied to a terminal with at least two audio players; the audio playing method comprises the following steps:
acquiring a current space state of a terminal;
determining audio player information corresponding to the sound channels of the audio to be played according to the current space state of the terminal;
and playing the audio from the corresponding audio player.
2. The audio playing method according to claim 1, wherein the obtaining the current spatial state of the terminal comprises:
acquiring current motion data of the terminal through a motion sensor arranged in the terminal;
and determining the current space state of the terminal according to the current motion data of the terminal.
3. The audio playing method according to claim 2, wherein the motion sensor built in the terminal includes at least one of a gyro sensor and an acceleration sensor.
4. The audio playing method according to claim 3, wherein when the motion sensor includes a gyroscope sensor, the acquiring the current motion data of the terminal by the motion sensor built in the terminal includes:
acquiring a rotation angle of the terminal based on an initial state through the gyro sensor;
the determining the current space state of the terminal according to the current motion data of the terminal includes:
and determining the attitude information in the current space state of the terminal according to the rotation angle.
5. The audio playing method according to claim 4, wherein the determining, according to the current spatial state of the terminal, the audio player information corresponding to each of the channels of the audio to be played comprises:
and according to the attitude information in the current space state of the terminal, determining an audio player corresponding to the sound channel of the audio to be played from the audio players on the terminal.
6. The audio playing method according to any one of claims 3 to 5, wherein when the motion sensor includes an acceleration sensor, the obtaining of the current motion data of the terminal through a motion sensor built in the terminal includes:
acquiring the motion acceleration of the terminal based on the initial state through the acceleration sensor;
the determining the current space state of the terminal according to the current motion data of the terminal includes:
and determining the motion information in the current space state of the terminal according to the motion acceleration.
7. The audio playing method according to claim 6, wherein the determining, according to the current spatial state of the terminal, the audio player information corresponding to each of the channels of the audio to be played comprises:
and determining the volume adjustment information of the terminal audio player according to the motion information in the current space state of the terminal.
8. The audio playing method of claim 7, wherein the determining of the volume change information of the audio player of the terminal according to the motion information in the current spatial state of the terminal comprises:
determining the displacement condition of the terminal relative to a user according to the motion information in the current space state of the terminal;
and determining the volume adjustment information of the audio player on the terminal according to the displacement condition.
9. An audio playback apparatus comprising:
the state acquisition module (121) is used for acquiring the current space state of the terminal;
the playing confirmation module (122) is used for determining audio player information corresponding to the sound channels of the audio to be played according to the current space state of the terminal;
an audio playing module (123) for playing the audio from the corresponding audio player.
10. A terminal, characterized in that it comprises a processor (131), a memory (132) and a communication bus (133);
the communication bus (133) is used for realizing connection communication between the processor (131) and the memory (132);
the processor (131) is configured to execute a computer program stored in the memory (132) to implement the steps of the audio playback method according to any of claims 1-8.
11. A computer-readable storage medium, in which one or more computer programs are stored, the computer programs being executable by one or more processors to implement the steps of the audio playback method according to any one of claims 1 to 8.
CN201810713428.9A 2018-06-29 2018-06-29 Audio playing method, device, terminal and computer readable storage medium Withdrawn CN110661916A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810713428.9A CN110661916A (en) 2018-06-29 2018-06-29 Audio playing method, device, terminal and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810713428.9A CN110661916A (en) 2018-06-29 2018-06-29 Audio playing method, device, terminal and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN110661916A true CN110661916A (en) 2020-01-07

Family

ID=69027122

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810713428.9A Withdrawn CN110661916A (en) 2018-06-29 2018-06-29 Audio playing method, device, terminal and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN110661916A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111294438A (en) * 2020-01-22 2020-06-16 华为技术有限公司 Method and terminal for realizing stereo output

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103295610A (en) * 2013-05-22 2013-09-11 华为技术有限公司 Audio playing method and audio playing device
CN103974167A (en) * 2013-02-06 2014-08-06 辉达公司 Flat-panel electronic device and audio player thereof
CN108040311A (en) * 2017-10-24 2018-05-15 努比亚技术有限公司 A kind of audio frequency playing method, terminal and computer-readable recording medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103974167A (en) * 2013-02-06 2014-08-06 辉达公司 Flat-panel electronic device and audio player thereof
CN103295610A (en) * 2013-05-22 2013-09-11 华为技术有限公司 Audio playing method and audio playing device
CN108040311A (en) * 2017-10-24 2018-05-15 努比亚技术有限公司 A kind of audio frequency playing method, terminal and computer-readable recording medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111294438A (en) * 2020-01-22 2020-06-16 华为技术有限公司 Method and terminal for realizing stereo output
CN111294438B (en) * 2020-01-22 2021-06-01 华为技术有限公司 Method and terminal for realizing stereo output

Similar Documents

Publication Publication Date Title
CN101784004B (en) Information processing system and information processing method
US10051396B2 (en) Automatic microphone switching
US10397728B2 (en) Differential headtracking apparatus
US9609601B2 (en) Mobile terminal and method for managing power thereof
EP2451187A2 (en) Headset with accelerometers to determine direction and movements of user head and method
US20120207308A1 (en) Interactive sound playback device
US9615176B2 (en) Audio channel mapping in a portable electronic device
US11647352B2 (en) Head to headset rotation transform estimation for head pose tracking in spatial audio applications
US20220103965A1 (en) Adaptive Audio Centering for Head Tracking in Spatial Audio Applications
US20210400414A1 (en) Head tracking correlated motion detection for spatial audio applications
CN112911065B (en) Audio playing method and device for terminal, electronic equipment and storage medium
CN110618805B (en) Method and device for adjusting electric quantity of equipment, electronic equipment and medium
US11589183B2 (en) Inertially stable virtual auditory space for spatial audio applications
US20130163794A1 (en) Dynamic control of audio on a mobile device with respect to orientation of the mobile device
US11586280B2 (en) Head motion prediction for spatial audio applications
CN112492097B (en) Audio playing method, device, terminal and computer readable storage medium
CN110673751A (en) System and method for equalizing audio for playback on an electronic device
CN113014983A (en) Video playing method and device, storage medium and electronic equipment
CN203482246U (en) Mobile terminal device
CN110661916A (en) Audio playing method, device, terminal and computer readable storage medium
US20230045721A1 (en) Audio signal processing method, electronic apparatus, and storage medium
CN113766275B (en) Video editing method, device, terminal and storage medium
CN113473306A (en) Directional recording method and device, electronic equipment and storage medium
US11696085B2 (en) Apparatus, method and computer program for providing notifications
CN116069290B (en) Electronic device, control method and device thereof, and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20200107