CN111199743B - Audio coding format determining method and device, storage medium and electronic equipment - Google Patents

Audio coding format determining method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN111199743B
CN111199743B CN202010129474.1A CN202010129474A CN111199743B CN 111199743 B CN111199743 B CN 111199743B CN 202010129474 A CN202010129474 A CN 202010129474A CN 111199743 B CN111199743 B CN 111199743B
Authority
CN
China
Prior art keywords
audio
audio coding
format
bluetooth
coding format
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010129474.1A
Other languages
Chinese (zh)
Other versions
CN111199743A (en
Inventor
候祥
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202010129474.1A priority Critical patent/CN111199743B/en
Publication of CN111199743A publication Critical patent/CN111199743A/en
Application granted granted Critical
Publication of CN111199743B publication Critical patent/CN111199743B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L19/00Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis
    • G10L19/005Correction of errors induced by the transmission channel, if related to the coding algorithm
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L19/00Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis
    • G10L19/04Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis using predictive techniques
    • G10L19/16Vocoder architecture
    • G10L19/167Audio streaming, i.e. formatting and decoding of an encoded audio signal representation into a data stream for transmission or storage purposes
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L19/00Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis
    • G10L19/04Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis using predictive techniques
    • G10L19/16Vocoder architecture
    • G10L19/18Vocoders using multiple modes
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L19/00Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis
    • G10L19/04Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis using predictive techniques
    • G10L19/16Vocoder architecture
    • G10L19/18Vocoders using multiple modes
    • G10L19/22Mode decision, i.e. based on audio signal content versus external parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Computational Linguistics (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • Acoustics & Sound (AREA)
  • Multimedia (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Communication Control (AREA)

Abstract

The embodiment of the application discloses a method, a device, a storage medium and electronic equipment for determining an audio coding format, wherein the method comprises the following steps: acquiring a first audio coding format supported by Bluetooth audio equipment under an audio coding protocol and a first coding parameter corresponding to the first audio coding format, and when the first audio coding format is not matched with a second audio coding format supported by the terminal under the audio coding protocol and/or the first coding parameter is not matched with a second audio coding parameter corresponding to the second audio coding format, switching the second audio coding format into a default audio coding format under the audio coding protocol, and controlling to perform audio coding by adopting the default audio coding format. By adopting the embodiment of the application, the stability of Bluetooth audio connection between the terminal and the Bluetooth audio equipment can be improved, and the normal use of the Bluetooth audio function is ensured.

Description

Audio coding format determining method and device, storage medium and electronic equipment
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and apparatus for determining an audio encoding format, a storage medium, and an electronic device.
Background
The bluetooth communication technology is widely used in terminals and bluetooth audio devices as a short-range wireless communication method. The terminal (such as a smart phone) and the Bluetooth audio equipment (such as a Bluetooth sound box and a Bluetooth earphone) establish Bluetooth audio connection through an audio transmission protocol, so that audio data can be played on the Bluetooth audio equipment.
Currently, prior to communication using bluetooth communication technology, it is necessary to determine the audio coding format between two devices. Once the bluetooth audio device is in the same audio encoding format as the priority determination on the terminal, an audio connection is established. When the two audio coding parameters (such as bit rate, sampling rate, etc.) are not matched, the audio connection is interrupted, so that Bluetooth audio data sent by the terminal cannot be played.
Disclosure of Invention
The embodiment of the application provides an audio coding format determining method, an audio coding format determining device, a storage medium and electronic equipment, which can improve the stability of Bluetooth audio connection between a terminal and Bluetooth audio equipment and ensure normal use of Bluetooth audio functions. The technical scheme is as follows:
in a first aspect, an embodiment of the present application provides a method for determining an audio coding format, where the method includes:
Acquiring a first audio coding format supported by Bluetooth audio equipment under an audio coding protocol and a first coding parameter corresponding to the first audio coding format;
determining that the first audio coding format is not matched with a second audio coding format supported by the terminal under the audio coding protocol, and/or that the first coding parameters are not matched with second audio coding parameters corresponding to the second audio coding format, and switching the second audio coding format to a default audio coding format under the audio coding protocol;
and controlling to carry out audio coding by adopting the default audio coding format.
In a second aspect, an embodiment of the present application provides an audio coding format determining apparatus, including:
the system comprises a format parameter acquisition module, a first audio coding module and a second audio coding module, wherein the format parameter acquisition module is used for acquiring a first audio coding format supported by Bluetooth audio equipment under an audio coding protocol and a first coding parameter corresponding to the first audio coding format;
the coding format switching module is used for switching the second audio coding format into a default audio coding format under the audio coding protocol when the first audio coding format is not matched with the second audio coding format supported by the terminal under the audio coding protocol and/or the first coding parameter is not matched with the second audio coding parameter corresponding to the second audio coding format;
And the audio coding control module is used for controlling the audio coding to be carried out by adopting the default audio coding format. In a third aspect, embodiments of the present application provide a computer storage medium storing a plurality of instructions adapted to be loaded by a processor and to perform the above-described method steps.
In a fourth aspect, an embodiment of the present application provides an electronic device, which may include: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the above-mentioned method steps.
The technical scheme provided by the embodiments of the application has the beneficial effects that at least:
in one or more embodiments of the present application, a terminal switches a second audio coding format to a default audio coding format supported by a terminal and a bluetooth audio device under an audio coding protocol by acquiring a first audio coding format supported by the bluetooth audio device under the audio coding protocol and a first coding parameter corresponding to the first audio coding format, when the first audio coding format is not matched with a second audio coding format supported by the terminal under the audio coding protocol, and/or the first coding parameter is not matched with a second audio coding parameter corresponding to the second audio coding format, and performs audio coding in the default audio coding format. The problem that Bluetooth audio connection is interrupted under the condition that the Bluetooth audio formats supported by the terminal and the Bluetooth audio equipment are the same and corresponding audio coding parameters are not matched can be avoided, and the stability of Bluetooth audio connection between the terminal and the Bluetooth audio equipment is improved, so that normal use of Bluetooth audio functions is ensured.
Drawings
In order to more clearly illustrate the embodiments of the application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of an audio coding format determining method according to an embodiment of the present application;
fig. 2 is a flowchart of another audio coding format determining method according to an embodiment of the present application;
fig. 3 is a terminal bluetooth setting interface related to an audio coding format determining method according to an embodiment of the present application;
fig. 4 is a schematic diagram of terminal coding format selection related to an audio coding format determining method according to an embodiment of the present application;
fig. 5 is a schematic view of a scene architecture for audio coding format determination according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of an audio coding format determining apparatus according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a format parameter obtaining module according to an embodiment of the present application;
Fig. 8 is a schematic structural diagram of a coding format switching module according to an embodiment of the present application
Fig. 9 is a schematic structural diagram of another audio coding format determining apparatus according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
In the description of the present application, it should be understood that the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. In the description of the present application, it should be noted that, unless expressly specified and limited otherwise, "comprise" and "have" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those listed steps or elements but may include other steps or elements not listed or inherent to such process, method, article, or apparatus. The specific meaning of the above terms in the present application will be understood in specific cases by those of ordinary skill in the art. Furthermore, in the description of the present application, unless otherwise indicated, "a plurality" means two or more. "and/or", describes an association relationship of an association object, and indicates that there may be three relationships, for example, a and/or B, and may indicate: a exists alone, A and B exist together, and B exists alone. The character "/" generally indicates that the context-dependent object is an "or" relationship.
The present application will be described in detail with reference to specific examples.
In one embodiment, as shown in fig. 1, an audio coding format determination method is specifically proposed, which may be implemented in dependence on a computer program and may be run on an audio coding format determination device based on von neumann system. The computer program may be integrated in the application or may run as a stand-alone tool class application.
Specifically, the audio coding format determining method includes:
step 101: and acquiring a first audio coding format supported by the Bluetooth audio equipment under an audio coding protocol and a first coding parameter corresponding to the first audio coding format.
The audio coding protocol may be understood as a protocol formulated by the bluetooth special interest group (Special Interest Group, SIG) for audio data transmission by a bluetooth audio transmitter (Source) and a bluetooth audio receiver (Sink) via a bluetooth connection. The audio coding protocol may be a bluetooth advanced audio transmission protocol (Advanced Audio Distribution Profile, A2 DP), and in the A2DP protocol, a bluetooth audio transmitting end (Source) and a bluetooth audio receiving end (Sink) are connected through bluetooth A2DP to realize transmission of high-quality audio data.
The A2DP protocol specifies the support of audio codec by the bluetooth audio sender and the bluetooth audio receiver, where SBC (Sub-band Coding) audio Coding formats are necessary, and other audio Coding formats are optional, such as MP3 (Moving Picture Experts Group Audio Layer III), AAC (Advanced Audio Coding), WMA (Windows Media Audio), ATRAC (Adaptive Transform Acoustic Coding), and so on.
The first audio coding format may be understood as an audio coding format supported by the bluetooth audio device under an audio coding protocol, such as at least one of an MP3 audio coding format, an AAC audio coding format, a WMA audio coding format, etc.
The first coding parameter corresponds to the first audio coding format, which can be understood as a working state parameter of the first audio coding format supported by the bluetooth audio device when audio data is coded, for example, the first coding parameter can be at least one coding parameter of sampling rate, signal-to-noise ratio, total harmonic distortion, bit rate and the like.
The terminal can acquire Bluetooth audio information of the Bluetooth audio equipment under the condition that Bluetooth connection is established with the Bluetooth audio equipment or the Bluetooth audio equipment is to be used for audio playing, and particularly acquire the audio coding format supported by the Bluetooth audio equipment based on an audio coding protocol and first coding parameters corresponding to the audio coding format.
In a specific implementation scenario, the first audio coding format of the bluetooth audio device acquired by the terminal and the first coding parameter corresponding to the first audio coding format may be actively pushed by the bluetooth audio device, specifically, after the bluetooth connection is established with the bluetooth audio device, the bluetooth audio device may monitor that the bluetooth connection is established successfully, the bluetooth audio device may acquire all audio coding information-first audio coding format and the first coding parameter corresponding to the first audio coding format under the audio coding protocol (such as the A2DP protocol) supported by the local end, for example, acquire preset audio coding information in a local storage space of the bluetooth audio device, and then the bluetooth audio device pushes the audio coding information-first audio coding format and the first coding parameter corresponding to the first audio coding format to the terminal through bluetooth connection with the terminal, and at this time, the terminal may acquire the first audio coding format and the first coding parameter by receiving the audio coding information.
In a specific implementation scenario, the terminal is used as a Source terminal, and the Bluetooth audio device is used as a Sink terminal; the terminal may generally define a target audio coding format in advance, where the target audio coding format may be understood that the terminal performs audio coding on local audio data or online audio data in the target audio coding format preferentially when establishing a bluetooth audio connection with any bluetooth audio device, and in practical application, a high-quality coding mode with higher quality is generally selected according to the audio quality corresponding to the audio coding format, for example, the target audio coding format is determined to be an AAC audio coding format with higher quality. In the embodiment of the application, in order to avoid the problem that the bluetooth audio connection (such as an A2DP connection) is disconnected or the audio playing fails due to the mismatch of the audio coding parameters corresponding to the audio coding format and the audio coding format of the bluetooth audio device, the terminal can directly determine whether the bluetooth audio device supports the target audio coding format and the target audio coding parameters corresponding to the target audio coding format, which is specifically as follows:
One way may be to obtain the target audio encoding format directly from the bluetooth audio device, as well as the target audio encoding parameters supported by the bluetooth audio device. Such as: the bluetooth audio device supports the AAC audio coding format and other A, B, C audio coding formats, and the terminal may directly send a request for acquiring the target audio coding format (AAC audio coding format) and the target audio coding parameters supported by the bluetooth audio device to the bluetooth audio device, where the bluetooth audio device feeds back the first audio coding format (i.e., AAC audio coding format) and the first coding parameters (i.e., audio coding parameters corresponding to the AAC audio coding format) based on the request
And then judging whether the target audio coding parameters supported by the terminal are matched with the target audio coding parameters supported by the Bluetooth audio equipment. It should be noted that, in the actual application scenario, when the terminal and the bluetooth audio device support the same audio coding format, the audio coding parameters corresponding to the same audio coding format supported by the terminal are not matched with the audio coding parameters corresponding to the same audio coding format supported by the bluetooth audio device. For example: the terminal and the Bluetooth audio equipment simultaneously support a target audio coding format-AAC coding format, taking audio coding parameters as bit rate and sampling rate as an example, wherein the bit rate supported by the terminal is A, and the sampling rate is B; the bit rate supported by the Bluetooth audio equipment is a, and the sampling rate is B; at this time, the audio coding parameters corresponding to the same AAC coding format supported by the terminal are not matched with the audio coding parameters corresponding to the same AAC coding format supported by the bluetooth audio device;
Step 102: and determining that the first audio coding format is not matched with a second audio coding format supported by the terminal under the audio coding protocol, and/or determining that the first coding parameters are not matched with second audio coding parameters corresponding to the second audio coding format, and switching the second audio coding format into a default audio coding format under the audio coding protocol.
The second audio coding format may be understood as an audio coding format supported by the terminal under an audio coding protocol, such as at least one of an MP3 audio coding format, an AAC audio coding format, a WMA audio coding format, etc., which is typically different from the default audio coding format.
The second coding parameter corresponds to the second audio coding format, which may be understood as a working state parameter of the second audio coding format supported by the terminal when audio data is coded, for example, the first coding parameter may be understood as one or more coding parameters of sampling rate, signal-to-noise ratio, total harmonic distortion, bit rate, and the like.
The default audio coding format is usually one supported by all or most bluetooth audio devices, and it can be understood that when the format of the audio coding of the terminal is usually the default audio coding format, the bluetooth audio device can usually perform audio coding and decoding based on the default audio coding format; in practical applications, the default audio Coding format is preferably selected from audio Coding formats for supporting audio Coding and decoding by the bluetooth audio transmitting end and the bluetooth audio receiving end, for example, the support of audio Coding and decoding by the bluetooth audio transmitting end and the bluetooth audio receiving end is specified in the A2DP protocol, wherein the SBC (Sub-band Coding) audio Coding format is selected from audio Coding formats, and the default audio Coding format can be the SBC audio Coding format. It should be noted that, when the terminal and the bluetooth audio device perform audio encoding and decoding on the audio book under the A2DP protocol in the SBC audio encoding format, the terminal and the bluetooth audio device generally support audio encoding parameters corresponding to the SBC audio encoding format.
Specifically, taking the audio coding protocol as the A2DP protocol as an example, the audio coding of the A2DP protocol generally includes an Apt-X audio coding format, an SBC audio coding format, an AAC audio coding format, an LDAC audio coding format, generally an Apt-X audio coding format, an AAC audio coding format, where the LDAC audio coding format has higher audio quality than the corresponding audio quality of the SBC audio coding format, and generally the second audio coding format of the terminal may be an AAC audio coding format, it will be understood that the terminal may take the AAC audio coding format as a preference when using a certain application program (such as a certain music program) or establishing a bluetooth connection with a bluetooth audio device.
Specifically, after the terminal obtains the first audio coding format and the first coding parameter supported by the bluetooth audio device under the audio coding protocol, the terminal may obtain the second audio coding format and the second audio coding format supported by the audio coding protocol, for example, the second audio coding format and the second audio coding format supported by the terminal are usually stored in the audio coding configuration file, and the terminal may obtain the second audio coding format and the second coding parameter supported by the audio coding protocol in the local audio coding configuration file. And then judging whether the first audio coding format is matched with a second audio coding format or not, and judging whether the first coding parameters are matched with second audio coding parameters corresponding to the second audio coding format or not.
In a specific implementation scenario, the second audio coding format supported by the terminal is an AAC audio coding format; the second audio coding parameters are: bit rate 165kbps, sample rate: 48khz; the first audio coding format supported by the Bluetooth audio equipment is an AAC audio coding format; the first audio coding parameters are: bit rate 128kbps, sample rate: 48khz or 44.1khz, comparing the first audio coding format and the second audio coding format to be the same audio coding format (AAC audio coding format), the sampling rates of the first coding parameter and the second audio coding parameter are consistent, and the bit rates of the first coding parameter and the second audio coding parameter are inconsistent; at this time, the terminal determines that the first audio coding format matches a second audio coding format supported by the terminal under the audio coding protocol but that the first coding parameter does not match a second audio coding parameter corresponding to the second audio coding format.
Specifically, after determining that the first audio coding format is not matched with a second audio coding format supported by the terminal under the audio coding protocol and/or the first coding parameter is not matched with a second audio coding parameter corresponding to the second audio coding format, the terminal switches the currently encoded audio coding format from the second audio coding format (such as an AAC audio coding format) to a default audio coding format under the audio coding protocol (such as an SBC audio coding format under an A2DP protocol), so that when a user starts an audio playing function on the terminal, the local or online audio data is encoded by adopting the default audio coding format.
After determining that the first audio coding format matches a second audio coding format supported by the terminal under the audio coding protocol and/or that the first coding parameter matches a second audio coding parameter corresponding to the second audio coding format, the terminal keeps the currently encoded audio coding format-the second audio coding format (such as AAC audio coding format), which is understood to be compatible with the second audio coding format supported by the bluetooth audio device, and the terminal does not need to switch the second audio coding format at this time.
Step 103: and controlling to carry out audio coding by adopting the default audio coding format.
Specifically, after determining that the first audio coding format is not matched with the second audio coding format supported by the terminal under the audio coding protocol and/or the first coding parameter is not matched with the second audio coding parameter corresponding to the second audio coding format by executing the steps, the terminal determines that the default audio coding format is the current audio coding format under the audio coding protocol (such as the A2DP protocol) from the second audio format supported by the terminal and the default audio coding format. Then registering SEP (Stream End Point) the default audio coding format under the audio coding protocol (such as the A2DP protocol) and negotiating with the bluetooth audio device via the SEP to establish the SEP corresponding to the default audio coding format under the audio coding protocol (such as the A2DP protocol) as well, thereby completing the establishment of the bluetooth audio connection. After completing the establishment of the bluetooth audio connection, the application on the terminal may encode the local audio data or the online audio data by the corresponding audio encoder (e.g., SBC audio encoding) of the corresponding default audio encoding format, and the terminal may then provide Transport Services and AV capabilities the encoded audio stream data to the bluetooth audio device via this interface.
In one or more embodiments of the present application, a terminal switches a second audio coding format to a default audio coding format supported by a terminal and a bluetooth audio device under an audio coding protocol by acquiring a first audio coding format supported by the bluetooth audio device under the audio coding protocol and a first coding parameter corresponding to the first audio coding format, when the first audio coding format does not match a second audio coding format supported by the terminal under the audio coding protocol and/or the first coding parameter does not match a second audio coding parameter corresponding to the second audio coding format, and performs audio coding in the default audio coding format. The problem that Bluetooth audio connection is interrupted under the condition that the Bluetooth audio formats supported by the terminal and the Bluetooth audio equipment are the same and corresponding audio coding parameters are not matched can be avoided, and the stability of Bluetooth audio connection between the terminal and the Bluetooth audio equipment is improved, so that normal use of Bluetooth audio functions is ensured.
Referring to fig. 2, fig. 2 is a flowchart illustrating another embodiment of an audio coding format determining method according to the present application. Specific:
Step 201: and sending a coded information acquisition request under an audio coding protocol to the Bluetooth audio equipment.
The request may be understood as an indication or requirement for requesting the bluetooth audio device to operate, as code for requesting the bluetooth audio device to specify certain controls for performing certain operations or functional implementations. The code information obtaining request may be understood as a code that the terminal requests the code information of the bluetooth audio device, and the bluetooth audio device may obtain the locally stored audio code information by executing the code, i.e. "the first audio coding format supported under the audio coding protocol and the first coding parameter corresponding to the first audio coding format".
Specifically, after the bluetooth connection with the bluetooth audio device is established, the terminal may send, based on the bluetooth connection, a code information acquisition request under an audio coding protocol to the bluetooth audio device, so as to query audio coding information supported by the bluetooth audio device, such as a supported audio coding format and audio coding parameters corresponding to the audio coding format. After receiving the coded information obtaining request, the bluetooth audio device may respond to the coded information obtaining request, and by executing a code requesting the coded information of the bluetooth audio device, the locally stored audio coded information- "the first audio coding format supported under the audio coding protocol and the first coding parameter corresponding to the first audio coding format" may be obtained, and then the coded information including the first audio coding format and the first coding parameter may be sent to the terminal through a bluetooth connection.
Step 202: and receiving a first audio coding format supported by the audio coding protocol and a first coding parameter corresponding to the first audio coding format, which are sent by the Bluetooth audio equipment.
Specifically, when the bluetooth audio device responds to the encoded information acquisition request, the bluetooth audio device acquires the encoded information supported under the audio encoding protocol, and sends the encoded information containing the first audio encoding format and the first encoding parameters to the terminal through bluetooth connection. The terminal can receive a first audio coding format supported by the audio coding protocol and a first coding parameter corresponding to the first audio coding format, which are sent by the Bluetooth audio equipment.
Step 203: and judging whether the first audio coding format is matched with a second audio coding format supported by the terminal under the audio coding protocol, and judging whether the first coding parameters are matched with second audio coding parameters corresponding to the second audio coding format.
Specifically, the terminal determines whether the first audio coding format is matched with the second audio coding format, and whether the first coding parameter is matched with the second audio coding parameter corresponding to the second audio coding format, where there are generally 4 cases:
1. The first audio coding format is not matched with a second audio coding format, and the first coding parameters are not matched with second audio coding parameters corresponding to the second audio coding format;
2. the first audio coding format is not matched with the second audio coding format, and the first coding parameters are matched with the second audio coding parameters corresponding to the second audio coding format;
3. the first audio coding format is matched with a second audio coding format, and the first coding parameters are not matched with the second audio coding parameters corresponding to the second audio coding format;
4. the first audio encoding format is matched to a second audio encoding format, and the first encoding parameters are matched to second audio encoding parameters corresponding to the second audio encoding format.
Of the 4 cases described above, case 4: when the first audio coding format is matched with a second audio coding format and the first coding parameters are matched with the second audio coding parameters corresponding to the second audio coding format, the terminal determines that the Bluetooth audio equipment controls to adopt the second audio coding format for audio coding; case 1, case 2, and case 3, the terminal may perform the method described in step 204.
The determining whether the first audio coding format and the second audio coding format are matched may be that the terminal determines whether the first audio coding format and the second audio coding format are the same audio coding format or not: 1. when the first audio coding format and the second audio coding format are the same audio coding format, determining that the first audio coding format is matched with the second audio coding format; 2. and when the first audio coding format and the second audio coding format are different audio coding formats, determining that the first audio coding format and the second audio coding format are not matched. Whether the first coding parameter is matched with a second audio coding parameter corresponding to the second audio coding format or not can be judged based on a preset coding parameter matching rule;
an encoding parameter matching rule may be to determine whether the values of the audio encoding parameters are consistent: 1. when the first coding parameter is consistent with the value of the second audio coding parameter corresponding to the second audio coding format, determining that the first coding parameter is matched with the second audio coding parameter; 2. and when the values of the first coding parameters and the second audio coding parameters corresponding to the second audio coding format are inconsistent, determining that the first coding parameters and the second audio coding parameters are not matched.
The encoding parameter matching rule may be based on a range of values of audio encoding parameters: if the value or range of the first audio parameter falls within the value range of the second audio parameter, judging whether the value or range of the first audio parameter falls within the value range of the second audio parameter; 1. when the value or range of the first audio parameter falls within the value range of the second audio parameter, determining that the first encoding parameter matches the second audio encoding parameter; 2. when the value or range of the first audio parameter does not fall within the value range of the second audio parameter, it is determined that the first encoding parameter does not match the second audio encoding parameter.
In a specific implementation scenario, the second audio coding format supported by the terminal is an AAC audio coding format; the second audio coding parameters are: bit rate 165kbps, sample rate: 48khz; the first audio coding format supported by the Bluetooth audio equipment is an AAC audio coding format; the first audio coding parameters are: bit rate 128kbps, sample rate: 48khz or 44.1khz, comparing the first audio coding format and the second audio coding format to be the same audio coding format (AAC audio coding format), the sampling rates of the first coding parameter and the second audio coding parameter are consistent, and the bit rates of the first coding parameter and the second audio coding parameter are inconsistent; at this time, the terminal determines that the first audio coding format matches a second audio coding format supported by the terminal under the audio coding protocol but that the first coding parameter does not match a second audio coding parameter corresponding to the second audio coding format.
Optionally, when the bluetooth audio device may support a plurality of first audio coding formats, that is, the terminal may obtain the plurality of first audio coding formats and first audio coding information corresponding to each first audio coding format, the determining whether the first audio coding format matches with a second audio coding format supported by the terminal under the audio coding protocol and whether the first coding parameter matches with a second audio coding parameter corresponding to the second audio coding format is specifically as follows:
the terminal may sequence each first audio coding format, for example, each first audio coding format is a, b, c, d four audio coding formats, where the sequence of the sequence is: b. c, d, a. The terminal determines the current first audio coding format according to the sorting order of the first audio coding formats (namely, determines that the current first audio coding format is the b audio coding format), and executes the steps of judging whether the first audio coding format is matched with a second audio coding format supported by the terminal under the audio coding protocol and judging whether the first coding parameter is matched with a second audio coding parameter corresponding to the second audio coding format;
And when the first audio coding format (such as b audio coding format) is not matched with a second audio coding format supported by the terminal under the audio coding protocol, and/or the first coding parameters are not matched with second audio coding parameters corresponding to the second audio coding format, acquiring the next first audio coding format of the current first audio coding format according to the sorting order of the plurality of first audio coding formats, taking the next first audio coding format as the current first audio coding format, and executing the steps of judging whether the first audio coding format is matched with the second audio coding format supported by the terminal under the audio coding protocol, and judging whether the first coding parameters are matched with the second audio coding parameters corresponding to the second audio coding format.
Step 204: and determining that the first audio coding format is not matched with a second audio coding format supported by the terminal under the audio coding protocol, and/or that the first coding parameters are not matched with second audio coding parameters corresponding to the second audio coding format.
See step 102, which is not described in detail herein.
Optionally, when the number of the second audio coding formats supported by the terminal is multiple, the second audio coding format in step 204 may be a target audio coding format that the terminal works by default, that is, the target audio coding format is preferably selected when the bluetooth audio connection is established with the bluetooth audio device and the audio data coding transmission is performed, where the target audio coding format may be default when the terminal leaves the factory, or may be user-defined, that is, the user performs setting on an audio coding format setting page of the terminal.
For example: when the bluetooth function of the terminal is started, the user selects the bluetooth audio coding format option to input a coding format setting instruction to the terminal in the bluetooth setting interface of the terminal as shown in fig. 3, at this time, the terminal responds to the coding format setting instruction input by the user, and displays a corresponding display window of the bluetooth audio coding format on the current display interface, as shown in fig. 4, fig. 4 is a schematic diagram of coding format selection of the terminal, and in the interface as shown in fig. 4, the user can select a target audio coding format from a plurality of audio coding format options respectively, for example, the user can select the AAC audio coding format in a finger touch manner.
When the terminal performs step 204 to determine that the target audio coding format does not match, the terminal performs the step of obtaining the next second audio coding format of the current second audio coding format according to the order of priority of the plurality of second audio coding formats.
Step 205: and acquiring the next second audio coding format of the current second audio coding format according to the high-low order of the priorities of the plurality of second audio coding formats.
The priority may be understood as a priority of each second audio encoding format determined based on a priority determination policy.
In a specific embodiment, the priority determining policy may be that the terminal determines the priority corresponding to each second audio coding format according to the audio coding quality (such as tone quality and timbre) corresponding to each second audio coding format. Taking an AAC audio coding format, an MP3 audio coding format, and an aptX audio coding format as examples, under the condition of the same code rate, the audio coding quality is generally HWA > aptX > AAC > MP3; the priority order of the four coding formats is: HWA > aptX > AAC > MP3.
In a specific embodiment, the priority determining policy may be that the terminal determines the priority of each second audio coding format in combination with the audio coding quality and the bluetooth connection status parameter of the terminal and the bluetooth audio device. The bluetooth connection status parameter may be at least one of a received signal strength indicator (received signalstrength indication, RSSI), a received signal code power (received signal code power, RSCP), a ratio of received chip signal strength to noise strength (eclio)/a ratio of received bit power to noise spectrum density (EcNo)/a signal-to-noise ratio (SNR)/a reference signal reception quality (reference signal receivingquality, RSRQ), a Bit Error Rate (BER)/a block error rate (BLER)/a packet error rate (packet error ratio, PER) of a received bluetooth signal, etc., which may be determined according to a practical application scenario, and is not limited herein.
Specifically, the terminal has a function of monitoring the bluetooth connection state, and can monitor the communication parameters of the bluetooth communication link between the terminal and the bluetooth audio device in real time, so as to obtain the bluetooth connection state parameters of the bluetooth audio device, and obtain a plurality of coding coefficients corresponding to the second audio coding formats respectively, where the coding coefficients can be understood as audio coding coefficients determined according to the audio coding quality corresponding to each second audio coding format, for example, the HWA format is determined to be 2.1, the aptx is determined to be 2.2, the aac is determined to be 2.3, and the mp3 is determined to be 2.4 according to the audio coding quality corresponding to each second audio coding format.
And then inputting the coding coefficients and the Bluetooth connection state parameters into a scoring model to respectively obtain a plurality of coding scores corresponding to the second audio coding formats.
The method comprises the steps of acquiring a large amount of sample data in an actual Bluetooth communication link environment in advance, extracting characteristic information, and marking the sample data, wherein the characteristic information comprises at least one communication parameter (RSSI, SNR, RSCP and the like) and coding coefficients in signal receiving indication information, and a scoring model is created. The scoring model may be trained using a plurality of test samples, e.g., the scoring model may be based on at least one of a convolutional neural network (Convolutional Neural Network, CNN) model, a deep neural network (Deep Neural Network, DNN) model, a recurrent neural network (Recurrent Neural Networks, RNN), a model, an embedded (empadd) model, a gradient boost decision tree (Gradient Boosting Decision Tree, GBDT) model, a logistic regression (Logistic Regression, LR) model, training the scoring model based on already-labeled sample data, and obtaining a trained scoring model.
The terminal may then determine the priority of the plurality of second audio encoding formats based on the order of magnitude of the encoding scores. The next second audio coding format of the current second audio coding format may be acquired in the order of priority of a plurality of the second audio coding formats, for example: the second audio coding formats are A, B, C, D and A, B, C, D, and the priority order of the second audio coding formats is A > C > D > B. It will be appreciated that when it is determined in step 204 that the second audio encoding format-a audio encoding format does not match, then the next second audio encoding format-C audio encoding format of the current second audio encoding format is acquired according to the priority order. Then the next step is performed of taking the next second audio coding format as the current second audio coding format.
Step 206: and taking the next second audio coding format as a current second audio coding format, and judging whether the first audio coding format is matched with a second audio coding format supported by the terminal under the audio coding protocol or not, and whether the first coding parameter is matched with a second audio coding parameter corresponding to the second audio coding format or not.
Specifically, taking the example of step 205 as an example, the terminal obtains a next second audio coding format-C audio coding format of the current second audio coding format according to the priority orders of the plurality of second audio coding formats, takes the C audio coding format as the current second audio coding format, and determines whether the first audio coding format is matched with a second audio coding format (i.e., C audio coding format) supported by the terminal under the audio coding protocol, and whether the first coding parameter is matched with a second audio coding parameter (i.e., C audio coding parameter corresponding to the C audio coding format) corresponding to the second audio coding format;
when the first audio coding format is matched with a second audio coding format (namely, C audio coding format) supported by the terminal under the audio coding protocol, and the first coding parameters are matched with second audio coding parameters corresponding to the second audio coding format (namely, C audio coding parameters corresponding to the C audio coding format), the terminal determines to perform audio coding in the current second audio coding format, namely, controls to perform audio coding in the second audio coding format (namely, C audio coding format).
And when the first audio coding format is not matched with a second audio coding format supported by the terminal under the audio coding protocol and/or the first coding parameters are not matched with second audio coding parameters corresponding to the second audio coding format, the terminal executes the step of acquiring the next second audio coding format of the current second audio coding format according to the priority order of a plurality of second audio coding formats.
Step 207: when the next second audio coding format does not exist, the second audio coding format is switched to a default audio coding format under the audio coding protocol.
Specifically, when the terminal determines, based on the priority orders of the plurality of second audio coding formats, whether the second audio coding formats meet the matching requirement exist in the second audio coding formats or not, and when the priority orders are based on the priority orders, the priority orders determine that the first audio coding format is not matched with the last second audio coding format supported by the terminal under the audio coding protocol, and/or the first coding parameters are not matched with the second audio coding parameters corresponding to the last second audio coding format. At this time, the terminal may determine that each second audio coding format supported under the audio coding protocol (such as the A2DP protocol) cannot meet the matching requirement, and it may be understood that if the terminal encodes in the second audio coding format, the bluetooth audio connection (such as the bluetooth A2DP audio connection) between the terminal and the bluetooth audio device cannot maintain normal audio data interaction, and the bluetooth audio device cannot receive the complete audio coding data, that is, the bluetooth audio device cannot play audio. At this point, the terminal typically determines that there is no next second audio encoding format, and the terminal device may perform audio encoding in the default audio encoding format. In practical applications, the default audio Coding format is preferably selected from audio Coding formats for supporting audio Coding and decoding by the bluetooth audio transmitting end and the bluetooth audio receiving end, for example, the support of audio Coding and decoding by the bluetooth audio transmitting end and the bluetooth audio receiving end is specified in the A2DP protocol, wherein the SBC (Sub-band Coding) audio Coding format is selected from audio Coding formats, and the default audio Coding format can be the SBC audio Coding format. It should be noted that, when the terminal and the bluetooth audio device perform audio encoding and decoding on the audio book under the A2DP protocol in the SBC audio encoding format, the terminal and the bluetooth audio device generally support audio encoding parameters corresponding to the SBC audio encoding format. Then, the terminal controls the current encoded audio encoding format to switch from the second audio encoding format (such as an AAC audio encoding format) to a default audio encoding format under the audio encoding protocol (such as an SBC audio encoding format under the A2DP protocol), so that when the user starts the audio playing function on the terminal, the terminal can control to perform audio encoding on the local or online audio data by using the default audio encoding format.
Step 208: and sending format confirmation information to the Bluetooth audio equipment, wherein the format confirmation information is used for indicating the Bluetooth audio equipment to perform audio coding by adopting the default audio coding format.
Specifically, after determining that the first audio coding format is not matched with the second audio coding format supported by the terminal under the audio coding protocol and/or the first coding parameter is not matched with the second audio coding parameter corresponding to the second audio coding format by executing the steps, the terminal determines that the default audio coding format is the current audio coding format under the audio coding protocol (such as the A2DP protocol) from the second audio format supported by the terminal and the default audio coding format. And then registering a Stream End Point (SEP) of a default audio coding format under the audio coding protocol (such as the A2DP protocol), negotiating with the bluetooth audio device through the SEP to establish the SEP of the default audio coding format also corresponding to the audio coding protocol (such as the A2DP protocol), and simultaneously sending format confirmation information to the bluetooth audio device, wherein the format confirmation information may include an audio coding format and/or an audio coding parameter corresponding to the audio coding format, for example, the format confirmation information may include an SBC audio coding format under the A2DP protocol and/or an audio coding parameter corresponding to the SBC audio coding format. After receiving the format confirmation information, the bluetooth audio device sets the current audio coding configuration, for example, the current audio coding format may be specifically set to be an SBC audio coding format under the A2DP protocol, and the audio coding parameters are set to be audio coding parameters corresponding to the SBC audio coding format, so as to complete setting of bluetooth audio connection and bluetooth audio coding and decoding, at this time, the bluetooth audio device may control to work in the default audio coding format, receive audio coding data sent by the terminal through the audio coding connection, and call an audio decoder corresponding to the default audio coding format to decode the audio coding data, so as to play audio corresponding to the audio coding data normally; or the bluetooth audio device may control to work in the default audio coding format, code the audio data of the local terminal by calling an audio encoder corresponding to the default audio coding format, and send the encoded audio data to the terminal through a bluetooth audio connection (such as a bluetooth A2DP connection) with the terminal.
Step 209: and controlling to carry out audio coding by adopting the default audio coding format.
See step 103, which is not described here.
Step 210: and acquiring the equipment identifier of the Bluetooth audio equipment, storing the equipment identifier into a Bluetooth blacklist, and closing the second audio coding format.
The device identification is typically indicative of the class, model, specification, etc. of the bluetooth audio device. Typically the device identification may be an id representing a bluetooth audio device, e.g. 1, 2, 3 etc. numbers representing ids; may be a MAC address, IP address representing a bluetooth audio device; may be key characters representing bluetooth audio devices, such as a, b, c, etc.; may be a key string representing a bluetooth audio device, such as pth_a, pth_b, pth_c; etc.
Furthermore, the device identifier may also be information such as a chip model number, a factory code, a bluetooth protocol version number, etc. of the bluetooth audio device.
Specifically, the terminal may generally control the included bluetooth communication module to scan bluetooth devices within a bluetooth communication range to search for bluetooth audio devices within the bluetooth communication range, and it may be understood that, once the terminal scans the bluetooth audio devices, the device identifier of the bluetooth audio devices may be obtained from the bluetooth audio devices; or, in the process of establishing the Bluetooth connection with the Bluetooth audio device, the terminal can scan the Bluetooth broadcasting packet of the Bluetooth audio device for starting the Bluetooth function broadcasting, and the terminal can analyze the received Bluetooth broadcasting packet to acquire the device identifier in the Bluetooth broadcasting packet; because the device identifier can uniquely identify one Bluetooth audio device, the terminal can distinguish different Bluetooth devices according to the Bluetooth identifier, so that when the second audio coding format and the second audio coding parameters do not meet the matching requirement of the Bluetooth audio device, the Bluetooth identifier of the Bluetooth audio device can be recorded, the terminal can avoid controlling to adopt the second audio coding format to code when the Bluetooth audio connection with the Bluetooth device is established next time, and close the second audio coding format, and the closing can understand to inactivate the coding process related to the second audio coding format.
In a possible implementation manner, the terminal may establish a corresponding bluetooth blacklist for each supported second bluetooth audio coding format, for example, the terminal supports A, B, C, D bluetooth audio coding formats corresponding to bluetooth blacklist a, bluetooth blacklist B, bluetooth blacklist C and bluetooth blacklist D, respectively. By executing the audio coding format determining method of the embodiment of the application, when determining that a certain second Bluetooth audio coding format is not matched with that supported by Bluetooth audio equipment, namely determining a target blue tooth blacklist corresponding to the certain second Bluetooth audio coding format, adding the equipment identifier to the target blue tooth blacklist, and the terminal can avoid encoding by adopting the certain second Bluetooth audio coding format when establishing Bluetooth audio connection with the Bluetooth equipment next time.
In a possible implementation manner, the terminal may be classified according to the audio coding quality corresponding to each supported second bluetooth audio coding format, for example, the audio coding quality may be classified into a primary audio coding format and a secondary audio coding format, where the primary audio coding mode may at least include an LDAC coding format and an APT-X coding format, and the secondary audio coding mode may at least include an AAC coding format and a SBC (sub band code). It should be understood that the above audio encoding method is only needed by way of example, and is not limited to the type of audio encoding method, and specifically, a rule may be defined to divide all audio encoding methods into a primary audio encoding format and a secondary audio encoding format, where the primary audio encoding corresponds to bluetooth blacklist 1 and the secondary audio encoding corresponds to bluetooth blacklist 2. When the Bluetooth audio equipment does not support primary audio coding, adding the equipment identification into a Bluetooth blacklist 1; and when the Bluetooth audio device does not support the secondary audio coding, adding the device identification to the Bluetooth blacklist 2; in actual operation, if the device identifier of the bluetooth audio device is in the bluetooth blacklist 1, that is, the bluetooth audio coding mode corresponding to the bluetooth blacklist 1 is not adopted for coding.
In one or more embodiments of the present application, a terminal switches a second audio coding format to a default audio coding format supported by a terminal and a bluetooth audio device under an audio coding protocol by acquiring a first audio coding format supported by the bluetooth audio device under the audio coding protocol and a first coding parameter corresponding to the first audio coding format, when the first audio coding format does not match a second audio coding format supported by the terminal under the audio coding protocol and/or the first coding parameter does not match a second audio coding parameter corresponding to the second audio coding format, and performs audio coding in the default audio coding format. The problem of interruption of Bluetooth audio connection caused by mismatching of corresponding audio coding parameters under the condition that the Bluetooth audio formats supported by the terminal and the Bluetooth audio equipment are the same can be avoided, and the stability of Bluetooth audio connection between the terminal and the Bluetooth audio equipment is improved, so that normal use of Bluetooth audio functions is ensured; when the first audio coding format is not matched with the second audio coding format and/or the first audio parameter is not matched with the second audio parameter, the equipment identification is stored in a Bluetooth blacklist, the terminal can match the equipment identification in the Bluetooth blacklist based on the next matching audio coding format of the Bluetooth audio equipment, and the time of the next matching audio coding format of the Bluetooth audio equipment can be saved; and when the number of the second audio formats supported by the terminal is multiple, determining the high-low order of the priorities of the multiple second audio coding formats based on the coding coefficients respectively corresponding to the Bluetooth connection state parameters and the second audio coding formats, and performing audio coding format matching according to the high-low order of the priorities, so that the accuracy of audio coding format matching can be improved.
Fig. 5 is a schematic view of a scene of an audio coding format determining system according to an embodiment of the present application. As shown in fig. 5, the audio encoding format determining system may include a terminal 100 and a bluetooth audio device cluster. The bluetooth audio device cluster may include a plurality of bluetooth audio devices, as shown in fig. 1, specifically including bluetooth audio device 1, bluetooth audio devices 2 and …, and bluetooth audio devices n, where n is an integer greater than 0; for ease of understanding, embodiments of the present application will be described by taking the terminal 100 and the bluetooth audio device 1 in fig. 1 as an example.
Each bluetooth audio device in the bluetooth audio device cluster may be an electronic device with bluetooth audio functionality, including but not limited to: bluetooth headsets, bluetooth speakers, smart bracelets, personal computers, tablet computers, vehicle-mounted devices, computing devices, or other processing devices connected to a wireless modem, and the like.
The Terminal 100 includes, but is not limited to, a Mobile Station (MS), a Mobile Terminal (Mobile Terminal), a Mobile phone (Mobile Telephone), a handset (handset), a portable device (portable equipment), etc., which may communicate with one or more core networks via a radio access network (RAN, radio Access Network), for example, the Terminal may be a Mobile phone (or "cellular" phone), a computer with wireless communication capability, etc., and the Terminal may also be a portable, pocket, hand-held, computer-built-in or vehicle-mounted Mobile device or equipment.
The terminal 100 establishes a bluetooth connection with the bluetooth audio device 1.
Specifically, the terminal 100 may monitor a bluetooth pairing instruction input by a user, and obtain bluetooth pairing information input for the bluetooth pairing instruction.
The bluetooth pairing instruction refers to a code for executing a bluetooth pairing operation by a computer, and in this embodiment, it may be understood that the terminal 100 executes a code for establishing a bluetooth pairing operation with the bluetooth audio device 1.
Specifically, the terminal 100 may have a touch screen, when a user touches, by using a stylus or a finger to touch, an option of a target bluetooth audio device on a display interface of the terminal 100, the terminal 100 monitors a bluetooth pairing instruction input by the user by detecting that a capacitance parameter of a bluetooth icon position changes, and meanwhile, based on bluetooth pairing information input by the user, the bluetooth pairing information may be understood as a device identifier of the bluetooth audio device 1, and may specifically be a device identifier of the bluetooth audio device 1 selected by the user in a bluetooth pairing device list of the terminal 100. At this time, the terminal 100 acquires bluetooth pairing information input by the user for the bluetooth pairing instruction. The terminal 100 then starts to establish a bluetooth connection with the bluetooth audio device 1, wherein the detailed steps of establishing the bluetooth connection are referred to the related art and are not described in detail herein.
After the terminal 100 establishes the bluetooth connection with the bluetooth audio device 1, a coding information acquisition request under an audio coding protocol may be sent to the bluetooth audio device 1 based on the bluetooth connection to query the bluetooth audio device 1 for audio coding information supported by the bluetooth audio device 1, such as a supported audio coding format and audio coding parameters corresponding to the audio coding format.
After receiving the encoded information acquisition request sent by the terminal 100, the bluetooth audio device 1 may respond to the encoded information acquisition request, and by executing a code that requests the encoded information of the bluetooth audio device 1, may acquire locally stored audio encoded information, i.e., the first audio encoded format supported under the audio encoded protocol and the first encoded parameter corresponding to the first audio encoded format, and then send the encoded information including the first audio encoded format and the first encoded parameter to the terminal 100 through a bluetooth connection.
The terminal 100 may receive the first audio coding format supported under the audio coding protocol and the first coding parameter corresponding to the first audio coding format sent by the bluetooth audio device 1.
The terminal 100 acquires the second audio coding format and the second audio coding format supported under the audio coding protocol (such as the A2DP protocol), for example, the second audio coding format and the second audio coding format supported by the terminal 100 are typically stored in an audio coding configuration file, and the terminal 100 may acquire the second audio coding format and the second coding parameter supported under the audio coding protocol in the local audio coding configuration file. And then judging whether the first audio coding format is matched with a second audio coding format or not, and judging whether the first coding parameters are matched with second audio coding parameters corresponding to the second audio coding format or not.
Specifically, the terminal 100 determines whether the first audio coding format matches the second audio coding format, and whether the first coding parameter matches the second audio coding parameter corresponding to the second audio coding format, there are generally 4 cases:
1. the first audio coding format is matched with a second audio coding format, and the first coding parameters are matched with second audio coding parameters corresponding to the second audio coding format;
2. the first audio coding format is not matched with the second audio coding format, and the first coding parameters are matched with the second audio coding parameters corresponding to the second audio coding format;
3. The first audio coding format is matched with a second audio coding format, and the first coding parameters are not matched with the second audio coding parameters corresponding to the second audio coding format;
4. the first audio encoding format is matched to a second audio encoding format, and the first encoding parameters are matched to second audio encoding parameters corresponding to the second audio encoding format.
Of the 4 cases described above, case 4: when the first audio coding format is matched with the second audio coding format and the first coding parameter is matched with the second audio coding parameter corresponding to the second audio coding format, the terminal 100 determines that the Bluetooth audio device 1 controls to perform audio coding in the second audio coding format; the 1 st case, the 2 nd case, and the 3 rd case, the terminal determines that the first audio coding format is not matched with a second audio coding format supported by the terminal under the audio coding protocol, and/or the first coding parameter is not matched with a second audio coding parameter corresponding to the second audio coding format, where the terminal 100 switches the second audio coding format to a default audio coding format under the audio coding protocol.
In practical applications, the terminal 100 preferably uses a default audio Coding format as an audio Coding format that is agreed by the bluetooth audio transmitting end and the bluetooth audio receiving end in the audio Coding protocol and is necessary for supporting audio Coding and decoding, for example, the A2DP protocol specifies that the bluetooth audio transmitting end and the bluetooth audio receiving end support audio Coding and decoding, where an SBC (Sub-band Coding) audio Coding format is necessary, and the default audio Coding format may be the SBC audio Coding format. It should be noted that, when the terminal 100 and the bluetooth audio device 1 perform audio encoding and decoding on the audio book under the A2DP protocol in the SBC audio encoding format, the terminal 100 and the bluetooth audio device 1 generally support audio encoding parameters corresponding to the SBC audio encoding format.
The terminal 100 determines that the default audio coding format is the current audio coding format under the audio coding protocol (such as the A2DP protocol) from the second audio format and the default audio coding format supported by the terminal 100 after determining that the first audio coding format is not matched with the second audio coding format supported by the terminal 100 under the audio coding protocol and/or the first coding parameter is not matched with the second audio coding parameter corresponding to the second audio coding format by performing the above steps, and the terminal 100 simultaneously sends format confirmation information to the bluetooth audio device 1, where the format confirmation information may include the audio coding format and/or the audio coding parameter corresponding to the audio coding format.
For example, the format confirmation information may include an SBC audio encoding format under the A2DP protocol and/or audio encoding parameters corresponding to the SBC audio encoding format. After receiving the format confirmation information, the bluetooth audio device 1 sets the current audio coding configuration, for example, the current audio coding format may be specifically set to be an SBC audio coding format under the A2DP protocol, and the audio coding parameters are set to be audio coding parameters corresponding to the SBC audio coding format, so as to complete the bluetooth audio connection and the setting of the bluetooth audio codec, and at this time, the bluetooth audio device 1 may control to work with the default audio coding format.
The terminal 100 may transmit audio encoded data to the bluetooth audio device 1 through an audio encoded connection;
the Bluetooth audio device 1 receives audio coding data sent by the terminal 100 through the audio coding connection, and calls an audio decoder corresponding to the default audio coding format to decode the audio coding data, so that audio corresponding to the audio coding data is normally played; or alternatively, the first and second heat exchangers may be,
the bluetooth audio device 1 may control to work in the default audio coding format, code the audio data of the local terminal by calling an audio encoder corresponding to the default audio coding format, and send the encoded audio data to the terminal 100 through a bluetooth audio connection (such as a bluetooth A2DP connection) with the terminal 100.
In one or more embodiments of the present application, a terminal switches a second audio coding format to a default audio coding format supported by a terminal and a bluetooth audio device under an audio coding protocol by acquiring a first audio coding format supported by the bluetooth audio device under the audio coding protocol and a first coding parameter corresponding to the first audio coding format, when the first audio coding format does not match a second audio coding format supported by the terminal under the audio coding protocol and/or the first coding parameter does not match a second audio coding parameter corresponding to the second audio coding format, and performs audio coding in the default audio coding format. The problem that Bluetooth audio connection is interrupted under the condition that the Bluetooth audio formats supported by the terminal and the Bluetooth audio equipment are the same and corresponding audio coding parameters are not matched can be avoided, and the stability of Bluetooth audio connection between the terminal and the Bluetooth audio equipment is improved, so that normal use of Bluetooth audio functions is ensured.
The following are examples of the apparatus of the present application that may be used to perform the method embodiments of the present application. For details not disclosed in the embodiments of the apparatus of the present application, please refer to the embodiments of the method of the present application.
Referring to fig. 6, a schematic diagram of an audio coding format determining apparatus according to an exemplary embodiment of the present application is shown. The audio encoding format determining apparatus may be implemented as all or part of the apparatus by software, hardware or a combination of both. The apparatus 1 comprises a format parameter acquisition module 11, a coding format switching module 12 and an audio coding control module 13.
A format parameter obtaining module 11, configured to obtain a first audio coding format supported by a bluetooth audio device under an audio coding protocol and a first coding parameter corresponding to the first audio coding format;
an encoding format switching module 12, configured to determine that the first audio encoding format does not match a second audio encoding format supported by the terminal under the audio encoding protocol, and/or that the first encoding parameter does not match a second audio encoding parameter corresponding to the second audio encoding format, and switch the second audio encoding format to a default audio encoding format under the audio encoding protocol;
an audio encoding control module 13, configured to control audio encoding using the default audio encoding format.
Optionally, as shown in fig. 7, the format parameter acquiring module 11 includes:
An acquisition request transmitting unit 111 configured to transmit an encoded information acquisition request under an audio encoding protocol to a bluetooth audio device;
the format parameter obtaining unit 112 is configured to receive a first audio coding format supported under the audio coding protocol and a first coding parameter corresponding to the first audio coding format, which are sent by the bluetooth audio device.
Optionally, as shown in fig. 9, the apparatus 1 further includes:
the encoding format matching module 14 is configured to determine whether the first audio encoding format matches a second audio encoding format supported by the terminal under the audio encoding protocol, and whether the first encoding parameter matches a second audio encoding parameter corresponding to the second audio encoding format.
Optionally, the second audio coding format includes a plurality of second audio coding formats, as shown in fig. 8, and the coding format switching module 12 further includes:
an encoding format obtaining unit 121, configured to obtain a next second audio encoding format of the current second audio encoding format according to the order of priority of the plurality of second audio encoding formats;
an audio coding matching unit 122, configured to take the next second audio coding format as a current second audio coding format, and perform a step of determining whether the first audio coding format matches a second audio coding format supported by the terminal under the audio coding protocol, and whether the first coding parameter matches a second audio coding parameter corresponding to the second audio coding format;
An encoding format switching unit 123, configured to switch the second audio encoding format to a default audio encoding format under the audio encoding protocol when there is no next second audio encoding format.
Optionally, as shown in fig. 9, the apparatus 1 further includes:
the priority determining module 15 is configured to obtain bluetooth connection status parameters of the bluetooth audio device, and obtain encoding coefficients corresponding to the plurality of second audio encoding formats respectively;
the priority determining module 15 is further configured to input the coding coefficient and the bluetooth connection status parameter into a scoring model, to obtain coding scores corresponding to the plurality of second audio coding formats respectively;
the priority determining module 15 is further configured to determine priorities of a plurality of the second audio encoding formats based on a size order of the encoding scores.
Optionally, as shown in fig. 9, the apparatus 1 further includes:
and the device identifier storage module 16 is configured to obtain a device identifier of the bluetooth audio device, store the device identifier in a bluetooth blacklist, and close the second audio encoding format.
Optionally, as shown in fig. 9, the apparatus 1 further includes:
And the format information sending module 17 is configured to send format confirmation information to the bluetooth audio device, where the format confirmation information is used to instruct the bluetooth audio device to perform audio encoding in the default audio encoding format.
It should be noted that, when the audio coding format determining apparatus provided in the foregoing embodiment performs the audio coding format determining method, only the division of the foregoing functional modules is used as an example, in practical application, the foregoing functional allocation may be performed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules, so as to complete all or part of the functions described above. In addition, the audio coding format determining apparatus provided in the above embodiment belongs to the same concept as the audio coding format determining method embodiment, and the implementation process is detailed in the method embodiment, which is not repeated here.
The foregoing embodiment numbers of the present application are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
In this embodiment, in one or more embodiments of the present application, a terminal switches a second audio coding format to a default audio coding format supported by a terminal and a bluetooth audio device under an audio coding protocol by acquiring a first audio coding format supported by the bluetooth audio device under the audio coding protocol and a first coding parameter corresponding to the first audio coding format, when the first audio coding format does not match a second audio coding format supported by the terminal under the audio coding protocol and/or the first coding parameter does not match a second audio coding parameter corresponding to the second audio coding format, and performs audio coding in the default audio coding format. The problem of interruption of Bluetooth audio connection caused by mismatching of corresponding audio coding parameters under the condition that the Bluetooth audio formats supported by the terminal and the Bluetooth audio equipment are the same can be avoided, and the stability of Bluetooth audio connection between the terminal and the Bluetooth audio equipment is improved, so that normal use of Bluetooth audio functions is ensured; when the first audio coding format is not matched with the second audio coding format and/or the first audio parameter is not matched with the second audio parameter, the equipment identification is stored in a Bluetooth blacklist, the terminal can match the equipment identification in the Bluetooth blacklist based on the next matching audio coding format of the Bluetooth audio equipment, and the time of the next matching audio coding format of the Bluetooth audio equipment can be saved; and when the number of the second audio formats supported by the terminal is multiple, determining the high-low order of the priorities of the multiple second audio coding formats based on the coding coefficients respectively corresponding to the Bluetooth connection state parameters and the second audio coding formats, and performing audio coding format matching according to the high-low order of the priorities, so that the accuracy of audio coding format matching can be improved.
The embodiment of the present application further provides a computer storage medium, where the computer storage medium may store a plurality of instructions, where the instructions are adapted to be loaded by a processor and execute the audio coding format determining method according to the embodiment shown in fig. 1 to 5, and the specific execution process may refer to the specific description of the embodiment shown in fig. 1 to 5, which is not repeated herein.
The present application further provides a computer program product, where at least one instruction is stored, where the at least one instruction is loaded by the processor and executed by the processor to perform the audio coding format determining method according to the embodiment shown in fig. 1 to 5, and the specific execution process may refer to the specific description of the embodiment shown in fig. 1 to 5, which is not repeated herein.
Referring to fig. 10, a schematic structural diagram of an electronic device is provided in an embodiment of the present application. As shown in fig. 10, the electronic device 1000 may include: at least one processor 1001, at least one network interface 1004, a user interface 1003, a memory 1005, at least one communication bus 1002.
Wherein the communication bus 1002 is used to enable connected communication between these components.
The user interface 1003 may include a Display screen (Display) and a Camera (Camera), and the optional user interface 1003 may further include a standard wired interface and a wireless interface.
The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface), among others.
Wherein the processor 1001 may include one or more processing cores. The processor 1001 connects various parts within the entire server 1000 using various interfaces and lines, and performs various functions of the server 1000 and processes data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 1005, and calling data stored in the memory 1005. Alternatively, the processor 1001 may be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), programmable logic array (Programmable Logic Array, PLA). The processor 1001 may integrate one or a combination of several of a central processing unit (Central Processing Unit, CPU), an image processor (Graphics Processing Unit, GPU), and a modem, etc. The CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing the content required to be displayed by the display screen; the modem is used to handle wireless communications. It will be appreciated that the modem may not be integrated into the processor 1001 and may be implemented by a single chip.
The Memory 1005 may include a random access Memory (Random Access Memory, RAM) or a Read-Only Memory (Read-Only Memory). Optionally, the memory 1005 includes a non-transitory computer readable medium (non-transitory computer-readable storage medium). The memory 1005 may be used to store instructions, programs, code, sets of codes, or sets of instructions. The memory 1005 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the above-described respective method embodiments, etc.; the storage data area may store data or the like referred to in the above respective method embodiments. The memory 1005 may also optionally be at least one storage device located remotely from the processor 1001. As shown in fig. 10, an operating system, a network communication module, a user interface module, and an audio encoding format determination application program may be included in the memory 1005, which is one type of computer storage medium.
In the electronic device 1000 shown in fig. 10, the user interface 1003 is mainly used for providing an input interface for a user, and acquiring data input by the user; and the processor 1001 may be configured to invoke the audio coding format determination application program stored in the memory 1005, and specifically perform the following operations:
Acquiring a first audio coding format supported by Bluetooth audio equipment under an audio coding protocol and a first coding parameter corresponding to the first audio coding format;
determining that the first audio coding format is not matched with a second audio coding format supported by the terminal under the audio coding protocol, and/or that the first coding parameters are not matched with second audio coding parameters corresponding to the second audio coding format, and switching the second audio coding format to a default audio coding format under the audio coding protocol;
and controlling to carry out audio coding by adopting the default audio coding format.
In one embodiment, the processor 1001, when executing the acquiring the first audio coding format supported by the bluetooth audio device under the audio coding protocol and the first coding parameter corresponding to the first audio coding format, specifically executes the following operations:
transmitting a coded information acquisition request under an audio coding protocol to Bluetooth audio equipment;
and receiving a first audio coding format supported by the audio coding protocol and a first coding parameter corresponding to the first audio coding format, which are sent by the Bluetooth audio equipment.
In one embodiment, before performing the determination that the first audio coding format does not match a second audio coding format supported by the terminal under the audio coding protocol and/or that the first coding parameters do not match second audio coding parameters corresponding to the second audio coding format, the processor 1001 further performs the following operations:
and judging whether the first audio coding format is matched with a second audio coding format supported by the terminal under the audio coding protocol, and judging whether the first coding parameters are matched with second audio coding parameters corresponding to the second audio coding format.
In one embodiment, when the second audio coding format includes a plurality of second audio coding formats, the processor 1001 specifically performs the following operations when switching the second audio coding format to a default audio coding format under the audio coding protocol:
acquiring the next second audio coding format of the current second audio coding format according to the high-low order of the priorities of the plurality of second audio coding formats;
taking the next second audio coding format as a current second audio coding format, and executing the steps of judging whether the first audio coding format is matched with a second audio coding format supported by the terminal under the audio coding protocol, and judging whether the first coding parameter is matched with a second audio coding parameter corresponding to the second audio coding format;
When the next second audio coding format does not exist, the second audio coding format is switched to a default audio coding format under the audio coding protocol.
In one embodiment, before executing the order of priority in accordance with the plurality of second audio encoding formats, the processor 1001 further executes the following operations:
acquiring Bluetooth connection state parameters of the Bluetooth audio equipment and acquiring a plurality of coding coefficients respectively corresponding to the second audio coding formats;
inputting the coding coefficients and the Bluetooth connection state parameters into a scoring model to respectively obtain a plurality of coding scores corresponding to the second audio coding formats;
a priority of a plurality of the second audio encoding formats is determined based on a size order of each of the encoding scores.
In one embodiment, the processor 1001, when executing the audio encoding format determining method, further performs the following operations:
and acquiring the equipment identifier of the Bluetooth audio equipment, storing the equipment identifier into a Bluetooth blacklist, and closing the second audio coding format.
In one embodiment, after performing the switching of the second audio encoding format to the default audio encoding format under the audio encoding protocol, the processor 1001 further performs the following operations:
And sending format confirmation information to the Bluetooth audio equipment, wherein the format confirmation information is used for indicating the Bluetooth audio equipment to perform audio coding by adopting the default audio coding format.
In this embodiment, in one or more embodiments of the present application, a terminal switches a second audio coding format to a default audio coding format supported by a terminal and a bluetooth audio device under an audio coding protocol by acquiring a first audio coding format supported by the bluetooth audio device under the audio coding protocol and a first coding parameter corresponding to the first audio coding format, when the first audio coding format does not match a second audio coding format supported by the terminal under the audio coding protocol and/or the first coding parameter does not match a second audio coding parameter corresponding to the second audio coding format, and performs audio coding in the default audio coding format. The problem of interruption of Bluetooth audio connection caused by mismatching of corresponding audio coding parameters under the condition that the Bluetooth audio formats supported by the terminal and the Bluetooth audio equipment are the same can be avoided, and the stability of Bluetooth audio connection between the terminal and the Bluetooth audio equipment is improved, so that normal use of Bluetooth audio functions is ensured; when the first audio coding format is not matched with the second audio coding format and/or the first audio parameter is not matched with the second audio parameter, the equipment identification is stored in a Bluetooth blacklist, the terminal can match the equipment identification in the Bluetooth blacklist based on the next matching audio coding format of the Bluetooth audio equipment, and the time of the next matching audio coding format of the Bluetooth audio equipment can be saved; and when the number of the second audio formats supported by the terminal is multiple, determining the high-low order of the priorities of the multiple second audio coding formats based on the coding coefficients respectively corresponding to the Bluetooth connection state parameters and the second audio coding formats, and performing audio coding format matching according to the high-low order of the priorities, so that the accuracy of audio coding format matching can be improved.
Those skilled in the art will appreciate that implementing all or part of the above-described methods in accordance with the embodiments may be accomplished by way of a computer program stored on a computer readable storage medium, which when executed may comprise the steps of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a read-only memory, a random access memory, or the like.
The foregoing disclosure is illustrative of the present application and is not to be construed as limiting the scope of the application, which is defined by the appended claims.

Claims (10)

1. An audio coding format determining method applied to a terminal, the method comprising:
acquiring a first audio coding format supported by Bluetooth audio equipment under an audio coding protocol and a first coding parameter corresponding to the first audio coding format, wherein the terminal supports a second audio coding format under the audio coding protocol, and the audio coding protocol is the Bluetooth audio coding protocol;
when the first audio coding format is not matched with a second audio coding format and the first coding parameter is not matched with a second audio coding parameter corresponding to the second audio coding format, or when the first audio coding format is not matched with the second audio coding format and the first coding parameter is matched with the second audio coding parameter corresponding to the second audio coding format, or when the first audio coding format is matched with the second audio coding format and the first coding parameter is not matched with the second audio coding parameter corresponding to the second audio coding format, the second audio coding format is switched to a default audio coding format under the audio coding protocol, and audio coding is conducted by using the default audio coding format;
And when the first audio coding format is matched with a second audio coding format and the first coding parameters are matched with the second audio coding parameters corresponding to the second audio coding format, determining to perform audio coding in the second audio coding format.
2. The method of claim 1, wherein the obtaining a first audio encoding format supported by the bluetooth audio device under the audio encoding protocol and a first encoding parameter corresponding to the first audio encoding format comprises:
transmitting a coded information acquisition request under an audio coding protocol to Bluetooth audio equipment;
and receiving a first audio coding format supported by the audio coding protocol and a first coding parameter corresponding to the first audio coding format, which are sent by the Bluetooth audio equipment.
3. The method of claim 1, wherein when the first audio encoding format does not match a second audio encoding format and the first encoding parameter does not match a second audio encoding parameter corresponding to the second audio encoding format, or when the first audio encoding format does not match a second audio encoding format and the first encoding parameter does match a second audio encoding parameter corresponding to the second audio encoding format, or when the first audio encoding format does match a second audio encoding format and the first encoding parameter does not match a second audio encoding parameter corresponding to the second audio encoding format, switching the second audio encoding format to a default audio encoding format under the audio encoding protocol is preceded by:
And judging whether the first audio coding format is matched with a second audio coding format supported by the terminal under the audio coding protocol, and judging whether the first coding parameters are matched with second audio coding parameters corresponding to the second audio coding format.
4. A method according to claim 3, wherein the second audio coding format comprises a plurality, and said switching the second audio coding format to a default audio coding format under the audio coding protocol comprises:
acquiring the next second audio coding format of the current second audio coding format according to the high-low order of the priorities of the plurality of second audio coding formats;
taking the next second audio coding format as a current second audio coding format, and executing the steps of judging whether the first audio coding format is matched with a second audio coding format supported by the terminal under the audio coding protocol, and judging whether the first coding parameter is matched with a second audio coding parameter corresponding to the second audio coding format;
when the next second audio coding format does not exist, the second audio coding format is switched to a default audio coding format under the audio coding protocol.
5. The method of claim 4, further comprising, prior to said prioritizing a plurality of said second audio encoding formats:
acquiring Bluetooth connection state parameters of the Bluetooth audio equipment and acquiring a plurality of coding coefficients respectively corresponding to the second audio coding formats;
inputting the coding coefficients and the Bluetooth connection state parameters into a scoring model to respectively obtain a plurality of coding scores corresponding to the second audio coding formats;
a priority of a plurality of the second audio encoding formats is determined based on a size order of each of the encoding scores.
6. The method according to claim 1, wherein the method further comprises:
and acquiring the equipment identifier of the Bluetooth audio equipment, storing the equipment identifier into a Bluetooth blacklist, and closing the second audio coding format.
7. The method of claim 1, further comprising, after said switching said second audio encoding format to a default audio encoding format under said audio encoding protocol:
and sending format confirmation information to the Bluetooth audio equipment, wherein the format confirmation information is used for indicating the Bluetooth audio equipment to perform audio coding by adopting the default audio coding format.
8. An audio coding format determining apparatus, the apparatus comprising:
the device comprises a format parameter acquisition module, a format parameter acquisition module and a data processing module, wherein the format parameter acquisition module is used for acquiring a first audio coding format supported by Bluetooth audio equipment under an audio coding protocol and a first coding parameter corresponding to the first audio coding format, the device supports a second audio coding format under the audio coding protocol, and the audio coding protocol is the Bluetooth audio coding protocol;
an encoding format switching module, configured to switch the second audio encoding format to a default audio encoding format under the audio encoding protocol when the first audio encoding format does not match a second audio encoding format and the first encoding parameter does not match a second audio encoding parameter corresponding to the second audio encoding format, or when the first audio encoding format does match a second audio encoding format and the first encoding parameter does not match a second audio encoding parameter corresponding to the second audio encoding format;
The audio coding control module is used for controlling the audio coding by adopting the default audio coding format;
the device is further configured to: and when the first audio coding format is matched with a second audio coding format and the first coding parameters are matched with the second audio coding parameters corresponding to the second audio coding format, determining to perform audio coding in the second audio coding format.
9. A computer storage medium storing a plurality of instructions adapted to be loaded by a processor and to perform the method steps of any one of claims 1 to 7.
10. An electronic device, comprising: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the method steps of any of claims 1-7.
CN202010129474.1A 2020-02-28 2020-02-28 Audio coding format determining method and device, storage medium and electronic equipment Active CN111199743B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010129474.1A CN111199743B (en) 2020-02-28 2020-02-28 Audio coding format determining method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010129474.1A CN111199743B (en) 2020-02-28 2020-02-28 Audio coding format determining method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN111199743A CN111199743A (en) 2020-05-26
CN111199743B true CN111199743B (en) 2023-08-18

Family

ID=70747666

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010129474.1A Active CN111199743B (en) 2020-02-28 2020-02-28 Audio coding format determining method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN111199743B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111970665B (en) * 2020-07-23 2022-07-29 南京邮电大学 Point-to-multipoint wireless audio transmission system based on Bluetooth
CN112135279B (en) * 2020-09-21 2022-03-18 珠海格力电器股份有限公司 Audio transmission method and device of multi-channel Bluetooth
CN115085769A (en) * 2021-03-10 2022-09-20 深圳市万普拉斯科技有限公司 Configuration method, device, terminal and storage medium of coding and decoding format
CN114783452B (en) * 2022-06-17 2022-12-13 荣耀终端有限公司 Audio playing method, device and storage medium
CN116013334B (en) * 2023-01-28 2023-08-18 荣耀终端有限公司 Audio data processing method, electronic device and storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0934499A (en) * 1995-07-17 1997-02-07 Kokusai Electric Co Ltd Sound encoding communication system
EP1587327A2 (en) * 2004-04-15 2005-10-19 Microsoft Corporation Video transcoding
CN101286770A (en) * 2007-04-09 2008-10-15 艾威梯软件技术(北京)有限公司 Method and system for automatically configuring audio encoding format transmitted by bluetooth A2DP
EP2180664A1 (en) * 2008-10-22 2010-04-28 Vivendi Mobile Entertainment System and method for accessing multi-media content via a mobile terminal
CN105812705A (en) * 2014-12-31 2016-07-27 华为终端(东莞)有限公司 Video communication method, terminal and system
CN107404339A (en) * 2017-08-14 2017-11-28 青岛海信电器股份有限公司 A kind of method and apparatus for adjusting bluetooth A2DP encoding settings
CN107770759A (en) * 2017-10-17 2018-03-06 广东欧珀移动通信有限公司 Method for building up, device, storage medium and the mobile terminal of blue tooth voice link
CN109003618A (en) * 2018-08-14 2018-12-14 Oppo广东移动通信有限公司 Coding control method, device, electronic equipment and storage medium
CN109273017A (en) * 2018-08-14 2019-01-25 Oppo广东移动通信有限公司 Coding control method, device and electronic equipment
CN110770824A (en) * 2017-07-07 2020-02-07 高通股份有限公司 Multi-stream audio coding

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005099243A1 (en) * 2004-04-09 2005-10-20 Nec Corporation Audio communication method and device
JP4445515B2 (en) * 2007-04-27 2010-04-07 株式会社東芝 Information processing device
US8224247B2 (en) * 2007-05-16 2012-07-17 Texas Instruments Incorporated Controller integrated audio codec for advanced audio distribution profile audio streaming applications
KR102374897B1 (en) * 2011-03-16 2022-03-17 디티에스, 인코포레이티드 Encoding and reproduction of three dimensional audio soundtracks
EP2830056A1 (en) * 2013-07-22 2015-01-28 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. Apparatus and method for encoding or decoding an audio signal with intelligent gap filling in the spectral domain
CN105898318A (en) * 2015-12-21 2016-08-24 乐视云计算有限公司 Offline transcoding method and system
US10304468B2 (en) * 2017-03-20 2019-05-28 Qualcomm Incorporated Target sample generation
CN108093287A (en) * 2017-12-27 2018-05-29 江苏惠通集团有限责任公司 The switching method and device of audio decoder algorithm, storage medium, terminal
CN108737658B (en) * 2018-05-22 2020-06-05 Oppo(重庆)智能科技有限公司 Mobile terminal, switching method of Bluetooth audio coding mode of mobile terminal and storage medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0934499A (en) * 1995-07-17 1997-02-07 Kokusai Electric Co Ltd Sound encoding communication system
EP1587327A2 (en) * 2004-04-15 2005-10-19 Microsoft Corporation Video transcoding
CN101286770A (en) * 2007-04-09 2008-10-15 艾威梯软件技术(北京)有限公司 Method and system for automatically configuring audio encoding format transmitted by bluetooth A2DP
EP2180664A1 (en) * 2008-10-22 2010-04-28 Vivendi Mobile Entertainment System and method for accessing multi-media content via a mobile terminal
CN105812705A (en) * 2014-12-31 2016-07-27 华为终端(东莞)有限公司 Video communication method, terminal and system
CN110770824A (en) * 2017-07-07 2020-02-07 高通股份有限公司 Multi-stream audio coding
CN107404339A (en) * 2017-08-14 2017-11-28 青岛海信电器股份有限公司 A kind of method and apparatus for adjusting bluetooth A2DP encoding settings
CN107770759A (en) * 2017-10-17 2018-03-06 广东欧珀移动通信有限公司 Method for building up, device, storage medium and the mobile terminal of blue tooth voice link
CN109003618A (en) * 2018-08-14 2018-12-14 Oppo广东移动通信有限公司 Coding control method, device, electronic equipment and storage medium
CN109273017A (en) * 2018-08-14 2019-01-25 Oppo广东移动通信有限公司 Coding control method, device and electronic equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
吴长树 .蓝牙高级音频应用系统设计与实现.中国优秀硕士学位论文全文数据库.2008,第23-35页 . *

Also Published As

Publication number Publication date
CN111199743A (en) 2020-05-26

Similar Documents

Publication Publication Date Title
CN111199743B (en) Audio coding format determining method and device, storage medium and electronic equipment
CN109246672B (en) Data transmission method, device and system and Bluetooth headset
CN106936987B (en) Method and device capable of identifying voice source of Bluetooth headset
CN101494474B (en) Method and terminal equipment for automatic connection of Bluetooth vehicle-mounted hands-free equipment
WO2015085959A1 (en) Voice processing method and device
CN109274405B (en) Data transmission method and device, electronic equipment and computer readable medium
CN108988909B (en) Audio processing method and device, electronic equipment and computer readable storage medium
KR101306119B1 (en) Apparatus for offering information using short message service in portable terminal and Method thereof
CN109450851B (en) Device connection method, electronic device, and computer-readable medium
US20060040714A1 (en) Handsfree device and mobile phone handset
US7860458B2 (en) Audio transmitting apparatus and mobile communication terminal
CN109714782A (en) Method, apparatus and electronic equipment for smart machine distribution
JP4459253B2 (en) Communication terminal
CN104183250A (en) Method and system for synchronizing function of music player of intelligent device and Bluetooth headset
CN109273017A (en) Coding control method, device and electronic equipment
CN104333643B (en) Add the method for contact person, system and terminal
US7668829B2 (en) Method and apparatus for storing music file in mobile communication terminal
US8838076B2 (en) Method and device for storing and displaying music file list in mobile communication terminal using hot keys
CN105704106B (en) A kind of visualization IVR implementation method and mobile terminal
CN109194998B (en) Data transmission method and device, electronic equipment and computer readable medium
CN101114846A (en) Blue tooth wireless multimedia transmission apparatus and system and method
CN113225644B (en) Low-delay Bluetooth audio system and audio source end and audio receiving end thereof
CN108900706B (en) Call voice adjustment method and mobile terminal
CN109150400B (en) Data transmission method and device, electronic equipment and computer readable medium
KR20060133757A (en) Method for data common in bluetooth of wireless terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant