CN106445449A - Audio focus control apparatus and method - Google Patents

Audio focus control apparatus and method Download PDF

Info

Publication number
CN106445449A
CN106445449A CN201610802825.4A CN201610802825A CN106445449A CN 106445449 A CN106445449 A CN 106445449A CN 201610802825 A CN201610802825 A CN 201610802825A CN 106445449 A CN106445449 A CN 106445449A
Authority
CN
China
Prior art keywords
audio frequency
application
frequency focus
heartbeat packet
focus
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
Application number
CN201610802825.4A
Other languages
Chinese (zh)
Other versions
CN106445449B (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.)
Nubia Technology Co Ltd
Original Assignee
Nubia Technology Co 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 Nubia Technology Co Ltd filed Critical Nubia Technology Co Ltd
Priority to CN201610802825.4A priority Critical patent/CN106445449B/en
Publication of CN106445449A publication Critical patent/CN106445449A/en
Application granted granted Critical
Publication of CN106445449B publication Critical patent/CN106445449B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/16Sound input; Sound output
    • G06F3/167Audio in a user interface, e.g. using voice commands for navigating, audio feedback

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Telephone Function (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses an audio focus control apparatus and an audio focus control method. The apparatus comprises a heartbeat packet sending module, a detection module and a control module. The heartbeat packet sending module is used for periodically sending a heartbeat packet by a first application occupying an audio focus currently; the detection module is used for detecting whether the audio focus is released by the first application or not when it is judged that the heartbeat packet is not received in a preset time interval; and the control module is used for forcing the first application to release the audio focus when the detection module detects that the audio focus is not released by the first application. The invention furthermore discloses a mobile terminal comprising the apparatus. According to the apparatus, the method, and the mobile terminal, the problem that other temporarily interrupted audio applications cannot be continuously played because certain applications not obeying an audio playing rule of an operation system completely still occupy the audio focus after termination can be avoided, so that the user experience is improved.

Description

A kind of audio frequency focal point control device and method
Technical field
The present invention relates to audio frequency play-back technology field, more particularly, to a kind of audio frequency focal point control device and method.
Background technology
Android system is processing audio frequency broadcasting time-division multiple " audio streams ", such as music stream, audio stream, telephone speech Stream etc., making can be non-interference during control volume.In most cases playing music is all using STREAM_MUSIC audio stream.Separately Outward, might have multiple application programs in system and can play audio frequency, so needing to consider between them, how this coordinates.In order to keep away Exempt to play music, android system is managed collectively using audio frequency focus simultaneously, only obtain answering of audio frequency focus Music just can be play with program.
Generally, play audio frequency and should follow following steps:
1st, obtain audio frequency focus requestAudioFocus;
2nd, after obtaining success, commence play out audio frequency;
3rd, loss and " DUCK " of audio frequency focus are processed;
4th, cancel audio frequency focus after finishing.
But, for above-mentioned steps 4, not all application under current ARIXTRA standard is all followed, or even most of Application discharges audio frequency focus after not finishing according to above-mentioned specification.
Audio frequency focus is natural cooperation, and application program is all expected in accordance with audio frequency focus guide, but rule is not system Enforce.For terminal unit, the general more than one audio software running, in certain audio program by another After audio program interrupts, after another audio program finishes, without following audio frequency focus release rule, do not discharge and account for Audio frequency focus, then audio program originally can not it is necessary to allow user actively again tap on broadcasting, also affect automatically in continued broadcasting Consumer's Experience.
Content of the invention
Present invention is primarily targeted at proposing a kind of audio frequency focal point control device and method it is intended to solve application program not Carry out audio frequency broadcasting by AUDIO SPECIFICATIONS, causing to have no progeny in other audio playing program can not continued broadcasting problem automatically.
For achieving the above object, the invention provides a kind of audio frequency focal point control device, including:
Heartbeat packet sending module, for controlling the first application currently occupying audio frequency focus periodically to send heartbeat packet;
Detection module, for when judging not receiving described heartbeat packet within a preset time interval, the described audio frequency of detection is burnt Whether point is by the described first application release;
Control module, for detecting described audio frequency focus not by the described first application release when described detection module When, force described first application to discharge described audio frequency focus.
Alternatively, described control module is additionally operable to:After forcing described first application to discharge described audio frequency focus, according to pre- Fixed strategy, makes the other application suspending broadcasting due to losing described audio frequency focus obtain described audio frequency focus.
Alternatively, described control module is further used for:
Send the broadcast notice obtaining described audio frequency focus, or,
Described audio frequency focus is given and occupies audio frequency focus and suspend the second application of broadcasting due to the described first application.
Alternatively, described device also includes:
Time block, for determining that described heartbeat packet sending module sends the cycle of described heartbeat packet, the described cycle according to Following one or more state determines:
The current electric quantity of terminal, the backstage current operation program quantity of described terminal and the Current Temperatures of described terminal.
Alternatively, wherein said prefixed time interval is the cycle that described heartbeat packet sending module sends described heartbeat packet 2 times.
Present invention also offers a kind of audio frequency focus control method, including:
The first application currently occupying audio frequency focus is controlled periodically to send heartbeat packet;
When judging not receiving described heartbeat packet within a preset time interval, detect described audio frequency focus whether by described the One application release;
When described audio frequency focus is detected not by the described first application release, force described first application release described Audio frequency focus.
Alternatively, methods described also includes:
After forcing described first application to discharge described audio frequency focus, according to predetermined policy, make due to losing described audio frequency Focus and suspend broadcasting other application obtain described audio frequency focus.
Alternatively, wherein, described according to predetermined policy, make the other suspending broadcasting due to losing described audio frequency focus should Included with the step obtaining described audio frequency focus:
Send the broadcast notice obtaining described audio frequency focus, or,
Described audio frequency focus is given and occupies audio frequency focus and suspend the second application of broadcasting due to the described first application.
Alternatively, wherein, described the first application currently occupying audio frequency focus sends the cycle of heartbeat packet, according to following one Plant or various states determine:
The current electric quantity of terminal, the backstage current operation program quantity of described terminal and the Current Temperatures of described terminal.
Alternatively, described prefixed time interval is 2 times that described heartbeat packet sends the cycle.
The invention also discloses a kind of mobile terminal, including the device described in any of the above-described.
Scheme provided in an embodiment of the present invention, by arranging heartbeat packet sending module, makes the application journey of occupancy audio frequency focus Sequence is opened after running, and periodically sends heartbeat packet to operating system so that operating system can monitor takies audio frequency focus Whether application program discharges audio frequency focus in time, can avoid some applications not exclusively following operating system audio frequency play rules Still occupy audio frequency focus after EP (end of program), lead to the audio application that are temporarily interrupted of other cannot continued broadcasting problem, improve Consumer's Experience.
Brief description
Fig. 1 is the hardware architecture diagram of the mobile terminal realizing each embodiment of the present invention;
Fig. 2 is a kind of structural representation of audio frequency focal point control device of first embodiment of the invention;
Fig. 3 is a kind of structural representation of audio frequency focal point control device of second embodiment of the invention;
Fig. 4 is a kind of schematic flow sheet of audio frequency focus control method of third embodiment of the invention;
Fig. 5 is a kind of schematic flow sheet of audio frequency focus control method of fourth embodiment of the invention;
Fig. 6 is the method flow schematic diagram of the present invention first one exemplary embodiment;
Fig. 7 is the method flow schematic diagram of the present invention second one exemplary embodiment.
The realization of the object of the invention, functional characteristics and advantage will be described further in conjunction with the embodiments referring to the drawings.
Specific embodiment
It should be appreciated that specific embodiment described herein, only in order to explain the present invention, is not intended to limit the present invention.
Below in conjunction with drawings and Examples, technical scheme is described in detail.
If it should be noted that not conflicting, each feature in the embodiment of the present invention and embodiment can mutually be tied Close, all within protection scope of the present invention.In addition, though showing logical order in flow charts, but in some situations Under, can be with the step shown or described different from order execution herein.
Realize the mobile terminal of each embodiment of the present invention referring now to Description of Drawings.In follow-up description, use For represent element such as " module ", " module " or " unit " suffix only for being conducive to the explanation of the present invention, itself Not specific meaning.Therefore, " module " and " module " can mixedly use.
Mobile terminal can be implemented in a variety of manners.For example, the terminal described in the present invention can include such as moving Phone, smart phone, notebook computer, PDA (personal digital assistant), PAD (panel computer), PMP (put by portable multimedia broadcasting Device), the fixed terminal of the mobile terminal of guider etc. and such as digital TV, desk computer etc..Hereinafter it is assumed that eventually End is mobile terminal.However, it will be understood by those skilled in the art that, in addition to being used in particular for the element of mobile purpose, root Can also apply to the terminal of fixed type according to the construction of embodiments of the present invention.
Fig. 1 is that the hardware configuration of the mobile terminal realizing each embodiment of the present invention is illustrated.
Mobile terminal 1 00 can include wireless communication unit 110, A/V (audio/video) input block 120, user input Unit 130, memorizer 140, dio Output Modules 150, display unit 160, controller 170 etc..Fig. 1 show have various The mobile terminal of assembly, it should be understood that be not required for implementing all assemblies illustrating.Can alternatively implement more or Less assembly.Will be discussed in more detail below the element of mobile terminal.
Wireless communication unit 110 generally includes one or more assemblies, and it allows mobile terminal 1 00 and wireless communication system Or the radio communication between network.For example, wireless communication unit can include broadcasting reception module, mobile communication module, no At least one of line the Internet module, short range communication module and location information module.
A/V input block 120 is used for receiving audio or video signal.A/V input block 120 can include camera and Mike Wind.
User input unit 130 can generate key input data to control each of mobile terminal according to the order of user input Plant operation.User input unit 130 allows the various types of information of user input, and can include keyboard, metal dome, touch Plate, touch screen, roller, rocking bar etc..
Memorizer 140 can store software program of the process being executed by controller 170 and control operation etc., or can Temporarily to store oneself data (for example, telephone directory, message, still image, video etc.) through exporting or will export.And And, memorizer 140 can be to store the vibration of various modes with regard to exporting and audio signal when touching and being applied to touch screen Data.
Memorizer 140 can include the storage medium of at least one type, and described storage medium includes flash memory, hard disk, many Media card, card-type memorizer (for example, SD or DX memorizer etc.), random access storage device (RAM), static random-access storage Device (SRAM), read only memory (ROM), Electrically Erasable Read Only Memory (EEPROM), programmable read only memory (PROM), magnetic storage, disk, CD etc..And, mobile terminal 1 00 can execute memorizer with by network connection The network storage device cooperation of 140 store function.
Dio Output Modules 150 can mobile terminal be in call signal reception pattern, call mode, logging mode, When under the isotypes such as speech recognition mode, broadcast reception mode, that wireless communication unit 110 is received or in memorizer 140 The voice data transducing audio signal of middle storage and be output as sound.And, dio Output Modules 150 can provide and move The audio output (for example, call signal receives sound, message sink sound etc.) of the specific function correlation of terminal 100 execution. Dio Output Modules 150 can include speaker, buzzer etc..
Display unit 160 may be displayed on the information processing in mobile terminal 1 00.For example, when mobile terminal 1 00 is in electricity During words call mode, display unit 160 can show (for example, text messaging, the multimedia file that communicate with call or other Download etc.) related user interface (UI) or graphic user interface (GUI).When mobile terminal 1 00 is in video calling pattern Or during image capture mode, display unit 160 can show the image of capture and/or the image of reception, illustrate video or figure UI or GUI of picture and correlation function etc..
Meanwhile, when display unit 160 and the touch pad touch screen with formation superposed on one another as a layer, display unit 160 can serve as input equipment and output device.Display unit 160 can include liquid crystal display (LCD), thin film transistor (TFT) In LCD (TFT-LCD), Organic Light Emitting Diode (OLED) display, flexible display, three-dimensional (3D) display etc. at least A kind of.
Controller 170 generally controls the overall operation of mobile terminal.For example, controller 170 execution and voice call, data The related control of communication, video calling etc. and process.In addition, controller 170 can be included for reproducing (or playback) many matchmakers The multi-media module 180 of volume data, multi-media module 180 can construct in controller 170, or it is so structured that and controls Device 170 separates.Controller 170 can be with execution pattern identifying processing, by the handwriting input executing on the touchscreen or picture Draw input and be identified as character or image.
Various embodiment described herein can be with using such as computer software, hardware or its any combination of calculating Machine computer-readable recording medium is implementing.Hardware is implemented, embodiment described herein can be by using application-specific IC (ASIC), digital signal processor (DSP), digital signal processing device (DSPD), programmable logic device (PLD), scene can Program gate array (FPGA), processor, controller, microcontroller, microprocessor, be designed to execute function described herein At least one in electronic unit implementing, in some cases, can be implemented in controller 170 by such embodiment. Software is implemented, the embodiment of such as process or function can with allow to execute the single of at least one function or operation Software module is implementing.Software code can be come by the software application (or program) write with any suitable programming language Implement, software code can be stored in memorizer 140 and be executed by controller 170.
So far, oneself is through describing mobile terminal according to its function.Below, for the sake of brevity, will describe such as folded form, Slide type mobile terminal in various types of mobile terminals of board-type, oscillating-type, slide type mobile terminal etc. is as showing Example.Therefore, the present invention can be applied to any kind of mobile terminal, and is not limited to slide type mobile terminal.
Based on above-mentioned mobile terminal hardware configuration, each embodiment of the inventive method is proposed.The embodiment of the present invention be suitable for but It is not limited to the terminal of any employing android system, including but not limited to mobile terminal, as long as using audio frequency focus as management The terminal unit that audio frequency is play in order.
As shown in Fig. 2 first embodiment of the invention proposes a kind of audio frequency focal point control device, including heartbeat packet sending module 10th, detection module 11, control module 12.
Heartbeat packet sending module 10 is used for current the first application periodically transmission heartbeat packet controlling and occupying audio frequency focus;
Whether the first application program that described heartbeat packet instruction currently occupies audio frequency focus has actual source of sound to be broadcast Put.
Detection module 11 is used for when judging not receiving described heartbeat packet within a preset time interval, and the described audio frequency of detection is burnt Whether point is by the described first application release;
Control module 12 is used for described audio frequency focus is detected not by the described first application release when described detection module When, force described first application to discharge described audio frequency focus.
According to android system specification, play music stream, audio stream, the audio playing program of telephone speech stream, for avoiding Play music to lead to interfere, audio playing program, before playing sound stream, will call audio frequency focus Audio Focus letter simultaneously Number obtains audio frequency focus.The embodiment of the present invention arranges heartbeat packet sending module 11, makes currently to occupy audio frequency focus broadcasting audio frequency Audio application, including but not limited to music player software, speech message playout software etc. are opened when running, periodically Heartbeat packet sending module 11 is called to send a self-defining structure (i.e. heartbeat packet) to operating system, to represent this application journey Sequence is currently played associate audio signal, system can be allowed to know whether audio application has actual source of sound by heartbeat packet Played out using the audio frequency focus obtaining.Under normal circumstances, after this application program is play associate audio signal and finished, Audio frequency focus should be discharged, call for other application program, play other audio signals.If some application programs are not followed The audio frequency of android system plays specification in fact it could happen that audio frequency finishes, but does not discharge audio frequency focus in time, leads to it Its audio playing program cannot normal play.
Detection module 11 is set in an operating system, utilizes heartbeat packet sending module 11 weeks for receiving audio application The heartbeat packet that phase property sends, if not receiving heartbeat packet in default time interval, shows that this application program is over (broadcasting terminates), does not retransmit heartbeat packet.At this time, it may be necessary to whether detection audio frequency focus discharges, if discharged, need not enter Row is other to be processed;If detection module 11 detection finds that audio frequency focus is not discharged by this application program, need to force to answer Discharge audio frequency focus with program.For example, in 2 cycles sending in normal heartbeat bag in detection module 11, all do not receive heart beating Bag, then judge that this application program is over playing, can check whether audio frequency focus function is released, without release, Then need to control this application program forcible aborting audio frequency focus function.
Audio frequency focal point control device provided in an embodiment of the present invention, by arranging heartbeat packet sending module 11, makes occupancy sound The application program of frequency focus is opened after running, and periodically sends heartbeat packet to operating system so that operating system can monitor Whether the application program taking audio frequency focus discharges audio frequency focus in time, can avoid some not exclusively following operating system audio frequency The application program of play rules still occupies audio frequency focus after terminating, and leads to the audio application that are temporarily interrupted of other cannot Continued broadcasting problem, improves Consumer's Experience.
Alternatively, described control module 12 is additionally operable to:After forcing described first application to discharge described audio frequency focus, according to Predetermined policy, makes the other application suspending broadcasting due to losing described audio frequency focus obtain described audio frequency focus.
Generally, when an audio application takies audio frequency focus, another application journey playing audio frequency may be led to Sequence temporarily interrupts audio frequency broadcasting, if the application program taking audio frequency focus has fully complied with the audio frequency of android system recommendation Play specification, then, when this application program terminates to play audio frequency, can actively discharge audio frequency focus (or audio frequency focus function), for quilt Temporarily this function is called in the application program interrupting or other application program application.But if the application program of this occupancy audio frequency focus The audio frequency not fully complying with the recommendation of android system plays specification, and by system forcible aborting, the application being temporarily interrupted Program may not learn that audio frequency focus has discharged it is therefore desirable to system is by certain strategy in time, notifies be interrupted to answer Obtain this audio frequency focus continued broadcasting with program, it is to avoid need user to manually boot continued broadcasting.
Alternatively, wherein, described according to predetermined policy, make the other suspending broadcasting due to losing described audio frequency focus should With obtaining described audio frequency focus, including:
Send the broadcast notice obtaining described audio frequency focus, or,
Described audio frequency focus is given and occupies audio frequency focus and suspend the second application of broadcasting due to the described first application.
After audio frequency focus is forced release, in order to make the front application program being interrupted recovers to play automatically, the present invention Embodiment provides at least two modes:Send the broadcast notice that audio frequency focus has discharged, the application program weight Gong being interrupted New application audio frequency focus carries out continued broadcasting, or directly audio frequency focus is given taken before this audio frequency focus application program temporary transient Interrupt application software, from but the application software of this temporary transient interruption continue play audio frequency, again click on continued broadcasting without user, change Kind Consumer's Experience.
Fig. 3 is the apparatus structure schematic diagram of the second embodiment of the present invention;
As shown in figure 3, the audio frequency focal point control device that the present invention provides, on the basis of first embodiment, alternatively, also Including time block 13, described time block 13, for determining that described heartbeat packet sending module 11 sends the week of described heartbeat packet Phase, the described cycle determines according to following one or more state:
The current electric quantity of terminal, the backstage current operation program quantity of described terminal and the Current Temperatures of described terminal.
Periodically send heart beating packet function because audio application introduces, system power dissipation can be increased, and mobile terminal pair It is very sensitive it is therefore desirable to reasonable setting sends length cycle time of heartbeat packet in power consumption.The embodiment of the present invention can root According to the current composite state of audio-frequency playing terminal, determine that heartbeat packet sending module 11 sends the cycle of heartbeat packet, for example, it is possible to knot Close current electric quantity, terminal running background program quantity and the terminal temperature rise situation of terminal, optimize the transmission cycle of heartbeat packet, to save Save the power consumption of terminal.For example, including but not limited to considered below:
1st, judge the current electric quantity of terminal, electricity is higher, the cycle that heartbeat packet sending module 11 sends heartbeat packet can get over Short, electricity is lower, and the cycle that heartbeat packet sending module 11 sends heartbeat packet can be longer.
2nd, judge the backstage current operation program quantity of terminal, quantity is more, heartbeat packet sending module 11 sends heartbeat packet Cycle longer, quantity is fewer, heartbeat packet sending module 11 send heartbeat packet cycle shorter;
3rd, judge the current temperature rise situation of terminal:Temperature is higher, and the cycle that heartbeat packet sending module 11 sends heartbeat packet gets over Long, temperature is lower, and the cycle that heartbeat packet sending module 11 sends heartbeat packet is shorter.
In a word, while improving the meeting of audio user playing body, reduce as far as possible due to introducing heartbeat packet sending module 11 Periodically send the system power dissipation increase that heart beating machine contracting system leads to.
Alternatively, wherein said prefixed time interval is the cycle that described heartbeat packet sending module 11 sends described heartbeat packet 2 times.
Generally, the audio application taking audio frequency focus under normal circumstances should be according to the cycle determining, timing sends Heartbeat packet, if all not receiving heartbeat packet in the twice time interval in this cycle, shows that audio application is over Play source of sound and do not recall heartbeat packet sending module 11 and send heartbeat packet.
It is of course also possible to according to practical application needs, adjust this time interval, such as one and half heartbeat packet sends the cycle (delay leading in view of certain reason) or longer time (as 2 half periods or 3 cycles) etc..
Audio frequency focal point control device provided in an embodiment of the present invention, by arranging heartbeat packet sending module 11, makes occupancy sound The application program of frequency focus is opened after running, and periodically sends heartbeat packet to operating system so that operating system can monitor Whether the application program taking audio frequency focus discharges audio frequency focus in time, can avoid some not exclusively following operating system audio frequency The application program of play rules still occupies audio frequency focus after terminating, and leads to the audio application that are temporarily interrupted of other cannot Continued broadcasting problem, sends the cycle of heartbeat packet, it is possible to reduce terminal is due to for sound by reasonable arrangement heartbeat packet sending module 11 Frequency application introduces the power problemses that heart beating machine contracting system may lead to, while improving audio user broadcasting experience, as much as possible The power consumption of minimizing system.
Based on said apparatus, the embodiment of the present invention additionally provides a kind of mobile terminal comprising said apparatus.
Correspondingly, third embodiment of the invention additionally provides a kind of audio frequency focus control method, as shown in figure 4, include with Lower step:
Step 20:The first application currently occupying audio frequency focus is controlled periodically to send heartbeat packet;
Whether the first application program that described heartbeat packet instruction currently occupies audio frequency focus has actual source of sound to be broadcast Put.
Step 22:When judging not receiving described heartbeat packet within a preset time interval, whether detect described audio frequency focus By the described first application release;
Step 24:When described audio frequency focus is detected not by the described first application release, force described first application Discharge described audio frequency focus.
According to android system specification, play music stream, audio stream, the audio playing program of telephone speech stream, for avoiding Play music to lead to interfere, audio playing program, before playing sound stream, will call audio frequency focus Audio Focus letter simultaneously Number obtains audio frequency focus.The embodiment of the present invention setting currently occupy audio frequency focus play audio frequency application program, periodically to Operating system sends a self-defining structure, i.e. heartbeat packet, to represent that this application program is currently played related audio Signal, can allow system know whether audio application is having actual source of sound using the audio frequency focus obtaining by heartbeat packet Play out.Under normal circumstances, when this application program is play after associate audio signal finishes it should release audio frequency focus, supply it Other audio signals are play in its application call.If the audio frequency that some application programs do not follow android system is play Specification is in fact it could happen that audio frequency finishes, but does not discharge audio frequency focus in time, leads to other audio playing program normal Play.
Whether periodic detection receives the heartbeat packet that audio playing module periodically sends in an operating system, if pre- If time interval in do not receive heartbeat packet, then may determine that this application program is over, then detection audio frequency is burnt further Whether point discharges, if discharged, need not carry out other process;If system detectio finds that audio frequency focus should not by this With program release, then force this application program release audio frequency focus.
Audio frequency focus control method provided in an embodiment of the present invention, by the current application program taking audio frequency focus of setting Periodically send heartbeat packet to operating system so that system can monitor whether the application program taking audio frequency focus is released in time Playback frequency focus, after some application programs not exclusively following operating system audio frequency play rules can be avoided to terminate, still accounts for According to audio frequency focus, lead to audio application that other is temporarily interrupted cannot continued broadcasting problem, improve Consumer's Experience.
Another kind of audio frequency focus control method that Fig. 5 provides for fourth embodiment of the invention.
As shown in figure 5, the audio frequency focus control method that the present invention provides, on the basis of 3rd embodiment, alternatively, also Including:
Step 26:After forcing described first application to discharge described audio frequency focus, according to predetermined policy, make by losing The other application stated audio frequency focus and suspend broadcasting obtains described audio frequency focus.
Generally, when an audio application takies audio frequency focus, another application journey playing audio frequency may be led to Sequence temporarily interrupts audio frequency broadcasting, if the application program taking audio frequency focus has fully complied with the audio frequency of android system recommendation Play specification, then, when this application program terminates to play audio frequency, can actively discharge audio frequency focus (or audio frequency focus function), for quilt Temporarily this function is called in the application program interrupting or other application program application.But if the application program of this occupancy audio frequency focus The audio frequency not fully complying with the recommendation of android system plays specification, and by system forcible aborting, the application being temporarily interrupted Program may not learn that audio frequency focus has discharged it is therefore desirable to system is by certain strategy in time, notifies be interrupted to answer Obtain this audio frequency focus continued broadcasting with program, it is to avoid need user to manually boot continued broadcasting.
Alternatively, wherein, described according to predetermined policy, make the other suspending broadcasting due to losing described audio frequency focus should Step with obtaining described audio frequency focus, including:
Send the broadcast notice obtaining described audio frequency focus, or,
Described audio frequency focus is given and occupies audio frequency focus and suspend the second application of broadcasting due to the described first application.
After audio frequency focus is forced release, in order to make the front application program being interrupted recovers to play automatically, Ke Yifa The broadcast that audio frequency focus has discharged is sent to notify, the application program Gong being interrupted applies for that audio frequency focus carries out continued broadcasting again, or Directly audio frequency focus is given and is taken the application software that this application program of audio frequency focus temporarily interrupts before this, from but this face When the application software that interrupts continue to play audio frequency, again click on continued broadcasting without user, improve Consumer's Experience.
Alternatively, wherein, described the first application currently occupying audio frequency focus sends the cycle of heartbeat packet, according to following one Plant or various states determine:
The current electric quantity of terminal, the backstage current operation program quantity of described terminal and the Current Temperatures of described terminal.
Introduce the increase that heartbeat mechanism leads to system power dissipation for mitigating for audio application, the embodiment of the present invention is permissible According to the current composite state of audio-frequency playing terminal, determine that heartbeat packet sends the cycle, for example, it is possible to combine the current electricity of terminal Amount, terminal running background program quantity and terminal temperature rise situation, to optimize the transmission cycle of heartbeat packet, save the power consumption of terminal. For example, including but not limited to considered below:
1st, judge the current electric quantity of terminal, electricity is higher, the cycle sending heartbeat packet is shorter, and electricity is lower, send heart beating The cycle of bag can lengthen.
2nd, judge the backstage current operation program quantity of terminal, quantity is more, the cycle sending heartbeat packet is longer, and quantity is got over Few, the cycle sending heartbeat packet can be shorter;
3rd, judge the current temperature rise situation of terminal:Temperature is higher, and the cycle sending heartbeat packet is longer, and temperature is lower, sends The cycle of heartbeat packet can be shorter.
Alternatively, wherein, described prefixed time interval is 2 times that described heartbeat packet sends the cycle.
Generally, the application program taking audio frequency focus under normal circumstances should be according to the cycle determining, timing sends heart beating Bag, if all not receiving heartbeat packet in the twice time interval in this cycle, shows that this application program is over playing sound Frequently.
It is of course also possible to according to practical application needs, adjust this time interval, such as one and half heartbeat packet sends the cycle (delay leading in view of certain reason) or longer time (as 2 half periods or 3 cycles) etc..
Audio frequency focus control method provided in an embodiment of the present invention, by the current application program taking audio frequency focus of setting Periodically send heartbeat packet to operating system so that operating system can monitor take the application program of audio frequency focus whether and When discharge audio frequency focus, some application programs not exclusively following operating system audio frequency play rules can be avoided to terminate after, according to So occupy audio frequency focus, lead to the application programs that are temporarily interrupted of other cannot continued broadcasting problem, sent out by reasonable arrangement heartbeat packet The cycle sent, it is possible to reduce terminal, due to introducing, for voice applications, the power problemses that heartbeat mechanism may lead to, is used improving While family audio frequency plays experience, it is reduced as far as the power consumption of system.
Below by one exemplary embodiment, further illustrate the present invention.
Example one, as shown in Figure 6 it is assumed that the first application program obtains audio frequency focus, lead to play audio frequency Second application program temporarily interrupts playing;When this first application program commences play out audio frequency, the current electricity of system detectio, after Platform operation program quantity and the temperature of terminal, determine that the cycle that the first application program sends heartbeat packet is T.
Step 200:Application program 0 uses audio frequency focus to play source of sound;
Step 201:The manually opened application program of user 1 plays music, and application program 0 automatic pause is play.
Step 202:System, according to the current composite situation of terminal, determines that application program 1 sends the cycle T of heartbeat packet;
Step 203:System monitors the broadcasting situation of application program 1 by heartbeat mechanism;
Step 204:Judge whether receive heartbeat packet in T time interval;If received, go to step 203 continuation monitorings;If No, connect step 205;
Step 205:Judge whether do not receive heartbeat packet yet in 2T time interval;If received, go to step 203 continuation prisons Survey;If it is, connecing step 206;
Step 206:Whether detection audio frequency focus discharges;If it is, normal operating, application program 0 acquisition audio frequency focus, continue Continued broadcasting is put;If not, connecing step 207;
Step 207:System mandatory use program 1 discharges audio frequency focus;
Step 208:The message of broadcast notification audio focus release;
Step 209:Application program 0 obtains audio frequency focus, continues to play.
Example two, suppose that music program 1 uses audio frequency focus to play music, now to receive one section of voice short for wechat Letter, user clicks on and listens to this voice SMS;May comprise steps of:
Step 300:Music program 1 uses audio frequency focus to play music;
Step 301:User clicks on and plays wechat voice SMS, and music program 1 automatic pause is play.
Step 302:System, according to the comprehensive condition at that time of terminal, determines that speech play application program 1 sends heartbeat packet Cycle T 1 (depending on terminal comprehensive condition at that time);
Step 303:System monitors the broadcasting situation of speech play 1 by heartbeat mechanism;
Step 304:Judge whether receive heartbeat packet in T1 time interval;If received, go to step 303 continuation monitorings;As Really no, connect step 305;
Step 305:Judge whether do not receive heartbeat packet yet in 2T1 time interval;If received, go to step 203 continuation prisons Survey;If it is, connecing step 306;
Step 306:Whether detection audio frequency focus discharges;If it is, normal operating, it is burnt that music program 1 obtains audio frequency Point, continues to play;If not, connecing step 307;
Step 307:System forces speech play program release audio frequency focus;
Step 308:Audio frequency focus is given music program 1;
Step 309:Music program 1 obtains audio frequency focus, continues to play.
It should be noted that herein, term " inclusion ", "comprising" or its any other variant are intended to non-row The comprising of his property, so that including a series of process of key elements, method, article or device not only include those key elements, and And also include other key elements of being not expressly set out, or also include intrinsic for this process, method, article or device institute Key element.In the absence of more restrictions, the key element being limited by sentence "including a ..." is it is not excluded that including being somebody's turn to do Also there is other identical element in the process of key element, method, article or device.
The embodiments of the present invention are for illustration only, do not represent the quality of embodiment.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can be realized by the mode of software plus necessary general hardware platform naturally it is also possible to pass through hardware, but in many cases The former is more preferably embodiment.Based on such understanding, technical scheme is substantially done to prior art in other words Go out partly can embodying in the form of software product of contribution, this computer software product is stored in a storage medium In (as ROM/RAM, magnetic disc, CD), including some instructions with so that a station terminal equipment (can be mobile phone, PDA, flat board Computer etc.) execution each embodiment of the present invention described in method.
These are only the preferred embodiments of the present invention, not thereby limit the present invention the scope of the claims, every using this Equivalent structure or equivalent flow conversion that bright description and accompanying drawing content are made, or directly or indirectly it is used in other related skills Art field, is included within the scope of the present invention.

Claims (10)

1. a kind of audio frequency focal point control device is it is characterised in that include:
Heartbeat packet sending module, for controlling the first application currently occupying audio frequency focus periodically to send heartbeat packet;
Detection module, for when judging not receiving described heartbeat packet within a preset time interval, detecting that described audio frequency focus is No application by described first discharges;
Control module, for when described detection module detect described audio frequency focus by described first application release when, by force Make described first application and discharge described audio frequency focus.
2. device as claimed in claim 1 it is characterised in that
Described control module is additionally operable to:Force described first application discharge described audio frequency focus after, according to predetermined policy, make by Obtain described audio frequency focus in the other application losing described audio frequency focus and suspending broadcasting.
3. device as claimed in claim 2 is it is characterised in that wherein,
Described control module is further used for:
Send the broadcast notice obtaining described audio frequency focus, or,
Described audio frequency focus is given and occupies audio frequency focus and suspend the second application of broadcasting due to the described first application.
4. device as claimed in claim 1 or 2 is it is characterised in that also include:
Time block, for determining the cycle of the described heartbeat packet sending module described heartbeat packet of transmission, the described cycle is according to following One or more state determines:
The current electric quantity of terminal, the backstage current operation program quantity of described terminal and the Current Temperatures of described terminal.
5. device as claimed in claim 1 or 2 it is characterised in that wherein, send out for described heartbeat packet by described prefixed time interval Module is sent to send 2 times of cycle of described heartbeat packet.
6. a kind of audio frequency focus control method is it is characterised in that include:
The first application currently occupying audio frequency focus is controlled periodically to send heartbeat packet;
When judging not receiving described heartbeat packet within a preset time interval, detect whether described audio frequency focus should by described first With release;
When described audio frequency focus is detected not by the described first application release, described first application is forced to discharge described audio frequency Focus.
7. method as claimed in claim 6 is it is characterised in that also include:
After forcing described first application to discharge described audio frequency focus, according to predetermined policy, make due to losing described audio frequency focus And the other application suspending broadcasting obtains described audio frequency focus.
8. method as claimed in claim 7 is it is characterised in that wherein,
Described according to predetermined policy, make the other application suspending broadcasting due to losing described audio frequency focus obtain described audio frequency burnt The step of point includes:
Send the broadcast notice obtaining described audio frequency focus, or,
Described audio frequency focus is given and occupies audio frequency focus and suspend the second application of broadcasting due to the described first application.
9. method as claimed in claims 6 or 7 is it is characterised in that wherein, described the first application currently occupying audio frequency focus Send the cycle of heartbeat packet, determined according to following one or more state:
The current electric quantity of terminal, the backstage current operation program quantity of described terminal and the Current Temperatures of described terminal.
10. a kind of mobile terminal, including the device as described in any one of Claims 1 to 5.
CN201610802825.4A 2016-09-05 2016-09-05 A kind of audio focal point control device and method Active CN106445449B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610802825.4A CN106445449B (en) 2016-09-05 2016-09-05 A kind of audio focal point control device and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610802825.4A CN106445449B (en) 2016-09-05 2016-09-05 A kind of audio focal point control device and method

Publications (2)

Publication Number Publication Date
CN106445449A true CN106445449A (en) 2017-02-22
CN106445449B CN106445449B (en) 2019-07-19

Family

ID=58165245

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610802825.4A Active CN106445449B (en) 2016-09-05 2016-09-05 A kind of audio focal point control device and method

Country Status (1)

Country Link
CN (1) CN106445449B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106952658A (en) * 2017-02-28 2017-07-14 生迪智慧科技有限公司 The audio frequency playing method and intelligent LED lamp of intelligent LED lamp
CN108235756A (en) * 2017-12-27 2018-06-29 深圳前海达闼云端智能科技有限公司 A kind of audio competition playing device and its method, mobile terminal
CN109408119A (en) * 2018-01-29 2019-03-01 维沃移动通信有限公司 A kind of labeling method and terminal device of application program
CN109658934A (en) * 2018-12-27 2019-04-19 苏州思必驰信息科技有限公司 Pass through the method and device of voice control multimedia app
CN111132104A (en) * 2019-12-19 2020-05-08 飞天诚信科技股份有限公司 Method and device for searching mobile terminal
CN112235063A (en) * 2020-09-29 2021-01-15 中国第一汽车股份有限公司 Vehicle-mounted audio playing control method, device, equipment and storage medium
US11418839B2 (en) * 2020-07-22 2022-08-16 Dell Products L.P. Automatic media control

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105468380A (en) * 2015-12-29 2016-04-06 山东大学 Optimized method for managing audio focus in Android system
CN105654970A (en) * 2015-12-25 2016-06-08 中科创达软件股份有限公司 Multisystem audio playing control method and system and vehicle-mounted system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105654970A (en) * 2015-12-25 2016-06-08 中科创达软件股份有限公司 Multisystem audio playing control method and system and vehicle-mounted system
CN105468380A (en) * 2015-12-29 2016-04-06 山东大学 Optimized method for managing audio focus in Android system

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106952658A (en) * 2017-02-28 2017-07-14 生迪智慧科技有限公司 The audio frequency playing method and intelligent LED lamp of intelligent LED lamp
CN108235756A (en) * 2017-12-27 2018-06-29 深圳前海达闼云端智能科技有限公司 A kind of audio competition playing device and its method, mobile terminal
WO2019127113A1 (en) * 2017-12-27 2019-07-04 深圳前海达闼云端智能科技有限公司 Audio competition playing device and method therefor and mobile terminal
CN108235756B (en) * 2017-12-27 2021-10-01 深圳前海达闼云端智能科技有限公司 Audio competition playing device and method and mobile terminal
CN109408119A (en) * 2018-01-29 2019-03-01 维沃移动通信有限公司 A kind of labeling method and terminal device of application program
CN109408119B (en) * 2018-01-29 2021-12-21 维沃移动通信有限公司 Application program marking method and terminal equipment
CN109658934A (en) * 2018-12-27 2019-04-19 苏州思必驰信息科技有限公司 Pass through the method and device of voice control multimedia app
CN111132104A (en) * 2019-12-19 2020-05-08 飞天诚信科技股份有限公司 Method and device for searching mobile terminal
CN111132104B (en) * 2019-12-19 2023-05-19 飞天诚信科技股份有限公司 Method and device for searching mobile terminal
US11418839B2 (en) * 2020-07-22 2022-08-16 Dell Products L.P. Automatic media control
CN112235063A (en) * 2020-09-29 2021-01-15 中国第一汽车股份有限公司 Vehicle-mounted audio playing control method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN106445449B (en) 2019-07-19

Similar Documents

Publication Publication Date Title
CN106445449A (en) Audio focus control apparatus and method
US10782856B2 (en) Method and device for displaying application function information, and terminal device
CN106990828A (en) A kind of apparatus and method for controlling screen display
CN103455275A (en) Method and apparatus for moving object in terminal having touch screen
CN104965665B (en) A kind of information processing method and device, terminal
CN106604375A (en) Dormancy device and method
CN106990889A (en) A kind of prompt operation implementation method and device
CN108710458A (en) A kind of split screen control method and terminal device
JP2015517777A (en) Multiple video playback method and apparatus
CN104615432B (en) Splash screen information processing method and client
CN104754126A (en) Method for displaying electronic information in mobile electronic device
WO2020206688A1 (en) Video playback method and apparatus, storage medium and electronic device
CN107018559A (en) Component processor is set to enter the terminal and method of resting state
CN106527685A (en) Control method and device for terminal application
CN106444983A (en) Device and method for achieving computer external connection function
TWI632816B (en) Continuous data delivery with energy conservation
CN108449806A (en) A kind of information processing method, terminal and readable storage medium storing program for executing
CN106488207A (en) A kind of multi-screen projecting method based on DLNA agreement and terminal
CN106375842A (en) Image sharing device and method
KR100747444B1 (en) Moving picture transmission method for mobile communication terminal
US9094532B2 (en) Manners reminder
CN106211286B (en) A kind of control method and mobile terminal
US10489192B2 (en) Method and controlling apparatus for automatically terminating an application of an electronic apparatus based on audio volume level being adjusted lower than a threshold audio volume level by a user
CN109240480A (en) A kind of terminal display control method and a kind of terminal
CN108833712A (en) A kind of message prompt method, terminal and computer readable storage medium

Legal Events

Date Code Title Description
C06 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