A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://patents.google.com/patent/CN113223539B/en below:

CN113223539B - Audio transmission method and electronic equipment

具体实施方式Detailed ways

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some of the embodiments of the present invention, but not all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.

本发明实施例提供了一种音频传输方法,所述方法应用于第一电子设备,该第一电子设备可以是指手机、平板电脑、车载电脑、电子书阅读器、MP3播放器、MP4播放器、膝上型便携计算机、台式计算机、智能电视机、可穿戴设备等能够传输音频的设备,本实施例不做过多举例。An embodiment of the present invention provides an audio transmission method, the method is applied to a first electronic device, and the first electronic device may refer to a mobile phone, a tablet computer, a vehicle-mounted computer, an e-book reader, an MP3 player, or an MP4 player , laptop portable computer, desktop computer, smart TV, wearable device and other devices capable of transmitting audio, this embodiment does not give too many examples.

请参见图1,图1是本发明实施例提供的一种音频传输方法的流程图,如图1所示,所述音频传输方法包括以下步骤:Please refer to FIG. 1. FIG. 1 is a flowchart of an audio transmission method provided by an embodiment of the present invention. As shown in FIG. 1, the audio transmission method includes the following steps:

步骤101、解码音频文件为第一声道音频信号和第二声道音频信号。 Step 101, decode an audio file into a first channel audio signal and a second channel audio signal.

容易理解地,所述音频文件可以是歌曲、视频文件中的音频等;所述音频文件可以是存储于第一电子设备中,或者也可以是第一电子设备的应用程序中包含的音频文件。在其他的一些实施方式中,所述音频文件也可以被称之为音源文件、音源信息、声音文件等。It is easy to understand that the audio file may be a song, audio in a video file, etc.; the audio file may be stored in the first electronic device, or may also be an audio file contained in an application program of the first electronic device. In some other implementation manners, the audio files may also be called audio source files, audio source information, sound files, and so on.

本步骤中,第一电子设备可以是在获取到音频文件的情况下,将所述音频文件解码为第一声道音频信号和第二声道音频信号。可选地,所述第一声道音频信号可以是指左声道音频信号,所述第二声道音频信号可以是指右声道音频信号。例如,第一电子设备可以是对获取的音频文件进行解码,将所述音频文件解码为左声道音频信号和右声道音频信号。要说明的是,所述音频文件中的每一个子文件都携带有左声道音源标识或是右声道音源标识,进而以方便第一电子设备对子文件的识别,以将音频文件解码为左声道音频信号和右声道音频信号。所述第一电子设备对音频文件的具体解码操作可以是参考相关技术,本实施例对此不做赘述。In this step, the first electronic device may decode the audio file into a first channel audio signal and a second channel audio signal if the audio file is acquired. Optionally, the first channel audio signal may refer to a left channel audio signal, and the second channel audio signal may refer to a right channel audio signal. For example, the first electronic device may decode the acquired audio file, and decode the audio file into a left channel audio signal and a right channel audio signal. It should be noted that each sub-file in the audio file carries a left-channel audio source identifier or a right-channel audio source identifier, so that the first electronic device can easily identify the sub-file and decode the audio file into A left channel audio signal and a right channel audio signal. For the specific decoding operation of the audio file by the first electronic device, reference may be made to related technologies, which will not be described in detail in this embodiment.

步骤102、通过第一无线芯片对所述第一声道音频信号进行编码后发送给第二电子设备的第一声道播放装置。Step 102: Encode the audio signal of the first channel through the first wireless chip and send it to the first channel playing device of the second electronic device.

需要说明的是,所述第二电子设备可以是指能够接收所述音频文件,并对所述音频文件进行播放的音频播放设备,如耳机、音响等。It should be noted that the second electronic device may refer to an audio playback device capable of receiving the audio file and playing the audio file, such as earphones, stereos, and the like.

本发明实施例中,第一电子设备在将音频文件解码为第一声道音频信号和第二声道音频信号后,可以是将第一声道音频信号传输给第一无线芯片,并通过第一无线芯片对第一声道音频信号进行编码,并通过第一无线芯片将编码后的第一声道音频信号发送给第二电子设备的第一声道播放装置。In the embodiment of the present invention, after the first electronic device decodes the audio file into the first channel audio signal and the second channel audio signal, it may transmit the first channel audio signal to the first wireless chip, and pass the first channel audio signal to the first wireless chip. A wireless chip encodes the first channel audio signal, and sends the encoded first channel audio signal to the first channel playing device of the second electronic device through the first wireless chip.

步骤103、通过第二无线芯片对所述第二声道音频信号进行编码后发送给所述第二电子设备的第二声道播放装置。Step 103: Encode the audio signal of the second channel through the second wireless chip and send it to the second channel playing device of the second electronic device.

可以理解地,第一电子设备通过第二无线芯片对第二声道音频信号进行编码后发送给第二电子设备的第二声道播放装置,进而使得音频文件可以解码为两部分,并通过两个无线芯片来分别发送。这样,相比于现有的音频文件只能通过一个无线芯片来进行发送,本发明实施例提供的方案,也就将音频的传输通道扩展了一倍,也就更有利于数据量大的音频文件的传输,确保音频文件的传输质量。Understandably, the first electronic device encodes the second-channel audio signal through the second wireless chip and sends it to the second-channel playback device of the second electronic device, so that the audio file can be decoded into two parts, and the Each wireless chip is sent separately. In this way, compared to the existing audio files that can only be sent through a wireless chip, the solution provided by the embodiment of the present invention doubles the audio transmission channel, which is more conducive to audio files with a large amount of data. The transmission of files ensures the transmission quality of audio files.

可选地,所述第一无线芯片和第二无线芯片均为蓝牙芯片。这样,在现有的蓝牙技术和蓝牙协议的基础上,第一电子设备通过设置两个蓝牙芯片,将音频文件能够解码为两部分,分别通过两个蓝牙芯片分别进行编码和传送,这样也就将第一电子设备中音频的传输通道扩展了一倍,传输带宽也提升了一倍,进而可以不用对音频文件进行压缩操作,不会造成音频文件的音质受损,保证了音频文件的传输质量,确保了音频文件的播放效果,为用户带来更好的听觉体验。Optionally, both the first wireless chip and the second wireless chip are Bluetooth chips. In this way, on the basis of the existing bluetooth technology and bluetooth protocol, the first electronic device can decode the audio file into two parts by setting two bluetooth chips, and encode and transmit the audio file respectively through the two bluetooth chips. The audio transmission channel in the first electronic device is doubled, and the transmission bandwidth is also doubled, so that the audio file can not be compressed, and the sound quality of the audio file will not be damaged, ensuring the transmission quality of the audio file , ensuring the playback effect of the audio file and bringing a better listening experience to the user.

可选地,在一种具体的实施方式中,所述第一声道音频信号为左声道音频信号,所述第二声道音频信号为右声道音频信号,所述第二电子设备为音频播放设备,所述第二电子设备的第一声道播放装置为左声道播放装置,第二声道播放装置为右声道播放装置。例如,第一无线芯片为第一蓝牙芯片,第二无线芯片为第二蓝牙芯片,音频播放设备为蓝牙耳机,那么蓝牙耳机的左声道播放装置为左耳机,右声道播放装置为右耳机。本实施方式中,第一电子设备能够将音频文件解码为左声道音频信号和右声道音频信号,并通过第一蓝牙芯片对左声道音频信号进行编码后发送给蓝牙耳机的左耳机,通过第二蓝牙芯片对右声道音频信号进行编码后发送给蓝牙耳机的右耳机。Optionally, in a specific implementation manner, the first channel audio signal is a left channel audio signal, the second channel audio signal is a right channel audio signal, and the second electronic device is In the audio playback device, the first channel playback device of the second electronic device is a left channel playback device, and the second channel playback device is a right channel playback device. For example, the first wireless chip is the first bluetooth chip, the second wireless chip is the second bluetooth chip, and the audio playback device is a bluetooth earphone, then the left channel playback device of the bluetooth earphone is the left earphone, and the right channel playback device is the right earphone . In this embodiment, the first electronic device can decode the audio file into a left channel audio signal and a right channel audio signal, and encode the left channel audio signal through the first Bluetooth chip and send it to the left earphone of the Bluetooth earphone, The right channel audio signal is encoded by the second bluetooth chip and sent to the right earphone of the bluetooth earphone.

需要说明的是,蓝牙的传输带宽大约为3Mbps,在只有一个蓝牙芯片的情况下,这就限定了左右声道音频信号所能获得的传输带宽最大为1.5Mbps。而本发明实施例提供的方案,第一电子设备能够通过两个独立的蓝牙芯片,分别向蓝牙耳机的左耳机发送左声道音频信号,向蓝牙耳机的右耳机发送右声道音频信号,使得左右声道音频信号都能享受3Mbps的传输带宽,这样也就提升了音频文件的传输带宽,保证了音频文件的传输质量,避免音频文件音质受损。It should be noted that the transmission bandwidth of Bluetooth is about 3Mbps. In the case of only one Bluetooth chip, this limits the transmission bandwidth of the left and right channel audio signals to a maximum of 1.5Mbps. In the solution provided by the embodiment of the present invention, the first electronic device can send the left channel audio signal to the left earphone of the Bluetooth earphone and the right channel audio signal to the right earphone of the Bluetooth earphone through two independent bluetooth chips, so that Both left and right channel audio signals can enjoy a transmission bandwidth of 3Mbps, which increases the transmission bandwidth of audio files, ensures the transmission quality of audio files, and avoids damage to the sound quality of audio files.

另外,第一电子设备能够根据蓝牙耳机的播放特征,将左右声道音频信号分别发送至对应的左右耳机,相比于现有蓝牙耳机的左右耳机接收的是压缩在一起的包括左右声道音频信号的打包文件,本发明提供的方案也就使得蓝牙耳机无需对音频文件进行解压操作,也无需在解压之后再提取对应的左右声道音频信号,简化了蓝牙耳机对音频文件的处理操作。In addition, the first electronic device can send the left and right channel audio signals to the corresponding left and right earphones respectively according to the playback characteristics of the Bluetooth earphones. Signal packaging files, the solution provided by the present invention also makes it unnecessary for the Bluetooth headset to decompress the audio file, and does not need to extract the corresponding left and right channel audio signals after decompression, which simplifies the processing operation of the Bluetooth headset on the audio file.

需要说明的是,以上只是以蓝牙芯片、蓝牙耳机为例作为本发明的一种具体实施方式作为说明,本发明中的第一无线芯片、第二无线芯片以及音频播放设备还可以是其他的实施方式,例如第一无线芯片及第二无线芯片还可以是无线保真(Wireless-Fidelity,WIFI)芯片,或者是超宽带(Ultra Wide Band,UWB)芯片等;所述第二电子设备还可以是无线音响,如蓝牙音响等。It should be noted that the above is just an example of a bluetooth chip and a bluetooth earphone as a specific embodiment of the present invention as an illustration, and the first wireless chip, the second wireless chip and the audio playback device in the present invention can also be other implementations For example, the first wireless chip and the second wireless chip can also be a wireless fidelity (Wireless-Fidelity, WIFI) chip, or an ultra-wideband (Ultra Wide Band, UWB) chip, etc.; the second electronic device can also be Wireless speakers, such as Bluetooth speakers, etc.

可选地,由于第一声道音频信号和第二声道音频信号分别是通过第一无线芯片和第二无线芯片进行编码和发送,那么第一无线芯片对第一声道音频信号的编码和发送,可以是与第二无线芯片对第二声道音频信号的编码和发送同时进行,或者也可以是基于第二电子设备的工作状态分别进行。Optionally, since the audio signal of the first channel and the audio signal of the second channel are encoded and sent through the first wireless chip and the second wireless chip respectively, the first wireless chip encodes and transmits the audio signal of the first channel The sending may be performed simultaneously with the encoding and sending of the second channel audio signal by the second wireless chip, or may be performed separately based on the working state of the second electronic device.

例如,在所述第二电子设备为耳机,所述左声道播放装置为左耳机,所述右声道播放装置为右耳机的情况下,所述第一电子设备可以是获取左耳机和右耳机的工作状态,再根据左耳机和右耳机的工作状态来执行相应的操作。具体地,所述步骤102可以包括:For example, in the case where the second electronic device is an earphone, the left-channel playing device is a left earphone, and the right-channel playing device is a right earphone, the first electronic device may obtain the left earphone and the right earphone. The working status of the earphone, and then perform corresponding operations according to the working status of the left earphone and the right earphone. Specifically, the step 102 may include:

在所述耳机的左耳机处于使用状态且所述耳机的右耳机处于未使用状态的情况下,通过所述第一无线芯片对所述左声道音频信号进行编码后发送给所述左耳机;When the left earphone of the earphone is in use and the right earphone of the earphone is not in use, the left channel audio signal is encoded by the first wireless chip and then sent to the left earphone;

所述步骤103包括:The step 103 includes:

在所述耳机的右耳机处于使用状态且所述耳机的左耳机处于未使用状态的情况下,通过所述第二无线芯片对所述右声道音频信号进行编码后发送给所述右耳机。When the right earphone of the earphone is in use and the left earphone of the earphone is not in use, the right channel audio signal is encoded by the second wireless chip and sent to the right earphone.

可选地,左耳机及右耳机可以是分别设置有启动开关,若启动开关开启,则对应的左耳机或右耳机处于使用状态,若启动开关未开启,则对应的左耳机或右耳机处于未使用状态。第一电子设备可以是通过耳机发送的信号来获知耳机的工作状态。或者,耳机的左耳机和右耳机可以是分别安装有红外传感器,通过红外传感器来检测左耳机或右耳机是否与用户的左耳或右耳接触,以确定左耳机及右耳机是处于使用状态还是处于非使用状态。Optionally, the left earphone and the right earphone can be respectively provided with start switches, if the start switch is turned on, then the corresponding left earphone or right earphone is in use state, if the start switch is not turned on, then the corresponding left earphone or right earphone is in the off state. status of use. The first electronic device may learn the working state of the earphone through a signal sent by the earphone. Or, the left earphone and the right earphone of the earphone can be equipped with infrared sensors respectively, and detect whether the left earphone or the right earphone is in contact with the user's left ear or right ear through the infrared sensor, so as to determine whether the left earphone and the right earphone are in use or not. is not in use.

例如,当检测到左耳机与用户的左耳接触且右耳机脱离用户右耳时,则说明用户此时正在或者需要使用左耳机,则第一电子设备通过第一无线芯片对左声道音频信号进行编码后发送给所述左耳机;当检测到右耳机与用户的右耳接触且左耳机脱离用户左耳时,说明用户此时正在或者需要使用右耳机,则第一电子设备通过第二无线芯片对右声道音频信号进行编码后发送给所述右耳机。这样,也就能够根据对耳机中左右耳机的工作状态,来发送对应的左右声道音频信号,在左耳机或右耳机处于未使用状态时,可以不向左耳机或右耳机发送音频信号,进而能够避免使用不必要的传输带宽,降低第一电子设备的使用功耗。当然,若左耳机和右耳机都处于使用状态,则第一电子设备能够通过第一无线芯片向左耳机发送编码后的左声道音频信号,同时通过第二无线芯片向右耳机发送编码后的右声道音频信号。For example, when it is detected that the left earphone is in contact with the user's left ear and the right earphone is out of the user's right ear, it means that the user is using or needs to use the left earphone at this time, and the first electronic device transmits the left channel audio signal through the first wireless chip. After encoding, send it to the left earphone; when it is detected that the right earphone is in contact with the user's right ear and the left earphone is out of the user's left ear, it means that the user is using or needs to use the right earphone at this time, then the first electronic device passes the second wireless The chip encodes the right channel audio signal and sends it to the right earphone. In this way, it is also possible to send the corresponding left and right channel audio signals according to the working status of the left and right earphones in the earphone. The use of unnecessary transmission bandwidth can be avoided, and the power consumption of the first electronic device can be reduced. Of course, if both the left earphone and the right earphone are in use, the first electronic device can send the encoded left channel audio signal to the left earphone through the first wireless chip, and at the same time send the encoded audio signal to the right earphone through the second wireless chip. Right channel audio signal.

本发明实施例提供的音频传输方法,第一电子设备能够解码音频文件为第一声道音频信号和第二声道音频信号,并通过第一无线芯片对第一声道音频信号编码后发送给第二电子设备的第一声道播放装置,通过第二无线芯片对第二声道音频信号编码后发送给第二电子设备的第二声道播放装置。这样,也就将第一电子设备中音频的传输通道扩展了一倍,传输带宽也提升了一倍,进而能够提升音频文件的传输质量,确保音频文件的播放效果,为用户带来更好的听觉体验。In the audio transmission method provided by the embodiment of the present invention, the first electronic device can decode the audio file into the first channel audio signal and the second channel audio signal, and encode the first channel audio signal through the first wireless chip and send it to The device for playing the first channel of the second electronic device encodes the audio signal of the second channel through the second wireless chip and sends it to the device for playing the second channel of the second electronic device. In this way, the audio transmission channel in the first electronic device is also doubled, and the transmission bandwidth is also doubled, thereby improving the transmission quality of audio files, ensuring the playback effect of audio files, and bringing users better auditory experience.

为更好地理解本发明实施例的方案,以下将以第一无线芯片为第一蓝牙芯片,第二无线芯片为第二蓝牙芯片,第二电子设备为蓝牙耳机为例进行具体说明。请参照图2,第一电子设备将音频文件经解码后脉冲编码调制(Pulse CodeModulation,PCM)传输形成左声道音频文件(L)和右声道音频文件(R),并通过第一蓝牙芯片对左声道音频文件(L)进行处理,通过第二蓝牙芯片对右声道音频文件(R)进行处理。In order to better understand the solutions of the embodiments of the present invention, the following will take the first wireless chip as the first Bluetooth chip, the second wireless chip as the second Bluetooth chip, and the second electronic device as a Bluetooth headset as examples for specific description. Please refer to Fig. 2, the first electronic device forms the left channel audio file (L) and the right channel audio file (R) after the audio file is decoded and then pulse code modulation (Pulse Code Modulation, PCM) transmission, and through the first bluetooth chip The left channel audio file (L) is processed, and the right channel audio file (R) is processed through the second bluetooth chip.

具体地,第一蓝牙芯片通过声音Audio应用层接收左声道音频文件(L);通过蓝牙音频传输模型协定(Advanced Audio Distribution Profile,A2DP)和音频/视频在蓝牙设备间的传输协议(Audio/Video Distribution TransportProtocol,AVDTP)对左声道音频文件(L)进行编码并通过基带单元和射频单元传输给蓝牙耳机的左耳机。需要说明的是,第一蓝牙芯片还包括遵循的其他协议及控制层,如会话描述协议(Session DescriptionProtocol,SDP)、可切换的媒体访问控制器和物理层(Alternate Media AccessController/PhysicalLayer,AMP)、逻辑链路控制和适配层协议(Logical Link Controland AdaptationLayer Protocol,L2CAP)、人机交互(Human–Computer Interaction,HCI)控制面、链路管理协议(Link Manager Protocol,LMP)、比特流(Bit Torrent,BT)基带控制层、端口物理层(Physical,PHY)等,第一蓝牙芯片的具体工作原理可以是参考相关技术,本实施例对此不做赘述。另外,第二蓝牙芯片的相关结构及工作原理与第一蓝牙芯片一致,可以参考上述描述,本实施例不再赘述。第二蓝牙芯片在接收到右声道音频文件(R)后,基于相关的蓝牙协议及蓝牙技术对其进行编码等操作后,传输给蓝牙耳机的右耳机。这样,也就使得第一电子设备能够通过两个蓝牙芯片来分别传输左声道音频文件(L)和右声道音频文件(R),扩展了第一电子设备的音频传输通道,进而能够提升音频文件的传输质量,避免对音频文件音质的损害,确保音频文件的音质效果。Specifically, the first bluetooth chip receives the left channel audio file (L) through the sound Audio application layer; Video Distribution Transport Protocol, AVDTP) encodes the left channel audio file (L) and transmits it to the left earphone of the Bluetooth headset through the baseband unit and the radio frequency unit. It should be noted that the first bluetooth chip also includes other protocols and control layers followed, such as Session Description Protocol (Session Description Protocol, SDP), switchable media access controller and physical layer (Alternate Media Access Controller/PhysicalLayer, AMP), Logical Link Control and Adaptation Layer Protocol (L2CAP), Human–Computer Interaction (HCI) control plane, Link Manager Protocol (LMP), Bit Torrent (Bit Torrent) , BT) baseband control layer, port physical layer (Physical, PHY), etc. The specific working principle of the first Bluetooth chip can refer to related technologies, which will not be described in this embodiment. In addition, the related structure and working principle of the second bluetooth chip are consistent with those of the first bluetooth chip, and reference may be made to the above description, which will not be repeated in this embodiment. After the second bluetooth chip receives the right channel audio file (R), it is transmitted to the right earphone of the bluetooth earphone after encoding and other operations based on the relevant bluetooth protocol and bluetooth technology. In this way, the first electronic device can transmit the left channel audio file (L) and the right channel audio file (R) respectively through the two bluetooth chips, expanding the audio transmission channel of the first electronic device, thereby improving the The transmission quality of the audio file avoids damage to the sound quality of the audio file and ensures the sound quality of the audio file.

请参见图3,图3是本发明实施例提供的一种电子设备的结构图,所述电子设备为第一电子设备。如图3所示,所述电子设备300包括:Please refer to FIG. 3 . FIG. 3 is a structural diagram of an electronic device provided by an embodiment of the present invention, and the electronic device is a first electronic device. As shown in FIG. 3, the electronic device 300 includes:

解码芯片301,用于解码音频文件为第一声道音频信号和第二声道音频信号;The decoding chip 301 is used to decode the audio file into a first channel audio signal and a second channel audio signal;

第一无线芯片302,用于对所述第一声道音频信号进行编码后发送给第二电子设备的第一声道播放装置;The first wireless chip 302 is configured to encode the first channel audio signal and send it to the first channel playback device of the second electronic device;

第二无线芯片303,用于对所述第二声道音频信号进行编码后发送给所述第二电子设备的第二声道播放装置。The second wireless chip 303 is configured to encode the second channel audio signal and send it to the second channel playing device of the second electronic device.

可选的,所述第一声道音频信号为左声道音频信号,所述第二声道音频信号为右声道音频信号,所述第一声道播放装置为左声道播放装置,所述第二声道播放装置为右声道播放装置。Optionally, the first channel audio signal is a left channel audio signal, the second channel audio signal is a right channel audio signal, and the first channel playback device is a left channel playback device, so The second channel playback device is a right channel playback device.

可选的,所述第二电子设备为耳机,所述左声道播放装置为左耳机,所述右声道播放装置为右耳机;Optionally, the second electronic device is an earphone, the left channel playback device is a left earphone, and the right channel playback device is a right earphone;

所述第一无线芯片302还用于:在所述耳机的左耳机处于使用状态且所述耳机的右耳机处于未使用状态的情况下,对所述左声道音频信号进行编码后发送给所述左耳机;The first wireless chip 302 is also used for: when the left earphone of the earphone is in use and the right earphone of the earphone is not in use, encode the audio signal of the left channel and send it to the the left earphone;

所述第二无线芯片303还用于:在所述耳机的右耳机处于使用状态且所述耳机的左耳机处于未使用状态的情况下,对所述右声道音频信号进行编码后发送给所述右耳机。The second wireless chip 303 is also used for: when the right earphone of the earphone is in use and the left earphone of the earphone is not in use, encode the audio signal of the right channel and send it to the to the right earphone.

可选的,所述第一无线芯片及所述第二无线芯片均为蓝牙芯片。Optionally, both the first wireless chip and the second wireless chip are Bluetooth chips.

需要说明的是,电子设备300能够实现图1所述的音频传输方法实施例的各个过程,并能达到相同的技术效果,为避免重复,这里不再赘述。It should be noted that the electronic device 300 can implement various processes of the embodiment of the audio transmission method described in FIG. 1 and can achieve the same technical effect. To avoid repetition, details are not repeated here.

本发明实施例中,电子设备300能够解码音频文件为第一声道音频信号和第二声道音频信号,并通过第一无线芯片对第一声道音频信号编码后发送给第二电子设备的第一声道播放装置,通过第二无线芯片对第二声道音频信号编码后发送给第二电子设备的第二声道播放装置。这样,也就将电子设备300中音频的传输通道扩展了一倍,传输带宽也提升了一倍,进而能够提升音频文件的传输质量,确保音频文件的播放效果,为用户带来更好的听觉体验。In the embodiment of the present invention, the electronic device 300 can decode the audio file into the first channel audio signal and the second channel audio signal, and encode the first channel audio signal through the first wireless chip and send it to the second electronic device. The device for playing the first channel encodes the audio signal of the second channel through the second wireless chip and sends it to the device for playing the second channel of the second electronic device. In this way, the audio transmission channel in the electronic device 300 is doubled, and the transmission bandwidth is also doubled, thereby improving the transmission quality of the audio file, ensuring the playback effect of the audio file, and bringing better hearing to the user experience.

请参照图4,图4为实现本发明实施例的另一种电子设备的结构图。如图4所示,电子设备400包括但不限于:射频单元401、网络模块402、音频输出单元403、输入单元404、传感器405、显示单元406、用户输入单元407、接口单元408、存储器409、处理器410、以及电源411等部件。本领域技术人员可以理解,图4中示出的电子设备结构并不构成对电子设备的限定,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。在本发明实施例中,电子设备包括但不限于手机、平板电脑、笔记本电脑、掌上电脑、车载终端、可穿戴设备、以及计步器等。Please refer to FIG. 4 , which is a structural diagram of another electronic device implementing an embodiment of the present invention. As shown in Figure 4, the electronic device 400 includes, but is not limited to: a radio frequency unit 401, a network module 402, an audio output unit 403, an input unit 404, a sensor 405, a display unit 406, a user input unit 407, an interface unit 408, a memory 409, A processor 410, a power supply 411 and other components. Those skilled in the art can understand that the structure of the electronic device shown in Figure 4 does not constitute a limitation on the electronic device, and the electronic device may include more or less components than shown in the illustration, or combine some components, or different components layout. In the embodiment of the present invention, electronic devices include but are not limited to mobile phones, tablet computers, notebook computers, palmtop computers, vehicle-mounted terminals, wearable devices, and pedometers.

本发明实施例中,所述电子设备400为第一电子设备,所述电子设备400包括第一无线芯片和第二无线芯片;其中,所述处理器410用于:In the embodiment of the present invention, the electronic device 400 is a first electronic device, and the electronic device 400 includes a first wireless chip and a second wireless chip; wherein, the processor 410 is configured to:

解码音频文件为第一声道音频信号和第二声道音频信号;Decoding the audio file into a first channel audio signal and a second channel audio signal;

通过所述第一无线芯片对所述第一声道音频信号进行编码后发送给第二电子设备的第一声道播放装置;Encoding the first channel audio signal through the first wireless chip and sending it to the first channel playing device of the second electronic device;

通过所述第二无线芯片对所述第二声道音频信号进行编码后发送给所述第二电子设备的第二声道播放装置。The audio signal of the second channel is encoded by the second wireless chip and sent to the second channel playing device of the second electronic device.

可选的,所述第一声道音频信号为左声道音频信号,所述第二声道音频信号为右声道音频信号,所述第一声道播放装置为左声道播放装置,所述第二声道播放装置为右声道播放装置。Optionally, the first channel audio signal is a left channel audio signal, the second channel audio signal is a right channel audio signal, and the first channel playback device is a left channel playback device, so The second channel playback device is a right channel playback device.

可选的,所述第二电子设备为耳机,所述左声道播放装置为左耳机,所述右声道播放装置为右耳机;处理器410,还用于:Optionally, the second electronic device is an earphone, the left channel playback device is a left earphone, and the right channel playback device is a right earphone; the processor 410 is further configured to:

在所述耳机的左耳机处于使用状态且所述耳机的右耳机处于未使用状态的情况下,通过所述第一无线芯片对所述左声道音频信号进行编码后发送给所述左耳机;When the left earphone of the earphone is in use and the right earphone of the earphone is not in use, the left channel audio signal is encoded by the first wireless chip and then sent to the left earphone;

在所述耳机的右耳机处于使用状态且所述耳机的左耳机处于未使用状态的情况下,通过所述第二无线芯片对所述右声道音频信号进行编码后发送给所述右耳机。When the right earphone of the earphone is in use and the left earphone of the earphone is not in use, the right channel audio signal is encoded by the second wireless chip and sent to the right earphone.

可选的,所述第一无线芯片及所述第二无线芯片均为蓝牙芯片。Optionally, both the first wireless chip and the second wireless chip are Bluetooth chips.

需要说明的是,在这种实施方式中,电子设备400能够实现图1所述的音频传输方法实施例的各个过程,并能达到相同的技术效果,为避免重复,这里不再赘述。It should be noted that, in this implementation manner, the electronic device 400 can implement each process of the embodiment of the audio transmission method described in FIG. 1 and achieve the same technical effect. To avoid repetition, details are not repeated here.

应理解的是,本发明实施例中,射频单元401可用于收发信息或通话过程中,信号的接收和发送,具体的,将来自基站的下行数据接收后,给处理器410处理;另外,将上行的数据发送给基站。通常,射频单元401包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器、双工器等。此外,射频单元401还可以通过无线通信系统与网络和其他设备通信。It should be understood that, in the embodiment of the present invention, the radio frequency unit 401 can be used for receiving and sending signals during sending and receiving information or during a call. Specifically, the downlink data from the base station is received and processed by the processor 410; Uplink data is sent to the base station. Generally, the radio frequency unit 401 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 401 can also communicate with the network and other devices through a wireless communication system.

电子设备400通过网络模块402为用户提供了无线的宽带互联网访问,如帮助用户收发电子邮件、浏览网页和访问流式媒体等。The electronic device 400 provides users with wireless broadband Internet access through the network module 402 , such as helping users send and receive emails, browse web pages, and access streaming media.

音频输出单元403可以将射频单元401或网络模块402接收的或者在存储器409中存储的音频数据转换成音频信号并且输出为声音。而且,音频输出单元403还可以提供与电子设备400执行的特定功能相关的音频输出(例如,呼叫信号接收声音、消息接收声音等等)。音频输出单元403包括扬声器、蜂鸣器以及受话器等。The audio output unit 403 may convert audio data received by the radio frequency unit 401 or the network module 402 or stored in the memory 409 into an audio signal and output as sound. Also, the audio output unit 403 may also provide audio output related to a specific function performed by the electronic device 400 (eg, call signal reception sound, message reception sound, etc.). The audio output unit 403 includes a speaker, a buzzer, a receiver, and the like.

输入单元404用于接收音频或视频信号。输入单元404可以包括图形处理器(Graphics Processing Unit,GPU)4041和麦克风4042,图形处理器4041对在视频捕获模式或图像捕获模式中由图像捕获装置(如摄像头)获得的静态图像或视频的图像数据进行处理。处理后的图像帧可以显示在显示单元406上。经图形处理器4041处理后的图像帧可以存储在存储器409(或其它计算机可读存储介质)中或者经由射频单元401或网络模块402进行发送。麦克风4042可以接收声音,并且能够将这样的声音处理为音频数据。处理后的音频数据可以在电话通话模式的情况下转换为可经由射频单元401发送到移动通信基站的格式输出。The input unit 404 is used for receiving audio or video signals. The input unit 404 can include a graphics processing unit (Graphics Processing Unit, GPU) 4041 and a microphone 4042, and the graphics processing unit 4041 is used for still images or video images obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The data is processed. The processed image frames may be displayed on the display unit 406 . The image frames processed by the graphics processor 4041 may be stored in the memory 409 (or other computer-readable storage medium) or sent via the radio frequency unit 401 or the network module 402 . The microphone 4042 can receive sound, and can process such sound into audio data. The processed audio data can be converted into a format that can be sent to a mobile communication base station via the radio frequency unit 401 for output in the case of a phone call mode.

电子设备400还包括至少一种传感器405,比如光传感器、运动传感器以及其他传感器。具体地,光传感器包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板4061的亮度,接近传感器可在电子设备400移动到耳边时,关闭显示面板4061和/或背光。作为运动传感器的一种,加速计传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别电子设备姿态(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;传感器405还可以包括指纹传感器、压力传感器、虹膜传感器、分子传感器、陀螺仪、气压计、湿度计、温度计、红外线传感器等,在此不再赘述。The electronic device 400 also includes at least one sensor 405, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display panel 4061 according to the brightness of the ambient light, and the proximity sensor can turn off the display panel 4061 and the / or backlighting. As a kind of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in various directions (generally three axes), and can detect the magnitude and direction of gravity when it is still, and can be used to identify the posture of electronic equipment (such as horizontal and vertical screen switching, related games) , magnetometer posture calibration), vibration recognition-related functions (such as pedometer, knocking), etc.; the sensor 405 can also include fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, Infrared sensors, etc., will not be repeated here.

显示单元406用于显示由用户输入的信息或提供给用户的信息。显示单元406可包括显示面板4061,可以采用液晶显示器(Liquid Crystal Display,LCD)、有机发光二极管(Organic Light-Emitting Diode,OLED)等形式来配置显示面板4061。The display unit 406 is used to display information input by the user or information provided to the user. The display unit 406 may include a display panel 4061, and the display panel 4061 may be configured in the form of a liquid crystal display (Liquid Crystal Display, LCD), an organic light-emitting diode (Organic Light-Emitting Diode, OLED), or the like.

用户输入单元407可用于接收输入的数字或字符信息,以及产生与电子设备400的用户设置以及功能控制有关的键信号输入。具体地,用户输入单元407包括触控面板4071以及其他输入设备4072。触控面板4071,也称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板4071上或在触控面板4071附近的操作)。触控面板4071可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器410,接收处理器410发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板4071。除了触控面板4071,用户输入单元407还可以包括其他输入设备4072。具体地,其他输入设备4072可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆,在此不再赘述。The user input unit 407 can be used to receive input numbers or character information, and generate key signal input related to user settings and function control of the electronic device 400 . Specifically, the user input unit 407 includes a touch panel 4071 and other input devices 4072 . The touch panel 4071, also referred to as a touch screen, can collect touch operations of the user on or near it (for example, the user uses any suitable object or accessory such as a finger or a stylus on the touch panel 4071 or near the touch panel 4071). operate). The touch panel 4071 may include two parts, a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, and detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and sends it to the For the processor 410, receive the command sent by the processor 410 and execute it. In addition, the touch panel 4071 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 4071 , the user input unit 407 may also include other input devices 4072 . Specifically, other input devices 4072 may include, but are not limited to, physical keyboards, function keys (such as volume control keys, switch keys, etc.), trackballs, mice, and joysticks, which will not be repeated here.

进一步的,触控面板4071可覆盖在显示面板4061上,当触控面板4071检测到在其上或附近的触摸操作后,传送给处理器410以确定触摸事件的类型,随后处理器410根据触摸事件的类型在显示面板4061上提供相应的视觉输出。虽然在图4中,触控面板4071与显示面板4061是作为两个独立的部件来实现电子设备400的输入和输出功能,但是在某些实施例中,可以将触控面板4071与显示面板4061集成而实现电子设备400的输入和输出功能,具体此处不做限定。Furthermore, the touch panel 4071 can be covered on the display panel 4061, and when the touch panel 4071 detects a touch operation on or near it, it will be sent to the processor 410 to determine the type of the touch event, and then the processor 410 will The type of event provides a corresponding visual output on the display panel 4061 . Although in FIG. 4, the touch panel 4071 and the display panel 4061 are used as two independent components to realize the input and output functions of the electronic device 400, but in some embodiments, the touch panel 4071 and the display panel 4061 can be combined The input and output functions of the electronic device 400 are realized through integration, which is not specifically limited here.

接口单元408为外部装置与电子设备400连接的接口。例如,外部装置可以包括有线或无线头戴式耳机端口、外部电源(或电池充电器)端口、有线或无线数据端口、存储卡端口、用于连接具有识别模块的装置的端口、音频输入/输出(I/O)端口、视频I/O端口、耳机端口等等。接口单元408可以用于接收来自外部装置的输入(例如,数据信息、电力等等)并且将接收到的输入传输到电子设备400内的一个或多个元件或者可以用于在电子设备400和外部装置之间传输数据。The interface unit 408 is an interface for connecting an external device to the electronic device 400 . For example, an external device may include a wired or wireless headset port, an external power (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device with an identification module, audio input/output (I/O) ports, video I/O ports, headphone ports, and more. The interface unit 408 can be used to receive input from an external device (for example, data information, power, etc.) transfer data between devices.

存储器409可用于存储软件程序以及各种数据。存储器409可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据手机的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器409可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。The memory 409 can be used to store software programs as well as various data. The memory 409 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application program required by a function (such as a sound playback function, an image playback function, etc.); Data created by the use of mobile phones (such as audio data, phonebook, etc.), etc. In addition, the memory 409 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage devices.

处理器410是电子设备400的控制中心,利用各种接口和线路连接整个电子设备400的各个部分,通过运行或执行存储在存储器409内的软件程序和/或模块,以及调用存储在存储器409内的数据,执行电子设备400的各种功能和处理数据,从而对电子设备400进行整体监控。处理器410可包括一个或多个处理单元;优选的,处理器410可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器410中。The processor 410 is the control center of the electronic device 400, and uses various interfaces and lines to connect various parts of the entire electronic device 400, by running or executing software programs and/or modules stored in the memory 409, and calling Execute various functions of the electronic device 400 and process data, so as to monitor the electronic device 400 as a whole. The processor 410 may include one or more processing units; preferably, the processor 410 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface and application programs, etc., and the modem The processor mainly handles wireless communication. It can be understood that the foregoing modem processor may not be integrated into the processor 410 .

电子设备400还可以包括给各个部件供电的电源411(比如电池),优选的,电源411可以通过电源管理系统与处理器410逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。The electronic device 400 can also include a power supply 411 (such as a battery) for supplying power to various components. Preferably, the power supply 411 can be logically connected to the processor 410 through a power management system, so as to manage charging, discharging, and power consumption through the power management system. and other functions.

另外,电子设备400包括一些未示出的功能模块,在此不再赘述。In addition, the electronic device 400 includes some functional modules not shown, which will not be repeated here.

可选的,本发明实施例还提供一种电子设备,包括处理器,存储器,存储在存储器上并可在所述处理器上运行的计算机程序,该计算机程序被处理器执行时实现上述音频传输方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。Optionally, an embodiment of the present invention also provides an electronic device, including a processor, a memory, and a computer program stored in the memory and operable on the processor, and the computer program realizes the above-mentioned audio transmission when executed by the processor Each process of the method embodiment can achieve the same technical effect, and will not be repeated here to avoid repetition.

本发明实施例还提供一种计算机可读存储介质,计算机可读存储介质上存储有计算机程序,该计算机程序被处理器执行时实现上述音频传输方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。其中,所述的计算机可读存储介质,如只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等。The embodiment of the present invention also provides a computer-readable storage medium. A computer program is stored on the computer-readable storage medium. When the computer program is executed by a processor, each process of the above-mentioned audio transmission method embodiment is realized, and the same technology can be achieved. Effect, in order to avoid repetition, will not repeat them here. Wherein, the computer-readable storage medium is, for example, a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk or an optical disk, and the like.

需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。It should be noted that, in this document, the term "comprising", "comprising" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article or apparatus comprising a set of elements includes not only those elements, It also includes other elements not expressly listed, or elements inherent in the process, method, article, or device. Without further limitations, an element defined by the phrase "comprising a ..." does not preclude the presence of additional identical elements in the process, method, article, or apparatus comprising that element.

通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本发明各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus a necessary general-purpose hardware platform, and of course also by hardware, but in many cases the former is better implementation. Based on such an understanding, the essence of the technical solution of the present invention or the part that contributes to the prior art can be embodied in the form of software products, and the computer software products are stored in a storage medium (such as ROM/RAM, disk, CD) contains several instructions to make a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) execute the methods described in various embodiments of the present invention.

以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以权利要求的保护范围为准。The above is only a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Anyone skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the present invention. Should be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4