Electronic devices and methods for controlling buffers
By dynamically adjusting the buffer size and varying the number of PCM samples used in Bluetooth electronic devices, the latency and audio interruption issues caused by a fixed buffer size were resolved, achieving stable audio data output and sound quality optimization.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-02-09
- Publication Date
- 2026-03-10
AI Technical Summary
In Bluetooth-based electronic devices, with a fixed buffer size, it is impossible to simultaneously address issues such as high latency or audio interruption, resulting in audio data delays during live events or audio interruptions during music playback.
By dynamically adjusting the buffer size and varying the number of Pulse Code Modulation (PCM) samples, the buffer size can be optimized to suit different scenario requirements, preventing sound interruptions and changes in sound quality.
It optimizes latency by controlling the buffer size in different scenarios, prevents sound interruptions or changes in sound quality, and ensures stable output of audio data.
Smart Images

Figure CN115053288B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Certain embodiments relate to an electronic device and a method for controlling a buffer of a wireless communication device. BACKGROUND
[0002] Users can access a variety of media while carrying an electronic device. These electronic devices can be connected to external devices by using wireless network technology that provides extended functionality.
[0003] An electronic device can use Bluetooth network technology as one of a variety of wireless network interfaces. Bluetooth network technology can include Bluetooth legacy (or classic) network technology or Bluetooth low energy (BLE) network, and can include various connection form topologies such as piconet and scatteret. An external wireless communication device can be wirelessly connected to the electronic device using such Bluetooth technology. Audio data of content played (or reproduced) in the electronic device can be transmitted to the external wireless communication device. The audio data can be processed in the external wireless communication device and output to the user. SUMMARY
[0004] TECHNICAL PROBLEM
[0005] In the case of processing audio data in an electronic device based on Bluetooth technology, the buffer size of the electronic device is fixed. Therefore, if the buffer size of the electronic device is large, the delay is high, and thus a delay can occur when processing audio data of content such as a live event.
[0006] If the size of the buffer of the electronic device is small, the delay is small, but sound interruption can frequently occur when a user listens to content such as music. Even if the size of the buffer is changed to an appropriate size according to the used scenario, a mute state can temporarily occur when the size of the buffer is reset.
[0007] The electronic device and the method for controlling a buffer of a wireless communication device as described in this document can alleviate the foregoing problems.
[0008] SOLUTION TO THE PROBLEM
[0009] According to an embodiment, an electronic device includes a communication circuit; a memory including a buffer configured to store audio data received from an external electronic device via the communication circuit; an audio output circuit; and a processor electrically connected to the communication circuit, the memory, and the audio output circuit, wherein the processor is configured to: control the communication circuit to be connected to the external electronic device with a first communication scheme; process pulse code modulation (PCM) samples obtained by decoding audio data output from the buffer with a first number of PCM samples, and control the audio output circuit to output the PCM samples processed with the first number of PCM samples; in response to receiving a request for adjusting a size of the buffer from the external electronic device, change a processing number of PCM samples from the first number of PCM samples to a second number of PCM samples; in response to the change of the processing number of PCM samples to the second number of PCM samples, process PCM samples obtained by decoding the audio data output from the buffer with the second number of PCM samples while adjusting the size of the buffer, and control the audio output circuit to output the PCM samples processed with the second number of PCM samples; and when the size of the buffer being adjusted reaches a designated buffer size, process PCM samples obtained by decoding the audio data output from the buffer with the first number of PCM samples, and control the audio output circuit to output the PCM samples processed with the first number of PCM samples.
[0010] According to certain embodiments, an electronic device comprises: communication circuitry; a memory; audio processing circuitry; and a processor electrically connected to the communication circuitry, the memory, and the audio processing circuitry, wherein the processor is configured to: control the communication circuitry to connect to an external electronic device using a first communication scheme; control the audio processing circuitry to process pulse code modulation (PCM) samples of an audio source with a first number of PCM samples; control the communication circuitry to transmit, to the external electronic device, audio data generated by encoding the PCM samples processed with the first number of PCM samples; in response to identifying occurrence of an event for controlling a buffer of the external electronic device, control the audio processing circuitry to process PCM samples of the audio source with a second number of PCM samples; control the communication circuitry to transmit, to the external electronic device, audio data generated by encoding the PCM samples processed with the second number of PCM samples; and when identifying that a size of the buffer of the external electronic device being adjusted reaches a specified buffer size, control the communication circuitry to transmit, to the external electronic device, audio data generated by encoding PCM samples processed with the first number of PCM samples.
[0011] According to certain embodiments, a method for controlling a buffer in an electronic device comprises: connecting to an external electronic device using a first communication scheme; storing, in a buffer, audio data received from the external electronic device; processing pulse code modulation (PCM) samples obtained by decoding audio data output from the buffer with a first number of PCM samples, and outputting the PCM samples processed with the first number of PCM samples; in response to receiving, from the external electronic device, a request for adjusting a size of the buffer, changing a processing number of PCM samples from the first number of PCM samples to a second number of PCM samples; in response to the change of the processing number of PCM samples to the second number of PCM samples, processing PCM samples obtained by decoding the audio data output from the buffer with the second number of PCM samples while adjusting the size of the buffer, and outputting the PCM samples processed with the second number of PCM samples; and when the size of the buffer being adjusted reaches a specified buffer size, processing PCM samples obtained by decoding audio data output from the buffer with the first number of PCM samples, and outputting the PCM samples processed with the first number of PCM samples.
[0012] Advantageous effects of the invention
[0013] As can be clearly seen from the foregoing description, in accordance with the electronic device and the operating method in the electronic device according to the embodiment, when processing audio data, the latency can be optimized by controlling the optimal buffer size for each scene, thereby preventing sound interruptions or noise and improving sound quality.
[0014] According to the electronic device and the operating method in the electronic device according to the embodiment, sound interruption or change in sound quality can be prevented by correction, so that there is no silence period or change in pitch when adjusting the size of the buffer. Attached Figure Description
[0015] Figure 1 This is a diagram illustrating a network environment according to an embodiment;
[0016] Figure 2 This is a diagram illustrating an example of the structure of an electronic device and an external electronic device according to an embodiment;
[0017] Figure 3 This is a diagram illustrating an example of the structure of an electronic device and an external electronic device according to an embodiment;
[0018] Figure 4 This is a diagram illustrating an example of the structure of an electronic device and an external electronic device according to another embodiment.
[0019] Figure 5 This is a diagram illustrating an example of the operation process for controlling a buffer in an external electronic device according to an embodiment;
[0020] Figure 6a , Figure 6b and Figure 6c This is a diagram illustrating an example of the operation process for controlling a buffer in an external electrical device according to an embodiment;
[0021] Figure 7a , Figure 7b and Figure 7c This is a diagram illustrating an example of the operation process for controlling a buffer in an external electrical device according to an embodiment;
[0022] Figure 8 This is a diagram illustrating an example of the operation process of a buffer in a control electronic device and an external electronic device according to an embodiment;
[0023] Figure 9 This is a diagram illustrating an example of the operation process of a buffer in a control electronic device and an external electronic device according to an embodiment;
[0024] Figure 10 This is a diagram illustrating an example of a screen for an electronic device for controlling a buffer according to another embodiment;
[0025] Figure 11This is a diagram illustrating an example of the operation process of a buffer in a control electronic device according to another embodiment;
[0026] Figure 12 This is a diagram illustrating an example of the operation process of a buffer in a control electronic device according to another embodiment; and
[0027] Figure 13 This is a diagram illustrating an example of the operation process of a buffer in a control electronic device and a plurality of external electronic devices according to another embodiment. Detailed Implementation
[0028] In the following description, an electronic device according to certain embodiments will be described with reference to the accompanying drawings.
[0029] Figure 1 This is a block diagram illustrating an electronic device 101 in a network environment 100 according to various embodiments. (Refer to...) Figure 1 In network environment 100, electronic device 101 can communicate with electronic device 102 via a first network 198 (e.g., a short-range wireless communication network), or with electronic device 104 or server 108 via a second network 199 (e.g., a long-range wireless communication network). According to an embodiment, electronic device 101 can communicate with electronic device 104 via server 108. According to an embodiment, electronic device 101 may include a processor 120, memory 130, input device 150, sound output device 155, display device 160, audio module 170, sensor module 176, interface 177, connection terminal 178, haptic module 179, camera module 180, power management module 188, battery 189, communication module 190, user identification module (SIM) 196, or antenna module 197. In some embodiments, at least one of these components (e.g., display device 160 or camera module 180) may be omitted from electronic device 101, or one or more other components may be added to electronic device 101. In some embodiments, some of the components may be implemented as a single integrated circuit. For example, the sensor module 176 (e.g., a fingerprint sensor, an iris sensor, or an illuminance sensor) may be implemented as embedded in the display device 160 (e.g., a display).
[0030] Processor 120 may run software (e.g., program 140) to control at least one other component (e.g., hardware or software component) of electronic device 101 connected to processor 120, and may perform various data processing or calculations. According to one embodiment, as at least part of the data processing or calculation, processor 120 may load commands or data received from another component (e.g., sensor module 176 or communication module 190) into volatile memory 132, process the commands or data stored in volatile memory 132, and store the resulting data in non-volatile memory 134. According to an embodiment, processor 120 may include a main processor 121 (e.g., central processing unit (CPU) or application processor (AP)) and an auxiliary processor 123 (e.g., graphics processing unit (GPU), image signal processor (ISP), sensor hub processor, or communication processor (CP)) that is operationally independent of or combined with the main processor 121. Additionally or alternatively, auxiliary processor 123 may be adapted to consume less power than main processor 121, or adapted for a specific function. The auxiliary processor 123 can be implemented separately from the main processor 121, or it can be implemented as part of the main processor 121.
[0031] When the main processor 121 is inactive (e.g., in sleep mode), the auxiliary processor 123 may replace the main processor 121 in controlling at least some of the functions or states associated with at least one component of the electronic device 101 (e.g., display device 160, sensor module 176, or communication module 190). Alternatively, when the main processor 121 is active (e.g., running an application), the auxiliary processor 123 may work with the main processor 121 to control at least some of the functions or states associated with at least one component of the electronic device 101 (e.g., display device 160, sensor module 176, or communication module 190). According to embodiments, the auxiliary processor 123 (e.g., an image signal processor or a communication processor) may be implemented as part of another component (e.g., camera module 180 or communication module 190) functionally associated with the auxiliary processor 123.
[0032] Memory 130 may store various data used by at least one component of electronic device 101 (e.g., processor 120 or sensor module 176). The various data may include, for example, software (e.g., program 140) and input or output data for commands associated with it. Memory 130 may include volatile memory 132 or non-volatile memory 134.
[0033] The program 140 may be stored as software in the memory 130, and the program 140 may include, for example, an operating system (OS) 142, middleware 144, or application 146.
[0034] Input device 150 can receive commands or data from outside electronic device 101 (e.g., a user) that will be used by other components of electronic device 101 (e.g., processor 120). Input device 150 may include, for example, a microphone, mouse, keyboard, or digital pen (e.g., stylus).
[0035] The sound output device 155 can output sound signals to the outside of the electronic device 101. The sound output device 155 may include, for example, a speaker or a receiver. The speaker can be used for general purposes such as playing multimedia or playing records, and the receiver can be used for incoming calls. According to an embodiment, the receiver may be implemented separately from the speaker or as part of the speaker.
[0036] Display device 160 can visually provide information to the outside of electronic device 101 (such as to a user). Display device 160 may include, for example, a display, a holographic device, or a projector, and control circuitry for controlling a respective one of the display, holographic device, and projector. According to an embodiment, display device 160 may include touch circuitry adapted to detect touch or sensor circuitry (e.g., a pressure sensor) adapted to measure the intensity of the force caused by touch.
[0037] The audio module 170 can convert sound into electrical signals and vice versa. According to an embodiment, the audio module 170 can obtain sound via the input device 150, or output sound via the sound output device 155 or headphones of an external electronic device (e.g., electronic device 102) that is directly (e.g., wired) or wirelessly connected to the electronic device 101.
[0038] Sensor module 176 can detect the operating state of electronic device 101 (e.g., power or temperature) or the environmental state outside electronic device 101 (e.g., user state), and then generate an electrical signal or data value corresponding to the detected state. According to embodiments, sensor module 176 may include, for example, a gesture sensor, gyroscope sensor, atmospheric pressure sensor, magnetic sensor, accelerometer, grip sensor, proximity sensor, color sensor, infrared (IR) sensor, biometric sensor, temperature sensor, humidity sensor, or illuminance sensor.
[0039] Interface 177 may support one or more specific protocols used to enable electronic device 101 to connect directly (e.g., wired) or wirelessly to external electronic devices (e.g., electronic device 102). According to embodiments, interface 177 may include, for example, a High Definition Multimedia Interface (HDMI), a Universal Serial Bus (USB) interface, a Secure Digital Card (SD) interface, or an audio interface.
[0040] Connection end 178 may include a connector, through which electronic device 101 can be physically connected to an external electronic device (e.g., electronic device 102). According to embodiments, connection end 178 may include, for example, an HDMI connector, a USB connector, an SD card connector, or an audio connector (e.g., a headphone connector).
[0041] The tactile module 179 can convert electrical signals into mechanical stimuli (e.g., vibration or motion) or electrical stimuli that can be recognized by a user through his touch or kinesthesia. According to embodiments, the tactile module 179 may include, for example, a motor, a piezoelectric element, or an electrical stimulator.
[0042] Camera module 180 can capture still or moving images. According to an embodiment, camera module 180 may include one or more lenses, an image sensor, an image signal processor, or a flash.
[0043] The power management module 188 manages the power supply to the electronic device 101. According to an embodiment, the power management module 188 may be implemented as at least part of, for example, a power management integrated circuit (PMIC).
[0044] Battery 189 can power at least one component of electronic device 101. According to an embodiment, battery 189 may include, for example, a non-rechargeable primary battery, a rechargeable accumulator, or a fuel cell.
[0045] Communication module 190 can support the establishment of a direct (e.g., wired) or wireless communication channel between electronic device 101 and external electronic devices (e.g., electronic device 102, electronic device 104, or server 108), and perform communication via the established communication channel. Communication module 190 may include one or more communication processors capable of operating independently of processor 120 (e.g., application processor (AP)) and support direct (e.g., wired) or wireless communication. According to embodiments, communication module 190 may include wireless communication module 192 (e.g., cellular communication module, short-range wireless communication module, or Global Navigation Satellite System (GNSS) communication module) or wired communication module 194 (e.g., local area network (LAN) communication module or power line communication (PLC) module). One of these communication modules can communicate with an external electronic device via a first network 198 (e.g., a short-range communication network such as Bluetooth, Wi-Fi Direct, or Infrared Data Association (IrDA)) or a second network 199 (e.g., a long-range communication network such as a cellular network, the Internet, or a computer network (e.g., a LAN or a wide area network (WAN))). These various types of communication modules can be implemented as a single component (e.g., a single chip) or as multiple components (e.g., multiple chips) that are separate from each other. The wireless communication module 192 can identify and verify the electronic device 101 in the communication network (such as the first network 198 or the second network 199) using user information (e.g., the International Mobile Subscriber Identity (IMSI)) stored in the user identification module 196.
[0046] Antenna module 197 can transmit or receive signals or power to or from the exterior of electronic device 101 (e.g., external electronic device). According to an embodiment, antenna module 197 may include an antenna comprising a radiating element formed of a conductive material or conductive pattern formed in or on a substrate (e.g., a PCB). According to an embodiment, antenna module 197 may include multiple antennas. In this case, at least one antenna suitable for a communication scheme used in a communication network (such as a first network 198 or a second network 199) can be selected from the multiple antennas by, for example, communication module 190 (e.g., wireless communication module 192). Signals or power can then be transmitted or received between communication module 190 and the external electronic device via the selected at least one antenna. According to an embodiment, additional components besides the radiating element (e.g., a radio frequency integrated circuit (RFIC)) may be additionally incorporated into antenna module 197.
[0047] At least some of the aforementioned components can be interconnected and communicate signals (e.g., commands or data) between them via an inter-peripheral communication scheme (e.g., bus, general purpose input / output (GPIO), serial peripheral interface (SPI), or mobile industrial processor interface (MIPI)).
[0048] According to an embodiment, commands or data can be sent or received between electronic device 101 and external electronic device 104 via server 108 connected to a second network 199. Each of electronic device 102 and electronic device 104 can be a device of the same type as electronic device 101, or a device of a different type. According to an embodiment, all or some operations that would be performed on electronic device 101 can be performed on one or more of external electronic devices 102, external electronic devices 104, or server 108. For example, if electronic device 101 is required to automatically perform a function or service, or is required to perform a function or service in response to a request from a user or another device, electronic device 101 may request the one or more external electronic devices to perform at least a portion of the function or service, instead of running the function or service, or electronic device 101 may request the one or more external electronic devices to perform at least a portion of the function or service in addition to running the function or service. Upon receiving the request, the one or more external electronic devices may perform at least a portion of the requested function or service, or perform additional functions or services related to the request, and transmit the result of the execution to electronic device 101. Electronic device 101 may provide the result as at least a partial response to the request, either with further processing or without further processing. For this purpose, technologies such as cloud computing, distributed computing, or client-server computing may be used.
[0049] Electronic device 101 can use Bluetooth networking technology as one of a variety of wireless network interfaces to wirelessly connect to external electronic devices, such as external electronic device 102. Electronic device 100 can transmit audio data to external electronic device 102.
[0050] When processing audio data in electronic device 101 using Bluetooth technology, the buffer size in memory 130 can be fixed. Therefore, if the buffer size is large, latency is high, potentially causing delays when processing audio data such as live events. If the buffer size is small, latency is low, but frequent sound interruptions may occur when the user is listening to content such as music. Changing the buffer size to an appropriate level can prevent mute when the buffer size is reset.
[0051] Figure 2 This is a diagram illustrating an example of the structure of an electronic device and an external electronic device according to an embodiment.
[0052] refer to Figure 1 and Figure 2 According to the embodiment, the external electronic device 102 can communicate with the electronic device 101 using a first communication scheme (e.g., Bluetooth communication). For example, the external electronic device 102 can be an accessory device such as headphones or earphones. For example, the electronic device 101 and the external electronic device 102 can be configured as an audio source device and an audio sink device, respectively.
[0053] For example, the external electronic device 102 can be configured to include a main device 102a and a secondary device that are physically separate but communicate with each other. The main device 102a and the secondary device 102b can communicate with each other using a first communication scheme. As another example, the external electronic device 102 can be configured as a single device instead of being divided into a main device 102a and a secondary device 102b. For example, the main device 102a could be the right earbud, and the secondary device 102b could be the left earbud.
[0054] The main device 102a of the external electronic device 102 may include a memory 201a, a communication circuit 203a, a processor 205a, a sensor circuit 207a, an audio output circuit 209a (e.g., a speaker), and a battery 211a. The secondary device 102b of the external electronic device 102 may include a memory 201b, a communication circuit 203b, a processor 205b, a sensor circuit 207b, an audio output circuit 209b (e.g., a speaker), and a battery 211b. The main device 102a and the secondary device 102b of the external electronic device 102 may store each other's address information and may be connected to each other using the stored address information.
[0055] The primary device 102a and secondary device 102b can be configured as a device performing a master role and a device performing a slave role, respectively. The primary device 102a can perform a master role based on communication between itself and the secondary device 102b. The primary device 102a can transmit data packets received from the electronic device 101 to the secondary device 102b. The secondary device 102b can perform a slave role based on communication and can receive data packets from the primary device 102a. In one example, the secondary device 102b can receive data packets from the electronic device 101 and then transmit the data packets to the primary device 102a. The packet data may include audio data and / or related information for processing the audio data. The primary device 102a can synchronize with the secondary device 102b to process the audio data. In some embodiments, the audio data may include a presentation timestamp indicating the time when the audio data should be converted into sound. For example, depending on the object connected to the electronic device 101, the master device 102a can be configured as a device performing a subordinate role, while the secondary device 102b can be configured as a master device performing a master role.
[0056] When the external electronic device 102 is configured as a single device instead of being divided into a main device 102a and a secondary device 102b, the external electronic device 102 may include the same components as those included in the main device 102a, such as the memory 201a, communication circuit 203a, processor 205a, sensor circuit 207a, audio output circuit 209a, and battery 211a.
[0057] External electronic device 102 can connect main device 102a to electronic device 101 via, for example, a first communication scheme, and main device 102a can transmit audio data received by electronic device 101 and related information for processing the audio data to secondary device 102b. When secondary device 102b receives the received audio data and related information for processing the audio data from main device 102a, secondary device 102b can perform the same operations as main device 102a.
[0058] If the master device 102a receives a request from the electronic device 101 to adjust the buffer size, the master device 102a can transmit the relevant information to the secondary device 102b, so that the buffers of the master device 102a and the secondary device 102b are synchronized and their sizes are adjusted. Alternatively, the external electronic device 102 can communicate with the electronic device 101 via the secondary device 102b using a first communication scheme, and the secondary device 102b can transmit audio data received by the electronic device 101 and related information for processing the audio data to the master device 102a.
[0059] For example, external electronic device 102 can communicate with electronic device 101 via both main device 102a and secondary device 102b. For instance, main device 102a can communicate with electronic device 101 via a first communication scheme. Secondary device 102b can receive or monitor audio data transmitted and received between main device 102a and electronic device 101 and related information for processing audio data based on information received from main device 102a regarding the first communication scheme.
[0060] For example, the received information about the first communication scheme may include address information or clock information of electronic device 101. Secondary device 102b may receive the same data packets as the data packets received by primary device 102a via monitoring. Monitoring operations may be referred to as covert surveillance, eavesdropping, or spying. Secondary device 102b may receive information about the first communication scheme via various methods other than receiving information about the first communication scheme from primary device 102a. For example, secondary device 102b may receive information about the first communication scheme stored on an external server (not shown). In another example, secondary device 102b may receive information about the first communication scheme transmitted (or shared) from primary device 102a via an external server.
[0061] The memories 201a and 201b of the external electronic device 102 may store at least one of the following: audio content stored by the user and user profile, device information, device information of the external electronic device, and information of the other party's headset. The memories 201a and 201b may be configured to include buffers (not shown) for temporary storage of audio data received from the electronic device 101.
[0062] In some embodiments, electronic device 101 can receive audio data. The audio data may include a transport stream according to the Moving Picture Experts Group (MPEG) standard. The transport stream may include fixed packets of a packed elementary stream. The packed elementary stream may include audio data compressed using inverse modified discrete cosine transform (IMDCT). Primary device 102a and secondary device 102b can decode the audio data to generate a time-based analog signal. The analog signal can be digitized using pulse code modulation (PCM) samples at different numbers of samples per second. That is, based on the digitization rate, one second of analog signal can be represented by different numbers of PCM samples.
[0063] The communication circuits 203a and 203b of the external electronic device 102 can communicate with the external electronic device (e.g., electronic device 101) via short-range wireless communication (e.g., Bluetooth (BT) or Wi-Fi) and can be configured to include an antenna for short-range wireless communication.
[0064] The processors 205a and 205b of the external electronic device 102 can control the communication circuits 203a and 203b to connect to the electronic device 101 using a first communication scheme (e.g., Bluetooth (BT)). The processors 205a and 205b can decode audio data received via buffers in the memories 201a and 201b to generate PCM samples. The PCM modulated samples can digitize the audio content using a specific rate of samples per second. The processors 205a and 205b can cause the audio output circuits 209a and 209b to output sound from the processed PCM samples.
[0065] Processors 205a and 205b can change the number of PCM samples processed from a first number of PCM samples to a second number of PCM samples in response to a request received from electronic device 101 for adjusting the buffer size. Processors 205a and 205b can use the second number of PCM samples to process PCM samples obtained by decoding audio data received via the buffer when adjusting the buffer size, and control audio output circuits 209a and 209b to output PCM samples digitized from the audio signal at the second number of PCM samples.
[0066] When the size of the buffer being adjusted reaches the specified buffer size, processors 205a and 205b can use a first number of PCM samples to process PCM samples obtained by decoding audio data received via a buffer with a specified buffer size, and control audio output circuits 209a and 209b to output PCM samples processed using the first number of PCM samples.
[0067] The sensor modules 207a and 207b of the external electronic device 102 may be configured to include at least one of a motion sensor (e.g., an accelerometer and a gyroscope), a proximity sensor, or a biometric sensor (e.g., including an optical sensor and electrodes). The sensor modules 207a and 207b may also include a variety of other sensors.
[0068] The audio output circuits 209a and 209b of the external electronic device 102 can be configured to output PCM samples of audio data processed by processors 205a and 205b via a speaker, so that the user can hear the audio data received from the external electronic device 101.
[0069] The batteries 211a and 211b of the external electronic device 102 can power at least one component of the external electronic device 102. According to an embodiment, the batteries 211a and 211b may include, for example, a non-rechargeable primary battery, a rechargeable secondary battery, or a fuel cell.
[0070] Figure 3This is a diagram illustrating an example of the structure of an electronic device and an external electronic device according to an embodiment.
[0071] External electronic device 102 receives audio data from electronic device 101. The audio data may include audio data compressed according to the MPEG standard. The audio data is received in buffer 301. The decoder decodes the audio data and provides the decoded audio data to PCM sampling module 311. PCM sampling module 311 digitizes the decoded audio signal at a specific sampling rate. Correction module 313 corrects the PCM samples to maintain pitch.
[0072] Based on the main device (e.g., Figure 2 The main device 102a) in the middle is described as the one to be referenced. Figure 3 The structure of the external electronic device 102 is described, and the sub-devices of the external electronic device 102 (e.g., Figure 2 The secondary device 102b) can be configured to include the same components as the primary device and perform the same operations as the primary device. For example, even if the external electronic device 102 is configured as a single device and not divided into primary and secondary devices, the external electronic device 102 can still be configured to include the same components as the primary device and perform the same operations as the primary device.
[0073] refer to Figure 3 According to the embodiment, the external electronic device 102 (e.g., Figure 2 The main device 102a or secondary device 102b can be configured to include a buffer 301, a decoder 303, and a pulse code modulation (PCM) processing module 305. The PCM processing module 305 can be configured to include a PCM sample control module 311 and a correction module 313. The PCM processing module 305 can be configured to include... Figure 2 The processor 205a or a separate component controlled by the processor 205a.
[0074] According to an embodiment, the external electronic device 102 can control the communication circuit (e.g., Figure 2 The audio data received from the electronic device 101 by the communication circuit 203a) is temporarily stored in a memory (e.g., Figure 2The audio data stored in the buffer 301 (memory 201a) is stored in the external electronic device 102. The external electronic device 102 can decode the audio data stored in the buffer 301 using the decoder 303, and process the PCM samples of the decoded audio data output from the decoder 303 via the PCM processing module 305. When audio data is received with the buffer size of the buffer 301 set to a first buffer size, the external electronic device 102 can process the PCM samples of the audio data received from and subsequently decoded from the buffer 301 having the first buffer size via the PCM processing module 305 with a first number of PCM samples, and control the audio output circuitry (e.g., ...). Figure 2 The audio output circuit 209a) outputs a PCM sample processed with the first quantity of PCM samples.
[0075] According to an embodiment, when a request for adjusting the size of buffer 301 is received from electronic device 101, external electronic device 102 can perform the operation of adjusting the size of buffer 301 based on information related to the buffer size received from electronic device 101. For example, external electronic device 102 can receive information related to the buffer size from electronic device 101 and identify a specified buffer size based on the received information related to the buffer size. The information related to the buffer size may include at least one of information about the specified buffer size, information about the type of application running on external electronic device 102, or information about communication quality. For example, external electronic device 102 can directly detect the communication quality between electronic device 101 and external electronic device 102, and can identify the specified buffer size based on information related to the directly detected communication quality.
[0076] According to an embodiment, external electronic device 102 can change the number of PCM samples processed from a first number of PCM samples to a second number of PCM samples in response to a request from electronic device 101 to adjust the size of buffer 301. The second number of PCM samples can be an increase of the first number of PCM samples to increase the size of buffer 301, or a decrease of the first number of PCM samples to decrease the size of buffer 301. In an embodiment, when the master device 102a of external electronic device 102 receives a request from electronic device 101 to adjust the size of buffer 301, the master device 102a can transmit information about the specified buffer size and information about the second number of PCM samples that the master device 102a changes to synchronize with the buffer of the secondary device 102b of external electronic device 102 and adjust the size of buffer 301 to the secondary device 102b, and transmit information about the specified buffer size to the secondary device 102b. In response to a change in the number of PCM samples processed to a second number of PCM samples, the external electronic device 102 can change the number of PCM samples processed when adjusting the size of the buffer to the second number of PCM samples in order to process the PCM samples obtained by decoding the audio data received from the buffer 301. The PCM processing module 305 processes the obtained PCM samples using the changed second number of PCM samples and controls the audio output circuitry (e.g., ...). Figure 2 The audio output circuit 209a) outputs the processed PCM sample.
[0077] According to an embodiment, when the size of the buffer 301 being adjusted reaches a specified buffer size, the external electronic device 102 can change the number of PCM samples processed from a second number of PCM samples back to a first number of PCM samples, using the first number of PCM samples to process the PCM samples obtained by decoding the audio data received via the buffer 301, and control the audio output circuit (e.g., Figure 2The audio output circuits 209a and 209b output PCM samples processed using a first number of PCM samples. The size of buffer 301 can be gradually or incrementally adjusted (e.g., increased or decreased) from a previous buffer size (e.g., a first buffer size) until the size of buffer 301 reaches a specified buffer size (e.g., a second buffer size) corresponding to the fact that PCM samples are processed using a second number of PCM samples. For example, a request to adjust the size of buffer 301 can be received via a request message (or packet) according to a message format according to a first communication scheme. The request message may include, for example, control information indicating a decrease or increase in the buffer size specified according to the content (or application) executed in electronic device 101. The request message may include, for example, information related to the content (or application) executed in electronic device 101 (e.g., the type of content (or application)). The request message may include, for example, information about the buffer size directly specified by the user via a menu displayed on the display of electronic device 101.
[0078] According to an embodiment, the external electronic device 102 can correct the PCM sample processed using a second quantity of PCM samples, thereby maintaining the pitch.
[0079] According to an embodiment, when adjusting the size of the buffer 301, the main device (PE) of the external electronic device 102 (e.g., Figure 2 The main device 102a) can connect the buffer of the main device to the secondary device (SE) (e.g., Figure 2 The buffer synchronization of the secondary device 102b) is as follows. For example, when the primary device receives a buffer size adjustment request from the electronic device 101, it can transmit information related to the buffer size adjustment to the secondary device. When the secondary device transmits a response to the request to the primary device, the primary and secondary devices can adjust the size of buffer 301 such that the size of buffer 301 changes to the specified buffer size when processing PCM samples using the changed number of PCM samples (e.g., a second number of PCM samples). When the size of the buffer 301 being adjusted reaches the specified buffer size and the change is complete, the primary and secondary devices can exchange status information with each other and simultaneously process PCM samples using the first number of PCM samples. For example, when the buffer size change is complete, the primary and secondary devices can identify the completion of the buffer size change without exchanging buffer size change completion information and process PCM samples using the first number of PCM samples.
[0080] According to an embodiment, the external electronic device 102 can handle the operations of adjusting the number of PCM samples processed by the PCM sample processing module 305 and adjusting the buffer size differently for each type of application. For example, changing the buffer size can be faster when playing a game than when playing music. Therefore, for a game, the external electronic device 102 can adjust the number of PCM samples from a first number to a second number (the number reduced from the first number) and adjust the buffer size to a second buffer size (e.g., 100ms). As described above, in the embodiment, reference has been made to... Figure 3 and Figure 2 The external electronic device 102 described herein is primarily composed of the following components. However, in some embodiments, not all components are described in detail. Figure 3 and Figure 2 All components shown are necessary components, and the external electronic device 102 (e.g., main device 102a or secondary device 102b) can be made by means of a different component. Figure 3 and Figure 2 The components shown can be implemented with more or fewer components. Furthermore, the above references... Figure 3 and Figure 4 The position of each major component of the described external electronic device 102 may be changed according to certain embodiments.
[0081] Figure 1 This is a diagram illustrating an example of the structure of an electronic device and an external electronic device according to another embodiment.
[0082] refer to Figure 4 and Figure 3 According to another embodiment, the electronic device 101 may be configured to include a PCM processing module 401 that processes PCM samples of audio signals (audio sources) and an encoder 403 that encodes the processed PCM samples as a buffer 421 for controlling an external electronic device 102 (e.g., Figure 1 The PCM processing module 401 and encoder 403 can be configured as separate components, which are included in the processor of the electronic device 101 (e.g., buffer 301). Figure 3 The encoder may be in or controlled by a processor (processor 120). In some embodiments, the encoder may include a hardware accelerator or an application-specific integrated circuit (ASIC). The PCM processing module 401 may be configured to include a PCM sample control module 411 and a correction module 413, the PCM sample control module being used to adjust the buffer 421 of the external electronics 102 (e.g., ...). Figure 1The correction module uses information related to the size of the buffer 301 in the audio signal (audio source) to change the number of PCM samples processed. The correction module is used to correct the processed PCM samples so that the pitch value of the PCM samples processed by the PCM sample control module 411 is maintained.
[0083] The processor of electronic device 101 can pre-specify and store information about the size of buffer 421 of external electronic device 102, or receive information about the size of buffer 421 of external electronic device 102 from external electronic device 102. Generally, a buffer with less memory can hold audio data representing a shorter period of time, or can hold audio data sampled at a lower sampling rate for PCM samples. In some embodiments, to avoid buffer overflow, the sampling rate is reduced when the buffer size decreases. Therefore, the processor of electronic device 101 can identify whether the size of buffer 421 has changed based on information related to the size of buffer 421 of external electronic device 102.
[0084] According to another embodiment, the processor of electronic device 101 can process PCM samples of an audio signal in a first number of PCM samples via PCM processing module 401, encode the PCM samples of the audio signal via encoder 403, and transmit the audio data of the encoded PCM samples to external electronic device 102 to control external electronic device 102 to output audio data. Here, the first number of PCM samples may be an initial setting or a number identified corresponding to buffer size information set in the content (or application) including the audio signal.
[0085] According to another embodiment, the processor of electronic device 101 can identify whether the size of buffer 421 of external electronic device 102 has changed and the changed size of buffer 421 based on information related to the size of buffer 421 of external electronic device 102. The processor of electronic device 101 can control the PCM processing module 401 to change the number of PCM samples of the audio signal processed based on the changed size of buffer 421 identified based on information related to the size of buffer 421, and process the PCM samples processed using the changed number of PCM samples (e.g., a second number of PCM samples). The processor of electronic device 101 can control the encoding of the PCM samples processed using the changed number of PCM samples (e.g., a second number of PCM samples) via encoder 403, and via communication circuits (e.g., Figure 3 The communication module 190 transmits the audio data of the encoded PCM sample to the external electronic device 102.
[0086] According to another embodiment, the processor of the electronic device 101 can control the correction of the processed PCM samples processed by the correction module 413 using the changed number of PCM samples (e.g., a second number of PCM samples) so as to maintain the pitch value.
[0087] According to another embodiment, the external electronic device 102 can temporarily store the audio data received from the electronic device 101 in a buffer 421 (e.g., Figure 3 In buffer 301), via decoder 423 (e.g., Figure 2 The decoder 303 decodes the audio data output from the buffer 421 according to the size of the buffer 421, and outputs it via the audio output circuit (e.g., Figures 1 to 3 The audio output circuits 209a and 209b in the middle output PCM samples of the decoded audio data.
[0088] When an external electronic device 102 is connected to an electronic device 101, the electronic device 101, according to one embodiment and another, can obtain information related to the signal strength or communication quality of the communication between the electronic device 101 and the external electronic device 102. The electronic device 101 can transmit the information related to the signal strength or communication quality to the external electronic device 102 as information related to the buffer size, and the external electronic device 102 can identify a specified buffer size corresponding to the signal strength or communication quality based on the received information related to the buffer size.
[0089] According to an embodiment, electronic device 101 can identify communication quality based on the retransmission rate of packets transmitted to external electronic device 102, effective channel mapping information, or RSSI information. For example, if the communication quality is poor, external electronic device 102 may not be able to receive packets transmitted by electronic device 101 normally, and therefore external electronic device 102 may transmit a NACK or may not transmit a response packet. Electronic device 101 may retransmit the same packet until external electronic device 102 receives the packet normally (e.g., until external electronic device 102 transmits an ACK). As another example, if the distance between electronic device 101 and external electronic device 102 increases, the received RSSI may be lower. If the received RSSI is less than or equal to a specified threshold, electronic device 101 can identify poor communication quality. According to an embodiment, if the communication quality is poor, electronic device 101 may request an increase in the buffer size of external electronic device 102, thereby reducing the occurrence of audio interruptions or noise. According to an embodiment, if the communication quality is good, the electronic device 102 can request a reduction in the buffer size of the external electronic device 102, thereby outputting audio without delay without degradation of sound quality.
[0090] According to one embodiment and another embodiment, the external electronic device 102 can directly identify the signal strength or communication quality of the communication between the electronic device 101 and the external electronic device 102. In this case, the external electronic device 102 can adjust the size of the buffer based on information related to the buffer size, according to the signal strength or communication quality directly identified by the external electronic device 102, to increase or decrease the size of the buffer to a specified buffer size without receiving information related to the buffer size from the electronic device 101.
[0091] Electronic devices according to embodiments (e.g., Figure 2 External electronic device 102 may include: communication circuitry (e.g., Figure 3 The communication circuit 203a or 203b in the middle; including a buffer (e.g., Figure 2 The memory of buffer 301 in the memory (e.g., Figure 2 The memory 201a or 201b is configured to store audio data received from an external electronic device via a communication circuit; the audio output circuit (e.g., Figure 2 The audio output circuit 209a or 209b in the circuit; and the processor (e.g., the one electrically connected to the communication circuit, the memory, and the audio output circuit) Figure 2 The processor (205a or 205b) is configured to: control a communication circuit to connect to an external electronic device using a first communication scheme; process pulse code modulation (PCM) samples obtained by decoding audio data output from a buffer using a first number of PCM samples; control an audio output circuit to output PCM samples processed using the first number of PCM samples; in response to receiving a request from the external electronic device for adjusting the buffer size, change the number of PCM samples processed from the first number of PCM samples to a second number of PCM samples; in response to the change from the number of PCM samples processed to the second number of PCM samples, process the PCM samples obtained by decoding audio data output from the buffer using the second number of PCM samples when adjusting the buffer size; control the audio output circuit to output PCM samples processed using the second number of PCM samples; and when the buffer size being adjusted reaches a specified buffer size, process the PCM samples obtained by decoding audio data output from the buffer using the first number of PCM samples; and control the audio output circuit to output PCM samples processed using the first number of PCM samples.
[0092] According to an embodiment, the processor (e.g., Figure 2 The processor 205a or 205b in the process can be further configured to correct the PCM samples processed by a second number of PCM samples, thereby maintaining the pitch.
[0093] According to an embodiment, the processor (such as...) Figure 2 The processor 205a or 205b can be configured to control the communication circuitry to transmit information related to the state of the buffer to an external electronic device. The information related to the size of the buffer may include at least one of the following: information about the specified buffer size, information about the type of application running on the external electronic device, or information about the quality of communication.
[0094] According to an embodiment, the processor (e.g., Figure 1 The processor 205a or 205b in the buffer can be configured to control the communication circuitry to transmit information related to the state of the buffer to an external electronic device.
[0095] According to an embodiment, the first communication scheme may be Bluetooth communication.
[0096] According to an embodiment, the processor (e.g., Figure 1 The processor 205a or 205b in the device may be further configured to connect to the secondary device via a first communication scheme when the electronic device is performing the role of the primary device, to transmit audio data received from the external electronic device to the secondary device, and in response to receiving a request for adjusting the size of the buffer, to control the communication circuit to transmit information about a second number of PCM samples that have been changed and information about a specified buffer size to the secondary device, and the buffer may be synchronized with the buffer of the secondary device.
[0097] An electronic device according to another embodiment (e.g., Figure 1 and 2 The first electronic device 101 in the middle may include a communication circuit (e.g., Figure 1 The communication module 190 in the middle), memory (e.g., Figure 1 The memory 130 in the middle), audio processing circuit ( Figure 1 The sound output device 155 in the middle) and the processor (e.g., the sound output device 155 in the middle) electrically connected to the communication circuit, the memory and the audio processing circuit. Figure 1The processor 120 is configured to: control a communication circuit to connect to an external electronic device using a first communication scheme; control an audio processing circuit to process pulse code modulation (PCM) samples of an audio source using a first number of PCM samples; control the communication circuit to transmit audio data generated by encoding the PCM samples processed using the first number of PCM samples to the external electronic device; in response to recognizing the occurrence of an event for controlling a buffer of the external electronic device; control the audio processing circuit to process PCM samples of an audio signal using a second number of PCM samples; control the communication circuit to transmit audio data generated by encoding the PCM samples processed using the second number of PCM samples to the external electronic device; and when recognizing that the size of the buffer of the external electronic device being adjusted has reached a specified buffer size, control the communication circuit to transmit audio data generated by encoding the PCM samples processed using the first number of PCM samples to the external electronic device.
[0098] According to another embodiment, the processor (e.g., Figure 1 The processor 120 in the process can be further configured to correct the PCM samples processed by a second number of PCM samples, thereby maintaining the pitch.
[0099] According to another embodiment, the processor (e.g., Figure 1 The processor 120 in the buffer can be further configured to obtain information related to the size of the buffer and to identify the specified buffer size based on the information related to the size of the buffer.
[0100] According to another embodiment, the processor (e.g., Figure 1 The processor 120 in the system can be configured to recognize an event when the content of the generated audio source changes.
[0101] According to another embodiment, the processor (e.g., Figure 1 The processor 120 in the first communication scheme can be configured to recognize an event when the communication quality of the first communication scheme changes.
[0102] According to another embodiment, the electronic device may further include a display (e.g., Figures 1 to 3 The display 160 in the middle), and the processor (e.g., Figure 5 The processor 120 in the display can be configured to recognize an event when information relating to the size of at least one buffer displayed on the display is selected by the user.
[0103] According to another embodiment, the first communication scheme may be Bluetooth communication.
[0104] The electronic device described above will be described in detail with reference to the accompanying drawings (e.g., Figure 5The operation process of the external electronic device 102 in the middle.
[0105] Figures 1 to 3 This is a diagram illustrating an example of the operation process for controlling a buffer in an external electronic device according to an embodiment.
[0106] refer to Figure 1 In operation 501, the external electronic device according to the embodiment (e.g., Figure 2 External electronic device 102 can be connected to electronic device (e.g., via a first communication scheme, such as Bluetooth communication) Figure 2 and Figure 1 (electronic device 101 in the middle).
[0107] In operation 503, external electronic devices can be connected via communication circuits (e.g., Figure 2 The communication circuit 203a or 203b in the middle) is connected to the electronic device (e.g., Figure 3 and Figure 3 The audio data received by the electronic device 101 is stored in a buffer (e.g., Figure 3 The audio data is stored in buffer 301 and decoded from the buffer. An external electronic device can receive audio data from content (or an application) executed on the electronic device and temporarily store the received audio data in a buffer. When audio data is output from the buffer and temporarily stored in a buffer whose size is set to a first buffer size (e.g., 100ms), the external electronic device can decode the audio data by using a decoder. Figure 2 The decoder 303 in the middle is used to decode the audio data.
[0108] In operation 505, external electronic devices can be used via a PCM processing module (e.g., Figure 2 The PCM processing module 305 in the audio output circuit processes the PCM samples of the decoded audio data using a set first number of PCM samples. External electronic devices can then process the PCM samples via an audio output circuit (e.g., ...). Figure 2 The audio output circuits 209a and 209b in the middle output PCM samples (e.g., first PCM samples) processed using a first number of PCM samples.
[0109] In operation 507, the external electronic device can identify whether it receives a request (e.g., a request message) from the first electronic device to adjust the buffer size when outputting PCM samples processed using a first number of PCM samples (e.g., the first PCM sample). If a request to adjust the buffer size (e.g., the request message) is received, the external electronic device can perform operation 509. If no request to adjust the buffer size (e.g., the request message) is received, the external electronic device can decode the audio data continuously output from a buffer with a buffer size set to the first buffer size (e.g., 100 ms) and process the decoded audio data using the first number of PCM samples by performing operation 503 again.
[0110] In operation 509, in response to receiving a request (e.g., a request message) from the first electronic device for adjusting the buffer size, the external electronic device may identify a specified buffer size based on information related to the buffer size included in the request message, and change the number of PCM samples processed from a first number of PCM samples to a second number of PCM samples. For example, the external electronic device may identify a second buffer size (e.g., 300ms) as the specified buffer size, and change the number of PCM samples processed to the second number of PCM samples based on the identified second buffer size.
[0111] In operation 511, when the buffer size is adjusted by a second buffer size (e.g., 300ms), the external electronics can utilize a second number of PCM samples to process the PCM samples (e.g., the second PCM samples) obtained by decoding the audio data received via the buffer, and via the audio output circuit (e.g., Figure 3 The audio output circuits 209a and 209b in the middle output PCM samples (e.g., second PCM samples) processed using a second number of PCM samples.
[0112] In operation 513, the external electronic device can identify whether the buffer size being adjusted has reached a second buffer size (e.g., 300ms), which is a specified buffer size. If the buffer size being adjusted has reached the second buffer size (e.g., 300ms), the external electronic device can perform operation 515. If the buffer size being adjusted has not reached the second buffer size (e.g., 300ms), the external electronic device can continuously process the PCM samples of the decoded audio data using a second number of PCM samples by performing operations 511 to 513.
[0113] In operation 515, an external electronic device can use a first number of PCM samples to process the PCM samples obtained by decoding audio data output from a buffer whose size has been changed from a second buffer size (e.g., 300ms), and via an audio output circuit (e.g., Figure 3 The audio output circuits 209a and 209b in the middle output PCM samples (e.g., first PCM samples) processed using a first number of PCM samples.
[0114] According to another embodiment, when a buffer size adjustment request is received, such as in operation 507, the external electronic device can perform a gradual or incremental adjustment of the buffer without performing operations 509 and 513 (e.g., Figure 3 The operation on the size of buffer 301 in the buffer continues until the buffer (e.g., Figure 3 The size of the buffer 301 in the buffer reaches the specified buffer size, and as in operation 515, the PCM samples of the decoded audio data are processed using a first number of PCM samples to output the PCM samples processed using the first number of PCM samples.
[0115] According to yet another embodiment, when a buffer size adjustment request is received as in operation 507, the external electronic device can perform a gradual or incremental adjustment of the buffer without performing operations 509 and 513 (e.g., Figure 6a The operation on the size of buffer 301 in the buffer continues until the buffer (e.g., Figure 6b The size of the buffer 301 in the buffer reaches the specified buffer size, and as in operation 515, the PCM sample of the decoded audio data is processed at a first speed, which is the playback speed of the decoded audio data, to output the PCM sample processed at the first speed.
[0116] Figure 6c , Figure 6a and Figure 1 This is a diagram illustrating an example of the operation process for controlling a buffer in an external electrical device according to an embodiment.
[0117] According to the embodiments, such as Figure 2 As shown, when from an electronic device (e.g., Figures 1 to 3 and Figure 3 When the electronic device 101 in the middle receives audio data, the external electronic device (e.g., Figure 3 The external electronic device 102 can temporarily store the received audio data in a buffer 301 (e.g., with the buffer size set to a first buffer size (t1 size (e.g., 100ms)). Figure 6b In the buffer 301). External electronic devices can be accessed via decoder 303 (e.g., Figure 1The decoder 303 decodes the audio data output from the buffer 301 and processes the PCM samples (e.g., first PCM samples) of the decoded audio data using a first number of PCM samples to output the PCM samples processed using the first number of PCM samples.
[0118] According to the embodiments, such as Figure 3 As shown, in response to the electronic device ( Figure 3 The external electronic device 101 receives a request to increase the size of buffer 301. The external electronic device can adjust the size of buffer 301 by increasing its size, such that the size of buffer 301 is a specified buffer size (t3 size (e.g., 300ms)). When the size of buffer 301 increases to the specified buffer size (e.g., t3 size), the external electronic device can decode the audio data output from buffer 301 via decoder 303, and process the decoded audio data's PCM samples (e.g., second PCM samples) using a changed second number of PCM samples (e.g., an increase from the first number of PCM samples), to output via PCM processing module 305 (e.g., ...). Figure 3 The PCM processing module 305 in the middle) processes PCM samples using a second number of PCM samples. The PCM processing module 305 can be configured to include a PCM sample control module 311 (e.g., Figure 2 The PCM sample control module 311 and the correction module 313 (e.g., Figure 6c The correction module 313 (in the original text) can change the number of PCM samples processed for processing audio data decoded in the decoder 303 from a first number of PCM samples to a second number of PCM samples based on a specified buffer size, and process PCM samples (e.g., second PCM samples) using the changed second number of PCM samples. The correction module 313 can correct the PCM samples processed using the second number of PCM samples, such that the pitch is maintained, and output the corrected PCM samples (e.g., second PCM samples) to the audio output circuit (e.g., ...). Figure 7a (The audio output circuit 209a or 209b in the middle).
[0119] According to the embodiments, such as Figure 7bAs shown, when the size of buffer 301 increases and reaches a second buffer size (e.g., size t3), which is a specified buffer size, an external electronic device can decode the audio data output from buffer 301 via decoder 303, and process the PCM samples of the decoded audio data (e.g., first PCM samples) using a first number of PCM samples to output processed PCM samples processed using the first number of PCM samples. When processing PCM samples (e.g., second PCM samples) using a second number of PCM samples, the buffer size can be gradually or incrementally increased until the buffer size reaches the second buffer size.
[0120] Figure 7c , Figure 7a and Figure 1 This is a diagram illustrating an example of the operation process for controlling a buffer in an external electrical device according to an embodiment.
[0121] According to the embodiments, such as Figure 2 As shown, when from an external first electronic device (e.g., Figures 1 to 3 and Figure 3 When the first electronic device 101 receives audio data, an external electronic device (e.g., Figure 3 The external electronic device 102 can temporarily store the received audio data in a buffer 301 (e.g., with the buffer size set to a first buffer size (t3 size (e.g., 300ms)). Figure 7b In the buffer 301). External electronic devices can be accessed via decoder 303 (e.g., Figure 3 The decoder 303 decodes the audio data output from the buffer 301 and processes the PCM samples (e.g., first PCM samples) of the decoded audio data using a first number of PCM samples to output the PCM samples processed using the first number of PCM samples.
[0122] According to the embodiments, such as Figure 3As shown, in response to a request received from the first electronic device to reduce the size of buffer 301 to a specified buffer size (t1 size (e.g., 100ms)), the external electronic device can adjust the size of buffer 301 by reducing its size so that the size of buffer 301 is the specified buffer size (t1 size (e.g., 100ms)). When the size of buffer 301 is reduced to the specified buffer size (e.g., t1 size), the external electronic device can decode the audio data output from buffer 301 via decoder 303 and process the PCM samples of the decoded audio data (e.g., the second PCM sample) using a changed second number of PCM samples (e.g., the number reduced from the first number of PCM samples) to output via PCM processing module 305 (e.g., ...). Figure 3 The PCM processing module 305 in the middle) processes PCM samples using a second number of PCM samples. The PCM processing module 305 can be configured to include a PCM sample control module 311 (e.g., Figure 2 The PCM sample control module 311 and the correction module 313 (e.g., Figure 7c The correction module 313 (in the code) can change the number of PCM samples processed from the audio data decoded in the decoder 303 from a first number of PCM samples to a second number of PCM samples based on a specified buffer size, and process the PCM samples (e.g., the second PCM sample) using the changed second number of PCM samples. The correction module 313 can correct the PCM samples processed using the second number of PCM samples, such that the pitch is maintained, and output the corrected PCM samples (e.g., the second PCM sample) to the audio output circuit (e.g., ...). Figure 8 (The audio output circuit 209a or 209b in the middle).
[0123] According to the embodiments, such as Figure 9 As shown, when the size of buffer 301 gradually decreases and reaches a specified buffer size (e.g., size t1), an external electronic device can decode the audio data output from buffer 301 via decoder 303, and process the PCM samples of the decoded audio data (e.g., first PCM samples) using a first number of PCM samples to output processed PCM samples processed using the first number of PCM samples. When processing PCM samples (e.g., second PCM samples) using a second number of PCM samples, the buffer size can gradually or incrementally decrease until the buffer size reaches the second buffer size.
[0124] Figure 8 This is a diagram illustrating an example of the operation process of a buffer in a control electronic device and an external electronic device according to an embodiment. Figure 1This is a diagram illustrating an example of the operation process of a buffer in a control electronic device and an external electronic device according to an embodiment.
[0125] refer to Figure 2 In operation 801, according to an embodiment, the electronic device (e.g., Figures 1 to 3 and Figure 2 The electronic device 101 in the middle can be connected to an external electronic device (e.g., via a first communication scheme, such as Bluetooth communication) Figure 2 External electronic device 102). For example, electronic device 101 can be connected to the host device of external electronic device 102 (e.g., Figure 1 The secondary device 102a) in the external electronic device 102 is used to perform communication with the main device of the external electronic device 102, and the main device can perform communication with the secondary device of the external electronic device 102 (e.g., Figure 2 The communication link is established between the primary device and the secondary device (102b). The primary device can establish a communication link by transmitting information for the communication link (e.g., link-related information) to the secondary device and receiving a response. In another example, the external electronic device 102 can be connected to the secondary device or to both the primary device and the secondary device.
[0126] In operation 803, electronic device 101 (e.g., Figure 9 and Figure 2 The electronic device 101 in the middle can run a first application (or first content). For example, such as Figure 3 As shown, the first application can be an application 901 that provides music.
[0127] In operation 805, electronic device 101 can transmit audio data for running a first application to external electronic device 102 via a first communication scheme (e.g., Bluetooth communication). The buffer size information corresponding to the first application set in external electronic device 102 can be a first buffer size (e.g., 300ms). For example, a secondary device of external electronic device 102 can receive the audio data by monitoring the communication between electronic device 101 and the primary device. Alternatively, the audio data can be transmitted to the primary device 102a of external electronic device 102. The primary device 102a can transmit the received audio data to a secondary device 102b of external electronic device 102 via the established communication link (e.g., ...). Figure 2The primary device can transmit all audio data or some data (e.g., some untransmitted data) to the secondary device. The primary device can transmit received audio data upon request from the secondary device, or can transmit received audio data after inquiring whether the secondary device has received the received audio data. For example, the electronic device 101 can transmit audio data to the secondary device or both the primary and secondary devices. In operation 807, the external electronic device 102 can receive audio data (e.g., first audio data) from the electronic device 101 and temporarily store the received audio data (e.g., first audio data) in a buffer (e.g., ...). Figure 9 The buffer is stored in buffer 301, and the first audio data output via the buffer is decoded. For example, the buffer size can be set to a first buffer size (e.g., 300ms) before receiving a buffer size adjustment request. For example, when the master device receives audio data from the electronic device 101, the master device can transmit the audio data to the secondary device. The buffer size of the master device can be synchronized with the buffer size of the secondary device. When adjusting the buffer size, in order to synchronize with the secondary device, the master device can do the following: exchange buffer size synchronization information with the secondary device before starting to adjust the buffer size, set the current buffer size to the same buffer size as the secondary device, and start adjusting the buffer size simultaneously with the secondary device, and terminate the buffer size adjustment simultaneously with the secondary device.
[0128] According to an embodiment, based on audio data received from electronic device 101 in operation 805, external electronic device 102 can obtain at least one of the following as buffer-size-related information: information about the type of a first application running on electronic device 101, information about a specified buffer size, or information related to communication quality. The buffer-size-related information can be obtained periodically or upon receiving audio data. For example, external electronic device 102 can determine, based on the obtained buffer-size-related information, that the currently set buffer size (e.g., a first buffer size) does not need to be changed.
[0129] In operation 809, external electronic device 102 can process PCM samples of the decoded audio data using a set first number of PCM samples. External electronic device 102 can process these PCM samples via an audio output circuit (e.g., Figure 1 The audio output circuits 209a and 209b output PCM samples (e.g., first PCM samples) processed using a first number of PCM samples. In an embodiment, when the master device of the external electronic device 102 transmits the received audio data (e.g., first audio data) to the secondary device, the master device and the secondary device can perform operation 809 in the same manner.
[0130] In operation 811, electronic device 101 can run a second application while running a first application. For example, such as Figure 9 As shown, the second application could be application 903 providing a game, in which audio needs to be output immediately without delay. The buffer size information set corresponding to the second application could be the second buffer size (e.g., 100ms). In operation 811, the case of running the second application while running the first application has been described as an example; however, as another example, if immediacy is required when the electronic device 101 is operating based on, for example, stability, then when running the first application, the electronic device 101 does not perform operation 811, and information related to the adjustment of the buffer size can be set based on immediacy. For example, the electronic device 101 could display on a monitor (e.g., ...). Figure 9 The settings screen is displayed on the display device 160 in the middle so that the user can set information related to the adjustment of the buffer size without running an additional application (e.g., a second application).
[0131] In operation 813, electronic device 101 may transmit a request message for adjusting the buffer size of external electronic device 102. For example, electronic device 101 may transmit the request message based on the operation of a second application set to a second buffer size (e.g., 100ms). Alternatively, if immediacy is required when electronic device 101 is operating based on, for example, stability, electronic device 101 may not perform operation 811 while the first application is running, and may transmit a request message including information related to the adjustment of the buffer size set by the user in operation 813. The request message for adjusting the buffer size is configured to specify a packet format and may include control information indicating buffer size adjustment and information related to the buffer size. The information related to the buffer size may include at least one of information about the buffer size specified based on the second application, information about the type of the second application, and communication quality. For example, upon receiving a request message for adjusting the buffer size, the master device of external electronic device 102 may notify the secondary device of the request for adjusting the buffer size and exchange information with the secondary device for synchronizing the buffer size.
[0132] In operation 815, when external electronic device 102 receives a request message for adjusting the buffer size, external electronic device 102 can identify a specified buffer size based on the buffer size-related information included in the received request message. External electronic device 102 can change the number of PCM samples processed from a first number of PCM samples to a second number of PCM samples based on the specified buffer size. For example, the specified buffer size could be a second buffer size set to correspond to a second application (e.g., 100ms). External electronic device 102 can transmit a packet including information related to the buffer state according to the buffer size change at the point in time when the buffer size change begins upon receiving the request message. For example, when the master device of external electronic device 102 performs operation 815, the master device can identify the specified buffer size based on the buffer size-related information received according to the request for adjusting the buffer size, adjust the buffer size, and change the number of PCM samples processed from a first number of PCM samples to a second number of PCM samples. The master device can change the specified buffer size to the second number of PCM samples. The master device 102a can transmit information to the secondary device regarding a second number of altered PCM samples and a specified buffer size for requesting buffer size adjustment. The secondary device can synchronize its buffer size with the master device's buffer size based on the second number of altered PCM samples and the specified buffer size, and decode audio data output from the buffer whose size has been adjusted, processing the decoded PCM samples in the same manner as the master device.
[0133] In operation 817, electronic device 101 may transmit audio data (e.g., second audio data) included in the second application to external electronic device 102. For example, when the master device of external electronic device 102 receives the second audio data from electronic device 101, the master device may transmit the received second audio data to the secondary device.
[0134] In operation 819, the external electronic device 102 can receive audio data, temporarily store the audio data in a buffer, and decode the audio data output from the buffer (e.g., second audio data) to change the size of the buffer to a second buffer size (e.g., 100ms) that is a specified buffer size.
[0135] In operation 821, external electronic device 102 can process PCM samples of the decoded audio data (e.g., second audio data) using the changed second number of PCM samples, and output PCM samples processed using the second number of PCM samples. For example, when the master device of external electronic device 102 transmits received audio data (e.g., second audio data) to the secondary device, the master device and the secondary device can perform operation 821 in the same manner. For example, as Figure 2 As shown, if a second application (e.g., game 903) is running while a first application (e.g., music 901) is running in the first electronic device, and the buffer size decreases to a second buffer size (e.g., 100ms), the buffer size decreases, while audio data remains in the buffer, and some audio data is lost, so the user may experience sound interruption. To prevent sound interruption or pitch change due to the reduction in buffer size, the external electronic device 102 can process the PCM samples of the audio data output from the buffer and decoded when the buffer size decreases using a second number of altered PCM samples (the number reduced from the first number of PCM samples), and output the PCM samples processed using the second number of PCM samples. The external electronic device 102 can correct the PCM samples processed using the second number of PCM samples to maintain pitch.
[0136] In operation 823, external electronic device 102 can identify whether the buffer size being adjusted has reached a second buffer size (e.g., 100ms), which is a specified buffer size. If the buffer size reaches the second buffer size (e.g., 100ms), operation 825 can be executed. If the buffer size does not reach the second buffer size (e.g., 100ms), then when adjusting the buffer size by executing operations 819 and 821, a second number of PCM samples can be used to process the PCM samples of the decoded audio data. For example, all master and secondary devices can execute operation 823 in the same manner. As another example, when operation 823 is executed in the master device of external electronic device 102, the master device can transmit control information to the secondary devices based on the result of identifying whether the buffer size has reached the second buffer size (e.g., 100ms).
[0137] In operation 825, such as Figure 8 As shown, the external electronic device 102 can process PCM samples (e.g., first PCM samples) obtained by decoding audio data received via a buffer whose buffer size has been changed to a second buffer size (e.g., 100ms) using a first number of PCM samples, and via an audio output circuit (e.g., Figure 2The audio output circuits 209a and 209b in the middle output a PCM sample (e.g., a first PCM sample) processed using a first number of PCM samples. For example, both the main device and the secondary device can perform operation 825 in the same manner.
[0138] According to an embodiment, based on the fact that a second application is running, in operation 813, electronic device 101 may transmit a signal instructing the running of the second application or information about the type of the second application to external electronic device 102. External electronic device 102 may adjust the size of the buffer to a specified buffer size based on the information about the second application (e.g., the type of the second application).
[0139] exist Figure 2 During the operation shown, the main device of the external electronic device 102 (e.g., Figure 10 The main device 102a) and secondary devices (e.g., Figure 10 The operation of the secondary device 102b has not been described separately. However, for example, the operation of the external electronic device 102 can be performed in the same manner in the main device, and the main device can interoperate with the secondary device. For example, the operation of the external electronic device 102 can be performed in the same manner in the secondary device, and the secondary device can interoperate with the main device. For example, if both the main device 102a and the secondary device receive audio data from the electronic device 101, the operation of the external electronic device 102 can be performed in the same manner in both the main device 102a and the secondary device 102b.
[0140] Figure 1 This is a diagram illustrating an example of a screen for an electronic device for controlling a buffer according to another embodiment.
[0141] refer to Figure 2 The electronic device 101 can be displayed on a screen (e.g., Figure 11 The display device 160 in the middle displays a setting for controlling external electronic devices (e.g., Figure 12The setting screen 1001 displays information about the buffer of the external electronic device 102. The electronic device 101 can display objects on the setting screen 1001 that allow setting audio quality priorities for each content (or application) of the external electronic device 102. Here, the application displayed on the setting screen 1001 of the electronic device 101 can be an application related to the wearable device. The audio quality priority setting can be used as information related to adjusting the buffer size of the external electronic device 102. The setting screen 1001 can be configured to allow the user to directly input and set information. For example, if the user selects "Stability" as the audio quality priority setting for a first content (or a first application) on the setting screen 1001, the electronic device 101 can set information related to adjusting the buffer size as control information for increasing the buffer size (e.g., for changing the buffer size to a first buffer size). For example, if the user selects "Immediacy" on the settings screen 1001 as the audio quality priority setting for the first content (or the first application) through input, the electronic device 101 can set information related to adjusting the buffer size as control information for reducing the buffer size (e.g., for changing the buffer size to a second buffer size). For example, if the user selects "Balance Setting" on the settings screen 1001 as the audio quality priority setting for the first content (or the first application) through input, the electronic device 101 can set information related to adjusting the buffer size as control information for maintaining the default buffer size set in the external electronic device 102 or changing the buffer size to the default buffer size (e.g., for changing the buffer size to a third buffer size that is smaller than the first buffer size and larger than the second buffer size).
[0142] According to another embodiment, for example, if a problem occurs when the external electronic device 102 performs an operation to adjust the size of the buffer according to the audio quality priority setting (e.g., balance setting) selected on the setting screen 1001, the electronic device 101 can guide the user to select another audio quality priority setting (e.g., stability) by displaying information related to the occurrence of the problem on the current setting screen displayed on the display or on another screen. As another example, if a problem occurs, the electronic device 101 can automatically change the audio quality priority setting to another audio quality priority setting (e.g., stability). As another example, if the problem persists when the operation to adjust the size of the buffer is performed in the external electronic device 102 according to the audio quality priority setting selected on the setting screen 1001, the electronic device 101 can automatically change the audio quality priority setting to another audio quality priority setting, and then change it back to the previously selected audio quality priority setting after a predetermined time.
[0143] Figure 11 This is a diagram illustrating an example of the operation process of a buffer in a control electronic device according to another embodiment, and Figure 12 This is a diagram illustrating an example of the operation process of a buffer in a control electronic device according to another embodiment.
[0144] refer to Figure 1 and Figure 2 In operation type 1101, according to another embodiment, the electronic device (e.g., Figures 1 to 3 and Figure 1 The electronic device 101 in the middle can be connected to an external electronic device (e.g., via a first communication scheme, such as Bluetooth communication) Figure 2 External electronic device 102).
[0145] In operation 1103, electronic device 101 (e.g., Figure 12 and Figure 1 The first electronic device 101 can run a first application (or first content), obtain an audio source of the running first application, and process the obtained audio source into a first number of PCM samples (e.g., a first PCM sample). For example, as Figure 2 As shown, the first application could be an application that provides music.
[0146] In operation 1105, electronic device 101 can encode a first number of PCM samples (such as a first PCM sample) and transmit the encoded audio data to external electronic device 102 via a first communication scheme (such as Bluetooth communication). Figure 12 and Figure 12 External electronic device 102).
[0147] In operation 1107, while a second application (e.g., a navigation application) is running while a first application is running, electronic device 101 can identify whether the size of the buffer of external electronic device 102 has changed based on information related to the buffer size. If a change in the buffer size is identified, operation 1109 can be executed, and if the buffer size is identified as unchanged, operation 1103 can be executed again. For example, electronic device 101 can compare the buffer size information (e.g., 500ms) set for the first application as information related to the buffer size with the buffer size information (e.g., 100ms) set for the second application as information related to the buffer size, and if the buffer size information set for the first application differs from the buffer size information set for the second application, a change in the buffer size is identified. As another example, first electronic device 101 can identify whether the buffer size has changed based on user input information (as information related to the buffer size). For example, if for Figure 12 The second application of the navigation application 1203 shown requires real-time characteristics, which necessitates reducing waiting time. Therefore, the electronic device 101 can perform an operation to change the size of the buffer of the external electronic device 102, thereby reducing the size of the buffer.
[0148] In operation 1109, when a change in the size of the buffer is detected, the electronic device 101 may set the number of PCM samples processed from the audio source to a second number of PCM samples (e.g., a decrease from the first number of PCM samples) based on the detected information related to the buffer size, and process the PCM samples using the set second number of PCM samples.
[0149] In operation 1111, electronic device 101 can encode PCM samples (e.g., second PCM samples) processed using a second number of PCM samples. In operation 1111, electronic device 101 can transmit audio data (e.g., a navigation start sound, "Good Day!") of the encoded PCM samples (e.g., the second PCM sample) to external electronic device 102. External electronic device 102 can decode the received audio data and output the decoded PCM samples as is, without altering the number of PCM samples processed. For example, electronic device 101 processes PCM samples (either the first or second PCM sample) using a second number of PCM samples. The amount of audio data received from electronic device 101 (e.g., audio data mixed with music playback audio and navigation audio) is as follows... Figure 13When the external electronic device 102 shown is reduced, the external electronic device 102 can automatically change (increase or decrease). Here, the first PCM sample can be, for example, a PCM sample of audio data based on music playback, and the second PCM sample can be, for example, a PCM sample of audio data used for navigation (e.g., a navigation start sound).
[0150] In operation 1113, electronic device 101 can identify whether the size of the buffer has reached a second buffer size (e.g., 100ms), which is buffer size information set for a second application. If the size of the buffer is identified as reaching the second buffer size (e.g., 100ms), electronic device 101 can perform operation 1115. If the size of the buffer is identified as not reaching the second buffer size (e.g., 100ms), electronic device 101 can continuously process PCM samples of the audio source using a second number of PCM samples by performing operations 1109 to 1111.
[0151] In operation 1115, if the size of the buffer reaches the second buffer size (e.g., 100 ms), the electronic device 101 can process such a large number of PCM samples. Figure 13 The audio source shown contains PCM samples (e.g., the first PCM sample and the second PCM sample).
[0152] In operation 1117, electronic device 101 can encode PCM samples (e.g., first PCM sample and second PCM sample) processed using a first number of PCM samples, and transmit the encoded audio data (e.g., audio data mixed with music playback audio and navigation audio) to external electronic device 102.
[0153] Figure 1 This is a diagram illustrating an example of the operation process of a buffer in a control electronic device and a plurality of external electronic devices according to another embodiment.
[0154] refer to Figure 3 According to another embodiment, when multiple external electronic devices 1301 and 1303 (e.g., Figure 13When an external electronic device 102 is connected to electronic device 101, the signal strength or communication quality may vary depending on the distance between electronic device 101 and each of the external electronic devices 1301 and 1303, and the objects located between electronic device 101 and each of the external electronic devices 1301 and 1303. Therefore, electronic device 101 can obtain and manage information related to the signal strength or communication quality of communication between electronic device 101 and each of the external electronic devices 1301 and 1303. For example, if the signal strength or communication quality is less than or equal to a reference value based on information related to the signal strength or communication quality, audio interruption or noise is likely to occur. Therefore, electronic device 101 may be configured to increase the buffer (e.g., ...). Figure 13 The first control information regarding the size of the buffer (301) is used as information related to the buffer size to increase stability. For example, if the signal strength or communication quality is greater than or equal to a reference value, the probability of audio interruption or noise is low; therefore, the electronic device 101 can set a second control information for reducing the buffer size as information related to the buffer size to increase immediacy.
[0155] Electronic device 101 can transmit setting information related to the buffer size to each of external electronic devices 1301 and 1303, and each of external electronic devices 1301 and 1303 can set a specified buffer size corresponding to signal strength or communication quality based on the received information related to the buffer size. For example, if external electronic device 1301 receives first control information from electronic device 101 to increase the buffer size as information related to the buffer size, and because the signal strength (or communication quality) of the communication link between external electronic device 1301 and electronic device 101 is strong, external electronic device 1301 can set a first buffer size (e.g., 500ms) as the specified buffer size, and adjust the buffer size so that the current buffer size (e.g., 100ms) gradually increases to the set first buffer size (e.g., 500ms). For example, if external electronic device 1303 receives second control information from electronic device 101 to reduce the size of the buffer as information related to the buffer size, because the signal strength (or communication quality) of the communication link between external electronic device 1303 and electronic device 101 is weak, external electronic device 1303 can set a second buffer size (e.g., 100ms) as the specified buffer size and adjust the size of the buffer so that the current buffer size (e.g., 500ms) gradually decreases to the set second buffer size (e.g., 100ms).
[0156] According to another embodiment, such as Figure 2The signal strength or communication quality of the communication between the electronic device 101 described herein and each of the external electronic devices 1301 and 1303 can be directly identified in each of the external electronic devices 1301 and 1303, and in this case, no information related to the buffer size is received from the electronic device 101. Each of the external electronic devices 1301 and 1303 can adjust the size of the buffer based on the information related to the buffer size based on the directly identified signal strength or communication quality, such that the size of the buffer is increased to or decreased to a specified buffer size.
[0157] According to another embodiment, such as Figure 13 Each of the external electronic devices 1301 and 1303 shown can identify or set a specified buffer size based on received information related to the buffer size, and change the number of PCM samples processed for processing the PCM samples, thereby adjusting the buffer size based on the specified buffer size. Each of the external electronic devices 1301 and 1303 can process the PCM samples using the changed number of samples, correct the processed PCM samples to maintain pitch, and output the signal via an audio output circuit (e.g., ...). Figure 3 The audio output circuits 209a and 209b in the external electronic device 1301 allow the user to hear calibrated PCM samples. For example, if the external electronic device 1301 gradually increases the buffer size from a first buffer size (e.g., 100ms) to a second buffer size (e.g., 500ms), the external electronic device 1301 can process PCM samples processed using the first number of PCM samples by increasing the buffer size by the amount of increase from the first number of PCM samples, thus increasing the buffer size. Conversely, if the external electronic device 1303 gradually decreases the buffer size from a first buffer size (e.g., 500ms) to a second buffer size (e.g., 100ms), the external electronic device 1303 can process PCM samples processed using the first number of PCM samples by decreasing the buffer size by the amount of decrease from the first number of PCM samples, thus decreasing the buffer size.
[0158] According to another embodiment, such as Figure 3 Each of the external electronic devices 1301 and 1303 shown can perform a gradual adjustment of the buffer (e.g., Figure 2 The operation on the size of buffer 301 in the buffer allows the buffer size to be changed to a specified buffer size without changing the number of PCM samples processed, via the decoder (e.g., Figure 11 The decoder 303 in the middle decodes the audio data output from the resized buffer and outputs it via the audio output circuit (e.g., Figures 1 to 3The audio output circuits 102a and 120b in the circuit output the decoded PCM sample. According to another embodiment, such as... Figure 3 The electronic device 101 can process PCM samples using a changed processing quantity, thereby changing the buffer size of each of the external electronic devices 1301 and 1303, and outputting the PCM samples processed using the changed processing quantity to the external electronic device 1301 or 1303. The external electronic device 1301 or 1303 can receive the PCM samples processed using the changed processing quantity and can change the buffer size in response to the change in the amount of PCM samples received. For example, if the communication quality (or signal strength) of the communication link between the first electronic device 101 and the external electronic device 1301 is identified as good, the first electronic device 101 can process PCM samples of audio data to be transmitted to the external electronic device 1301 using an increased processing quantity and output the PCM samples processed using the increased processing quantity. The external electronic device 1301 receives PCM samples whose quantity increases with the increase in the processing quantity, therefore the buffer size of the external electronic device 1301 can gradually increase to the first buffer size (e.g., 500 ms). For example, if the communication quality (or signal strength) of the communication link between the first electronic device 101 and the external electronic device 1303 is identified as poor, the first electronic device 101 can process PCM samples of the audio data to be transmitted to the external electronic device 1303 using a reduced number of processing steps, and output the PCM samples processed using the reduced number of processing steps. The external electronic device 1303 receives PCM samples whose quantity decreases as the number of PCM samples processed decreases, so the size of the buffer of the external electronic device 1303 can be gradually reduced to a second buffer size (e.g., 100ms).
[0159] According to an embodiment, a control electronic device (e.g., Figures 1 to 3 The buffer in the external electronic device 102 (e.g., Figures 1 to 3 The method of buffer 301 in the buffer may include: connecting to an external electronic device (e.g., using a first communication scheme) Figure 2 The electronic device 101 in the middle will receive data from an external electronic device (e.g., Figure 2The electronic device 101 receives audio data and stores it in a buffer. It processes PCM samples obtained by decoding audio data output from the buffer using a first number of Pulse Code Modulation (PCM) samples and outputs PCM samples processed using the first number of PCM samples. In response to receiving a request from an external electronic device to adjust the buffer size, it changes the number of PCM samples processed from the first number of PCM samples to a second number of PCM samples. In response to the change from the number of PCM samples processed to the second number of PCM samples, it processes PCM samples obtained by decoding audio data output from the buffer using the second number of PCM samples when adjusting the buffer size and outputs PCM samples processed using the second number of PCM samples. When the buffer size being adjusted reaches a specified buffer size, it processes PCM samples obtained by decoding audio data output from the buffer using the first number of PCM samples and outputs PCM samples processed using the first number of PCM samples.
[0160] According to an embodiment, the method may further include: correcting the PCM samples processed using a second quantity of PCM samples to maintain pitch.
[0161] According to an embodiment, the method may further include: upon receiving a request from an external electronic device for adjusting the buffer size, receiving information related to the size of the buffer from the external electronic device, and identifying a specified buffer size based on the information related to the buffer size. The information related to the buffer size may include at least one of information about the specified buffer size, information about the type of application running on the external electronic device, or information about communication quality.
[0162] According to an embodiment, the method may further include transmitting information related to the state of the buffer to an external electronic device.
[0163] According to an embodiment, the first communication scheme may be Bluetooth communication.
[0164] The electronic device according to various embodiments can be one of a variety of types of electronic devices. Electronic devices may include, for example, portable communication devices (e.g., smartphones), computer devices, portable multimedia devices, portable medical devices, cameras, wearable devices, or home appliances. According to embodiments of this disclosure, the electronic device is not limited to those described above.
[0165] It should be understood that the various embodiments of this disclosure and the terminology used therein are not intended to limit the technical features set forth herein to the specific embodiments, but rather to include various changes, equivalents, or substitutions to the respective embodiments. In the description of the drawings, similar reference numerals may be used to refer to similar or related elements. It will be understood that nouns in the singular form corresponding to terms may include one or more things unless the relevant context clearly indicates otherwise. As used herein, each of the phrases such as “A or B,” “at least one of A and B,” “at least one of A or B,” “A, B, or C,” “at least one of A, B, and C,” and “at least one of A, B, or C” may include any one or all possible combinations of the items enumerated together with the corresponding phrase among the plurality of phrases. As used herein, terms such as “first” and “second” or “first” and “second” may be used to simply distinguish the respective component from another component and do not limit the component in other respects (e.g., importance or order). It will be understood that, whether the terms “operably” or “communically” are used or not, if an element (e.g., a first element) is referred to as “combined with another element (e.g., a second element),” “combined to another element (e.g., a second element),” “connected to another element (e.g., a second element),” or “attached to another element (e.g., a second element)”, it means that the first element can be directly (e.g., wired) connected to the second element, wirelessly connected to the second element, or connected to the second element via a third element.
[0166] As used herein, the term "module" can include a unit implemented in hardware, software, or firmware, and is used interchangeably with other terms (e.g., "logic," "logic block," "part," or "circuit"). A module can be a single integrated component adapted to perform one or more functions, or the smallest unit or part of such a single integrated component. For example, according to an embodiment, a module can be implemented in the form of an application-specific integrated circuit (ASIC).
[0167] The various embodiments set forth herein can be implemented as software (e.g., program 140) containing one or more instructions readable by a machine (e.g., electronic device 101) stored in a storage medium (e.g., internal memory 136 or external memory 138). For example, under the control of a processor, the processor (e.g., processor 120) of the machine (e.g., electronic device 101) can invoke and execute at least one of the one or more instructions stored in the storage medium, with or without the use of one or more other components. This enables the machine to operate to perform at least one function according to the invoked at least one instruction. The one or more instructions may include code generated by a compiler or code executable by an interpreter. Machine-readable storage media may be provided in the form of non-transitory storage media. The term "non-transitory" means only that the storage medium is a tangible device and does not include signals (e.g., electromagnetic waves), but this term does not distinguish between data being stored semi-permanently in the storage medium and data being temporarily stored in the storage medium.
[0168] According to embodiments, methods according to various embodiments of this disclosure may be included and provided in a computer program product. The computer program product can be traded as a product between a seller and a buyer. The computer program product may be distributed in the form of a machine-readable storage medium (e.g., a compact disk read-only memory (CD-ROM)) or via an app store (e.g., the Play Store). TM The computer program product may be published online (e.g., downloaded or uploaded), or may be distributed directly between two user devices (e.g., smartphones) (e.g., downloaded or uploaded). If published online, at least a portion of the computer program product may be temporarily generated, or at least a portion of the computer program product may be temporarily stored in a machine-readable storage medium (such as the memory of a manufacturer's server, an app store's server, or a forwarding server).
[0169] According to various embodiments, each of the above-described components (e.g., a module or program) may include a single entity or multiple entities. According to various embodiments, one or more of the above-described components may be omitted, or one or more other components may be added. Optionally or additionally, multiple components (e.g., modules or programs) may be integrated into a single component. In this case, according to various embodiments, the integrated component may still perform the one or more functions of each of the multiple components in the same or similar manner as the corresponding component of the multiple components performed one or more functions prior to integration. According to various embodiments, the operations performed by a module, program, or other component may be performed sequentially, in parallel, repeatedly, or heuristically, or one or more of the operations may be run in a different order or omitted, or one or more other operations may be added.
[0170] Machine-readable storage media (e.g., electronic device 101) may include hardware devices such as hard disks, floppy disks and magnetic tapes (e.g., magnetic tape), optical media (such as optical disc ROMs (CD-ROMs) and digital versatile discs (DVDs)), magneto-optical media (such as optical floppy disks), ROM, RAM, or flash memory. Examples of program instructions may include not only machine language code but also high-level language code executable by an interpreter from various computing devices. The aforementioned hardware devices may be configured to operate as one or more software modules to perform exemplary embodiments of this disclosure, and vice versa.
[0171] According to an embodiment, a non-transitory storage medium (e.g., Figure 1 The memory 201a or 201b in the memory may include executable instructions, which are executed by a processor (e.g., Figure 2 When the processor 205a or 205b in the middle is executed, it causes the processor to use a first communication scheme to communicate with an external electronic device (e.g., Figure 3 or The connection of the electronic device 101 in the middle will store the audio data received from the external electronic device in a buffer (e.g., In the buffer 301, a first number of Pulse Code Modulation (PCM) samples are processed using PCM samples, and PCM samples processed using the first number are output. The PCM samples are obtained by decoding audio data output from the buffer. In response to receiving a request from an external electronic device for adjusting the buffer size, the number of PCM samples processed is changed from the first number of PCM samples to a second number of PCM samples. In response to the change from the number of PCM samples processed to the second number of PCM samples, when adjusting the buffer size, the second number of PCM samples is used to process the PCM samples obtained by decoding audio data output from the buffer, and PCM samples processed using the second number of PCM samples are output. When the buffer size being adjusted reaches a specified buffer size, the first number of PCM samples is used to process the PCM samples obtained by decoding audio data output from the buffer, and PCM samples processed using the first number of PCM samples are output.
[0172] The embodiments disclosed herein are presented to describe and understand the disclosed technology and are not intended to limit the scope of this disclosure. Therefore, the scope of this disclosure should be construed as including all modifications or various embodiments based on the technical spirit of this disclosure.
Claims
1.An electronic device comprising: a communication circuitry; a memory including a buffer having a first buffer size, the buffer configured to store audio data received from an external electronic device via the communication circuitry; an audio output circuitry; and a processor electrically connected to the communication circuitry, the memory, and the audio output circuitry, wherein the memory stores instructions that, when executed by the processor, cause the electronic device to: control the communication circuitry to connect to the external electronic device with a first communication scheme; process PCM samples obtained by decoding audio data output from the buffer having the first buffer size with a first number of pulse code modulation (PCM) samples, and control the audio output circuitry to output the PCM samples processed with the first number of PCM samples; in response to receiving a request for adjusting a size of the buffer from the external electronic device, change a number of PCM samples processed from the first number of PCM samples to a second number of PCM samples; and in response to the change of the number of PCM samples processed to the second number of PCM samples, process PCM samples obtained by decoding audio data output from the buffer with the second number of PCM samples, and control the audio output circuitry to output the PCM samples processed with the second number of PCM samples; and based on the size of the buffer being changed from the first buffer size to a second buffer size, process PCM samples obtained by decoding audio data output from the buffer with the first number of PCM samples, and control the audio output circuitry to output the PCM samples processed with the first number of PCM samples. when the instructions are executed by the processor, cause the electronic device to correct the PCM samples processed with the second number of PCM samples so that a pitch is maintained. when the instructions are executed by the processor, cause the electronic device to: 2.The electronic device of claim 1, wherein, when receiving the request for adjusting the size of the buffer from the external electronic device, receive information about the size of the buffer from the external electronic device; and 3.The electronic device of claim 1, wherein identify the second buffer size based on the information about the size of the buffer, and wherein the information about the size of the buffer includes at least one of information about the second buffer size, information about a type of an application running on the external electronic device, or information about a communication quality. when the instructions are executed by the processor, cause the electronic device to control the communication circuitry to transmit information about a state of the buffer to the external electronic device, and wherein the first communication scheme is a Bluetooth communication. when the instructions are executed by the processor, cause the electronic device to: 4.The electronic device of claim 1, wherein when the electronic device performs a role of a master device, connect to a slave device via the first communication scheme; 5.The electronic device of claim 1, wherein transmit the audio data received from the external electronic device to the slave device; And in response to receiving a request for adjusting a size of the buffer, controlling the communication circuitry to transmit information of a second number of changed PCM samples and information about the second buffer size to the secondary device, wherein the buffer is synchronized with a buffer of the secondary device. 6.An electronic device comprising: communication circuitry; a memory; audio processing circuitry; and a processor electrically connected to the communication circuitry, the memory, and the audio processing circuitry, wherein the memory stores instructions that, when executed by the processor, cause the electronic device to: control the communication circuitry to connect to an external electronic device using a first communication scheme; control the audio processing circuitry to process PCM samples of an audio source with a first number of PCM samples; control the communication circuitry to transmit, to the external electronic device, audio data generated by encoding the PCM samples processed with the first number of PCM samples; in response to identifying occurrence of an event for controlling a buffer of the external electronic device, control the audio processing circuitry to process PCM samples of the audio source with a second number of PCM samples; and control the communication circuitry to transmit, to the external electronic device, audio data generated by encoding the PCM samples processed with the second number of PCM samples; and based on a size of the buffer of the external electronic device changing from a first buffer size to a second buffer size, control the communication circuitry to transmit, to the external electronic device, audio data generated by encoding PCM samples processed with the first number of PCM samples. the memory stores instructions that, when executed by the processor, cause the electronic device to correct the PCM samples processed with the second number of PCM samples so that a pitch is maintained. 7.The electronic device of claim 6, wherein the memory stores instructions that, when executed by the processor, cause the electronic device to: 8.The electronic device of claim 6, wherein, obtain information about a size of the buffer; and identify the second buffer size based on the information about the size of the buffer. the memory stores instructions that, when executed by the processor, cause the electronic device to identify the event to occur when a content of the audio source changes. 9.The electronic device of claim 6, wherein the memory stores instructions that, when executed by the processor, cause the electronic device to identify the event to occur when a communication quality between the electronic device and the external electronic device changes. 10.The electronic device of claim 6, wherein 11.The electronic device of claim 8, further comprising: a display, wherein the memory stores instructions that, when executed by the processor, cause the electronic device to identify the event to occur when information about at least one buffer size displayed on the display is selected by a user, and wherein the first communication scheme is a Bluetooth communication. 12.A method for controlling a buffer in an electronic device, the method comprising: connect to an external electronic device using a first communication scheme; store audio data received from the external electronic device in a buffer having a first buffer size; process PCM samples obtained by decoding audio data output from the buffer having the first buffer size, with a first number of PCM samples, and output the PCM samples processed with the first number of PCM samples; in response to receiving a request for adjusting a size of the buffer from the external electronic device, change a number of PCM samples processed from the first number of PCM samples to a second number of PCM samples; and in response to the change in the number of PCM samples processed to the second number of PCM samples, process PCM samples obtained by decoding audio data output from the buffer, with the second number of PCM samples, and output the PCM samples processed with the second number of PCM samples; and based on the size of the buffer changing from the first buffer size to a second buffer size, process PCM samples obtained by decoding audio data output from the buffer, with the first number of PCM samples, and output the PCM samples processed with the first number of PCM samples. 13.The method of claim 12, further comprising: correcting the PCM samples processed with the second number of PCM samples so that a pitch is maintained. 14.The method of claim 12, further comprising: when the request for adjusting the size of the buffer is received from the external electronic device, receiving information related to the size of the buffer from the external electronic device; and identifying the second buffer size based on the information related to the size of the buffer, wherein the information related to the size of the buffer includes at least one of information on the second buffer size, information on a type of an application program running on the external electronic device, or information on a communication quality. 15.The method of claim 12, further comprising: transmitting information related to a state of the buffer to the external electronic device, wherein the first communication scheme is a Bluetooth communication.
Citation Information
Patent Citations
Audio and video network playing method and device and electronic device
CN109963184A
Synchronizing wireless earphones
US20120230510A1
System having device-mount audio mode
US20190349662A1