Audio playback method, device, embedded device and storage medium

By establishing a correspondence between virtual devices and playback devices in embedded devices and using audio tracks to control the transmission of audio data, the problems of stuttering and sound quality during multi-device playback are solved, and efficient and synchronized audio playback is achieved.

CN116048450BActive Publication Date: 2025-09-23BESTECHNIC SHANGHAI CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211718412.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-29
Publication Date
2025-09-23
Estimated Expiration
2042-12-29

AI Technical Summary

Technical Problem

When devices based on embedded platforms play audio on multiple output devices simultaneously, there will be problems such as lag and poor sound quality. This is mainly due to performance limitations of copying and synchronization control between devices.

Method used

A correspondence between virtual devices and playback devices is pre-established in the embedded device. The virtual device is controlled by the audio track to obtain the audio to be played from the buffer pool, and the virtual device is sent to the corresponding playback device for playback, avoiding direct copying of audio data between devices.

Benefits of technology

It reduces the adverse effects of playback devices on audio playback, improves the control efficiency and synchronization of audio playback, and avoids lag and sound quality degradation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116048450B_ABST
    Figure CN116048450B_ABST
Patent Text Reader

Abstract

The present application provides an audio playback method, device, embedded device and storage medium, and is designed in the field of audio processing. The audio playback method includes: storing the audio to be played in a preset buffer pool; based on the control of the audio track, enabling a preset virtual device to obtain the audio to be played from the buffer pool; wherein, the audio track has a pre-established correspondence with a plurality of virtual devices, and each of the virtual devices corresponds to a different playback device; based on the virtual device, the audio to be played is sent to the playback device corresponding to the virtual device, so that the corresponding playback device plays the audio to be played. The audio playback process is managed by the embedded device, reducing the impact of the performance of the playback device on the audio playback.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of audio processing technology, and in particular to an audio playback method, apparatus, embedded device and storage medium. Background Art

[0002] Devices based on embedded platforms can communicate with playback devices such as headphones and speakers. Devices based on embedded platforms can parse audio data and then play the audio data through the playback devices.

[0003] In some scenarios, multiple output devices are required to play an audio simultaneously. For example, when playing an incoming call ringtone, since the user may not be wearing headphones and the headphone volume is low, the device's own speaker and external speakers are required to play the incoming call ringtone simultaneously.

[0004] However, embedded devices typically don't support simultaneous audio playback on multiple output devices. Currently, when implementing multiple output devices, some embedded devices typically copy and play the parsed audio data separately. However, because the copying operation is subject to the performance limitations of each device and requires synchronization between output devices, a failure on any output device can affect audio playback on other devices, resulting in lag and poor sound quality. Summary of the Invention

[0005] In view of this, the present application aims to provide an audio playback method, apparatus, embedded device and storage medium, so that the embedded device can reduce the mutual influence of each playback device on the audio playback when supporting multiple playback devices to play audio simultaneously.

[0006] In a first aspect, an embodiment of the present application provides an audio playback method, which is applied to an embedded device. The audio playback method includes: storing the audio to be played in a preset buffer pool; based on the control of the audio track, enabling a preset virtual device to obtain the audio to be played from the buffer pool; wherein a corresponding relationship is pre-established between the audio track and a plurality of the virtual devices, and each of the virtual devices corresponds to a different playback device; based on the virtual device, sending the audio to be played to the playback device corresponding to the virtual device, so that the corresponding playback device plays the audio to be played.

[0007] In an embodiment of the present application, a virtual device corresponding to the playback device is pre-established locally on the embedded device. When audio playback is performed, the audio track controls the virtual device to obtain the audio to be played from the buffer pool, and the virtual device sends it to the corresponding playback device for playback. Compared with the existing technology, this avoids the playback device directly copying the audio to be played from the embedded device, and the playback process of the audio to be played is controlled by the embedded device, thereby reducing the adverse impact of the performance of the playback device on the audio playback.

[0008] In one embodiment, before storing the audio to be played into the buffer pool, the method includes: applying for an audio track; determining a virtual device corresponding to the playback device; establishing a correspondence between the corresponding virtual device and the audio track, wherein the audio track is used to control the virtual device with which the correspondence is established to obtain the audio to be played.

[0009] In an embodiment of the present application, before playing audio, you can apply for an audio track and establish a relationship between the audio track and the virtual device. Thus, during playback, the audio track can directly control the virtual device corresponding to the playback device, thereby directly enabling the playback device to play under the control of the embedded device, reducing the intervention of the playback device in the playback of audio, and thus reducing the adverse impact of the playback device on the audio playback.

[0010] In one embodiment, after the virtual device sends the audio to be played to the playback device corresponding to the virtual device, the method further includes: controlling the virtual device to stop obtaining the audio to be played from the buffer pool based on the audio track; or controlling the virtual device to stop sending the audio to be played to the corresponding playback device based on the audio track; or pausing writing the audio to be played to the buffer pool to pause playing the audio to be played.

[0011] Pause the audio playback and then resume it from the point where it was interrupted. In the embodiment of the present application, by pausing the writing of the audio to be played into the buffer pool, or controlling the virtual device to send the audio to be played to the playback device, or controlling the virtual device to stop obtaining the audio to be played from the buffer pool, any of these methods can prevent the audio to be played from being continued. After resuming playback, the audio to be played can be continued from the point where it was interrupted, thereby avoiding the loss of the audio clip to be played and improving the user experience. In addition, any of the above methods can achieve relatively fast pause playback, thereby improving the efficiency of controlling audio playback.

[0012] In one embodiment, after sending the audio to be played to the playback device corresponding to the virtual device based on the virtual device, the method further includes: releasing the correspondence between the audio track and the virtual device to cause the playback device to stop playing the audio.

[0013] In an embodiment of the present application, when stopping audio playback, it can be achieved by releasing the correspondence between the audio track and the virtual device. On the one hand, it can reduce the occupation of operating resources by the audio track and improve the operating efficiency of the embedded device. On the other hand, it can facilitate the next use of the virtual device. When playing other audio files, there is no need to first release the correspondence between the virtual device and the previous audio track, thereby improving playback efficiency.

[0014] In one embodiment, the virtual device includes a first virtual device and multiple second virtual devices, each of the second virtual devices corresponds to a different playback device; the audio track-based control enables the preset virtual device to obtain the audio to be played from the buffer pool, including: based on the audio track control, enabling the first virtual device to obtain the audio to be played from the buffer pool; based on the first virtual device, copying the audio to be played to obtain multiple identical audios to be played, and the number of copies is the same as the number of the second virtual devices; sending the multiple identical audios to be played to each of the second virtual devices, so that each of the second virtual devices is sent to its corresponding playback device.

[0015] In the embodiments of the present application, the first virtual device is used within the embedded device to replicate the audio to be played. Compared to the prior art, this prevents each playback device from copying the audio to be played, thereby reducing the impact of the playback device on the audio replication process. In addition, the first virtual device performs the replication, while the second virtual device transmits the audio to be played. Thus, the embedded device can control the synchronization between the various playback devices by controlling the transmission of the audio to be played, thereby avoiding the need for playback synchronization between the various playback devices and further reducing the impact of the various playback devices on the audio playback.

[0016] In one embodiment, a second virtual device corresponding to a target playback device is determined; and a binding relationship is established between the corresponding second virtual device and the first virtual device, so as to play the audio to be played based on the target playback device.

[0017] In an embodiment of the present application, during simultaneous playback on multiple playback devices, a new playback device can be added by establishing a binding relationship between a second virtual device and a first virtual device. In the process of adding a new playback device, there is no need to stop the ongoing playback of other playback devices, thereby reducing the impact on other playback devices during the process of adding a new playback device.

[0018] In a second aspect, an embodiment of the present application provides an audio playback device, comprising: a storage module for storing the audio to be played in a preset buffer pool; a control module for controlling, based on the audio track, a preset virtual device to obtain the audio to be played from the buffer pool; wherein a corresponding relationship is pre-established between the audio track and the virtual device, and the virtual device corresponds to the playback device; an output module for sending the audio to be played to the playback device corresponding to the virtual device based on the virtual device, so that the corresponding playback device plays the audio to be played.

[0019] In a third aspect, an embodiment of the present application provides an embedded device, comprising: a communication module for establishing a communication connection with different playback devices; and a processing module for executing the method described in any one of the first aspects.

[0020] In one embodiment, the embedded device is a smart watch.

[0021] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer program runs on a computer, the computer executes the network access method described in the first aspect or the network access method described in the second aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without creative work.

[0023] Figure 1 A schematic diagram of audio playback of a single-channel device in the prior art;

[0024] Figure 2 A flowchart of an audio playback method provided in an embodiment of the present application;

[0025] Figure 3 A schematic structural diagram of an audio playback device provided in an embodiment of the present application;

[0026] Figure 4 A schematic diagram of the structure of an embedded device provided in an embodiment of the present application.

[0027] Icon: audio playback device 100 ; storage module 110 ; control module 120 ; output module 130 ; association module 140 ; ​​embedded device 200 ; communication module 210 ; processing module 220 . DETAILED DESCRIPTION

[0028] In order to make the purpose, technical solutions and advantages of this application more clearly understood, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0029] Before introducing the solution of the present application, in order to facilitate understanding of the solution of the present application, the scenario targeted by the present application is first explained.

[0030] See also Figure 1 , Figure 1 The figure is a schematic diagram of the audio playback of a single-channel device in the prior art. Source represents the data source, Sink represents the playback source, and the playback source corresponds to various playback devices, such as Figure 1 The playback source shown can be a speaker or a Bluetooth headset.

[0031] The data used by various audio playback devices is PCM (Pulse Code Modulation) data. Using PCM data, the playback device can play the corresponding audio. Currently, when playing audio, various audio playback software first decodes the audio file to be played, converting the audio file into PCM data and sending the PCM data to the receiving end of the playback device. After receiving it, the playback device plays it, such as playing it through speakers, or converts it according to its own device. For example, when playing through Bluetooth headphones, the PCM data can be converted using A2DP (Advanced Audio Distribution Profile) and then sent to the Bluetooth headphones for playback.

[0032] The above scenario describes a current scenario where an embedded device uses a single player. When multiple players are playing simultaneously, the existing technology typically converts the audio data into PCM data, then has each player copy the PCM data, and then each player plays the PCM data. However, because different players need to play the same audio file simultaneously, the embedded device controls the process of copying the PCM data to each player. If any player experiences an error during the data copying process, it will affect the PCM data copying of other players, resulting in lag and reduced sound quality.

[0033] In response to the above situation, the present application provides an audio playback method. When applied on an embedded device, when the embedded device plays audio through multiple playback devices, the process of sending PCM data to each playback device for playback can be controlled on the embedded device side, thereby reducing the impact of each playback device on the audio playback.

[0034] See also Figure 2 , Figure 2 This is a flowchart of an audio playback method provided in an embodiment of the present application. The audio playback method includes:

[0035] S110: Storing the audio to be played in a preset buffer pool.

[0036] S120 , based on the control of the audio track, enabling the preset virtual device to obtain the audio to be played from the buffer pool.

[0037] S130: Send the audio to be played to a playback device corresponding to the virtual device based on the virtual device, so that the corresponding playback device plays the audio to be played.

[0038] Next, the audio playback method provided by this application will be described in detail in combination with the embedded device and the playback device.

[0039] In one embodiment, before S110 , virtual devices are constructed in the embedded device based on the number of playback devices, and a correspondence between the virtual devices and the playback devices is established.

[0040] In this embodiment, there can be multiple playback devices. Within the embedded device, a corresponding number of virtual devices can be created based on the number of playback devices. For example, if the playback devices include the embedded device's own speakers, external headphones, and speakers, that is, three playback devices, then three virtual devices can be created: device 1, device 2, and device 3. Next, a correspondence is established between each virtual device and a different playback device. For example, device 1 corresponds to the embedded device's own speakers, device 2 corresponds to the external headphones, and device 3 corresponds to the external speakers.

[0041] By building a number of virtual devices that corresponds to the number of playbacks and establishing a correspondence between the virtual devices, the embedded device can select the corresponding virtual device for audio playback based on the device the user wants to play audio on. For example, if the user wants to use headphones for audio playback, they can select device 2 for audio playback.

[0042] In one embodiment, the virtual device includes a first virtual device and a second virtual device.

[0043] There are multiple second virtual devices. One first virtual device corresponds to multiple second virtual devices. Each second virtual device is used to implement the functions of the above virtual device, that is, each second virtual device is bound to a different playback device.

[0044] The first virtual device is used to copy the audio to be played. When multiple playback devices play audio simultaneously, each playback device requires a copy of the PCM data to play. However, in this application, the playback device cannot copy directly from the embedded device and must send it through the second virtual device. Therefore, in an embodiment of the present application, a first virtual device is set up, and the first virtual device is used to copy the audio data to be played and distribute it to each second virtual device. As a result, through the first virtual device, while achieving the copying of the audio to be played, it is also possible to achieve control of playback synchronization.

[0045] S110: Storing the audio to be played in a preset buffer pool.

[0046] In the embodiment of the present application, the audio to be played is PCM data, which is obtained by transcoding each audio file to be played. It will not be repeated later. The process of converting the audio file into PCM data can refer to the existing technology and will not be repeated here.

[0047] In this embodiment, audio tracks can be used to store the audio to be played in a preset buffer. In the field of audio processing, a track refers to the path on a recording medium that records audio signals. In this application, an audio track is used to record the transcoded audio to be played and store it in a preset buffer. Therefore, during playback, an audio track can serve as the source.

[0048] Among them, before the audio track stores the audio to be played into the preset buffer pool, the audio track also applies for a Buffer for each 5 playback behavior, that is, the buffer pool, so as to temporarily store the audio to be played recorded by the audio track through the buffer pool.

[0049] In one embodiment, before storing the audio to be played into the buffer pool, the audio playing method further includes:

[0050] Apply for an audio track; determine the virtual device corresponding to the playback device; and establish a corresponding relationship between the virtual device and the audio track.

[0051] In this embodiment, each time audio is played, the embedded device may apply for an audio track to record the transcoded audio to be played, wherein the audio track may be pre-established and stored in the embedded device.

[0052] When the audio track stores the audio to be played in the buffer pool, the audio track can control the virtual device to read the buffer pool, so that after the virtual device reads the audio to be played, it can send it to the corresponding playback device 5 for playback. At this time, the playback device for audio playback can be determined, the virtual device corresponding to the playback device can be determined, and the virtual device can be bound to the audio track. For example, if the playback device to be played is headphones, a binding relationship can be established between track and device 2, so that one virtual device corresponds to one audio track. Therefore, when the audio track writes the audio to be played into the buffer pool,

[0053] A control instruction is issued to the bound virtual device to control the virtual device to obtain the audio to be played from the buffer pool.

[0054] S120 , based on the control of the audio track, enabling the preset virtual device to obtain the audio to be played from the buffer pool.

[0055] In this embodiment, when playing for a playback device, when the audio track stores the audio to be played into the buffer pool, the audio track simultaneously sends a control instruction to the virtual device, so that the virtual device obtains the audio to be played from the buffer pool.

[0056] In one embodiment, when playing to multiple playback devices simultaneously, based on the control of the audio track,

[0057] The method enables a preset virtual device to obtain the audio to be played from a buffer pool, including: based on the control of the audio track, enabling the first virtual device to obtain the audio to be played from the buffer pool; based on the first virtual device, copying the audio to be played to obtain multiple identical audios to be played, and the number of copies is the same as the number of second virtual devices; and sending the multiple identical audios to be played to each of the second virtual devices respectively, so that each of the second virtual devices sends them to its corresponding playback device respectively.

[0058] In this embodiment, a binding relationship is established between the first virtual device and the audio track, and a binding relationship is established between the first virtual device and the second virtual devices corresponding to the multiple playback devices, wherein the number of audio tracks and the first virtual device is 1, and there are multiple second virtual devices.

[0059] When the audio track writes the audio to be played to the buffer pool, the audio track simultaneously sends a control instruction to the first virtual device, causing the first virtual device to retrieve the audio to be played from the buffer pool. After the first virtual device retrieves the audio to be played, it can copy the audio to be played to obtain multiple identical audios to be played, where the number of copied audios to be played is the same as the number of second virtual devices. Thus, the first virtual device can allocate a copy of the audio to be played to each second virtual device. After obtaining the audio to be played, each second virtual device can send it to its corresponding playback device, so that each playback device plays the audio to be played.

[0060] For example, the playback devices include speakers, headphones, and sound boxes, and the corresponding second virtual devices are device 1, device 2, and device 3. Upon receiving the control signal of the audio track, the first virtual device obtains the audio to be played from the buffer pool, copies the audio to be played into three copies, and sends each copy of the audio to be played to device 1, device 2, and device 3 respectively. Then, device 1, device 2, and device 3 send the audio to be played to the speakers, headphones, and sound boxes respectively for playback.

[0061] In one embodiment, when it is necessary to add or reduce playback devices, the relationship between the second virtual device and the first virtual device corresponding to the playback device may be established or released.

[0062] During the simultaneous playback of multiple playback devices, if a new playback device needs to be added, the target playback device to be played can be determined first, and the target second virtual device corresponding to the target playback device can be determined. Then, a binding relationship is established between the target second virtual device and the first virtual device. In this way, the first virtual device can increase the number of copied audio to be played and send it to the target second virtual device. The target second virtual device will then send the audio to be played to the target playback device for playback.

[0063] For example, if the playback devices include speakers, headphones, and speakers, and a Bluetooth speaker is added to play audio, a binding relationship can be established between the second virtual device corresponding to the Bluetooth speaker and the first virtual device. The second virtual device can obtain the audio to be played from the first virtual device and send it to the Bluetooth speaker, allowing the Bluetooth speaker and other playback devices to play the audio together. When the Bluetooth speaker establishes a communication connection with the embedded device, the embedded device can establish a second virtual device corresponding to the Bluetooth device.

[0064] When it is necessary to reduce the number of playback devices playing simultaneously, you can first determine the target playback device that needs to stop playing, and determine the target second virtual device corresponding to the target playback device. Then, you can release the binding relationship between the target second virtual device and the first virtual device. In this way, the first virtual device can reduce the number of copied audio to be played and no longer send it to the target second virtual device, so that the target playback device no longer plays.

[0065] In some embodiments, the user may be provided with a selection function for simultaneous playback on multiple devices or playback on a single device. When the user selects simultaneous playback on multiple devices, the user may select any number of playback devices for playback and add or remove playback devices during playback, wherein all playback devices are in communication with the embedded device.

[0066] When the user chooses single-device playback, the virtual device does not need to be set. After the audio data is converted into PCM data, it can be sent directly to the playback device for playback. The implementation method of single-device playback can refer to the existing technology and will not be expanded here.

[0067] S130: Send the audio to be played to a playback device corresponding to the virtual device based on the virtual device, so that the corresponding playback device plays the audio to be played.

[0068] In this embodiment, each virtual device corresponds to a playback device. When the virtual device obtains the audio to be played, it can send the audio to be played to the corresponding playback device, so that the playback device plays the audio to be played.

[0069] The audio playback process also includes pause and stop. Pausing playback pauses the current audio file, and then continues playing the file from the interrupted position. Stopping playback stops the current audio file, and the embedded device will play another audio file or restart the current audio file from the beginning when it resumes playback.

[0070] In this application, corresponding methods of pausing and stopping playback are provided for the above-mentioned audio playback method.

[0071] In one embodiment, pausing playback includes: controlling the virtual device to stop obtaining the audio to be played from the buffer pool based on the audio track; or controlling the virtual device to stop sending the audio to be played to the corresponding playback device based on the audio track; or pausing writing the audio to be played into the buffer pool to pause playback of the audio to be played.

[0072] In this embodiment, the virtual device can pause playback of the audio to be played by either stopping the virtual device from acquiring the audio to be played from the buffer pool or stopping the virtual device from sending the audio to be played to the online playback device. It is understood that these two actions are mutually exclusive. When the virtual device stops acquiring the audio to be played from the buffer pool, it cannot obtain new data and will also stop sending the audio to be played to the online playback device. Similarly, after the virtual device stops sending audio to the playback device, to avoid excessive data on the virtual device, the virtual device should also stop acquiring the audio to be played.

[0073] In addition, pausing playback may also mean that the audio track pauses writing the audio to be played into the buffer pool. At this time, the virtual device cannot obtain the audio to be played from the buffer pool, thereby pausing audio playback.

[0074] Any of the three methods above can be used to pause audio playback. However, it should be noted that when executing any of the three pause methods, the other two methods must be executed simultaneously to avoid ineffective audio playback. The controlled pause method involves the embedded device receiving a user's pause command, pausing the track to write the audio to be played to the buffer pool, and simultaneously issuing a control command to control the virtual device to obtain and send the audio to be played.

[0075] In one embodiment, stopping the playback includes: releasing the correspondence between the audio track and the virtual device, so that the playback device stops playing the audio.

[0076] In this embodiment, the audio track is used to record the PCM data converted from an audio file, that is, the audio to be played. When the playback is stopped, the audio track does not need to record the audio to be played, and the audio track does not need to control the virtual device. At this time, the corresponding relationship between the audio track and the virtual device can be released, that is, the binding relationship can be released, thereby stopping the playback.

[0077] In an embodiment of the present application, a virtual device corresponding to the playback device is pre-established locally on the embedded device. When audio playback is performed, the audio track controls the virtual device to obtain the audio to be played from the buffer pool, and the virtual device sends it to the corresponding playback device for playback. Compared with the existing technology, this avoids the playback device directly copying the audio to be played from the embedded device, and the playback process of the audio to be played is controlled by the embedded device, thereby reducing the impact of the performance of the playback device on the audio playback.

[0078] Based on the same inventive concept, this application also provides an audio playback device. Figure 3 , Figure 3 This is a structural diagram of an audio playback device provided in an embodiment of the present application. The audio playback device 100 includes: a storage module 110 , a control module 120 and an output module 130 .

[0079] The storage module 110 is used to store the audio to be played into a preset buffer pool.

[0080] The control module 120 controls the audio track to enable the preset virtual device to obtain the audio to be played from the buffer pool; wherein a corresponding relationship is pre-established between the audio track and the virtual device, and the virtual device corresponds to the playback device.

[0081] The output module 130 is configured to send the audio to be played to a playback device corresponding to the virtual device based on the virtual device, so that the corresponding playback device plays the audio to be played.

[0082] The audio playback device 100 further includes an association module 140, which is used to apply for an audio track, determine a virtual device corresponding to the playback device, and establish a corresponding relationship between the corresponding virtual device and the audio track. The audio track is used to control the virtual device corresponding to it to obtain the audio to be played.

[0083] The control module 120 is also used to control the virtual device to stop obtaining the audio to be played from the buffer pool based on the audio track; or to control the virtual device to stop sending the audio to be played to the corresponding playback device based on the audio track; or to pause writing the audio to be played into the buffer pool to pause playing the audio to be played.

[0084] The association module 140 is further configured to release the correspondence between the audio track and the virtual device, so that the playback device stops playing the audio.

[0085] The virtual device includes a first virtual device and multiple second virtual devices, each corresponding to a different playback device. The control module 120 is further configured to: based on the control of the audio track, cause the first virtual device to obtain the audio to be played from the buffer pool; copy the audio to be played based on the first virtual device to obtain multiple identical audio to be played, the number of copies being the same as the number of second virtual devices; and send the multiple identical audio to be played to each second virtual device, so that each second virtual device sends the audio to its corresponding playback device.

[0086] The association module 140 is further configured to determine a second virtual device corresponding to the target playback device; and establish a binding relationship between the second virtual device and the first virtual device, so as to play the audio to be played based on the target playback device.

[0087] It can be understood that the functions implemented by the audio playback device 100 correspond to the audio playback method. For specific implementation details, reference may be made to the audio playback method, which will not be described in detail here.

[0088] Based on the same inventive concept, the present application embodiment provides an embedded device, see Figure 4 , 0 Figure 4This is a structural diagram of an embedded device provided in an embodiment of the present application, wherein the embedded device 200

[0089] It includes: a communication module 210 and a processing module 220 .

[0090] The communication module 210 is used to enable the embedded device to communicate with various playback devices.

[0091] The communication module 210 includes but is not limited to a Bluetooth module, a wireless communication module, an I / O module or other modules for communication.

[0092] The processing module 220 is configured to execute the audio playback method provided in any of the above embodiments or implement the functions of the above audio playback device.

[0093] In one embodiment, the embedded device 200 may be a smart watch.

[0094] Based on the same inventive concept, the embodiment of the present application further provides a computer-readable storage medium,

[0095] A computer program is stored thereon, and when the computer program is run, the method 0 provided in the above embodiment is executed.

[0096] The storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media. The available medium can be a magnetic medium (such as a floppy disk, hard disk, or tape), an optical medium (such as a DVD), or a semiconductor medium (such as an SSD (Solid State Disk)).

[0097] In the embodiments provided herein, it should be understood that the disclosed methods may also be implemented in other ways. The functional modules in the various embodiments of the present application may be integrated together to form an independent component, or each module may exist independently, or two or more modules may be integrated to form an independent component.

[0098] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a ROM (Read-Only Memory), a RAM (Random Access Memory), a magnetic disk or an optical disk.

[0099] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in the present application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.

[0100] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.

Claims

1. An audio playback method, characterized in that: Applied to embedded devices, the audio playback method includes: Store the audio to be played in a preset buffer pool; Based on the control of the audio track, a preset virtual device is caused to obtain the audio to be played from the buffer pool; wherein a correspondence is pre-established between the audio track and a plurality of the virtual devices, and each of the virtual devices corresponds to a different playback device; Sending the audio to be played to a playback device corresponding to the virtual device based on the virtual device, so that the corresponding playback device plays the audio to be played; The virtual device includes a first virtual device and multiple second virtual devices, each of which corresponds to a different playback device; the track-based control, which enables the preset virtual device to obtain the audio to be played from the buffer pool, includes: Based on the control of the audio track, the first virtual device obtains the audio to be played from the buffer pool; duplicating the audio to be played based on the first virtual device to obtain a plurality of identical audios to be played, the number of the duplicates being the same as the number of the second virtual devices; A plurality of identical audios to be played are sent to each of the second virtual devices respectively, so that each of the second virtual devices is sent to its corresponding playback device respectively.

2. The method according to claim 1, characterized in that Before storing the audio to be played into the buffer pool, the method includes: Apply for audio track; Determining a virtual device corresponding to the playback device; A correspondence between the corresponding virtual device and the audio track is established, and the audio track is used to control the virtual device with which the correspondence is established to obtain the audio to be played.

3. The method according to claim 1, wherein After sending the audio to be played to the playback device corresponding to the virtual device based on the virtual device, the method further includes: Controlling the virtual device to stop acquiring the to-be-played audio from the buffer pool based on the audio track; or Controlling the virtual device to stop sending the to-be-played audio to the corresponding playback device based on the audio track; or The writing of the audio to be played into the buffer pool is paused to pause the playing of the audio to be played.

4. The method according to claim 1, wherein After sending the plurality of identical audios to be played to the second virtual devices respectively, and sending the audios to be played to the playback devices corresponding to the virtual devices based on the virtual devices, the method further includes: The corresponding relationship between the audio track and the virtual device is released, so that the playback device stops playing the audio.

5. The method according to claim 1, wherein Before sending the plurality of identical audios to be played to the respective second virtual devices, the method further includes: Determine a second virtual device corresponding to the target playback device; A binding relationship is established between the corresponding second virtual device and the first virtual device, so as to play the audio to be played based on the target playback device.

6. An audio playback device, characterized in that: include: A storage module is used to store the audio to be played in a preset buffer pool; A control module, configured to control a preset virtual device to obtain the audio to be played from the buffer pool based on the control of the audio track; wherein a correspondence is pre-established between the audio track and the virtual device, and the virtual device corresponds to the playback device; an output module, configured to send the audio to be played to a playback device corresponding to the virtual device based on the virtual device, so that the corresponding playback device plays the audio to be played; The virtual device includes a first virtual device and multiple second virtual devices, each of which corresponds to a different playback device; the control module is used to: based on the control of the audio track, enable the first virtual device to obtain the audio to be played from the buffer pool; based on the first virtual device, copy the audio to be played to obtain multiple identical audios to be played, and the number of copies is the same as the number of second virtual devices; and send the multiple identical audios to be played to each second virtual device respectively, so that each second virtual device sends them to its corresponding playback device.

7. An embedded device, characterized in that: include: Communication module, used to establish communication connections with different playback devices; A processing module, configured to execute the method according to any one of claims 1 to 5.

8. The embedded device according to claim 7, wherein: The embedded device is a smart watch.

9. A computer-readable storage medium, characterized in that The readable storage medium stores a computer program, and when the computer program is run on a computer, the computer is enabled to execute the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Call method using multiple audio devices and electronic device

    CN114785886A