# US 11,120,808 B2 · Audio playing method and apparatus, and terminal

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 11,120,808 B2
- Document ID: US11120808B2
- Status: Granted
- Kind: B2
- Application number: 16/798,185
- Filed: 2020-02-21
- Published: 2020-06-18
- Granted: 2021-09-14
- Earliest claimed: 2017-09-08
- Assignees: Xi'an Zhongxing New Software Co., Ltd.
- Applicants: Xi'an Zhongxing New Software Co., Ltd.
- Inventors: Huipeng Zeng
- Web page: https://patentgrep.com/patent/US11120808B2

## CPC

- G10L 19/008: Multichannel audio signal coding or decoding using interchannel correlation to reduce redundancy, e.g. joint-stereo, intensity-coding or matrixing
- H04R 5/04: Circuit arrangements, {e.g. for selective connection of amplifier inputs/outputs to loudspeakers, for loudspeaker detection, or for adaptation of settings to personal preferences or hearing impairments (combinations of amplifiers H03F3/68; stereophonic systems H04S)}
- G06F 3/162: {Interface to dedicated audio devices, e.g. audio drivers, interface to CODECs}
- H04M 1/72433: for voice messaging, e.g. dictaphones (for answering incoming calls H04M1/64)
- H04S 1/007: {in which the audio signals are in digital form (data reduction aspects thereof based on psychoacoustics G10L19/02)}
- H04S 3/008: {in which the audio signals are in digital form, i.e. employing more than two discrete digital channels (data reduction aspects thereof based on psychoacoustics G10L19/02)}
- H04M 2250/16: including more than one display unit
- H04R 2420/01: Input selection or mixing for amplifiers or loudspeakers
- H04R 2499/11: Transducers incorporated or for use in hand-held devices, e.g. mobile phones, PDA's, camera's
- H04R 2499/15: Transducers incorporated in visual displaying devices, e.g. televisions, computer displays, laptops
- G10L: SPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
- H04R: LOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; ELECTRIC HEARING AIDS; PUBLIC ADDRESS SYSTEMS (producing sounds with frequency not determined by supply frequency G10K)
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- H04M: TELEPHONIC COMMUNICATION (circuits for controlling other apparatus via a telephone cable and not involving telephone switching apparatus G08)
- H04S: STEREOPHONIC SYSTEMS

## Abstract

The present disclosure provides an audio playing method and apparatus, and a terminal. The method includes: obtaining a combined third pulse code modulation (PCM) code stream according to a first PCM code stream and a second PCM code stream, where information about the first PCM code stream and information about the second PCM code stream are carried in respective channels of the third PCM code stream; inputting the third PCM code stream to a DAC, and outputting the third PCM code stream to a first speaker and a second speaker through the DAC for playback. According to the embodiments of the present disclosure, two audio code streams are combined into one audio code stream, and the information about the two audio code streams are carried in different channels of the combined audio code stream.

## Claims

### Claim 1

An audio playing method, comprising:
obtaining a combined third pulse code modulation (PCM) code stream according to a first PCM code stream and a second PCM code stream, wherein information about the first PCM code stream and information about the second PCM code stream are carried in one of channels of the third PCM code stream, respectively; and
inputting the third PCM code stream to a digital to analog converter (DAC), and outputting the third PCM code stream to a first speaker and a second speaker through the DAC for playing;
wherein obtaining the combined third PCM code stream according to the first PCM code stream and the second PCM code stream comprises:
superposing left and right channels of the first PCM code stream to obtain first mono data, using the first mono data as a first channel of a first to-be-combined PCM code stream, obtaining corresponding second PCM code stream attenuation data according to the second PCM code stream, and using the second PCM code stream attenuation data as a second channel of the first to-be-combined PCM code stream;
superposing left and right channels of the second PCM code stream to obtain second mono data, and using the second mono data as a second channel of a second to-be-combined PCM code stream; obtaining corresponding first PCM code stream attenuation data according to the first PCM code stream, and using the first PCM code stream attenuation data as a first channel of the second to-be-combined PCM code stream; and
combining the first to-be-combined PCM code stream and the second to-be-combined PCM code stream; and obtaining the combined third PCM code stream.

### Claim 2 (depends on 1)

The audio playing method according to claim 1, wherein obtaining the combined third PCM code stream according to the first PCM code stream and the second PCM code stream comprises:
superposing left and right channels of the first PCM code stream to obtain first mono data, using the first mono data as a first channel of a first to-be-combined PCM code stream, and setting a second channel of the first to-be-combined PCM code stream to be empty;
superposing left and right channels of the second PCM code stream to obtain second mono data, using the second mono data as a second channel of a second to-be-combined PCM code stream, and setting a first channel of the second to-be-combined PCM code stream to be empty; and
combining the first to-be-combined PCM code stream and the second to-be-combined PCM code stream; and obtaining the combined third PCM code stream.

### Claim 3 (depends on 1)

The audio playing method according to claim 1, wherein
obtaining corresponding second PCM code stream attenuation data according to the second PCM code stream comprises: rotating a data phase of the second PCM code stream by 180 degrees, and multiplying the data phase by a preset attenuation coefficient to obtain the second PCM code stream attenuation data; and
obtaining corresponding first PCM code stream attenuation data according to the first PCM code stream comprises: rotating a data phase of the first PCM code stream by 180 degrees, and multiplying the data phase by a preset attenuation coefficient to obtain the first PCM code stream attenuation data.

### Claim 4 (depends on 1)

The audio playing method according to claim 1, wherein before obtaining the combined third PCM code stream according to the first PCM code stream and the second PCM code stream, the method further comprises:
determining that a first channel corresponding to the first PCM code stream is one of a left(L) channel and a right(R) channel, and determining that a second channel corresponding to the second PCM code stream is the other of the L channel and the R channel, to combine the first PCM code stream and the second PCM code stream according to the determined first and second channels.

### Claim 5 (depends on 4)

The audio playing method according to claim 4, wherein determining that the first channel corresponding to the first PCM code stream is one of the L channel and the R channel and determining that a second channel corresponding to the second PCM code stream is the other of the L channel and the R channel comprises:
finding out, according to an audio code stream, a UID of an application to which the audio code stream belongs; wherein the audio code stream is the first PCM code stream or the second PCM code stream;
determining a corresponding playing screen according to the UID of the application;
determining, according to a correspondence between playing screens and speakers, a speaker corresponding to the audio code stream; and
determining, according to a correspondence between speakers and channels, a channel corresponding to the audio code stream.

### Claim 6

An audio playing apparatus, disposed on a terminal, comprising:
a processor, and
a memory, communicably with the processor;
wherein the memory stores instructions executable on the processor; when executed by the processor, the instructions cause the processor to perform a method comprising:
obtaining a combined third pulse code modulation (PCM) code stream according to a first PCM code stream and a second PCM code stream, wherein information about the first PCM code stream and information about the second PCM code stream are carried in one of channels of the third PCM code stream, respectively; and
inputting the third PCM code stream to a digital to analog converter (DAC), and outputting the third PCM code stream to a first speaker and a second speaker through the DAC for playing;
wherein obtaining the combined third PCM code stream according to the first PCM code stream and the second PCM code stream comprises:
superposing left and right channels of the first PCM code stream to obtain first mono data, using the first mono data as a first channel of a first to-be-combined PCM code stream, obtaining corresponding second PCM code stream attenuation data according to the second PCM code stream, and using the second PCM code stream attenuation data as a second channel of the first to-be-combined PCM code stream;
superposing left and right channels of the second PCM code stream to obtain second mono data, and using the second mono data as a second channel of a second to-be-combined PCM code stream; obtaining corresponding first PCM code stream attenuation data according to the first PCM code stream, and using the first PCM code stream attenuation data as a first channel of the second to-be-combined PCM code stream; and
combining the first to-be-combined PCM code stream and the second to-be-combined PCM code stream; and obtaining the combined third PCM code stream.

### Claim 7 (depends on 6)

The audio playing apparatus according to claim 6, wherein obtaining the combined third PCM code stream according to the first PCM code stream and the second PCM code stream comprises:
superposing left and right channels of the first PCM code stream to obtain first mono data, using the first mono data as a first channel of a first to-be-combined PCM code stream, and setting a second channel of the first to-be-combined PCM code stream to be empty;
superposing left and right channels of the second PCM code stream to obtain second mono data, using the second mono data as a second channel of a second to-be-combined PCM code stream, and setting a first channel of the second to-be-combined PCM code stream to be empty; and
combining the first to-be-combined PCM code stream and the second to-be-combined PCM code stream; and obtaining the combined third PCM code stream.

### Claim 8 (depends on 6)

The audio playing apparatus according to claim 6, wherein obtaining corresponding second PCM code stream attenuation data according to the second PCM code stream comprises: rotating a data phase of the second PCM code stream by 180 degrees, and multiplying the data phase by a preset attenuation coefficient to obtain the second PCM code stream attenuation data; and
obtaining corresponding first PCM code stream attenuation data according to the first PCM code stream comprises: rotating a data phase of the first PCM code stream by 180 degrees, and multiplying the data phase by a preset attenuation coefficient to obtain the first PCM code stream attenuation data.

### Claim 9 (depends on 6)

The audio playing apparatus according to claim 6, wherein before obtaining the combined third PCM code stream according to the first PCM code stream and the second PCM code stream, the method further comprises:
determining that a first channel corresponding to the first PCM code stream is one of a left(L) channel and a right(R) channel, and determining that a second channel corresponding to the second PCM code stream is the other of the L channel and the R channel, to combine the first PCM code stream and the second PCM code stream according to the determined first and second channels.

### Claim 10 (depends on 9)

The audio playing apparatus according to claim 9, wherein determining that a first channel corresponding to the first PCM code stream is one of the L channel and the R channel and determining that a second channel corresponding to the second PCM code stream is the other of the L channel and the R channel comprises:
finding out, according to an audio code stream, a UID of an application to which the audio code stream belongs; wherein, the audio code stream is the first PCM code stream or the second PCM code stream;
determining a corresponding playing screen according to the UID of the application;
determining, according to a correspondence between playing screens and speakers, a speaker corresponding to the audio code stream; and
determining, according to a correspondence between speakers and channels, a channel corresponding to the audio code stream.

### Claim 11

A terminal, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein when the processor executes the computer program, implements processing of a method comprising:
obtaining a combined third pulse code modulation (PCM) code stream according to a first PCM code stream and a second PCM code stream, wherein information about the first PCM code stream and information about the second PCM code stream are carried in one of channels of the third PCM code stream, respectively; and
inputting the third PCM code stream to a digital to analog converter (DAC), and outputting the third PCM code stream to a first speaker and a second speaker through the DAC for playing;
wherein obtaining the combined third PCM code stream according to the first PCM code stream and the second PCM code stream comprises:
superposing left and right channels of the first PCM code stream to obtain first mono data, using the first mono data as a first channel of a first to-be-combined PCM code stream, obtaining corresponding second PCM code stream attenuation data according to the second PCM code stream, and using the second PCM code stream attenuation data as a second channel of the first to-be-combined PCM code stream;
superposing left and right channels of the second PCM code stream to obtain second mono data, and using the second mono data as a second channel of a second to-be-combined PCM code stream; obtaining corresponding first PCM code stream attenuation data according to the first PCM code stream, and using the first PCM code stream attenuation data as a first channel of the second to-be-combined PCM code stream; and
combining the first to-be-combined PCM code stream and the second to-be-combined PCM code stream; and obtaining the combined third PCM code stream.

### Claim 12 (depends on 11)

The terminal according to claim 11, wherein obtaining the combined third PCM code stream according to the first PCM code stream and the second PCM code stream comprises:
superposing left and right channels of the first PCM code stream to obtain first mono data, using the first mono data as a first channel of a first to-be-combined PCM code stream, and setting a second channel of the first to-be-combined PCM code stream to be empty;
superposing left and right channels of the second PCM code stream to obtain second mono data, using the second mono data as a second channel of a second to-be-combined PCM code stream, and setting a first channel of the second to-be-combined PCM code stream to be empty; and
combining the first to-be-combined PCM code stream and the second to-be-combined PCM code stream; and obtaining the combined third PCM code stream.

### Claim 13 (depends on 11)

The terminal according to claim 11, wherein
obtaining corresponding second PCM code stream attenuation data according to the second PCM code stream comprises: rotating a data phase of the second PCM code stream by 180 degrees, and multiplying the data phase by a preset attenuation coefficient to obtain the second PCM code stream attenuation data; and
obtaining corresponding first PCM code stream attenuation data according to the first PCM code stream comprises: rotating a data phase of the first PCM code stream by 180 degrees, and multiplying the data phase by a preset attenuation coefficient to obtain the first PCM code stream attenuation data.

### Claim 14 (depends on 11)

The terminal according to claim 11, wherein before obtaining the combined third PCM code stream according to the first PCM code stream and the second PCM code stream, the method further comprises:
determining that a first channel corresponding to the first PCM code stream is one of a left(L) channel and a right(R) channel, and determining that a second channel corresponding to the second PCM code stream is the other of the L channel and the R channel, to combine the first PCM code stream and the second PCM code stream according to the determined first and second channels.

### Claim 15 (depends on 14)

The terminal according to claim 14, wherein determining that the first channel corresponding to the first PCM code stream is one of the L channel and the R channel and determining that a second channel corresponding to the second PCM code stream is the other of the L channel and the R channel comprises:
finding out, according to an audio code stream, a UID of an application to which the audio code stream belongs; wherein the audio code stream is the first PCM code stream or the second PCM code stream;
determining a corresponding playing screen according to the UID of the application;
determining, according to a correspondence between playing screens and speakers, a speaker corresponding to the audio code stream; and
determining, according to a correspondence between speakers and channels, a channel corresponding to the audio code stream.
