CN109273017A - Coding control method, device and electronic equipment - Google Patents
Coding control method, device and electronic equipment Download PDFInfo
- Publication number
- CN109273017A CN109273017A CN201810923291.XA CN201810923291A CN109273017A CN 109273017 A CN109273017 A CN 109273017A CN 201810923291 A CN201810923291 A CN 201810923291A CN 109273017 A CN109273017 A CN 109273017A
- Authority
- CN
- China
- Prior art keywords
- audio
- type
- audio output
- current
- scene
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 49
- 230000005540 biological transmission Effects 0.000 claims abstract description 23
- 238000012545 processing Methods 0.000 claims description 11
- 238000005070 sampling Methods 0.000 claims description 3
- 230000000875 corresponding effect Effects 0.000 description 57
- 230000006870 function Effects 0.000 description 10
- 238000004891 communication Methods 0.000 description 7
- 238000010586 diagram Methods 0.000 description 7
- 230000008569 process Effects 0.000 description 6
- 238000005516 engineering process Methods 0.000 description 4
- 230000000694 effects Effects 0.000 description 3
- 230000008901 benefit Effects 0.000 description 2
- 230000001413 cellular effect Effects 0.000 description 2
- 238000012512 characterization method Methods 0.000 description 2
- 238000004590 computer program Methods 0.000 description 2
- 238000013500 data storage Methods 0.000 description 2
- 230000009975 flexible effect Effects 0.000 description 2
- 238000003825 pressing Methods 0.000 description 2
- 241001269238 Data Species 0.000 description 1
- 230000009471 action Effects 0.000 description 1
- 239000008186 active pharmaceutical agent Substances 0.000 description 1
- 101150036464 aptx gene Proteins 0.000 description 1
- XEGGRYVFLWGFHI-UHFFFAOYSA-N bendiocarb Chemical compound CNC(=O)OC1=CC=CC2=C1OC(C)(C)O2 XEGGRYVFLWGFHI-UHFFFAOYSA-N 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 230000003111 delayed effect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000005611 electricity Effects 0.000 description 1
- 239000011521 glass Substances 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 230000006855 networking Effects 0.000 description 1
- 238000002360 preparation method Methods 0.000 description 1
- 238000009877 rendering Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 239000011435 rock Substances 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G10—MUSICAL INSTRUMENTS; ACOUSTICS
- G10L—SPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
- G10L19/00—Speech 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/04—Speech 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/16—Vocoder architecture
- G10L19/18—Vocoders using multiple modes
- G10L19/20—Vocoders using multiple modes using sound class specific coding, hybrid encoders or object based coding
-
- G—PHYSICS
- G10—MUSICAL INSTRUMENTS; ACOUSTICS
- G10L—SPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
- G10L19/00—Speech 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/04—Speech 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/16—Vocoder architecture
- G10L19/18—Vocoders using multiple modes
- G10L19/22—Mode decision, i.e. based on audio signal content versus external parameters
Landscapes
- Engineering & Computer Science (AREA)
- Computational Linguistics (AREA)
- Signal Processing (AREA)
- Health & Medical Sciences (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- Acoustics & Sound (AREA)
- Multimedia (AREA)
- Telephone Function (AREA)
Abstract
The embodiment of the present application discloses a kind of coding control method, device and electronic equipment.The described method includes: obtaining current audio output scene;Obtain audio encoding type corresponding with the current audio output scene;Audio data based on audio encoding type opposite direction audio-frequence player device transmission is encoded.This method is before the audio data of exports coding, by obtaining current audio output scene, then audio encoding type corresponding with the current audio output scene is obtained again, the audio data for being then based on the audio encoding type opposite direction audio-frequence player device transmission is encoded, so that electronic equipment can determine different audio encoding types according to different audio output scenes, and then improve the flexibility that electronic equipment is encoded.
Description
Technical field
This application involves technical field of electronic equipment, more particularly, to a kind of coding control method, device and electronics
Equipment.
Background technique
With the development of Bluetooth technology and universal, more electronic equipments can be supported to pass through bluetooth between electronic equipment
Agreement transmits data.For example, vehicle electronic device can transmit music between electronic equipment by Bluetooth protocol, and ear
Machine can receive the communication speech that electronic equipment is transmitted by Bluetooth protocol.
But in electronic equipment by way of bluetooth to other electronic equipment audio datas when, used sound
The type of frequency coding is fixed.
Summary of the invention
In view of the above problems, present applicant proposes a kind of coding control method, device and electronic equipments, are improved with realizing
The above problem.
In a first aspect, being applied to electronic equipment, which comprises obtain this application provides a kind of coding control method
Take current audio output scene;Obtain audio encoding type corresponding with the current audio output scene;Based on described
The audio data of audio encoding type opposite direction audio-frequence player device transmission is encoded.
Second aspect, this application provides a kind of data processing equipments, run on electronic equipment, described device, comprising: field
Scape acquiring unit, for obtaining current audio output scene;Type of coding acquiring unit, for obtaining and the current sound
The corresponding audio encoding type of frequency output scene;Coding unit, for being set based on audio encoding type opposite direction audio broadcasting
The audio data of standby transmission is encoded.
The third aspect, this application provides a kind of electronic equipment, including one or more processors and memory;One
Or multiple programs are stored in the memory and are configured as being executed by one or more of processors, it is one or
Multiple programs are configured to carry out above-mentioned method.
Fourth aspect, a kind of computer readable storage medium provided by the present application, in the computer readable storage medium
It is stored with program code, wherein execute above-mentioned method in said program code operation.
A kind of coding control method, device and electronic equipment provided by the present application, exports coding audio data it
Before, by obtaining current audio output scene, audio corresponding with the current audio output scene is then obtained again and is compiled
Code type, the audio data for being then based on the audio encoding type opposite direction audio-frequence player device transmission is encoded, to make
Different audio encoding types can be determined according to different audio output scenes by obtaining electronic equipment, and then is improved electronics and set
The standby flexibility encoded.
Detailed description of the invention
In order to more clearly explain the technical solutions in the embodiments of the present application, make required in being described below to embodiment
Attached drawing is briefly described, it should be apparent that, the drawings in the following description are only some examples of the present application, for
For those skilled in the art, without creative efforts, it can also be obtained according to these attached drawings other attached
Figure.
Fig. 1 shows a kind of flow chart of coding control method of the application proposition;
Fig. 2 shows the flow charts for another coding control method that the application proposes;
Fig. 3 shows the schematic diagram that user in a kind of coding control method of the application proposition selects audio encoding type;
Fig. 4 shows a kind of alternative when user's selection audio encoding type in a kind of coding control method of the application proposition
The schematic diagram of menu;
Another kind is standby when Fig. 5 shows user's selection audio encoding type in a kind of coding control method of the application proposition
Select the schematic diagram of menu;
Fig. 6 shows a kind of structural block diagram of coding-control device of the application proposition;
Fig. 7 shows the structural block diagram of another coding-control device of the application proposition;
Fig. 8 shows the structural block diagram of a kind of electronic equipment of the application proposition;
Fig. 9 is the embodiment of the present application for saving or carrying the coding control method realized according to the embodiment of the present application
Program code storage unit.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present application, technical solutions in the embodiments of the present application carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of embodiments of the present application, instead of all the embodiments.It is based on
Embodiment in the application, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment shall fall in the protection scope of this application.
With electronic equipment user for music experience demand, electronic equipment start support play audio file.And
The audio framework of electronic equipment is similar with the framework of computer, is exactly mainly by processor, built-in audio CODEC (codec)
To complete.Wherein, after the input of processor reception audio file, it is converted to I2S signal, and be transmitted to CODEC and be converted into simulating
Then signal plays out.Wherein, which can be mobile or portable and execute the various types of of wireless communication
Any one of computer system device.Specifically, electronic equipment 100 can be mobile phone or smart phone (for example, base
In iPhone TM, the phone based on Android TM), portable gaming device (such as Nintendo DS TM,
PlayStation Portable TM, Gameboy Advance TM, iPhone TM), laptop computer, PDA, it is portable mutually
Networked devices, music player and data storage device, other handheld devices and such as wrist-watch, earphone, pendant, earphone
It can also be other wearable devices (for example, such as electronic glasses, electronics clothes, electronics bracelet, electricity Deng, electronic equipment 100
Subitem chain, electronics tatoo, the headset equipment (HMD) of electronic equipment or smartwatch).
Electronic equipment 100 can also be that any one of multiple electronic equipments, multiple electronic equipments include but is not limited to
Cellular phone, smart phone, other wireless telecom equipments, personal digital assistant, audio player, other media players, sound
Happy logger, video recorder, camera, other medium recorders, radio, Medical Devices, vehicle transport instrument, calculator, can
Program remote controler, pager, laptop computer, desktop computer, printer, netbook computer, personal digital assistant
(PDA), portable media player (PMP), Motion Picture Experts Group's (MPEG-1 or MPEG-2) audio layer 3 (MP3) play
Device, portable medical device and digital camera and combinations thereof.
And as user is for the further demand of music, there is the audio other than more electronic equipments and plays
Equipment, which can receive the audio data that electronic equipment comes, and audio data is played out.Often
The audio-frequence player device seen includes earphone, speaker and onboard audio playback equipment etc..Wherein, as a kind of common transmission side
Audio data can be transferred to external audio-frequence player device and be played out by formula, electronic equipment by way of Bluetooth transmission.
Wherein, delivery of audio data is given external audio-frequence player device process in the mode based on bluetooth by electronic equipment
In, first audio data to be transmitted can be encoded.Wherein, three kinds of audio codings in bluetooth: Apt-X, SBC and AAC.
Wherein, Apt-X has the low advantage that is delayed compared with sbc.SBC is common audio format, is set in audio broadcasting
Standby all to be transmitted with SBC when not supporting AAC and Apt-X, sound quality is general.AAC, when audio-frequence player device supports AAC lattice
The file of formula, when electronic equipment also supports AAC to transmit, sound quality ratio SBC is good very much.Apt-X is a kind of lossless lattice of Bluetooth transmission
Formula is promoted by csr, at design initial stage, to be supported Apt-X, just be had to buy this software overhead, and aptx is not big
Most mobile phones all support that the mobile phone generally supported rearward has the logo of Apt-X, so while effect is good, but really may be used
It is in fact few with the equipment end of support.
And inventor has found under study for action, although there are many modes of bluetooth coding transmission, current electronic equipment with
Between external audio-frequence player device when transmitting audio data, used audio coding mode is relatively more fixed, or only
It is the coding mode supported according to both sides come coding mode used by determining reality.Therefore, the application is inventors herein proposed
In electronic equipment can be allowed to determine different audio encoding types according to different audio output scenes, and then promoted
Coding control method, device and the electronic equipment for the flexibility that electronic equipment is encoded.
Present embodiments are specifically described below in conjunction with attached drawing.
Referring to Fig. 1, a kind of coding control method provided by the present application, is applied to electronic equipment, which comprises
Step S110: current audio output scene is obtained.
Wherein, as a kind of mode, electronic equipment can determine current according to the application program that front and back is run
Audio output scene.Wherein, application program can be divided into following a few classes according to its operating status:
Foreground application: can usually interact with user, can operate in the application program on foreground, when it is invisible
When will be suspended (such as: game).
Background application: and user's interaction is very limited, during having gone out configuration, the other times of life cycle are all hidden
Hiding (such as: SMS automatically replies program and alarm clock program).
Batch type application program: the application program that can switch between foreground and backstage.
And usually user is during using electronic equipment, if there is application program is in front stage operation, then user's meeting
By the application program of focus to front stage operation.So in order to promote user experience, the current meaning of more intelligent identification user
Whether figure, the application program that electronic equipment can first detect the front stage operation of electronic equipment have audio output, if front stage operation
Application program has audio output, using the corresponding audio output scene of the type of the application program of the front stage operation as current
Audio output scene, it is if the application program of front stage operation does not have audio output, the type of the application program of running background is corresponding
Audio output scene as current audio output scene.
Wherein, as a kind of mode, electronic equipment is android operating system, can pass through execution
The getRunningTasks method of ActivityManager is got currently in the title of the application program of front stage operation.This
Outside, electronic equipment can also obtain the list for the program that user uses by UsageStatsManager, will remember in the list
The most recently used application program of record is identified as current foreground application.Furthermore accessible function can also be carried by android
Can, the variation of window focus is monitored, focus window is taken and corresponds to packet name as the current application program in front stage operation.
Wherein, as a kind of mode, all there is a possibility that playing audio in multiple applications, it is contemplated that how to hand between application
Mutually extremely important, to avoid each music application while playing, the electronic equipment based on Android operation system is burnt using audio
It puts to coordinate the broadcasting of audio, in this case, the application for only getting audio focus can play audio.So electronics
Equipment can detecte get audio focus application program whether be front stage operation application program, to judge front stage operation
Whether application program has audio output.Similarly, it if the application program of detection front stage operation does not have audio output, can also equally adopt
Whether there is the application program of running background to have audio output in manner just described.
Wherein, it should be noted that as a kind of mode, the corresponding audio output scene of application program and application program
Type is related.For example, if the type of application program is game, then corresponding audio output scene is scene of game, if using
The type of program is music, then corresponding audio output scene is music scenario.
Furthermore there may also be different scenes for the same application program.For example, for the application journey of type of play
Sequence may have interface, it is also possible to have music scenario.So in this case, current audio output scene and there is sound
The type at the interface that the application program of frequency output is currently shown is related.If the interface of display is interface, then current sound
Frequency output scene is scene of game, if the interface of display is music-playing interface, then current audio output scene is music
Scene.
It should be noted that game above-mentioned and music are only exemplary citing, the type of application program, using journey
The type and audio output scene at the interface of sequence are not limited to above two.
Step S120: audio encoding type corresponding with the current audio output scene is obtained.
Tables of data storage audio output scene and audio coding class can be stored in advance as a kind of mode, in electronic equipment
The corresponding relationship of type.
In addition, alternatively mode, the available current audio output scene of electronic equipment apply kind
Class, using with it is described using the corresponding audio encoding type of type as the current corresponding audio coding of audio output scene
Type.
Wherein, as a kind of mode, it can still be stored by way of tables of data and be answered belonging to audio output scene
Use type.For example, as shown in the table:
ID | Back_type | Application_type |
1 | Game | 1 |
2 | Music | 2 |
Wherein, Field ID indicates the mark of data, and field Back_type indicates audio output scene, Application_
Type indicates to apply type.For example, the corresponding audio output scene of data that ID is 1 is Game (scene of game), and it is corresponded to
Application type be 1, wherein 1 characterization the first kind.The corresponding audio output scene of the data that ID is 2 is (the music field music
Scape), and its corresponding application type is 2, wherein 2 characterization Second Types.Wherein, the corresponding transmission delay of the first type of coding is full
Sufficient pre-set delay condition.The corresponding audio sample rate of second type of coding meets default sampling condition.
It so in this case, will be described if the application type of the current audio output scene is the first kind
Corresponding first type of coding of the first kind is as the current corresponding audio encoding type of audio output scene.If described
The application type of current audio output scene is Second Type, using corresponding second type of coding of the Second Type as institute
State the current corresponding audio encoding type of audio output scene.
Step S130: the audio data based on audio encoding type opposite direction audio-frequence player device transmission is encoded.
A kind of coding control method provided by the present application, before the audio data of exports coding, by obtaining currently
Then audio output scene obtains audio encoding type corresponding with the current audio output scene again, is then based on institute
The audio data for stating the transmission of audio encoding type opposite direction audio-frequence player device is encoded, so that electronic equipment can basis
Different audio output scene determines different audio encoding types, so improve electronic equipment encoded it is flexible
Property.
Referring to Fig. 2, a kind of coding control method provided by the present application, is applied to electronic equipment, which comprises
Step S210: current audio output scene is obtained.
Step S220: the history audio encoding type of the current audio output scene is obtained.
As a kind of mode, if electronic equipment, there is currently audio output, electronic equipment can be in response to acting on electronics
The touch control operation of equipment switches current audio encoding type.
Wherein, touch control operation includes pressing operation and slide.Wherein, pressing operation, which refers to, touches electronic equipment
Display screen after, the operation of certain pressure is persistently generated to the touch position in the display screen.And slide refers to and is touching
Behind a position into display screen, touch points are made to be moved to the operation of another location from the position, and in moving process always
It keeps touching with display screen.
As a kind of mode, in the available preset time period before current time of electronic equipment, with it is described
Frequency is used described in the current identical scene of audio output scene more than setpoint frequency, or it is more than pre- for being used duration
If the audio encoding type of duration is as the history audio encoding type.
As a kind of mode, electronic equipment can be after the current audio output scene of determination, by the determining audio of user
Type of coding storage corresponding with current audio output scene.Wherein, the audio encoding type that user determines can be logical for user
The audio encoding type that manually mode is selected is crossed, or may be that electronic equipment is compiled according to the audio that the rule of setting determines
In the case where not being changed in set period of time after code type, the audio encoding type determined by electronic equipment.
For example, if electronic equipment has triggered music playing process starting, then can on the interface of music playing process
To show multiple alternative audio coding options.For example, as shown in figure 3, showing the name of audio encoding type in control 99
Claim, after detecting user's touch-control control 99, as shown in figure 4, an alternative menu 98 can be shown, in the alternative menu 98
In can show all or part of alternative audio type of coding, so that user can select oneself in the alternative menu 98
Required audio encoding type.
In addition, alternatively mode can also controlled directly other than showing audio encoding type on control
The corresponding effect of audio encoding type is shown on part, not know the corresponding effect of every kind of audio encoding type or advantage
User can the more intuitive audio encoding type selected needed for oneself.For example, as shown in figure 5, in control 99 and alternative dish
It is all that every kind of audio encoding type is shown in a manner of effect in single 98, so that user can more intuitive selection oneself
Required audio encoding type.
It is so based on aforesaid way, electronic equipment, can will be current after getting audio encoding type determined by user
Audio encoding type determined by user carries out corresponding storage with current audio output scene (being music scenario in figure).It can be with
Understand, for stored audio encoding type can by electronic equipment as a history audio encoding type, so as to
After it is music scenario above-mentioned that electronic equipment gets current audio output scene again, music scenario can be directly acquired
Corresponding history audio encoding type is as the corresponding audio encoding type of current music scene.And when defeated for the same audio
When scene has multiple history audio encoding types to be selected out, electronic equipment can be from multiple history audio encoding types to be selected
One type of middle determination is as the history audio encoding type chosen, so that the history audio encoding type chosen is determined as working as
The corresponding audio encoding type of preceding audio output scene.
How the history audio chosen so is determined from multiple history audio encoding types to be selected for electronic equipment
Type of coding will be made below detailed introduction.
Wherein, as a kind of mode, the audio types that scene is played can be exported according to present video to determine.That
, electronic equipment can also correspond to storage and work as in corresponding storage audio output scene and audio encoding type in this case
Preceding audio types.
For example, audio types may include popular song, rock song, supper bass etc. as a kind of mode.If that
Electronic equipment is recorded in this audio output scene of music, for having selected sound under this audio types of popular song
Frequency type of coding is Apt-X coding mode, then electronic equipment can be using Apt-X coding mode as one under music scene
A history audio encoding type to be selected.Similarly, if having selected audio coding under for this audio types of popular song
Type is SBC coding mode, then electronic equipment SBC coding mode can be also used as one under music scene it is to be selected
History audio encoding type.So in this case, electronic equipment detects current institute in the case where entering music scene
The audio types of broadcasting are popular song, then electronic equipment can be from multiple history audio coding classes to be selected of aforementioned determination
In type, when according to history frequency of use length and history using selecting frequency of use maximum in time span and history use
Length is longest as the history audio encoding type chosen.
In addition, alternatively mode, can also determine according to current login user.It is understood that right
In different users, even identical audio output scene, the demand of different users may also can be different, if that root
The history audio encoding type chosen is determined according to the hobby of different users, and electronic equipment can be enabled more flexible
Determine audio encoding type.
So in this case, correspondingly, electronic equipment is in corresponding storage audio output scene and audio encoding type
When, it can also correspond to the user account number for storing and determining the audio encoding type.
Or by taking music scene as an example.If the account number of currently logged on user is account number A under music scene
(account can be the account number of music application program, be also possible to the account number of electronic device system), then for
If the user of account number A has selected Apt-X coding mode, electronic equipment can it is corresponding by account number A, music scene with
And Apt-X coding mode carries out corresponding storage, and then using pt-X coding mode as account number is logged in as account number A in the case where,
A history audio encoding type in music scene, similarly, if still under music scene, if account number
The user of A has selected SBC coding mode, then electronic equipment corresponding can compile account number A, music scene and Apt-X
Code mode carries out corresponding storage, so using pt-X coding mode as account number is logged in as account number A in the case where, in music
A history audio encoding type in scene.So in electronic equipment in the case where entering music scene, detect current
The account number of login is account number A, then electronic equipment can be compiled from the corresponding multiple history audios to be selected of account number of aforementioned determination
In code type, according to history frequency of use length and history, using selecting in time span, frequency of use is maximum or history makes
Use duration longest as the history audio encoding type chosen.
Furthermore in addition to according to other than audio types perhaps user account number can also according to locating for electronic equipment environment or
Other states determine the history audio encoding type chosen.For example, if detecting the current electromagnetic environment of electronic equipment more
Complexity, then in order to guarantee audio frequency effect as far as possible, electronic equipment can choose the good audio encoding type of transmission quality (for example,
Sample rate meets the audio encoding type of preset condition).
In this application, whether electronic can determine electromagnetic environment by detecting the complexity of determining electromagnetic environment
It is complex, and electronic equipment can determine the complexity of current electromagnetic environment in several ways.Optionally, as one
Kind mode, electronic equipment may determine that the quantity for the wlan network for being currently able to search, by the quantity and electromagnetism of wlan network
The complexity of environment is corresponded to.For example, a segment is arrived when the quantity of wlan network is in 0, then corresponding complexity is
1, if the quantity of wlan network is in a to b segment, then corresponding complexity is 2, and so on.In this case,
Higher complexity can correspond to the higher audio coding mode of encoder bit rate.
It is understood that wlan network and bluetooth can work in 2.4GHz frequency range.But it is specifically broadcasted
The channel of signal still have difference.Outside quantity so except through detecting wlan network, electronic equipment can also judge
How many other equipment of channel are also using where the signal of the bluetooth of current broadcast, and then obtain the complexity of electromagnetic environment.
For example, a segment is arrived when the quantity of channel occupancy is in 0, then corresponding complexity is 1, if at the quantity of channel occupancy
In a to b segment, then corresponding complexity is 2, and so on.In this case, higher complexity can correspond to
The higher audio coding mode of encoder bit rate.It is understood that wherein channel occupancy refers to current current electronic device broadcast
Channel used in Bluetooth signal has other electronic equipments also in a situation of use where simultaneously, the quantity of other electronic equipments.
It and in this application, can be in addition to the type above-mentioned by application program is come other than determining audio output scene
Audio output scene is determined by the attribute or classification of audio-frequence player device.For example, currently being connect if electronic equipment detects
The audio-frequence player device for receiving the audio data of its transmission is earphone, then current audio scene can be determined as defeated to earphone
The scene of audio data out.If electronic equipment detects that it is general for currently receiving the audio-frequence player device of the audio data of its transmission
Speaker, then current audio scene can be determined as to general speaker export audio data scene.Furthermore if electric
Sub- equipment detects that the audio-frequence player device for currently receiving the audio data of its transmission is mobile unit, then can will be current
Audio scene is determined as exporting the scene of audio data to mobile unit.
Step S230: using the history audio encoding type as the corresponding audio coding class of current audio output scene
Type.
Step S240: the audio data based on audio encoding type opposite direction audio-frequence player device transmission is encoded.
A kind of coding control method provided by the present application, before the audio data of exports coding, by obtaining currently
Then audio output scene obtains history audio encoding type corresponding with the current audio output scene, then base again
It is encoded in the audio data of history audio encoding type opposite direction audio-frequence player device transmission, so that electronic equipment
Different audio encoding types can be determined according to different audio output scenes, and the audio output scene can be used
The usual history audio encoding type of lower user encodes, so that electronic equipment can preferably match user's habit,
Improve the flexibility that electronic equipment is encoded.
Referring to Fig. 6, a kind of data processing equipment provided by the present application, runs on electronic equipment, described device 300, packet
It includes: scene acquiring unit 310, type of coding acquiring unit 320 and coding unit 330.
Scene acquiring unit 310, for obtaining current audio output scene.
As a kind of mode, scene acquiring unit 310 is used for, detect the front stage operation of electronic equipment application program whether
There is audio output;It is if the application program of front stage operation has audio output, the type of the application program of the front stage operation is corresponding
Audio output scene as current audio output scene.It, will backstage if the application program of front stage operation does not have audio output
The corresponding audio output scene of the type of the application program of operation is as current audio output scene.
Type of coding acquiring unit 320, for obtaining audio coding class corresponding with the current audio output scene
Type.
As a kind of mode, type of coding acquiring unit 320, specifically for obtaining the current audio output scene
Using type, using with it is described using the corresponding audio encoding type of type as the current corresponding sound of audio output scene
Frequency type of coding.
As a kind of mode, if type of coding acquiring unit 320, the application kind of the current audio output scene is determined
Class is the first kind, and corresponding first type of coding of the first kind is corresponding as the current audio output scene
Audio encoding type, wherein the corresponding transmission delay of the first type of coding meets pre-set delay condition.
If type of coding acquiring unit 320, determine that the application type of the current audio output scene is Second Type,
Using corresponding second type of coding of the Second Type as the current corresponding audio encoding type of audio output scene,
Wherein, the corresponding audio sample rate of the second type of coding meets default sampling condition.
Coding unit 330, audio data for being transmitted based on the audio encoding type opposite direction audio-frequence player device into
Row coding.
Referring to Fig. 7, a kind of data processing equipment provided by the present application, runs on electronic equipment, described device 400, packet
It includes: scene acquiring unit 410, type of coding acquiring unit 420 and coding unit 430.
Scene acquiring unit 410, for obtaining current audio output scene.
History type of coding acquiring unit 420, for obtaining the history audio for obtaining the current audio output scene
Type of coding.
Wherein, as a kind of mode, history type of coding acquiring unit 420, be specifically used for obtaining apart from current time it
In preceding preset time period, in audio output scene identical with the current audio output scene, be used frequency or
It is more than the audio encoding type of preset value that person, which is used duration,;By it is described be used frequency or used duration be more than preset value
Audio encoding type as the history audio encoding type.
Type of coding acquiring unit 430, for using the history audio encoding type as current audio output scene
Corresponding audio encoding type.
Coding unit 440, audio data for being transmitted based on the audio encoding type opposite direction audio-frequence player device into
Row coding.
It should be noted that it is apparent to those skilled in the art that, for convenience and simplicity of description, on
The device of description and the specific work process of unit are stated, can refer to corresponding processes in the foregoing method embodiment, herein no longer
It repeats.
It should be noted that in the application it is specific how according to audio encoding type to audio data carry out coding be can be with
Using existing technology, the application is just not described further in detail.
In conclusion a kind of coding control method, device and electronic equipment provided by the present application, in the sound of exports coding
Before frequency evidence, by obtaining current audio output scene, then obtain again corresponding with the current audio output scene
Audio encoding type, the audio data for being then based on audio encoding type opposite direction audio-frequence player device transmission compiled
Code, so that electronic equipment can determine different audio encoding types, Jin Erti according to different audio output scenes
The flexibility that electronic equipment is encoded is risen.
A kind of electronic equipment provided by the present application is illustrated below in conjunction with Fig. 8.
Referring to Fig. 8, based on above-mentioned coding control method, device, another kind that the embodiment of the present application also provides can be with
Execute the electronic equipment 100 of aforementioned terminals control method.Electronic equipment 100 include the one or more that intercouples (in figure only
Show one) processor 102, memory 104, wireless module 106 and voicefrequency circuit 110.Wherein, it is deposited in the memory 104
The program that can execute content in previous embodiment is contained, and processor 102 can execute the journey stored in the memory 104
Sequence.
Wherein, processor 102 may include one or more processing core.Processor 102 utilizes various interfaces and route
The various pieces in entire electronic equipment 100 are connected, by running or executing the instruction being stored in memory 104, program, generation
Code collection or instruction set, and the data being stored in memory 104 are called, execute the various functions and processing of electronic equipment 100
Data.Optionally, processor 102 can be using Digital Signal Processing (Digital Signal Processing, DSP), scene
Programmable gate array (Field-Programmable Gate Array, FPGA), programmable logic array (Programmable
Logic Array, PLA) at least one of example, in hardware realize.Processor 102 can integrating central processor (Central
Processing Unit, CPU), in image processor (Graphics Processing Unit, GPU) and modem etc.
One or more of combinations.Wherein, the main processing operation system of CPU, user interface and application program etc.;GPU is for being responsible for
Show the rendering and drafting of content;Modem is for handling wireless communication.It is understood that above-mentioned modem
It can not be integrated into processor 102, be realized separately through one piece of communication chip.
Memory 104 may include random access memory (Random Access Memory, RAM), also may include read-only
Memory (Read-Only Memory).Memory 104 can be used for store instruction, program, code, code set or instruction set.It deposits
Reservoir 104 may include storing program area and storage data area, wherein the finger that storing program area can store for realizing operating system
Enable, for realizing at least one function instruction (such as touch function, sound-playing function, image player function etc.), be used for
Realize the instruction etc. of following each embodiments of the method.Storage data area can also store the number that terminal 100 is created in use
According to (such as phone directory, audio, video data, chat record data) etc..
The wireless module 106 is used to receive and transmit electromagnetic wave, realizes the mutual conversion of electromagnetic wave and electric signal, from
And it is communicated with communication network or other equipment, such as communicated with audio-frequence player device.The wireless module 106 can
Including various existing for executing the circuit elements of these functions, for example, antenna, RF transceiver, digital signal processor,
Encryption/deciphering chip, subscriber identity module (SIM) card, memory etc..The wireless module 106 can be for example mutual with various networks
Networking, intranet, wireless network communicate or communicated by wireless network and other equipment.Above-mentioned is wireless
Network may include cellular telephone networks, WLAN or Metropolitan Area Network (MAN).Various communication marks can be used in above-mentioned wireless network
Quasi-, agreement and technology, including but not limited to 802 agreement of IEEE withAndBluetooth protocol, in addition may include those currently not yet by
The agreement that developed.
Furthermore the voicefrequency circuit 110 can be also used for for will by bluetooth (when wireless module 106 be based on Bluetooth communication
Agreement transmit data when) transmission audio data encoded, wherein used audio encoding type can basis when coding
The mode that previous embodiment provides obtains.
It should be understood that above-mentioned electronic equipment 100 is not limited to intelligent mobile phone terminal, should refer to can moved
Computer equipment used in dynamic.Specifically, electronic equipment 100, refers to the mobile computer for being equipped with intelligent operating system
Equipment, electronic equipment 100 include but is not limited to smart phone, smartwatch, tablet computer, etc..
It should be appreciated that each section of the application can be realized with hardware, software, firmware or their combination.Above-mentioned
In embodiment, software that multiple steps or method can be executed in memory and by suitable instruction execution system with storage
Or firmware is realized.It, and in another embodiment, can be under well known in the art for example, if realized with hardware
Any one of column technology or their combination are realized: having a logic gates for realizing logic function to data-signal
Discrete logic, with suitable combinational logic gate circuit specific integrated circuit, programmable gate array (PGA), scene
Programmable gate array (FPGA) etc..
Referring to FIG. 9, it illustrates a kind of structural block diagrams of computer readable storage medium provided by the embodiments of the present application.
Program code is stored in the computer-readable medium 800, said program code can be called by processor and execute above method reality
Apply method described in example.
Computer readable storage medium 800 can be such as flash memory, EEPROM (electrically erasable programmable read-only memory),
The electronic memory of EPROM, hard disk or ROM etc.Optionally, computer readable storage medium 800 includes non-volatile meter
Calculation machine readable medium (non-transitory computer-readable storage medium).Computer-readable storage
Medium 800 has the memory space for the program code 810 for executing any method and step in the above method.These program codes can
With from reading or be written in one or more computer program product in this one or more computer program product.
Program code 810 can for example be compressed in a suitable form.
Above-mentioned integrated module both can take the form of hardware realization, can also be real using the form of software function module
It is existing.If the integrated module is realized and when sold or used as an independent product in the form of software function module,
It can store in a computer readable storage medium.
Storage medium mentioned above can be read-only memory, disk or CD etc..Although having been shown and retouching above
Embodiments herein is stated, it is to be understood that above-described embodiment is exemplary, and should not be understood as the limit to the application
System, those skilled in the art can be changed above-described embodiment, modify, replace and become within the scope of application
Type.
Finally, it should be noted that above embodiments are only to illustrate the technical solution of the application, rather than its limitations;Although
The application is described in detail with reference to the foregoing embodiments, those skilled in the art are when understanding: it still can be with
It modifies the technical solutions described in the foregoing embodiments or equivalent replacement of some of the technical features;And
These are modified or replaceed, do not drive corresponding technical solution essence be detached from each embodiment technical solution of the application spirit and
Range.
Claims (11)
1. a kind of coding control method, which is characterized in that be applied to electronic equipment, which comprises
Obtain current audio output scene;
Obtain audio encoding type corresponding with the current audio output scene;
Audio data based on audio encoding type opposite direction audio-frequence player device transmission is encoded.
2. the method according to claim 1, wherein the acquisition is corresponding with the current audio output scene
Audio encoding type the step of include:
The application type of the current audio output scene is obtained, audio encoding type corresponding with the application type is made
For the current corresponding audio encoding type of audio output scene.
3. according to the method described in claim 2, it is characterized in that, the application for obtaining the current audio output scene
Type is compiled with described using the corresponding audio encoding type of type as the corresponding audio of the current audio output scene
The step of code type includes:
If the application type of the current audio output scene is the first kind, by corresponding first coding of the first kind
Type is as the current corresponding audio encoding type of audio output scene, wherein the corresponding transmission of the first type of coding
Deferred gratification pre-set delay condition.
4. according to the method described in claim 2, it is characterized in that, the application for obtaining the current audio output scene
Type is compiled with described using the corresponding audio encoding type of type as the corresponding audio of the current audio output scene
The step of code type includes:
If the application type of the current audio output scene is Second Type, by corresponding second coding of the Second Type
Type is as the current corresponding audio encoding type of audio output scene, wherein the corresponding audio of the second type of coding
Sample rate meets default sampling condition.
5. the method according to claim 1, wherein the acquisition is corresponding with the current audio output scene
Audio encoding type the step of include:
Obtain the history audio encoding type of the current audio output scene;
Using the history audio encoding type as the current corresponding audio encoding type of audio output scene.
6. according to the method described in claim 5, it is characterized in that, the history for obtaining the current audio output scene
The step of audio encoding type includes:
It obtains in the set period of time before current time, it is defeated in audio identical with the current audio output scene
Out in scene, being used frequency or being used duration is more than the audio encoding type of setting value;
Using it is described be used frequency or by used duration be more than setting value audio encoding type compiled as the history audio
Code type.
7. the method according to claim 1, wherein described the step of obtaining current audio output scene, wraps
It includes:
Whether the application program for detecting the front stage operation of electronic equipment has audio output;
It is if the application program of front stage operation has audio output, the corresponding audio of the type of the application program of the front stage operation is defeated
Scene is as current audio output scene out.
If the application program of front stage operation does not have audio output, by the corresponding audio output of the type of the application program of running background
Scene is as current audio output scene.
8. a kind of data processing equipment, which is characterized in that run on electronic equipment, described device, comprising:
Scene acquiring unit, for obtaining current audio output scene;
Type of coding acquiring unit, for obtaining audio encoding type corresponding with the current audio output scene;
Coding unit, the audio data for being transmitted based on the audio encoding type opposite direction audio-frequence player device are encoded.
9. device according to claim 8, which is characterized in that the type of coding acquiring unit includes:
Scene type obtains word cell, for obtaining the application type of the current audio output scene;
Type of coding determines subelement, for using with it is described using the corresponding audio encoding type of type as the current sound
The corresponding audio encoding type of frequency output scene.
10. a kind of electronic equipment, which is characterized in that including one or more processors and memory;
One or more programs are stored in the memory and are configured as being executed by one or more of processors, institute
It states one or more programs and is configured to carry out method as claimed in claim 1 to 7.
11. a kind of computer readable storage medium, which is characterized in that be stored with program generation in the computer readable storage medium
Code, wherein perform claim requires any method of 1-7 in said program code operation.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810923291.XA CN109273017B (en) | 2018-08-14 | 2018-08-14 | Encoding control method and device and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810923291.XA CN109273017B (en) | 2018-08-14 | 2018-08-14 | Encoding control method and device and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109273017A true CN109273017A (en) | 2019-01-25 |
CN109273017B CN109273017B (en) | 2022-06-21 |
Family
ID=65153353
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810923291.XA Active CN109273017B (en) | 2018-08-14 | 2018-08-14 | Encoding control method and device and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109273017B (en) |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111199743A (en) * | 2020-02-28 | 2020-05-26 | Oppo广东移动通信有限公司 | Audio coding format determining method and device, storage medium and electronic equipment |
CN111816197A (en) * | 2020-06-15 | 2020-10-23 | 北京达佳互联信息技术有限公司 | Audio encoding method, audio encoding device, electronic equipment and storage medium |
WO2021120570A1 (en) * | 2019-12-17 | 2021-06-24 | 中兴通讯股份有限公司 | Bluetooth audio transmission method and apparatus, terminal, and readable storage medium |
WO2022048371A1 (en) * | 2020-09-01 | 2022-03-10 | 华为技术有限公司 | Cross-device audio playing method, mobile terminal, electronic device and storage medium |
WO2022062942A1 (en) * | 2020-09-22 | 2022-03-31 | 华为技术有限公司 | Audio encoding and decoding methods and apparatuses |
CN114783452A (en) * | 2022-06-17 | 2022-07-22 | 荣耀终端有限公司 | Audio playing method, device and storage medium |
WO2023051367A1 (en) * | 2021-09-29 | 2023-04-06 | 华为技术有限公司 | Decoding method and apparatus, and device, storage medium and computer program product |
CN117116302A (en) * | 2023-10-24 | 2023-11-24 | 深圳市齐奥通信技术有限公司 | Audio data analysis method, system and storage medium under complex scene |
CN117373465A (en) * | 2023-12-08 | 2024-01-09 | 富迪科技(南京)有限公司 | Voice frequency signal switching system |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102142924A (en) * | 2010-02-03 | 2011-08-03 | 中兴通讯股份有限公司 | Versatile audio code (VAC) transmission method and device |
CN102150200A (en) * | 2008-07-09 | 2011-08-10 | 三星电子株式会社 | Method and apparatus for coding scheme determination |
CN103617797A (en) * | 2013-12-09 | 2014-03-05 | 腾讯科技(深圳)有限公司 | Voice processing method and device |
US20170076735A1 (en) * | 2015-09-11 | 2017-03-16 | Electronics And Telecommunications Research Institute | Usac audio signal encoding/decoding apparatus and method for digital radio services |
-
2018
- 2018-08-14 CN CN201810923291.XA patent/CN109273017B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102150200A (en) * | 2008-07-09 | 2011-08-10 | 三星电子株式会社 | Method and apparatus for coding scheme determination |
CN102142924A (en) * | 2010-02-03 | 2011-08-03 | 中兴通讯股份有限公司 | Versatile audio code (VAC) transmission method and device |
CN103617797A (en) * | 2013-12-09 | 2014-03-05 | 腾讯科技(深圳)有限公司 | Voice processing method and device |
US20170076735A1 (en) * | 2015-09-11 | 2017-03-16 | Electronics And Telecommunications Research Institute | Usac audio signal encoding/decoding apparatus and method for digital radio services |
Cited By (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2021120570A1 (en) * | 2019-12-17 | 2021-06-24 | 中兴通讯股份有限公司 | Bluetooth audio transmission method and apparatus, terminal, and readable storage medium |
CN111199743B (en) * | 2020-02-28 | 2023-08-18 | Oppo广东移动通信有限公司 | Audio coding format determining method and device, storage medium and electronic equipment |
CN111199743A (en) * | 2020-02-28 | 2020-05-26 | Oppo广东移动通信有限公司 | Audio coding format determining method and device, storage medium and electronic equipment |
CN111816197A (en) * | 2020-06-15 | 2020-10-23 | 北京达佳互联信息技术有限公司 | Audio encoding method, audio encoding device, electronic equipment and storage medium |
CN111816197B (en) * | 2020-06-15 | 2024-02-23 | 北京达佳互联信息技术有限公司 | Audio encoding method, device, electronic equipment and storage medium |
WO2022048371A1 (en) * | 2020-09-01 | 2022-03-10 | 华为技术有限公司 | Cross-device audio playing method, mobile terminal, electronic device and storage medium |
CN114205336A (en) * | 2020-09-01 | 2022-03-18 | 华为技术有限公司 | Cross-device audio playing method, mobile terminal, electronic device and storage medium |
WO2022062942A1 (en) * | 2020-09-22 | 2022-03-31 | 华为技术有限公司 | Audio encoding and decoding methods and apparatuses |
WO2023051367A1 (en) * | 2021-09-29 | 2023-04-06 | 华为技术有限公司 | Decoding method and apparatus, and device, storage medium and computer program product |
CN114783452A (en) * | 2022-06-17 | 2022-07-22 | 荣耀终端有限公司 | Audio playing method, device and storage medium |
CN114783452B (en) * | 2022-06-17 | 2022-12-13 | 荣耀终端有限公司 | Audio playing method, device and storage medium |
CN117116302A (en) * | 2023-10-24 | 2023-11-24 | 深圳市齐奥通信技术有限公司 | Audio data analysis method, system and storage medium under complex scene |
CN117116302B (en) * | 2023-10-24 | 2023-12-22 | 深圳市齐奥通信技术有限公司 | Audio data analysis method, system and storage medium under complex scene |
CN117373465A (en) * | 2023-12-08 | 2024-01-09 | 富迪科技(南京)有限公司 | Voice frequency signal switching system |
CN117373465B (en) * | 2023-12-08 | 2024-04-09 | 富迪科技(南京)有限公司 | Voice frequency signal switching system |
Also Published As
Publication number | Publication date |
---|---|
CN109273017B (en) | 2022-06-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109273017A (en) | Coding control method, device and electronic equipment | |
CN105872253B (en) | Live broadcast sound processing method and mobile terminal | |
CN109246672B (en) | Data transmission method, device and system and Bluetooth headset | |
CN111713141B (en) | Bluetooth playing method and electronic equipment | |
CN110213504B (en) | Video processing method, information sending method and related equipment | |
CN108111953B (en) | Audio sharing method and system based on TWS earphone and TWS earphone | |
CN109151194B (en) | Data transmission method, device, electronic equipment and storage medium | |
CN109151861A (en) | Encoding rate method of adjustment, device and electronic equipment | |
CN107005800B (en) | Audio file transmission and receiving method, device, equipment and system | |
CN109413555B (en) | Audio output method and device, earphone and electronic equipment | |
CN108737658B (en) | Mobile terminal, switching method of Bluetooth audio coding mode of mobile terminal and storage medium | |
CN109107158B (en) | Sound effect processing method and device, electronic equipment and computer readable storage medium | |
CN109274407B (en) | Data transmission method, device, electronic equipment and storage medium | |
CN111199743B (en) | Audio coding format determining method and device, storage medium and electronic equipment | |
CN108886653A (en) | A kind of earphone sound channel control method, relevant device and system | |
CN106341546B (en) | A kind of playback method of audio, device and mobile terminal | |
CN104571498A (en) | Application program starting method | |
CN109151789B (en) | Translation method, device and system and Bluetooth headset | |
CN109379491A (en) | Audio frequency playing method, device, electronic equipment and computer-readable medium | |
CN113223539B (en) | Audio transmission method and electronic equipment | |
WO2019015573A1 (en) | Unlocking control method and related product | |
CN109257642A (en) | Video resource playback method, device, electronic equipment and storage medium | |
CN109410900B (en) | Sound effect processing method and device and electronic equipment | |
CN113873589A (en) | Bluetooth connection switching method, Bluetooth headset and computer readable storage medium | |
CN108803983A (en) | Display control method and device, the electronic device and storage medium of notification message |
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 |