US 11,720,317 B2
Electronic device and method for controlling buffer
Kyusang Ryu, Gyeonggi-do (KR); Gupil Cheong, Gyeonggi-do (KR); Sanghyeok Sim, Gyeonggi-do (KR); Sungjun Choi, Gyeonggi-do (KR); Doosuk Kang, Gyeonggi-do (KR); and Seongmin Je, Gyeonggi-do (KR)
Assigned to Samsung Electronics Co., Ltd., Suwon-si (KR)
Filed by Samsung Electronics Co., Ltd., Gyeonggi-do (KR)
Filed on Feb. 9, 2021, as Appl. No. 17/171,165.
Claims priority of application No. 10-2020-0015956 (KR), filed on Feb. 10, 2020.
Prior Publication US 2021/0247950 A1, Aug. 12, 2021
Int. Cl. H04B 3/00 (2006.01); G06F 3/16 (2006.01); G10L 19/00 (2013.01); H04W 76/14 (2018.01); H04W 4/80 (2018.01); H04B 3/54 (2006.01); H04R 1/08 (2006.01); H04R 1/10 (2006.01)
CPC G06F 3/162 (2013.01) [G10L 19/00 (2013.01); H04B 3/54 (2013.01); H04R 1/08 (2013.01); H04R 1/1016 (2013.01); H04R 1/1025 (2013.01); H04R 1/1041 (2013.01); H04W 4/80 (2018.02); H04W 76/14 (2018.02); H04R 2420/07 (2013.01)] 20 Claims
OG exemplary drawing
 
1. An electronic device, comprising:
a communication circuit;
a memory including a buffer;
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 connect to an external electronic device with a first communication scheme;
control the memory to store, in the buffer having a first buffer size, audio data received from the external electronic device via the communication circuit;
process pulse code modulation (PCM) samples obtained by decoding the audio data output from the buffer having the first buffer size, with a first number of PCM samples, and control the audio output circuit to output the PCM samples which are 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 in the processing number of PCM samples 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 circuit to output the PCM samples which are 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 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 which are processed with the first number of PCM samples.
 
8. An electronic device, comprising:
a communication circuit;
a memory;
an audio processing circuit; and
a processor electrically connected to the communication circuit, the memory, and the audio processing circuit,
wherein the processor is configured to:
control the communication circuit to connect to an external electronic device using a first communication scheme;
control the audio processing circuit to process pulse code modulation (PCM) samples for an audio source with a first number of PCM samples;
control the communication circuit to transmit, to the external electronic device, audio data which is generated by encoding the PCM samples which are 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 circuit to process PCM samples for the audio source with a second number of PCM samples
control the communication circuit to transmit, to the external electronic device, audio data which is generated by encoding the PCM samples which are processed with the second number of PCM samples; and
based on a size of the buffer of the external electronic device being changed from a first buffer size to a second buffer size, control the communication circuit to transmit, to the external electronic device, audio data which is generated by encoding PCM samples which are processed with the first number of PCM samples.
 
15. A method for controlling a buffer in an electronic device, the method comprising:
connecting to an external electronic device using a first communication scheme;
storing, in the buffer having a first buffer size, audio data received from the external electronic device via a communication circuit;
processing pulse code modulation (PCM) samples obtained by decoding the audio data output from the buffer having the first buffer size, with a first number of PCM samples, and outputting the PCM samples which are 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, 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 in the processing number of PCM samples to the second number of PCM samples, processing PCM samples obtained by decoding audio data output from the buffer with the second number of PCM samples, and outputting the PCM samples which are 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, processing PCM samples obtained by decoding audio data output from the buffer with the first number of PCM samples, and outputting the PCM samples which are processed with the first number of PCM samples.