Audio playback method, device, terminal and storage medium
By using at least three communication modules in the vehicle to communicate with the mobile terminal, determine the user's location and control the speaker to play the audio data in the corresponding channel, the problem of poor audio playback results caused by changes in the user's location is solved, and stereo sound effects and better immersion are achieved.
Patent Information
- Application Number
- CN202210369978.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-08
- Publication Date
- 2025-08-29
- Estimated Expiration
- 2042-04-08
AI Technical Summary
When the user's location changes, it is difficult for the prior art to effectively improve the audio playback effect, resulting in the impact of stereo sound effects.
By communicating with the mobile terminal through at least three communication modules in the vehicle, the position relationship between the mobile terminal and the user is determined, and based on the distance between the speaker and the user, the speaker is controlled to play the audio data of the corresponding channel to ensure that the audio data reaches the user's location at the same time.
It improves the stereoscopic sound effect of audio playback, enhances the user's immersion, and improves the playback effect of audio data.
Smart Images

Figure CN114928808B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computer technology, and in particular to an audio playback method, device, terminal, and storage medium. Background Art
[0002] Currently, when playing audio, devices can use multiple speakers to play different channels of audio, achieving stereo sound and enhancing the user's sense of immersion. However, if the user's position relative to the speakers changes, the audio playback quality may be affected. Therefore, determining the user's position to improve audio playback quality has become a pressing issue. Summary of the Invention
[0003] The embodiments of the present application provide an audio playback method, device, terminal, and storage medium to improve the playback effect of audio data. The technical solution is as follows:
[0004] According to one aspect of an embodiment of the present application, a method for playing audio is provided, the method comprising:
[0005] determining a position of the mobile terminal relative to the vehicle based on positions of at least three communication modules in the vehicle relative to the vehicle and a distance between each of the communication modules and the mobile terminal, the distance being obtained by communication between the communication module and the mobile terminal;
[0006] determining a position of a user to which the mobile terminal belongs relative to the vehicle based on the position of the mobile terminal relative to the vehicle and first position information, wherein the first position information indicates a relative positional relationship between the user and the mobile terminal;
[0007] Based on positions of a plurality of speakers in the vehicle relative to the vehicle and a position of the user relative to the vehicle, respectively determining a distance between each speaker and the user, each speaker corresponding to a channel;
[0008] In response to a playback instruction carrying audio data of multiple channels sent by the mobile terminal, based on the distance between the multiple speakers and the user, the multiple speakers are controlled to play the audio data of the corresponding channels so that the audio data of the multiple channels reach the user's location at the same time.
[0009] According to another aspect of an embodiment of the present application, there is provided an audio playback method, the method comprising:
[0010] Displaying the virtual objects controlled by the local terminal in the virtual scene;
[0011] Acquire audio data emitted by a virtual sound source in the virtual scene and third position information of the audio data, wherein the third position information indicates a relative position relationship between the virtual sound source and the virtual object;
[0012] Adjusting the audio data based on the third position information to obtain audio data of multiple channels;
[0013] Send a play instruction to the vehicle terminal, where the play instruction carries the audio data of the multiple channels.
[0014] According to another aspect of an embodiment of the present application, an audio playback device is provided, the device comprising:
[0015] a position determination module, configured to determine the position of the mobile terminal relative to the vehicle based on the positions of at least three communication modules in the vehicle relative to the vehicle and the distance between each of the communication modules and the mobile terminal, the distance being obtained by communication between the communication modules and the mobile terminal;
[0016] The position determination module is further configured to determine a position of a user to which the mobile terminal belongs relative to the vehicle based on the position of the mobile terminal relative to the vehicle and first position information, wherein the first position information indicates a relative positional relationship between the user and the mobile terminal;
[0017] a distance determination module, configured to determine a distance between each of the multiple speakers in the vehicle and the user based on positions of the multiple speakers relative to the vehicle and the position of the user relative to the vehicle, wherein each speaker corresponds to a channel;
[0018] The audio playback module is used to respond to a playback instruction carrying multiple channels of audio data sent by the mobile terminal, and based on the distance between the multiple speakers and the user, control the multiple speakers to play the audio data of the corresponding channels, so that the audio data of the multiple channels reaches the user's location at the same time.
[0019] According to another aspect of an embodiment of the present application, an audio playback device is provided, the device comprising:
[0020] The object display module is used to display the virtual objects controlled by the local terminal in the virtual scene;
[0021] a data acquisition module, configured to acquire audio data emitted by a virtual sound source in the virtual scene and third position information of the audio data, wherein the third position information indicates a relative position relationship between the virtual sound source and the virtual object;
[0022] a data adjustment module, configured to adjust the audio data based on the third position information to obtain audio data of multiple channels;
[0023] The instruction sending module is used to send a play instruction to the vehicle terminal, where the play instruction carries the audio data of the multiple channels.
[0024] According to another aspect of an embodiment of the present application, a terminal is provided, comprising a processor and a memory; the memory stores at least one program code, and the at least one program code is used to be executed by the processor to implement the audio playback method as described in the above aspect.
[0025] According to another aspect of an embodiment of the present application, a computer-readable storage medium is provided, wherein the storage medium stores at least one program code, and the at least one program code is used to be executed by a processor to implement the audio playback method as described in the above aspect.
[0026] According to another aspect of an embodiment of the present application, a computer program product is provided, including a computer program, wherein the computer program is used to be loaded and executed by a processor to implement the audio playback method described in the above aspect.
[0027] In an embodiment of the present application, at least three communication modules are provided in the vehicle, and the at least three communication modules can communicate with the mobile terminal, so that the position of the mobile terminal can be determined based on the position of each communication module and the distance obtained by each communication module communicating with the mobile terminal. According to the relative position relationship between the mobile terminal and the user, a more accurate position of the user can be further determined. By controlling the speaker to play the audio data of the corresponding channel based on the distance between each speaker and the user, the user can hear the audio data played by different speakers at the same time when the distances between the multiple speakers and the user are different, thereby increasing the user's immersion and improving the playback effect of the audio data. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0029] Figure 1 A schematic diagram showing an implementation environment provided by an exemplary embodiment of the present application is shown;
[0030] Figure 2 A flowchart of an audio playback method provided by an exemplary embodiment of the present application is shown;
[0031] Figure 3 A flowchart of another audio playback method provided by an exemplary embodiment of the present application is shown;
[0032] Figure 4 A flowchart of another audio playback method provided by an exemplary embodiment of the present application is shown;
[0033] Figure 5 A flowchart of another audio playback method provided by an exemplary embodiment of the present application is shown;
[0034] Figure 6 A schematic diagram showing an audio playback process provided by an exemplary embodiment of the present application is shown;
[0035] Figure 7 A structural block diagram of an audio playback device provided by an exemplary embodiment of the present application is shown;
[0036] Figure 8 A structural block diagram of another audio playback device provided by an exemplary embodiment of the present application is shown;
[0037] Figure 9 A structural block diagram of a terminal provided by an exemplary embodiment of the present application is shown. DETAILED DESCRIPTION
[0038] In order to make the objectives, technical solutions and advantages of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.
[0039] As used herein, "at least one" refers to one or more, and "plurality" refers to two or more. "And / or" describes a relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can mean: A exists alone, A and B exist simultaneously, or B exists alone. The character " / " generally indicates an "or" relationship between the associated objects.
[0040] Figure 1 A schematic diagram of an implementation environment provided by an exemplary embodiment of the present application is shown. Figure 1 The implementation environment includes a mobile terminal 101 and an in-vehicle terminal 102. The mobile terminal 101 and the in-vehicle terminal 102 are connected via a wireless or wired network. For example, the wired network connection is via a Universal Serial Bus (USB) connection, and the wireless network connection is via a Wireless Fidelity (Wi-Fi) connection. The communication connection between the mobile terminal 101 and the in-vehicle terminal 102 can support low-latency, high-bandwidth data transmission.
[0041] Exemplarily, the mobile terminal 101 is a laptop computer, a mobile phone, a tablet computer, a smart wearable device or other terminals. The vehicle-mounted terminal 102 is set on a vehicle, and the vehicle is also provided with multiple speakers, each speaker corresponding to a channel.
[0042] In an embodiment of the present application, the mobile terminal 101 is used to send a play instruction to the vehicle-mounted terminal 102, and the play instruction carries audio data of multiple channels. The vehicle-mounted device 102 is used to respond to the play instruction and play the audio data of the corresponding channels through multiple speakers set on the vehicle.
[0043] Exemplarily, a target application whose background service is provided by a server is installed on the mobile terminal 101. The mobile terminal 101 exchanges data with the server based on the target application. The target application can output audio data. Optionally, the target application is an application in the operating system of the mobile terminal 101, or an application provided by a third party. For example, the target application is any application that can output audio data, such as a game application, an audio application, or a video application, wherein the game application can be a first-person shooter (FPS) game application.
[0044] The following describes the application scenario of the embodiment of the present application using a mobile terminal as a mobile phone. The audio playback method provided in the embodiment of the present application can be applied to the audio playback scenario.
[0045] Taking the target application as a game application as an example, the mobile phone runs the game application, and the mobile phone sends a play instruction to the vehicle terminal. The play instruction carries the audio data of multiple channels of the game application. The vehicle terminal responds to the play instruction and plays the audio data of the multiple channels through the audio playback method provided in the embodiment of the present application, so that when the user plays the game through the mobile phone, he can hear the audio data played by multiple speakers of the vehicle at the same time, realizing the stereo sound effect of the game and enhancing the user's immersion.
[0046] Taking the target application as a video application as an example, the mobile phone runs a video application, and the mobile phone sends a play instruction to the vehicle terminal. The play instruction carries the audio data of multiple channels of the video application. The vehicle terminal responds to the play instruction and plays the audio data of the multiple channels through the audio playback method provided in the embodiment of the present application, so that when the user watches the video through the mobile phone, he can hear the audio data played by multiple speakers of the vehicle at the same time, realizing the stereo sound effect of the video and enhancing the user's immersion.
[0047] Taking the target application as an audio application as an example, the mobile phone runs an audio application, and the mobile phone sends a play instruction to the vehicle terminal. The play instruction carries the audio data of multiple channels of the audio application. The vehicle terminal responds to the play instruction and plays the audio data of the multiple channels through the audio playback method provided in the embodiment of the present application, so that when the user listens to the audio through the mobile phone, he can hear the audio data played by multiple speakers of the vehicle at the same time, realizing the stereo sound effect of the audio and enhancing the user's immersion.
[0048] The audio playback method provided in the embodiment of the present application can also be applied to other audio playback scenarios, and the embodiment of the present application does not limit this.
[0049] Figure 2 A flowchart of an audio playback method provided by an exemplary embodiment of the present application is shown. Figure 2 The method is executed by the vehicle terminal and includes:
[0050] 201. The vehicle-mounted terminal determines the position of the mobile terminal relative to the vehicle based on the positions of at least three communication modules in the vehicle relative to the vehicle and the distance between each communication module and the mobile terminal. The distance between the communication module and the mobile terminal is obtained by communication between the communication module and the mobile terminal.
[0051] In the embodiment of the present application, the vehicle includes an on-board terminal, which is used to control the vehicle and is connected to each module in the vehicle. For example, the on-board terminal is connected to each module via a hard line.
[0052] The vehicle also includes multiple speakers located at different locations in the vehicle, each speaker being configured to play audio data. For example, multiple speakers can simultaneously play audio data from different channels, thereby achieving a stereo sound effect. In addition, the vehicle also includes other types of modules, such as an air conditioning module.
[0053] It should be noted that the vehicle also includes at least three communication modules, and at least three communication modules can receive and send data packets carrying timestamps, so that they can communicate with the mobile terminal. Exemplarily, the communication module is an ultra-wideband (UWB) module. Optionally, the mobile terminal is also provided with a communication module of the same type, and the communication module in the vehicle can communicate with the communication module in the mobile terminal, thereby realizing communication between the vehicle-mounted terminal and the mobile terminal. It should be noted that the vehicle-mounted terminal is communicatively connected to the mobile terminal, and the vehicle-mounted terminal can either directly interact with the mobile terminal for data, or interact with the mobile terminal for data through the above-mentioned communication module.
[0054] The number of the above-mentioned communication modules configured in the vehicle and the position of each module relative to the vehicle can be set as needed, and the embodiments of the present application do not limit this. The vehicle-mounted terminal stores the position of each module relative to the vehicle. Since the position of each module relative to the vehicle is known, and the distance between each module and the mobile terminal can be determined through communication between each module in the vehicle and the mobile terminal, the position of the mobile terminal relative to the vehicle can be determined by triangulation. The distance between the module and the mobile terminal is a scalar quantity, that is, a quantity that does not include direction.
[0055] Furthermore, the determined position refers to a position within three-dimensional space. For example, if the three-dimensional space is represented as a three-dimensional coordinate system, the position includes three-dimensional coordinates. Because triangulation is used to determine the three-dimensional coordinates of a point in three-dimensional space, the three-dimensional coordinates of at least three other points in the space must be known, and at least three of these points are not coplanar. Therefore, at least three communication modules in the vehicle must not be coplanar to ensure that the mobile terminal can be located.
[0056] 202. The vehicle-mounted terminal determines the position of the user to which the mobile terminal belongs relative to the vehicle based on the position of the mobile terminal relative to the vehicle and first position information, where the first position information indicates a relative positional relationship between the user and the mobile terminal.
[0057] The user to which the mobile terminal belongs is the user who controls the mobile terminal. The first location information includes the distance and angle of the user relative to the mobile terminal. If the user listens to audio through their ears, the relative positional relationship between the user and the mobile terminal can be the relative positional relationship between the user's ears and the mobile terminal. Optionally, the relative positional relationship between the user and the mobile terminal is the relative positional relationship between the midpoint of the line connecting the user's two ears and the mobile terminal.
[0058] In an embodiment of the present application, the vehicle-mounted terminal obtains the first position information and stores the first position information. When the user manipulates the mobile terminal, the way the user manipulates the mobile terminal is mostly fixed. For example, the way the user manipulates the mobile terminal may be that the user holds the mobile terminal in hand, or fixes the mobile terminal on a fixing part on the vehicle for fixing the mobile terminal. The vehicle-mounted terminal can measure the relative position relationship between the user and the mobile terminal when the user manipulates the mobile terminal, thereby obtaining the first position information. Optionally, when the user manipulates the mobile terminal, the distance and angle between the user and the mobile terminal are measured, and the distance and angle are combined to form the first position information. It should be noted that the first position information can be measured by a technician and then stored by the vehicle-mounted terminal.
[0059] In an embodiment of the present application, since the first position information can represent the relative position relationship between the user and the mobile terminal, when the position of the mobile terminal relative to the vehicle is known, the vehicle-mounted terminal can determine the user's position relative to the vehicle based on the relative position relationship represented by the first position information.
[0060] 203. The vehicle-mounted terminal determines the distance between each speaker and the user based on the positions of the multiple speakers in the vehicle relative to the vehicle and the position of the user relative to the vehicle, where each speaker corresponds to a channel.
[0061] The vehicle is equipped with multiple speakers, each corresponding to a channel. The vehicle terminal stores the position of each speaker relative to the vehicle. Based on the position of each speaker relative to the vehicle and the position of the user relative to the vehicle, the vehicle terminal can determine the distance between each speaker and the user. When playing audio through the speaker, the vehicle terminal can control the speaker to play audio based on the distance between the speaker and the user.
[0062] The position of each speaker relative to the vehicle is different, and the number and position of the multiple speakers relative to the vehicle can be set as needed, which is not limited in this embodiment of the application. For example, a vehicle is equipped with six speakers, and the six speakers are respectively arranged at the front, rear, left front, right front, left rear, and right rear of the vehicle.
[0063] 204. The vehicle-mounted terminal responds to the playback instruction carrying multiple channels of audio data sent by the mobile terminal, and controls the multiple speakers to play the audio data of the corresponding channels based on the distances between the multiple speakers and the user, so that the audio data of the multiple channels reaches the user's location at the same time.
[0064] In an embodiment of the present application, the mobile terminal sends a play instruction to the vehicle terminal, which carries audio data of multiple channels to instruct the vehicle terminal to play the audio data of the multiple channels. The vehicle terminal responds to the play instruction and plays the audio data of the corresponding channels through multiple speakers respectively.
[0065] In an embodiment of the present application, at least three communication modules are provided in the vehicle, and the at least three communication modules can communicate with the mobile terminal, so that the position of the mobile terminal can be determined based on the position of each communication module and the distance obtained by each communication module communicating with the mobile terminal. According to the relative position relationship between the mobile terminal and the user, a more accurate position of the user can be further determined. By controlling the speaker to play the audio data of the corresponding channel based on the distance between each speaker and the user, the user can hear the audio data played by different speakers at the same time when the distances between the multiple speakers and the user are different, thereby increasing the user's immersion and improving the playback effect of the audio data.
[0066] Figure 3 A flowchart of another audio playback method provided by an exemplary embodiment of the present application is shown. Figure 3 The method is executed by the vehicle terminal. The method includes:
[0067] 301. The vehicle-mounted terminal determines the distance between each communication module and the mobile terminal based on the communication between at least three communication modules in the vehicle and the mobile terminal.
[0068] Optionally, a communication module is also provided in the mobile terminal. For example, the communication module is a UWB communication module. Optionally, for each of the at least three communication modules in the vehicle, the on-board terminal determines the distance between the communication module and the mobile terminal in the following manner: the mobile terminal sends a data packet carrying a timestamp, where the timestamp indicates the time when the mobile terminal sent the data packet; the on-board terminal receives the data packet through each communication module, determines the time difference between the timestamp carried in the data packet received by the communication module and the current time; and determines the distance between the communication module and the mobile terminal based on the time difference and a preset transmission speed.
[0069] The preset transmission speed refers to the transmission speed of data packets. The preset transmission speed can be set according to the type of communication module, and this application does not limit this. If the communication module is a UWB module, the preset transmission speed is the transmission speed of the radio signal.
[0070] In an embodiment of the present application, the time of the mobile terminal is synchronized with the time of the vehicle-mounted terminal, and the determined time difference is the time taken for a data packet to be transmitted from the mobile terminal to the communication module in the vehicle. Optionally, the vehicle-mounted terminal determines the distance between the communication module and the mobile terminal based on the time difference and a preset transmission speed by multiplying the time difference by the preset transmission speed as the distance between the communication module and the mobile terminal.
[0071] Another point worth noting is that after the mobile terminal establishes a connection with each communication module in the vehicle, it can send and receive data packets in real time, allowing the vehicle-mounted terminal to determine the distance between the mobile terminal and each communication module in real time. This allows the vehicle-mounted terminal to promptly update its position relative to the vehicle even if the mobile terminal moves within the vehicle.
[0072] In an embodiment of the present application, due to the time difference between the timestamp carried by the data packet sent by the mobile terminal and the current time of the vehicle-mounted terminal, it can accurately represent the time it takes for the data packet to be transmitted from the mobile terminal to the communication module in the vehicle, so that the distance between the communication module and the mobile terminal determined based on the time difference and the preset transmission speed is more accurate.
[0073] 302. The vehicle-mounted terminal determines a position of the mobile terminal relative to the vehicle based on positions of at least three communication modules in the vehicle relative to the vehicle and a distance between each communication module and the mobile terminal.
[0074] 303. The vehicle-mounted terminal determines the position of the user to which the mobile terminal belongs relative to the vehicle based on the position of the mobile terminal relative to the vehicle and the first position information, where the first position information indicates the relative position relationship between the user and the mobile terminal.
[0075] Optionally, the implementation of step 302-step 303 is similar to the implementation of step 201-step 202, and will not be repeated here.
[0076] In an embodiment of the present application, if a vehicle is equipped with at least three communication modules, the vehicle-mounted terminal can determine the position of the user to which the mobile terminal belongs relative to the vehicle by implementing steps 301 to 303. Alternatively, the vehicle can also determine the position of the user to which the mobile terminal belongs relative to the vehicle by the occupancy status of the seats in the vehicle. Accordingly, the audio playback method provided in the embodiment of the present application further includes the following steps 1 to 4:
[0077] Step 1: The vehicle-mounted terminal determines the occupancy status of multiple seats in the vehicle, where the occupancy status indicates whether the seat is occupied by a user.
[0078] Wherein, each seat has a corresponding seating state, and the seating state of the seat indicates whether the seat is occupied by the user. Optionally, a sensor corresponding to each seat is provided in the vehicle, and the on-board terminal determines the seating state of the seat based on the parameters output by the sensor. For example, if the sensor is a pressure sensor, the on-board terminal determines the seating state of the seat based on the pressure value output by the pressure sensor. Accordingly, when the pressure value is greater than the preset pressure value, the seating state of the seat is determined to be that the seat is occupied by the user; when the pressure value is not greater than the preset pressure value, the seating state of the seat is determined to be that the seat is not occupied by the user. Wherein, the preset pressure value can be set as needed, and the embodiment of the present application does not limit this.
[0079] Step 2: The vehicle-mounted terminal determines the number of seats in a first state as the number of users in the vehicle, where the first state indicates that the seats are occupied by users.
[0080] Among them, one seat in the vehicle can accommodate one user, so the number of seats occupied can represent the number of users in the vehicle. After determining the number of users, the vehicle terminal can determine the position of the user relative to the vehicle based on the number of users, and accordingly, the vehicle terminal executes step 3 or step 4.
[0081] Step 3: When the number of users is not greater than 1, the vehicle terminal determines the position of the user relative to the vehicle based on the position of the seat relative to the vehicle in the first state and the second position information, where the second position information represents the relative position relationship between the user and the seat.
[0082] If the number of users is not greater than 1, then the number of users is 0 or 1. A number of 0 indicates that there is no user in the vehicle, and a number of 1 indicates that there is one user in the vehicle. The user in the seat being occupied is the user to whom the mobile terminal belongs. The relative positional relationship between the user and the seat can be the relative positional relationship between the user's ears and the seat. Optionally, the relative positional relationship between the user and the seat is the relative positional relationship between the midpoint of the line connecting the user's two ears and the seat. The relative positional relationship between the user and the seat includes the distance and angle of the user relative to the seat.
[0083] In an embodiment of the present application, the vehicle-mounted terminal obtains and stores the second position information. Optionally, when the user is seated, the distance and angle between the user and the seat are measured, and the distance and angle are combined to form a relative position relationship between the user and the seat. It should be noted that the relative position relationship between the user and the seat can be measured by a technician, who can then store the relative position relationship between the user and the seat in the vehicle-mounted terminal.
[0084] Step 4: When the number of users is greater than 1, the vehicle terminal determines the position of the user relative to the vehicle based on the position of the selected seat relative to the vehicle and the second position information. The selected seat refers to the seat occupied by the user.
[0085] Among them, the number of users being greater than 1 indicates that there are multiple users in the vehicle, and the user can select a seat to obtain a selected seat. In one possible implementation, the on-board terminal displays seat identifiers corresponding to multiple seats in the vehicle, and determines the seat corresponding to the selected seat identifier among the multiple seat identifiers. Among them, the on-board terminal displays seat identifiers corresponding to multiple seats in the interface. If any of the multiple users in the vehicle wants to play the audio data of the mobile terminal through the speaker on the vehicle, the user can select the seat identifier corresponding to the seat currently occupied by the user from the multiple seat identifiers. Optionally, the implementation method for the on-board terminal to determine the selected seat identifier includes: the on-board terminal displays the options corresponding to each seat identifier, and in response to the option corresponding to any seat identifier being triggered, the seat identifier corresponding to the triggered option is determined as the selected seat identifier, and the seat identifier refers to the seat occupied by the user.
[0086] In an embodiment of the present application, the vehicle-mounted terminal can display seat identifications corresponding to multiple seats in the vehicle, and the user only needs to select the seat identification corresponding to the seat he or she is sitting in, which is highly efficient.
[0087] In another possible implementation, considering that it may not be convenient for the user to select the seat identifier displayed by the vehicle-mounted terminal, for example, the distance between the user and the display interface of the vehicle-mounted terminal is far, the vehicle-mounted terminal can also determine the selected seat with the help of the mobile terminal when it is in communication with the mobile terminal. Accordingly, the vehicle-mounted terminal sends a seat selection instruction to the mobile terminal, and the seat selection instruction carries the seat identifiers corresponding to multiple seats in the vehicle; the mobile terminal receives the seat selection instruction sent by the vehicle-mounted terminal, displays multiple seat identifiers, determines the selected seat identifier among the multiple seat identifiers, and returns the selected seat identifier to the vehicle-mounted terminal; the vehicle-mounted terminal receives the seat identifier selected by the mobile terminal from the seat identifiers corresponding to the multiple seats based on the seat selection instruction, and the seat identifier refers to the seat occupied by the user.
[0088] When the mobile terminal receives the seat selection instruction, it displays multiple seat identifiers, allowing the user of the mobile terminal to select the seat identifier corresponding to the seat to be occupied from the multiple seat identifiers. Optionally, the mobile terminal determines the selected seat identifier by displaying options corresponding to each seat identifier, and in response to an option corresponding to any seat identifier being triggered, determining the seat identifier corresponding to the triggered option as the selected seat identifier.
[0089] In an embodiment of the present application, the vehicle-mounted terminal can obtain the selected seat identification with the help of the mobile terminal by sending a seat selection instruction to the mobile terminal, so that the user can easily select the seat identification from the multiple seat identifications displayed on the mobile terminal, and the operation is more convenient.
[0090] 304. The vehicle-mounted terminal determines the distance between each speaker and the user based on the positions of the multiple speakers in the vehicle relative to the vehicle and the position of the user relative to the vehicle, where each speaker corresponds to a channel.
[0091] Optionally, the implementation of step 304 is similar to that of step 203 and will not be described in detail here.
[0092] 305. The vehicle-mounted terminal responds to the playback instruction carrying multiple channels of audio data sent by the mobile terminal, and controls the multiple speakers to play the audio data of the corresponding channels based on the distances between the multiple speakers and the user, so that the audio data of the multiple channels arrive at the user's location at the same time.
[0093] In an embodiment of the present application, when the vehicle-mounted terminal receives a play instruction, it maps the audio data of multiple channels to multiple speakers, and corresponds the speakers to the audio data one-to-one. Optionally, the play instruction carries multiple copies of audio data and a channel identifier corresponding to each copy of the audio data, and the channel identifier is used to distinguish different channels. The vehicle-mounted terminal stores the correspondence between the channel identifier and the speaker. Then, when the play instruction is received, for the audio data of each channel, the speaker that matches the channel identifier corresponding to the channel is determined from the correspondence between the channel and the speaker, and the audio data of the channel is mapped to the speaker.
[0094] In an embodiment of the present application, since the position of each speaker is different, the distance between each speaker and the user may be different, so the audio data played by the speaker may not reach the user's location at the same time, which may cause the user to hear the audio data played by different speakers one after another, resulting in poor audio playback effect and poor user experience. In an embodiment of the present application, the vehicle-mounted terminal can control the speaker to delay the playback of the audio data of the corresponding channel, that is, to delay the audio data. Optionally, the vehicle-mounted terminal controls the multiple speakers to play the audio data of the corresponding channels based on the distance between the multiple speakers and the user, respectively. The implementation method includes: for each speaker, the vehicle-mounted terminal determines the delay time corresponding to the speaker based on the distance between the speaker and the user, and the distance is negatively correlated with the delay time; the speaker is controlled to play the audio data of the channel corresponding to the speaker after the corresponding delay time has passed from the current time.
[0095] The current time refers to the time when the vehicle terminal receives the play command and determines the corresponding speaker for each channel's audio data. Each speaker has its own delay time. For example, if the delay time of speaker 1 is 10ms (ms means milliseconds) and the delay time of speaker 2 is 5ms, the vehicle terminal controls speaker 1 to play audio data with a delay of 10ms, and controls speaker 2 to play audio data with a delay of 5ms.
[0096] In an embodiment of the present application, the longer the distance, the later the audio data played by the speaker arrives at the user's location, and the shorter the distance, the earlier the audio data played by the speaker arrives at the user's location. The delay time determined by the distance is more accurate. By controlling the speaker to play the audio data after the corresponding delay time from the current time, delayed playback of the speaker is achieved, thereby achieving the simultaneous arrival of audio data of multiple channels at the user's location.
[0097] Optionally, the vehicle-mounted terminal determines the delay time corresponding to the speaker based on the distance between the speaker and the user. The implementation method includes: the vehicle-mounted terminal determines the propagation time corresponding to the speaker based on the distance between the speaker and the user and the speed of sound, and the propagation time is the time from the speaker playing the audio data to the audio data being heard by the user; the time difference between the maximum propagation time among the propagation times corresponding to multiple speakers and the propagation time corresponding to the speaker is determined as the delay time corresponding to the speaker.
[0098] Among them, the speed of sound is the speed at which sound propagates in the air. Accordingly, the vehicle-mounted terminal determines the ratio of the distance between the speaker and the user to the speed of sound as the corresponding propagation time of the speaker. Since the audio data played by the speaker with the longest distance arrives at the user's location the latest, and the audio data played by other speakers except this speaker can reach the user's location earlier, then the propagation time of this speaker, that is, the maximum propagation time, can be regarded as the propagation time of other speakers after adjustment, that is, the propagation time required after delayed playback.
[0099] The speaker with the maximum propagation duration has a delay of 0, meaning that this speaker does not need to be delayed. By determining the time difference between the maximum propagation duration and the actual propagation duration corresponding to each speaker, the required delay duration for each speaker can be determined more accurately.
[0100] In an embodiment of the present application, at least three communication modules are provided in the vehicle, and the at least three communication modules are capable of communicating with a mobile terminal. Thus, based on the position of each communication module and the distance obtained by each communication module communicating with the mobile terminal, the position of the mobile terminal can be determined. Based on the relative position relationship between the mobile terminal and the user, a more accurate position of the user can be further determined. Even if the user's position changes, the user's real-time position can be determined according to this solution. Thus, based on the user's real-time position, the distance between each speaker and the user is determined, making the determined distance more accurate. Subsequently, based on the distance between each speaker and the user, the speaker can be controlled to play the audio data of the corresponding channel. Therefore, even if the distances between multiple speakers and the user are different, the user can also hear the audio data played by different speakers at the same time, thereby increasing the user's immersion and improving the audio data playback effect.
[0101] Figure 4 A flowchart of another audio playback method provided by an exemplary embodiment of the present application is shown. Figure 4 , the method is executed by a mobile terminal, and the method includes:
[0102] 401. The mobile terminal displays a virtual object controlled by the mobile terminal in a virtual scene.
[0103] Among them, the virtual scene is a virtual scene displayed (or provided) when the target application is running on the mobile terminal. For example, the virtual scene is a simulation environment of the real world, or a semi-simulation and semi-fictitious virtual environment, or a purely fictitious virtual environment. A virtual object refers to an movable object in a virtual scene, and is also a virtual image in the virtual scene used to represent the user. For example, a virtual object is a virtual character or a virtual animal. In one possible implementation, the user can control the movement of the virtual object, for example, controlling the virtual object to run, jump or crawl. Optionally, the target application is a game application.
[0104] 402. The mobile terminal obtains audio data emitted by a virtual sound source in a virtual scene and third position information of the audio data, where the third position information indicates a relative position relationship between the virtual sound source and the virtual object.
[0105] Among them, the virtual sound source is any virtual sound source with a pronunciation function in a virtual scene. For example, the virtual sound source is the current virtual object, or another virtual object, or a virtual prop. The audio data corresponding to the virtual sound source represents the sound emitted by the virtual sound source. For example, when a virtual object performs a skill release operation in a virtual scene, the virtual object, as a virtual sound source, will emit audio data of the skill release, or when other virtual objects attack the virtual object controlled by this end, the other virtual objects, as virtual sound sources, will emit audio data of the attack, or the virtual scene itself can also be used as a virtual sound source to emit audio data such as thunder and rain. Among them, the third position information includes the distance and angle of the virtual sound source relative to the virtual object.
[0106] In an embodiment of the present application, the target application is provided by a server as a background service. The server sends audio data and third location information of the audio data to a mobile terminal, instructing the mobile terminal to play the audio data and simulating that the audio data is emitted by a virtual sound source; the mobile terminal receives the audio data and the third location information of the audio data.
[0107] 403. The mobile terminal adjusts the audio data based on the third position information to obtain audio data of multiple channels.
[0108] In the embodiment of the present application, the mobile terminal does not play the audio data, but instead sends it to the vehicle terminal for playback. To achieve a stereo sound effect, the mobile terminal also determines multiple channels of audio data for playback in the vehicle. Furthermore, considering the relative positional relationship between the virtual sound source and the virtual object, in order to simulate the aforementioned relative positional relationship between the audio data and the user when the audio data is played in the vehicle, the audio data is first adjusted based on the third position information. When the resulting multiple channels of audio data are sent to the vehicle for playback, it is as if the user is in the virtual scene, listening to the audio data emitted by the virtual sound source.
[0109] 404. The mobile terminal sends a play instruction to the vehicle-mounted terminal corresponding to the vehicle, where the play instruction carries audio data of multiple channels.
[0110] In an embodiment of the present application, the audio data is adjusted based on the third position information of the audio data to obtain audio data of multiple channels. When the user is inside the vehicle, the mobile terminal can play the audio data of the target application with the help of the vehicle-mounted terminal. By sending a play instruction to the vehicle-mounted terminal, the vehicle-mounted terminal can play the audio data of multiple channels based on the play instruction, thereby achieving stereo sound effects and enhancing the user's sense of immersion.
[0111] Figure 5 A flowchart of another audio playback method provided by an exemplary embodiment of the present application is shown. Figure 5 The method is implemented by interaction between the vehicle-mounted terminal and the mobile terminal. The method includes:
[0112] 501. The mobile terminal displays a virtual object controlled by the mobile terminal in a virtual scene.
[0113] The virtual scene is a virtual scene displayed (or provided) when the target application is running on the mobile terminal. Optionally, the target application is a game application, for example, the target application is an FPS game application. In an embodiment of the present application, the user triggers the mobile terminal to run the target application, and further, the user triggers the mobile terminal to display a virtual object in the virtual scene of the target application, so that the user can control the movement of the virtual object in the virtual scene.
[0114] 502. The mobile terminal obtains audio data corresponding to the virtual sound source and third position information of the audio data, where the third position information indicates a relative position relationship between the virtual sound source and the virtual object.
[0115] In an embodiment of the present application, the target application is provided with a background service by a server. The audio data is transmitted in the form of an audio stream. Optionally, the server sends the audio stream and third location information of the audio stream to the mobile terminal, and the mobile terminal receives the audio stream and the third location information.
[0116] It should be noted that the server may send the audio stream and the third position information at the same time, or the server may first send a section of the audio stream and then send the third position information of the audio stream.
[0117] 503. The mobile terminal adjusts the audio data based on the third position information to obtain audio data of multiple channels.
[0118] Each channel corresponds to a speaker in the vehicle, and each speaker has a different position relative to the vehicle. The mobile terminal stores the position of each speaker relative to the vehicle. In an embodiment of the present application, since the third position information can represent the relative positional relationship between the virtual sound source and the virtual object, and the virtual object represents the user, the audio data is adjusted according to the third position information so that the adjusted audio data corresponds to multiple channels. If the audio data of multiple channels is played, the user can hear sound with a stereo sound effect.
[0119] 504. The mobile terminal sends a play instruction to the vehicle-mounted terminal corresponding to the vehicle, where the play instruction carries audio data of multiple channels.
[0120] The mobile terminal encodes the audio data of multiple channels, and the play instruction carries the encoded audio data of multiple channels.
[0121] 505. The vehicle-mounted terminal responds to the playback instruction carrying multiple channels of audio data sent by the mobile terminal, and controls the multiple speakers to play the audio data of the corresponding channels based on the distances between the multiple speakers and the user, so that the audio data of the multiple channels arrive at the user's location at the same time.
[0122] When receiving the play instruction, the vehicle-mounted terminal decodes the encoded audio data of multiple channels to obtain decoded audio data of multiple channels.
[0123] Optionally, the implementation of step 505 is similar to that of step 305 and will not be repeated here.
[0124] For example, see Figure 6, the mobile terminal is a mobile phone and the target application is a game application as an example for explanation. The mobile phone is connected to the vehicle terminal via a wireless (e.g., Wi-Fi) or wired (e.g., USB) connection. A game application is running on the mobile phone. The mobile phone adjusts audio data corresponding to a virtual sound source output by the game application to obtain multi-channel audio data. The audio circuit in the mobile phone encodes the multi-channel audio data to obtain encoded multi-channel audio data. The mobile phone sends a play command to the vehicle terminal via a communication connection with the vehicle terminal. The vehicle terminal receives the play command via a communication connection with the mobile phone, decodes the multi-channel audio data to obtain decoded multi-channel audio data. The audio system in the vehicle terminal then maps the multi-channel audio data to corresponding speakers. The audio data is then delayed to control the speakers to play the audio data of the corresponding channels. The speakers (speakers) include speaker 1 (center), speaker 2 (speaker_FL) located in front of the left of the user, speaker 3 (speaker_FR) located in front of the right of the user, speaker 4 (speaker_RL) located behind the left of the user, speaker 5 (speaker_RR) located behind the right of the user, and a backup speaker 6 (sub_Wf).
[0125] In an embodiment of the present application, the user is in a vehicle and uses a mobile terminal to control a virtual object in a virtual scene. The virtual object can represent the user. While the virtual object performs operations in the virtual scene, the game application also generates audio data emitted by a virtual sound source. At this time, the audio data is played through multiple speakers in the vehicle. After playback, it can simulate the sound emitted by the virtual sound source heard by the user in the virtual scene, thereby bringing an immersive experience to the user.
[0126] In an embodiment of the present application, the audio data is adjusted based on the third position information of the audio data to obtain audio data of multiple channels. When the user is inside the vehicle, the mobile terminal can play the audio data of the target application with the help of the vehicle-mounted terminal. By sending a play instruction to the vehicle-mounted terminal, the vehicle-mounted terminal can control the speaker to play the audio data of multiple channels based on the play instruction, so that the audio data of multiple channels reach the user's location at the same time, that is, the user can hear the audio data played by each speaker at the same time. In this way, on the one hand, the user does not need to wear headphones, thereby reducing the discomfort of the user wearing headphones for a long time. On the other hand, the stereo sound effect of the target application is realized. If the target application is a game application, the user can also listen to the sound and determine the position more accurately based on the audio data played by multiple speakers, thereby improving the user's gaming experience and enhancing the user's sense of immersion.
[0127] The following are device embodiments of the present application, which can be used to implement the method embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments of the present application.
[0128] See Figure 7 , which shows a structural block diagram of an audio playback device provided by an exemplary embodiment of the present application. The audio playback device is configured in a vehicle-mounted terminal, and the audio playback device includes:
[0129] a position determination module 701 for determining the position of the mobile terminal relative to the vehicle based on the positions of at least three communication modules in the vehicle relative to the vehicle and the distance between each communication module and the mobile terminal, the distance being obtained by communication between the communication module and the mobile terminal;
[0130] The position determination module 701 is further configured to determine a position of a user to which the mobile terminal belongs relative to the vehicle based on the position of the mobile terminal relative to the vehicle and first position information, wherein the first position information indicates a relative position relationship between the user and the mobile terminal;
[0131] a distance determination module 702 for determining a distance between each speaker and the user based on positions of the plurality of speakers in the vehicle relative to the vehicle and the position of the user relative to the vehicle, wherein each speaker corresponds to a channel;
[0132] The audio playback module 703 is used to respond to a playback instruction carrying multiple channels of audio data sent by the mobile terminal, and control the multiple speakers to play the audio data of the corresponding channels based on the distance between the multiple speakers and the user, so that the audio data of the multiple channels reaches the user's location at the same time.
[0133] In a possible implementation, the apparatus further includes:
[0134] A data packet acquisition module is used to acquire, for each communication module, a data packet with a timestamp received by the communication module, where the data packet is sent by the mobile terminal;
[0135] A time difference determination module, configured to determine a time difference between a timestamp carried by a data packet received by the communication module and the current time;
[0136] The distance determining module 702 is further configured to determine the distance between the communication module and the mobile terminal based on the time difference and the preset transmission speed.
[0137] In a possible implementation, the audio playback module 703 is configured to:
[0138] For each speaker, the delay duration corresponding to the speaker is determined based on the distance between the speaker and the user. The distance is negatively correlated with the delay duration.
[0139] Controls the speaker to play the audio data of the channel corresponding to the speaker after the corresponding delay time has passed since the current time.
[0140] In a possible implementation, the audio playback module 703 is configured to:
[0141] Based on the distance between the speaker and the user and the speed of sound, determine the corresponding propagation time of the speaker. The propagation time is the time from when the speaker plays the audio data to when the audio data is heard by the user.
[0142] The time difference between the maximum propagation duration among the propagation durations corresponding to the multiple speakers and the propagation duration corresponding to the speaker is determined as the delay duration corresponding to the speaker.
[0143] In a possible implementation, the apparatus further includes:
[0144] An occupancy status determination module, configured to determine an occupancy status of a plurality of seats in a vehicle, the occupancy status indicating whether a seat is occupied by a user;
[0145] a quantity determination module, configured to determine the number of seats in a first state as the number of users of the vehicle, wherein the first state indicates that the seats are occupied by users;
[0146] The position determination module 701 is further configured to determine the position of the user relative to the vehicle based on the position of the seat relative to the vehicle in the first state and the second position information when the number of users is not greater than 1, where the second position information indicates a relative position relationship between the user and the seat;
[0147] The position determination module 701 is also used to determine the position of the user relative to the vehicle based on the position of the selected seat relative to the vehicle and the second position information when the number of users is greater than 1. The selected seat refers to the seat where the user is sitting.
[0148] In a possible implementation, the apparatus further includes:
[0149] an identification display module, configured to display seat identifications corresponding to a plurality of seats in the vehicle, and determine a selected seat identification from the plurality of seat identifications, wherein the seat identification indicates the seat occupied by the user; or
[0150] The instruction sending module is used to send a seat selection instruction to the mobile terminal and receive a seat identifier selected by the mobile terminal from seat identifiers corresponding to multiple seats based on the seat selection instruction, where the seat identifier refers to the seat occupied by the user.
[0151] In an embodiment of the present application, at least three communication modules are provided in the vehicle, and the at least three communication modules can communicate with the mobile terminal, so that the position of the mobile terminal can be determined based on the position of each communication module and the distance obtained by each communication module communicating with the mobile terminal. According to the relative position relationship between the mobile terminal and the user, a more accurate position of the user can be further determined. By controlling the speaker to play the audio data of the corresponding channel based on the distance between each speaker and the user, the user can hear the audio data played by different speakers at the same time when the distances between the multiple speakers and the user are different, thereby increasing the user's immersion and improving the playback effect of the audio data.
[0152] It should be noted that the apparatus provided in the above embodiments, when implementing its functions, is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the vehicle terminal can be divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus and method embodiments provided in the above embodiments are based on the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0153] See Figure 8 , which shows a structural block diagram of another audio playback device provided by an exemplary embodiment of the present application. The audio playback device is configured in a mobile terminal, and the audio playback device includes:
[0154] The object display module 801 is used to display the virtual object controlled by the local terminal in the virtual scene;
[0155] A data acquisition module 802 is configured to acquire audio data emitted by a virtual sound source in a virtual scene and third position information of the audio data, where the third position information indicates a relative position relationship between the virtual sound source and the virtual object;
[0156] A data adjustment module 803 is configured to adjust the audio data based on the third position information to obtain audio data of multiple channels;
[0157] The instruction sending module 804 is used to send a play instruction to the vehicle terminal, where the play instruction carries audio data of multiple channels.
[0158] In a possible implementation, the apparatus further includes:
[0159] An instruction receiving module is used to receive a seat selection instruction sent by the vehicle terminal, where the seat selection instruction carries seat identifiers corresponding to multiple seats in the vehicle;
[0160] A logo display module, used to display multiple seat logos;
[0161] An identification determination module, used to determine a selected seat identification from a plurality of seat identifications;
[0162] The identification sending module is used to return the selected seat identification to the vehicle terminal, where the seat identification refers to the seat occupied by the user.
[0163] In an embodiment of the present application, the audio data is adjusted based on the third position information of the audio data to obtain audio data of multiple channels. When the user is inside the vehicle, the mobile terminal can play the audio data of the target application with the help of the vehicle-mounted terminal. By sending a play instruction to the vehicle-mounted terminal, the vehicle-mounted terminal can play the audio data of multiple channels based on the play instruction, thereby achieving stereo sound effects and enhancing the user's sense of immersion.
[0164] It should be noted that the apparatus provided in the above embodiments, when implementing its functions, is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the mobile terminal can be divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus and method embodiments provided in the above embodiments are based on the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0165] An embodiment of the present application provides a terminal, which includes a processor and a memory; the memory stores at least one program code, and the at least one program code is used to be executed by the processor to implement the audio playback method provided by the above-mentioned various method embodiments.
[0166] See Figure 9 , which shows a block diagram of the structure of a terminal provided by an exemplary embodiment of the present application. In some embodiments, terminal 900 is a vehicle-mounted terminal or a mobile terminal. Terminal 900 in the present application includes at least one or more of the following components: a processor 910, a memory 920, and at least two wireless links 930.
[0167] In some embodiments, the processor 910 includes one or more processing cores. The processor 910 uses various interfaces and lines to connect various parts of the entire terminal 900. By running or executing program code stored in the memory 920 and calling data stored in the memory 920, it performs various functions of the terminal 900 and processes data. In some embodiments, the processor 910 is implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 910 can integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), a neural network processing unit (NPU), and a modem. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display; the NPU is used to implement artificial intelligence (AI) functions; and the modem is used to handle wireless communication. It is understandable that the above-mentioned modem may not be integrated into the processor 910 but may be implemented by a separate chip.
[0168] In some embodiments, the processor 910 is used to control the operating status of at least two wireless links 930. Accordingly, the processor 910 is a processor integrated with a Wireless Fidelity (Wi-Fi) chip. The Wi-Fi chip is a chip with dual Wi-Fi processing capabilities. For example, the Wi-Fi chip is a dual-band dual concurrent (DBDC) chip or a dual-band simultaneous (DBS) chip.
[0169] In some embodiments, the memory 920 includes a random access memory (RAM). In some embodiments, the memory 920 includes a read-only memory (ROM). In some embodiments, the memory 920 includes a non-transitory computer-readable storage medium. The memory 920 can be used to store program code. The memory 920 may include a program storage area and a data storage area. The program storage area may store program code for implementing an operating system, program code for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), program code for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data created according to the use of the terminal 900 (such as audio data, a phone book), etc.
[0170] In some embodiments, the memory 920 stores receiving schemes for receiving beacon frames of different wireless links 930, as well as identifiers of access nodes connected to different wireless links 930, identifiers of wireless links 930, and the like.
[0171] The at least two wireless links 930 are used to connect different access points (APs) to receive downlink data sent by the APs, wherein the different access points may be access points in the same router or in different routers.
[0172] In some embodiments, the terminal 900 further includes a display screen. The display screen is a display component for displaying a user interface. In some embodiments, the display screen is a display screen with a touch function, through which the user can use any suitable object such as a finger or a touch pen to perform touch operations on the display screen. In some embodiments, the display screen is generally provided on the front panel of the terminal 900. In some embodiments, the display screen is designed to be a full screen, a curved screen, a special-shaped screen, a double-sided screen, or a folding screen. In some embodiments, the display screen is also designed to be a combination of a full screen and a curved screen, a combination of a special-shaped screen and a curved screen, etc., which is not limited in this embodiment.
[0173] In addition, those skilled in the art will appreciate that the structure of terminal 900 shown in the above figures does not limit terminal 900. Terminal 900 may include more or fewer components than shown, or may combine certain components or arrange the components differently. For example, terminal 900 may also include a microphone, a speaker, an input unit, a sensor, an audio circuit, a module, a power supply, a Bluetooth module, and other components, which will not be described in detail here.
[0174] The present application also provides a computer-readable storage medium, which stores at least one program code, and the at least one program code is loaded and executed by a processor to implement the audio playback method shown in the above embodiments.
[0175] The present application also provides a computer program product, including a computer program, which is used to be loaded and executed by a processor to implement the audio playback method shown in the above embodiments.
[0176] In some embodiments, the computer program involved in the embodiments of the present application can be deployed and executed on one terminal, or on multiple terminals located at one location, or on multiple terminals distributed at multiple locations and interconnected through a communication network. Multiple terminals distributed at multiple locations and interconnected through a communication network can constitute a blockchain system.
[0177] The serial numbers of the above embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0178] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.), and signals involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. For example, the images involved in this application were obtained with full authorization.
[0179] Those skilled in the art will appreciate that all or part of the steps in the audio playback method of the above embodiment can be performed by hardware, or by a program instructing the relevant hardware to perform the steps. The program can be stored in a computer-readable storage medium, which can be a read-only memory, a magnetic disk, or an optical disk. The above are merely optional embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included within the scope of protection of the present application.
Claims
1. An audio playback method, characterized in that: The method comprises: determining a position of the mobile terminal relative to the vehicle based on positions of at least three communication modules in the vehicle relative to the vehicle and a distance between each of the communication modules and the mobile terminal, the distance being obtained by communication between the communication module and the mobile terminal; determining a position of a user to which the mobile terminal belongs relative to the vehicle based on the position of the mobile terminal relative to the vehicle and first position information, wherein the first position information indicates a relative positional relationship between the user and the mobile terminal; Based on positions of a plurality of speakers in the vehicle relative to the vehicle and a position of the user relative to the vehicle, respectively determining a distance between each speaker and the user, each speaker corresponding to a channel; In response to a playback instruction carrying audio data of multiple channels sent by the mobile terminal, based on the distance between the multiple speakers and the user, the multiple speakers are controlled to play the audio data of the corresponding channels so that the audio data of the multiple channels reach the user's location at the same time.
2. The method according to claim 1, characterized in that The method further comprises: For each of the communication modules, obtaining a data packet with a timestamp received by the communication module, where the data packet is sent by the mobile terminal; Determine a time difference between a timestamp carried by a data packet received by the communication module and the current time; Based on the time difference and a preset transmission speed, a distance between the communication module and the mobile terminal is determined.
3. The method according to claim 1, characterized in that The controlling the plurality of speakers to play the audio data of corresponding channels based on the distances between the plurality of speakers and the user respectively includes: For each of the speakers, determining a delay duration corresponding to the speaker based on a distance between the speaker and the user, wherein the distance is negatively correlated with the delay duration; The speaker is controlled to play the audio data of the channel corresponding to the speaker after the corresponding delay time has passed since the current time.
4. The method according to claim 3, characterized in that The determining, based on the distance between the speaker and the user, a delay duration corresponding to the speaker, includes: Determining, based on the distance between the speaker and the user and the speed of sound, a propagation duration corresponding to the speaker, where the propagation duration is the time from when the speaker plays the audio data to when the audio data is heard by the user; The time difference between the maximum propagation duration among the propagation durations corresponding to the multiple speakers and the propagation duration corresponding to the speaker is determined as the delay duration corresponding to the speaker.
5. The method according to claim 1, characterized in that The method further comprises: determining an occupancy status of a plurality of seats in the vehicle, the occupancy status indicating whether the seat is occupied by a user; determining the number of seats in which the occupancy state is a first state as the number of users of the vehicle, wherein the first state indicates that the seats are occupied by users; When the number of users is not greater than 1, determining the position of the user relative to the vehicle based on the position of the seat in the first state relative to the vehicle and second position information, wherein the second position information indicates a relative positional relationship between the user and the seat; When the number of users is greater than 1, the position of the user relative to the vehicle is determined based on the position of a selected seat relative to the vehicle and the second position information, where the selected seat refers to the seat occupied by the user.
6. The method according to claim 5, characterized in that The method further comprises: Displaying seat identifiers corresponding to a plurality of seats in the vehicle, and determining a selected seat identifier from the plurality of seat identifiers, wherein the seat identifier indicates the seat occupied by the user; or A seat selection instruction is sent to the mobile terminal, and a seat identifier selected by the mobile terminal from seat identifiers corresponding to a plurality of seats based on the seat selection instruction is received, where the seat identifier indicates the seat occupied by the user.
7. An audio playback method, characterized in that: The method comprises: Displaying the virtual objects controlled by the local terminal in the virtual scene; Acquire audio data emitted by a virtual sound source in the virtual scene and third position information of the audio data, wherein the third position information indicates a relative position relationship between the virtual sound source and the virtual object; Adjusting the audio data based on the third position information to obtain audio data of multiple channels; Sending a play instruction to the vehicle terminal, the play instruction carrying the audio data of the multiple channels, the vehicle terminal being configured to respond to the play instruction and control the multiple speakers to play the audio data of the corresponding channels based on the distances between the multiple speakers and the user, so that the audio data of the multiple channels reaches the location of the user at the same time; Among them, the distance between each of the speakers and the user is determined based on the positions of multiple speakers in the vehicle relative to the vehicle and the position of the user relative to the vehicle; the position of the user relative to the vehicle is determined based on the position of the mobile terminal relative to the vehicle and the first position information, and the first position information represents the relative position relationship between the user and the mobile terminal.
8. The method according to claim 7, characterized in that The method further comprises: receiving a seat selection instruction sent by the vehicle-mounted terminal, wherein the seat selection instruction carries seat identifiers corresponding to a plurality of seats of the vehicle; displaying a plurality of seat identifiers; determining a selected seat identifier from among the plurality of seat identifiers; The selected seat identifier is returned to the vehicle-mounted terminal, where the seat identifier indicates the seat occupied by the user.
9. An audio playback device, characterized in that: The device comprises: a position determination module, configured to determine the position of the mobile terminal relative to the vehicle based on the positions of at least three communication modules in the vehicle relative to the vehicle and the distance between each of the communication modules and the mobile terminal, the distance being obtained by communication between the communication modules and the mobile terminal; The position determination module is further configured to determine a position of a user to which the mobile terminal belongs relative to the vehicle based on the position of the mobile terminal relative to the vehicle and first position information, wherein the first position information indicates a relative positional relationship between the user and the mobile terminal; a distance determination module, configured to determine a distance between each of the multiple speakers in the vehicle and the user based on positions of the multiple speakers relative to the vehicle and the position of the user relative to the vehicle, wherein each speaker corresponds to a channel; The audio playback module is used to respond to a playback instruction carrying multiple channels of audio data sent by the mobile terminal, and based on the distance between the multiple speakers and the user, control the multiple speakers to play the audio data of the corresponding channels, so that the audio data of the multiple channels reaches the user's location at the same time.
10. An audio playback device, characterized in that: The device comprises: The object display module is used to display the virtual objects controlled by the local terminal in the virtual scene; a data acquisition module, configured to acquire audio data emitted by a virtual sound source in the virtual scene and third position information of the audio data, wherein the third position information indicates a relative position relationship between the virtual sound source and the virtual object; a data adjustment module, configured to adjust the audio data based on the third position information to obtain audio data of multiple channels; an instruction sending module, configured to send a play instruction to the vehicle terminal, the play instruction carrying the audio data of the multiple channels, the vehicle terminal being configured to respond to the play instruction and control the multiple speakers to play the audio data of the corresponding channels based on the distances between the multiple speakers and the user, so that the audio data of the multiple channels arrive at the user's location at the same time; Among them, the distance between each of the speakers and the user is determined based on the positions of multiple speakers in the vehicle relative to the vehicle and the position of the user relative to the vehicle; the position of the user relative to the vehicle is determined based on the position of the mobile terminal relative to the vehicle and the first position information, and the first position information represents the relative position relationship between the user and the mobile terminal.
11. A terminal, characterized in that: The terminal includes a processor and a memory; the memory stores at least one program code, and the at least one program code is used to be executed by the processor to implement the audio playback method according to any one of claims 1 to 8.
12. A computer-readable storage medium, characterized in that The storage medium stores at least one program code, and the at least one program code is used to be executed by a processor to implement the audio playback method according to any one of claims 1 to 8.
13. A computer program product comprising a computer program, characterized in that The computer program is configured to be executed by a processor to implement the audio playback method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Multi-channel audio system capable of tracking user and equipment with multi-channel audio system
CN106686520A
Method and device for audio control in games
CN110270094A