WO2015074504A1 - Method and smart terminal for controlling sound - Google Patents

Method and smart terminal for controlling sound Download PDF

Info

Publication number
WO2015074504A1
WO2015074504A1 PCT/CN2014/090865 CN2014090865W WO2015074504A1 WO 2015074504 A1 WO2015074504 A1 WO 2015074504A1 CN 2014090865 W CN2014090865 W CN 2014090865W WO 2015074504 A1 WO2015074504 A1 WO 2015074504A1
Authority
WO
WIPO (PCT)
Prior art keywords
dynamic library
sound
controlling interface
recording operation
sound controlling
Prior art date
Application number
PCT/CN2014/090865
Other languages
French (fr)
Inventor
Yongxin Wang
Original Assignee
Tencent Technology (Shenzhen) Company Limited
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 Tencent Technology (Shenzhen) Company Limited filed Critical Tencent Technology (Shenzhen) Company Limited
Publication of WO2015074504A1 publication Critical patent/WO2015074504A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/79Processing of colour television signals in connection with recording
    • H04N9/80Transformation of the television signal for recording, e.g. modulation, frequency changing; Inverse transformation for playback
    • H04N9/802Transformation of the television signal for recording, e.g. modulation, frequency changing; Inverse transformation for playback involving processing of the sound signal
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/76Television signal recording
    • H04N5/765Interface circuits between an apparatus for recording and another apparatus
    • H04N5/77Interface circuits between an apparatus for recording and another apparatus between a recording apparatus and a television camera
    • H04N5/772Interface circuits between an apparatus for recording and another apparatus between a recording apparatus and a television camera the recording apparatus and the television camera being placed in the same enclosure

Definitions

  • the present invention relates to a mobile terminal controlling field, and more particularly, to a method and smart terminal for controlling sound.
  • a recording application e.g., an APP of performing a recording function in an iOS device
  • a system cannot play the prompt tone (e.g., a short message tone and a push tone of an APP) .
  • prompt tone e.g., a short message tone and a push tone of an APP
  • a method, system and smart terminal for controlling sound is provided according to the present invention so that a system prompt tone can be played in a recording process.
  • a method for controlling sound includes:
  • Another method for controlling sound includes:
  • a smart terminal for controlling sound includes:
  • an interface calling module to call a first sound controlling interface when a system tone playing instruction is detected
  • a notification module to notify a three-party application being performing a recording operation to stop the recording operation via a pre-inputted dynamic library, wherein the dynamic library is associated with the first sound controlling interface through a hooking operation;
  • an operation module to play a system tone when detecting that the three-party application stops the recording operation.
  • the first sound control interface when detecting a system tone playing instruction, the first sound control interface is called, and the first global notification is transmitted through a pre-inputted dynamic library.
  • the third-party application When receiving the first global notification, the third-party application being performing the recording operation stops the recording operation.
  • the smart terminal normally plays the system tone.
  • the second control interface when detecting that a process of playing the system tone finishes, the second control interface is called, the second global notification is transmitted through the dynamic library. After the third-party application which has previously stopped the recording operation receives the second global notification, the recording operation is continued.
  • system prompt tone cannot be normally played in a recording process. And user requirement is satisfied.
  • FIG. 1 is a flowchart illustrating a method for controlling sound in a smart phone according to an embodiment of the present invention
  • FIG. 2 is a flowchart illustrating a method for controlling sound in a smart phone according to an embodiment of the present invention
  • FIG. 3 is a flowchart illustrating a method for controlling sound in a smart phone according to an embodiment of the present invention
  • FIG. 4 is a flowchart illustrating a method for controlling sound in a smart phone according to an embodiment of the present invention
  • FIG. 5 is a flowchart illustrating a method for controlling sound in a smart phone according to an embodiment of the present invention
  • FIG. 6 is a flowchart illustrating a method for controlling sound in a smart phone according to an embodiment of the present invention
  • FIG. 7 is a flowchart illustrating a method for controlling sound in a smart phone according to an embodiment of the present invention.
  • FIG. 8 is a flowchart illustrating a method for controlling sound in a smart phone according to an embodiment of the present invention.
  • FIG. 9 is a schematic diagram illustrating a structure of a system for controlling sound in a smart phone according to an embodiment of the present invention.
  • FIG. 10 is a schematic diagram illustrating a structure of a smart phone for controlling sound in a smart phone according to an embodiment of the present invention
  • FIG. 11 is a schematic diagram illustrating a structure of a smart phone for controlling sound in a smart phone according to an embodiment of the present invention
  • FIG. 12 is a schematic diagram illustrating a structure of a smart phone for controlling sound in a smart phone according to an embodiment of the present invention
  • FIG. 13 is a schematic diagram illustrating a structure of an apparatus for controlling sound according to an embodiment of the present invention.
  • an APP may be third-party application program.
  • program hooking the event may receive a system notification so that the program responds the hooked event in time.
  • FIG. 1 is a flowchart illustrating a method for controlling sound in a smart phone according to an embodiment of the present invention. The method includes procedures as follows.
  • a smart terminal when detecting a system tone playing instruction, a smart terminal calls a first sound controlling interface, and transmits a first global notification through a pre-inputted dynamic library.
  • the smart terminal may be a mobile terminal such as a smart phone, a tablet computer.
  • An operating system includes, but not limited to, an iOS system, an Android system, a Windows Mobile (WM) system etc.
  • the iOS system is taken as an example in the embodiment.
  • a system recording function of a three-party application running on the smart terminal cannot be compatible with an operation of playing a system prompt tone.
  • a system prompt tone e.g., a short message tone and a push tone of an APP
  • a dynamic library is per-generated.
  • Logic codes related with the dynamic library is inputted into a desktop management process SpringBoard of a system process.
  • Two hooked sound controlling interfaces compatible with a system tone are configured in the system, i.e., a first sound controlling interface and a second sound controlling interface.
  • two interfaces (BOOL) _play System Sound: (id) argl and (void) _sound Did Finish Playing: (id) argl of a class SB Sound Controller are taken as an example.
  • Another hooked interface that is compatible with the system tone may be adopted, which is not limited.
  • the two sound controlling hook interfaces are respectively hooked with the pre-inputted dynamic library.
  • a global notification (i.e., the first global notification in the embodiment) is transmitted from the inputted dynamic library to notify the third-party application being performing the recording operation that there is a prompt tone to be played.
  • the smart terminal plays the system tone.
  • the application being performing the recording operation may receive the first global notification. After the first global notification is received by the application being performing the recording operation, the recording operation is stopped.
  • the system tone may be normally played.
  • the APP After a process of playing the system tone finishes, according to a requirement or selection of the user, the APP is notified or is not notified that the process of playing the system tone finishes.
  • the first sound control interface when detecting a system tone playing instruction, the first sound control interface is called, and the first global notification is transmitted through a pre-inputted dynamic library.
  • the recording operation is stopped, and the smart phone plays the system tone.
  • the system prompt tone can be normally played in a recording process. And user requirement is satisfied.
  • a method for control sound is provided according to an embodiment of the present invention, which applies to a system side.
  • the method may further include procedures as follows.
  • the difference from the embodiment as shown in FIG. 1 is in that the method as shown in FIG. 2 further includes a technical solution of indicating that the third-party application continues to perform the recording operation.
  • the system may calls the second sound controlling interface.
  • the dynamic library transmits another global notification (i.e., the second global notification in the embodiment) to notify the APP that has previously stopped the recording operation.
  • the APP After receiving the second notification, the APP re-starts the recording operation to ensure that the recording operation is continued at the background.
  • the first sound control interface when detecting a system tone playing instruction, the first sound control interface is called, and the first global notification is transmitted through a pre-inputted dynamic library.
  • the third-party application When receiving the first global notification, the third-party application being performing the recording operation stops the recording operation.
  • the smart terminal normally plays the system tone.
  • the second control interface when detecting that a process of playing the system tone finishes, the second control interface is called, the second global notification is transmitted through the dynamic library. After the third-party application which has previously stopped the recording operation receives the second global notification, the recording operation is continued.
  • system prompt tone cannot be normally played in a recording process. And user requirement is satisfied.
  • a method for control a sound is provided according to an embodiment of the present invention, which applies to a system side.
  • the method may further include procedures as follows.
  • logic codes of the pre-generated dynamic library are inputted into a system running on the smart terminal to hook the first sound control interface and the second control interface pre-configured in the system.
  • the difference from the embodiment as shown in FIG. 2 is in that the method according to the embodiment of the present invention as shown in FIG. 3 further includes a technical solution of adding the pre-generated dynamic library into the system running on the smart terminal.
  • the iOS system is taken as an example.
  • the logic codes of the pre-generated dynamic library are inputted into the desktop management process SpringBoard of the system process.
  • Two hooked sound controlling interfaces compatible with the system tone are configured in the system, i.e., the first sound controlling interface and the second sound controlling interface.
  • the two interfaces (BOOL) _play System Sound: (id) argl and (void) _sound Did Finish Playing: (id) argl of the class SBSound Controller are taken as an example.
  • Another hook interface compatible with the system tone may be adopted, which is not limited.
  • the two sound controlling interfaces are hooked through the inputted dynamic library.
  • the first sound controlling interface is called, and the third-party application being performing the recording operation is notified to stop the recording operation through the inputted dynamic library.
  • the second sound controlling interface is called, and the third-party application is notified to continue the recording operation through the inputted dynamic library.
  • a method for controlling sound is provided according to an embodiment of the present invention, which applies to a system side.
  • the method may further include procedures as follows.
  • the dynamic library is generated.
  • the difference from the embodiment as shown in FIG. 3 is in that the method according to the embodiment of the present invention as shown in FIG. 4 further includes a technical solution of generating the dynamic library.
  • the dynamic library is used to hook the two sound controlling interfaces that are configured by the system and are compatible with the system tone after the dynamic library is inputted into the smart terminal system and to notify the third-party application to stop or continue the recording operation when the system calls at least one of the two sound controlling interfaces.
  • the dynamic library is generated.
  • the generated dynamic library is inputted into the smart terminal system.
  • the first sound control interface is called.
  • the first global notification is transmitted through the pre-inputted dynamic library.
  • the third-party application being performing the recording operation stops the recording operation.
  • the smart terminal normally plays the system tone.
  • the second control interface is called, the second global notification is transmitted through the dynamic library.
  • the recording operation is continued.
  • a method for controlling sound is provided according to an embodiment of the present invention, which applies to a smart terminal side.
  • the method may further include procedures as follows.
  • a first sound controlling interface is called.
  • a third-party application being performing a recording operation is notified to stop the recording operation through a pre-inputted dynamic library, wherein the dynamic library is associated with the first sound controlling interface by performing a hooking operation.
  • the smart terminal may be a mobile terminal such as a smart phone, a tablet computer.
  • An operating system includes, but not limited to, one of an iOS system, an Android system and a Windows Mobile system.
  • the iOS system is taken as an example in the embodiment.
  • a system recording function of a three-party application running on the smart terminal cannot be compatible with an operation of playing a system prompt tone.
  • a system prompt tone e.g., a short message tone and a push tone of an APP
  • a dynamic library is per-generated.
  • Logic codes related with the dynamic library is inputted into a desktop management process SpringBoard of a system process.
  • Two hooked sound controlling interfaces compatible with a system tone are configured in the system, i.e., a first sound controlling interface and a second sound controlling interface.
  • two interfaces (BOOL) _play System Sound: (id) argl and (void) _sound Did Finish Playing: (id) argl of a class SB Sound Controller are taken as an example.
  • Another hooked interface that is compatible with the system tone may be adopted, which is not limited.
  • the two sound controlling hook interfaces are respectively hooked with the pre-inputted dynamic library.
  • a global notification (i.e., the first global notification in the embodiment) is transmitted from the inputted dynamic library to notify the third-party application being performing the recording operation that there is a prompt tone to be played.
  • the system tone is played.
  • the application being performing the recording operation may receive the first global notification. After the first global notification is received by the application being performing the recording operation, the recording operation is stopped. Thus, the system tone may be normally played.
  • the APP After a process of playing the system tone finishes, according to a requirement or selection of the user, the APP is notified or is not notified that the process of playing the system tone finishes.
  • the first sound control interface when detecting a system tone playing instruction, the first sound control interface is called, and the first global notification is transmitted through a pre-inputted dynamic library.
  • the recording operation is stopped, and the smart phone plays the system tone.
  • the system prompt tone can be normally played in a recording process. And user requirement is satisfied.
  • a method for control sound is provided according to an embodiment of the present invention, which applies to a smart terminal side.
  • the method may further include procedures as follows.
  • the third-party application that has stopped the recording operation is notified to continue the recording operation through the dynamic library, wherein the dynamic library is associated with the second sound controlling interface by performing the hooking operation.
  • the difference from the embodiment as shown in FIG. 5 is in that the method according to the embodiment of the present invention as shown in FIG. 6 further includes a technical solution of indicating that the third-party application to continue to perform the recording operation after a process of playing the system tone finishes.
  • the system may calls the second sound controlling interface.
  • the dynamic library transmits another global notification (i.e., the second global notification in the embodiment) to notify the APP that has previously stopped the recording operation.
  • the APP After receiving the second notification, the APP re-starts the recording operation to ensure that the recording operation is continued at the background.
  • the first sound control interface when detecting a system tone playing instruction, the first sound control interface is called, and the first global notification is transmitted through a pre-inputted dynamic library.
  • the third-party application When receiving the first global notification, the third-party application being performing the recording operation stops the recording operation.
  • the smart terminal normally plays the system tone.
  • the second control interface when detecting that a process of playing the system tone finishes, the second control interface is called, the second global notification is transmitted through the dynamic library. After the third-party application which has previously stopped the recording operation receives the second global notification, the recording operation is continued.
  • system prompt tone cannot be normally played in a recording process. And user requirement is satisfied.
  • a method for controlling sound is provided according to a embodiment of the present invention, which applies to a smart terminal side.
  • the method may further include procedures as follows.
  • logic codes of a pre-generated dynamic library is inputted into the system running on the smart terminal to hook and the pre-configured first sound control interface and the pre-configured second control interface in the system.
  • the difference from the embodiment as shown in FIG. 6 is in that the method according to the embodiment of the present invention as shown in FIG. 7 further includes a technical solution of inputting the pre-generated dynamic library into the system running on the smart terminal.
  • the iOS system is taken as an example.
  • the logic codes of the pre-generated dynamic library are inputted into the desktop management process Spring Board of the system process.
  • Two hooked sound controlling interfaces compatible with the system tone are configured in the system, i.e., the first sound controlling interface and the second sound controlling interface.
  • the two interfaces (BOOL) _play System Sound: (id) argl and (void) sound Did Finish Playing: (id) argl of the class SB Sound Controller are taken as an example.
  • Another hook interface compatible with the system tone may be adopted, which is not limited.
  • the inputted dynamic library hooks two sound controlling interfaces.
  • the first sound controlling interface is called, and the third-party application being performing the recording operation is notified to stop the recording operation through the inputted dynamic library.
  • the second sound controlling interface is called, and the third-party application is notified to continue the recording operation through the inputted dynamic library.
  • a method for controlling a sound is provided according to an embodiment of the present invention, which applies to a smart terminal side.
  • the method may further include procedures as follows.
  • the dynamic library is generated.
  • the difference from the embodiment as shown in FIG. 7 is in that the method according to the embodiment of the present invention as shown in FIG. 8 further includes a technical solution of generating the dynamic library.
  • the dynamic library is used to hook the two sound controlling interfaces that are configured by the system and are compatible with the system tone after the dynamic library is inputted into the smart terminal system and to notify the third-party application to stop or continue the recording operation when the system calls at least one of the two sound controlling interfaces.
  • the dynamic library is generated.
  • the generated dynamic library is inputted into the smart terminal system.
  • the first sound control interface is called.
  • the first global notification is transmitted through the pre-inputted dynamic library.
  • the third-party application being performing the recording operation stops the recording operation.
  • the smart terminal normally plays the system tone.
  • the second control interface is called, the second global notification is transmitted through the dynamic library.
  • the recording operation is continued.
  • FIG. 9 is a schematic diagram illustrating a structure of a system for controlling sound in a smart phone according to an embodiment of the present invention.
  • the system includes a smart terminal 301 and a three-party application 302 running on the smart terminal 301.
  • the smart phone 301 is to call a first sound controlling interface when detecting a system tone playing instruction, transmit a first global notification via a pre-inputted dynamic library.
  • the three-party application 302 is to stop a recording operation being performed when receiving the first global notification.
  • the smart phone 301 is further to play a system tone.
  • the smart terminal 301 may be a mobile terminal such as a smart phone, a tablet computer.
  • An operating system includes, but not limited to, one of an iOS system, an Android system and a Windows Mobile system.
  • the iOS system is taken as an example in the embodiment.
  • a system recording function of a three-party application 302 running on the smart terminal 301 cannot be compatible with an operation of playing a system prompt tone.
  • a system prompt tone e.g., a short message tone and a push tone of an APP
  • a dynamic library is per-generated.
  • Logic codes related with the dynamic library is inputted into a desktop management process Spring Board of a system process.
  • Two hooked sound controlling interfaces compatible with a system tone are configured in the system, i.e., a first sound controlling interface and a second sound controlling interface.
  • two interfaces (BOOL) _play System Sound: (id) argl and (void) _sound Did Finish Playing: (id) argl of a class SB Sound Controller are taken as an example.
  • Another hooked interface that is compatible with the system tone may be adopted, which is not limited.
  • the two sound controlling hook interfaces are respectively hooked with the pre-inputted dynamic library.
  • a global notification (i.e., the first global notification in the embodiment) is transmitted from the inputted dynamic library to notify the third-party application 302 being performing the recording operation that there is a prompt tone to be played.
  • the application being performing the recording operation may receive the first global notification. After the first global notification is received by the application being performing the recording operation, the recording operation is stopped.
  • the system tone may be normally played.
  • the APP After a process of playing the system tone finishes, according to a requirement or selection of the user, the APP is notified or is not notified that the process of playing the system tone finishes.
  • the first sound control interface when detecting a system tone playing instruction, the first sound control interface is called, and the first global notification is transmitted through a pre-inputted dynamic library.
  • the recording operation is stopped, and the smart phone 301 plays the system tone.
  • the system prompt tone can be normally played in a recording process. And user requirement is satisfied.
  • the smart phone 301 is further to call a second sound controlling interface after detecting that a process of playing the system tone finishes, transmit a second global notification through the dynamic library.
  • the three-party application 302 is further to continue the recording operation after receiving the second global notification.
  • the system may calls the second sound controlling interface.
  • the dynamic library transmits another global notification (i.e., the second global notification in the embodiment) to notify the APP that has previously stopped the recording operation.
  • the APP After receiving the second notification, the APP re-starts the recording operation to ensure that the recording operation is continued at the background.
  • the first sound control interface when detecting a system tone playing instruction, the first sound control interface is called, and the first global notification is transmitted through a pre-inputted dynamic library.
  • the third-party application 302 When receiving the first global notification, the third-party application 302 being performing the recording operation stops the recording operation.
  • the smart terminal 301 normally plays the system tone.
  • the second control interface when detecting that a process of playing the system tone finishes, the second control interface is called, the second global notification is transmitted through the dynamic library. After the third-party application 302 which has previously stopped the recording operation receives the second global notification, the recording operation is continued.
  • system prompt tone cannot be normally played in a recording process. And user requirement is satisfied.
  • the smart phone 301 is further to add logic codes of the dynamic library pre-generated into a system of the smart phone 301 to perform the hooking operation between the first sound controlling interface and the dynamic library and between the second sound controlling interface and the dynamic library.
  • the smart phone 301 is further to generate the dynamic library.
  • the dynamic library is used to hook the two sound controlling interfaces that are configured by the system and are compatible with the system tone after the dynamic library is inputted into the smart terminal system and to notify the third-party application 302 to stop or continue the recording operation when the system calls at least one of the two sound controlling interfaces.
  • the dynamic library is generated.
  • the generated dynamic library is inputted into the smart terminal system.
  • the first sound control interface is called.
  • the first global notification is transmitted through the pre-inputted dynamic library.
  • the third-party application 302 being performing the recording operation stops the recording operation.
  • the smart terminal 301 normally plays the system tone.
  • the second control interface is called, the second global notification is transmitted through the dynamic library.
  • the recording operation is continued.
  • FIG. 10 is a schematic diagram illustrating a structure of a smart phone for controlling sound in a smart phone according to an embodiment of the present invention.
  • the smart terminal includes an interface calling module 401, a notification module 402, and an operation module 403.
  • the interface calling module 401 is to call a first sound controlling interface when a system tone playing instruction is detected.
  • the notification module 402 is to notify a three-party application being performing a recording operation to stop the recording operation via a pre-inputted dynamic library, wherein the dynamic library is associated with the first sound controlling interface through a hooking operation.
  • the operation module 403 is to play a system tone when detecting that the three-party application stops the recording operation.
  • the smart terminal may be a mobile terminal such as a smart phone, a tablet computer.
  • An operating system includes, but not limited to, one of an iOS system, an Android system and a Windows Mobile system.
  • the iOS system is taken as an example in the embodiment.
  • a system recording function of a three-party application running on the smart terminal cannot be compatible with an operation of playing a system prompt tone.
  • a system prompt tone e.g., a short message tone and a push tone of an APP
  • a dynamic library is per-generated.
  • Logic codes related with the dynamic library is inputted into a desktop management process SpringBoard of a system process.
  • Two hooked sound controlling interfaces compatible with a system tone are configured in the system, i.e., a first sound controlling interface and a second sound controlling interface.
  • two interfaces (BOOL) _play System Sound: (id) argl and (void) _sound Did Finish Playing: (id) argl of a class SB Sound Controller are taken as an example.
  • Another hooked interface that is compatible with the system tone may be adopted, which is not limited.
  • the two sound controlling hook interfaces are respectively hooked with the pre-inputted dynamic library.
  • a global notification (i.e., the first global notification in the embodiment) is transmitted from the inputted dynamic library to notify the third-party application being performing the recording operation that there is a prompt tone to be played.
  • the application being performing the recording operation may receive the first global notification. After the first global notification is received by the application being performing the recording operation, the recording operation is stopped.
  • the system tone may be normally played.
  • the APP After a process of playing the system tone finishes, according to a requirement or selection of the user, the APP is notified or is not notified that the process of playing the system tone finishes.
  • the first sound control interface when detecting a system tone playing instruction, the first sound control interface is called, and the first global notification is transmitted through a pre-inputted dynamic library.
  • the recording operation is stopped, and the smart phone plays the system tone.
  • the system prompt tone can be normally played in a recording process. And user requirement is satisfied.
  • the interface calling module 401 is further to call a second sound controlling interface after detecting that a process of playing the system tone finishes.
  • the notification module 402 is further to notify the three-party application stopping the recording operation to continue the recording operation through the dynamic library, wherein the dynamic library is associated with the second sound controlling interface through the hooking operation.
  • the system may calls the second sound controlling interface.
  • the dynamic library transmits another global notification (i.e., the second global notification in the embodiment) to notify the APP that has previously stopped the recording operation.
  • the APP After receiving the second notification, the APP re-starts the recording operation to ensure that the recording operation is continued at the background.
  • the second control interface when detecting that a process of playing the system tone finishes, the second control interface is called, the second global notification is transmitted through the dynamic library. After the third-party application which has previously stopped the recording operation receives the second global notification, the recording operation is continued. Thus, it is solved that system prompt tone cannot be normally played in a recording process. And user requirement is satisfied.
  • FIG. 11 is a schematic diagram illustrating a structure of a smart phone for controlling sound in a smart phone according to an embodiment of the present invention. Based on the embodiment as shown in FIG. 10, the smart terminal further includes an inputting module 400.
  • the inputting module 400 to input logic codes of the dynamic library pre-generated into a system of the smart terminal to perform the hooking operation between the first sound controlling interface and the dynamic library and to perform the hooking operation between the second sound controlling interface and the dynamic library.
  • the iOS system is taken as an example.
  • the logic codes of the pre-generated dynamic library are inputted into the desktop management process SpringBoard of the system process.
  • Two hooked sound controlling interfaces compatible with the system tone are configured in the system, i.e., the first sound controlling interface and the second sound controlling interface.
  • the two interfaces (BOOL) _play System Sound: (id) argl and (void) _sound Did Finish Playing: (id) argl of the class SB Sound Controller are taken as an example.
  • Another hook interface compatible with the system tone may be adopted, which is not limited.
  • the two sound controlling interfaces are hooked through the inputted dynamic library.
  • the first sound controlling interface is called, and the third-party application being performing the recording operation is notified to stop the recording operation through the inputted dynamic library.
  • the second sound controlling interface is called, and the third-party application is notified to continue the recording operation through the inputted dynamic library.
  • FIG. 12 is a schematic diagram illustrating a structure of a smart phone for controlling sound in a smart phone according to an embodiment of the present invention. Based on the embodiment as shown in FIG. 11, the smart terminal further includes a generation module 390.
  • the generation module 390 is to generate the dynamic library.
  • the difference from the embodiment as shown in FIG. 11 is in that the method according to the embodiment of the present invention as shown in FIG. 12 further includes a technical solution of generating the dynamic library.
  • the dynamic library is used to hook the two sound controlling interfaces that are configured by the system and are compatible with the system tone after the dynamic library is inputted into the smart terminal system and to notify the third-party application to stop or continue the recording operation when the system calls at least one of the two sound controlling interfaces.
  • the dynamic library is generated.
  • the generated dynamic library is inputted into the smart terminal system.
  • the first sound control interface is called.
  • the first global notification is transmitted through the pre-inputted dynamic library.
  • the third-party application being performing the recording operation stops the recording operation.
  • the smart terminal normally plays the system tone.
  • the second control interface is called, the second global notification is transmitted through the dynamic library.
  • the recording operation is continued.
  • the term “includes” means includes but not limited to, the term “including” means including but not limited to.
  • the term “based on” means based at least in part on so that a process, method or device may not only include those elements, but may also include another element that has not be directly listed, or may include elements that is inherently included in the process, method or device. In a condition that there is not more limitation, it is not excluded that in the process, method or device, an element limited by “including a. . . ” may include another same element.
  • the memory includes a ROM/RAM, a disk, a Compact Disc (CD) and so on.
  • FIG. 13 is a schematic diagram illustrating a structure of an apparatus for controlling sound according to an embodiment of the present invention.
  • the apparatus includes a processor 51 for executing instructions stored in a memory 52.
  • the instructions include an interface calling instruction 501, a notification instruction 502, an operation instruction 503.
  • the interface calling instruction 501 is to call a first sound controlling interface when a system tone playing instruction is detected.
  • the notification instruction 502 is to notify a three-party application being performing a recording operation to stop the recording operation via a pre-inputted dynamic library, wherein the dynamic library is associated with the first sound controlling interface through a hooking operation.
  • the operation instruction 503 is to play a system tone when detecting that the three-party application stops the recording operation.
  • the interface calling instruction 501 is further to call a second sound controlling interface after detecting that a process of playing the system tone finishes.
  • the notification instruction 502 is further to notify the three-party application stopping the recording operation to continue the recording operation through the dynamic library, wherein the dynamic library is associated with the second sound controlling interface through the hooking operation.
  • the apparatus further includes an inputting instruction 504.
  • the inputting instruction 504 is to input logic codes of the dynamic library pre-generated into a system of the smart terminal to perform the hooking operation between the first sound controlling interface and the dynamic library and to perform the hooking operation between the second sound controlling interface and the dynamic library.
  • the apparatus further includes a generation module instruction 505.
  • the generation instruction 505 is to generate the dynamic library.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Telephone Function (AREA)
  • Display Devices Of Pinball Game Machines (AREA)
  • Electrophonic Musical Instruments (AREA)
  • Stored Programmes (AREA)

Abstract

The present invention discloses a method and smart phone for controlling sound. In the method, a smart terminal calls a first sound controlling interface when detecting a system tone playing instruction. The smart terminal transmits a first global notification to a three-party application being performing a recording operation via a pre-inputted dynamic library so that the three-party application stops the recording operation when receiving the first global notification, wherein the dynamic library is associated with the first sound controlling interface through a hooking operation. The smart terminal plays a system tone. Thus, the system tone can be normally played in a recording process.

Description

METHOD AND SMART TERMINAL FOR CONTROLLING SOUND
The application claims priority to a Chinese patent application 201310594307.4, titled “method, system and smart terminal for controlling sound in smart terminal” , which was filed on November 21, 2013. The disclosures of the application No. 201310594307.4 are incorporated here by reference in its entirety.
Field of the Invention
The present invention relates to a mobile terminal controlling field, and more particularly, to a method and smart terminal for controlling sound.
Background of the Invention
In a current operation system, e.g., an iPhone Operation System (iOS) , a recording application (APP) (e.g., an APP of performing a recording function in an iOS device) cannot perform a compatible operation for playing a prompt tone. Thus, when a user uses a recording function, a system cannot play the prompt tone (e.g., a short message tone and a push tone of an APP) . Thus, user experience will be bad.
Summary of the Invention
A method, system and smart terminal for controlling sound is provided according to the present invention so that a system prompt tone can be played in a recording process.
A method for controlling sound includes:
calling, by a smart terminal, a first sound controlling interface when detecting a system tone playing instruction;
transmitting, by the smart terminal, a first global notification to a three-party application being performing a recording operation via a pre-inputted dynamic library so that the three-party application stops the recording operation when receiving the first global notification, wherein the dynamic library is associated with the first sound controlling interface through a hooking operation;
playing, by the smart terminal, a system tone.
Another method for controlling sound includes:
calling a first sound controlling interface when a system tone playing instruction is detected;
notifying a three-party application being performing a recording operation to stop the recording operation via a pre-inputted dynamic library, wherein the dynamic library is associated with the first sound controlling interface through a hooking operation;
playing a system tone when detecting that the three-party application stops the recording operation.
A smart terminal for controlling sound includes:
an interface calling module, to call a first sound controlling interface when a system tone playing instruction is detected;
a notification module, to notify a three-party application being performing a recording operation to stop the recording operation via a pre-inputted dynamic library, wherein the dynamic library is associated with the first sound controlling interface through a hooking operation;
an operation module, to play a system tone when detecting that the three-party application stops the recording operation.
According the technical solution above, when detecting a system tone playing instruction, the first sound control interface is called, and the first global notification is transmitted through a pre-inputted dynamic library. When receiving the first global notification, the third-party application being performing the recording operation stops the recording operation. The smart terminal normally plays the system tone. Thus, it is implemented that the system prompt tone can be normally played in a recording process. Furthermore, when detecting that a process of playing the system tone finishes, the second control interface is called, the second global notification is transmitted through the dynamic library. After the third-party application which has previously stopped the recording operation receives the second global notification, the recording operation is continued. Thus, it is solved that system prompt tone cannot be normally played in a recording process. And user requirement is satisfied.
Brief Description of Drawings
FIG. 1 is a flowchart illustrating a method for controlling sound in a smart phone according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a method for controlling sound in a smart phone according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating a method for controlling sound in a smart phone according to an embodiment of the present invention;
FIG. 4 is a flowchart illustrating a method for controlling sound in a smart phone according to an embodiment of the present invention;
FIG. 5 is a flowchart illustrating a method for controlling sound in a smart phone according to an embodiment of the present invention;
FIG. 6 is a flowchart illustrating a method for controlling sound in a smart phone according to an embodiment of the present invention;
FIG. 7 is a flowchart illustrating a method for controlling sound in a smart phone according to an embodiment of the present invention;
FIG. 8 is a flowchart illustrating a method for controlling sound in a smart phone according to an embodiment of the present invention;
FIG. 9 is a schematic diagram illustrating a structure of a system for controlling sound in a smart phone according to an embodiment of the present invention;
FIG. 10 is a schematic diagram illustrating a structure of a smart phone for controlling sound in a smart phone according to an embodiment of the present invention;
FIG. 11 is a schematic diagram illustrating a structure of a smart phone for controlling sound in a smart phone according to an embodiment of the present invention;
FIG. 12 is a schematic diagram illustrating a structure of a smart phone for controlling sound in a smart phone according to an embodiment of the present invention;
FIG. 13 is a schematic diagram illustrating a structure of an apparatus for controlling sound according to an embodiment of the present invention.
In order to make the technical solution of the present invention clearer, the present invention will be illustrated in detail hereinafter with reference to the accompanying drawings.
Detailed Description of the Invention
In order to make the object, technical solution and merits of the present invention clearer, the present invention will be illustrated in detail hereinafter with reference to the accompanying drawings and specific embodiments. It should be noted that, the embodiments described herein is to understand the present invention. The present invention cannot be limited to the embodiments.
In an example, an APP may be third-party application program. When a hooking operation is performed for a designated system event and a hooked event occurs, program hooking the event may receive a system notification so that the program responds the hooked event in time.
FIG. 1 is a flowchart illustrating a method for controlling sound in a smart phone according to an embodiment of the present invention. The method includes procedures as follows.
At block S101, when detecting a system tone playing instruction, a smart terminal calls a first sound controlling interface, and transmits a first global notification through a pre-inputted dynamic library.
In an example, the smart terminal may be a mobile terminal such as a smart phone, a tablet computer. An operating system includes, but not limited to, an iOS system, an Android system, a Windows Mobile (WM) system etc. The iOS system is taken as an example in the embodiment.
In the current smart terminal system, a system recording function of a three-party application running on the smart terminal cannot be compatible with an operation of playing a system prompt tone. Thus, when a user uses the recording function, a system cannot play the system prompt tone (e.g., a short message tone and a push tone of an APP) , and user experience becomes bad.
In order to implement playing a system prompt tone in a recording process in a smart terminal, a dynamic library is per-generated. Logic codes related with the dynamic library is inputted into a desktop management process SpringBoard of a system process.
Two hooked sound controlling interfaces compatible with a system tone are configured in the system, i.e., a first sound controlling interface and a second sound controlling interface. In the embodiment, two interfaces (BOOL) _play System Sound: (id) argl and (void) _sound Did Finish Playing: (id) argl of a class SB Sound Controller are taken as an example. Another hooked interface that is compatible with the system tone may be adopted, which is not limited.
The two sound controlling hook interfaces are respectively hooked with the pre-inputted dynamic library.
When detecting that the system is going to play the system tone, the smart terminal calls the first sound controlling interface. A global notification (i.e., the first global notification in the embodiment) is transmitted from the inputted dynamic library to notify the third-party application being performing the recording operation that there is a prompt tone to be played.
At block S102, after the first global notification is received by the third-party application being performing the recording operation, the recording operation is stopped.
At block S103, the smart terminal plays the system tone.
The application being performing the recording operation may receive the first global notification. After the first global notification is received by the application being performing the recording operation, the recording operation is stopped. The system tone may be normally played.
After a process of playing the system tone finishes, according to a requirement or selection of the user, the APP is notified or is not notified that the process of playing the system tone finishes.
In the technical solution according to the embodiment of the present invention, when detecting a system tone playing instruction, the first sound control interface is called, and the first global notification is transmitted through a pre-inputted dynamic  library. When the first global notification is received by the third-party application being performing the recording operation, the recording operation is stopped, and the smart phone plays the system tone. Thus, it is implemented that the system prompt tone can be normally played in a recording process. And user requirement is satisfied.
As shown in FIG. 2, a method for control sound is provided according to an embodiment of the present invention, which applies to a system side. On basis of the embodiment as shown in FIG. 1, after performing a procedure at block S103, the method may further include procedures as follows.
At block S 104, when detecting that a process of playing the system tone finishes, the second control interface is called, the second global notification is transmitted through the dynamic library.
At block S 105, after the third-party application stopping the recording operation receives the second global notification, the recording operation is continued.
The difference from the embodiment as shown in FIG. 1 is in that the method as shown in FIG. 2 further includes a technical solution of indicating that the third-party application continues to perform the recording operation.
In particular, after the process of playing the system tone finishes, the system may calls the second sound controlling interface. The dynamic library transmits another global notification (i.e., the second global notification in the embodiment) to notify the APP that has previously stopped the recording operation. After receiving the second notification, the APP re-starts the recording operation to ensure that the recording operation is continued at the background.
According the technical solution above, when detecting a system tone playing instruction, the first sound control interface is called, and the first global notification is transmitted through a pre-inputted dynamic library. When receiving the first global notification, the third-party application being performing the recording operation stops the recording operation. The smart terminal normally plays the system tone. Thus, it is implemented that the system prompt tone can be normally played in a recording process. Furthermore, when detecting that a process of playing the system tone finishes, the second control interface is called, the second global notification is transmitted through the dynamic library. After the third-party application which has previously stopped the recording operation receives the second global notification, the  recording operation is continued. Thus, it is solved that system prompt tone cannot be normally played in a recording process. And user requirement is satisfied.
As shown in FIG. 3, a method for control a sound is provided according to an embodiment of the present invention, which applies to a system side. On basis of the embodiment as shown in FIG. 2, before performing a procedure at block S 101, the method may further include procedures as follows.
At block 100, logic codes of the pre-generated dynamic library are inputted into a system running on the smart terminal to hook the first sound control interface and the second control interface pre-configured in the system.
The difference from the embodiment as shown in FIG. 2 is in that the method according to the embodiment of the present invention as shown in FIG. 3 further includes a technical solution of adding the pre-generated dynamic library into the system running on the smart terminal.
In an example, the iOS system is taken as an example. The logic codes of the pre-generated dynamic library are inputted into the desktop management process SpringBoard of the system process.
Two hooked sound controlling interfaces compatible with the system tone are configured in the system, i.e., the first sound controlling interface and the second sound controlling interface. In the embodiment, the two interfaces (BOOL) _play System Sound: (id) argl and (void) _sound Did Finish Playing: (id) argl of the class SBSound Controller are taken as an example. Another hook interface compatible with the system tone may be adopted, which is not limited.
The two sound controlling interfaces are hooked through the inputted dynamic library. Thus, when the system tone is to be played in the system, the first sound controlling interface is called, and the third-party application being performing the recording operation is notified to stop the recording operation through the inputted dynamic library. After the process of playing the system tone finishes, the second sound controlling interface is called, and the third-party application is notified to continue the recording operation through the inputted dynamic library. Thus, the problem that the system tone cannot be played in the recording process, and user requirements are satisfied.
As shown in FIG. 4, a method for controlling sound is provided according to an embodiment of the present invention, which applies to a system side. On basis of the embodiment as shown in FIG. 3, before performing the procedure at block S 100, the method may further include procedures as follows.
At block S90, the dynamic library is generated.
The difference from the embodiment as shown in FIG. 3 is in that the method according to the embodiment of the present invention as shown in FIG. 4 further includes a technical solution of generating the dynamic library. The dynamic library is used to hook the two sound controlling interfaces that are configured by the system and are compatible with the system tone after the dynamic library is inputted into the smart terminal system and to notify the third-party application to stop or continue the recording operation when the system calls at least one of the two sound controlling interfaces.
According the technical solution above, the dynamic library is generated. The generated dynamic library is inputted into the smart terminal system. When detecting the system tone playing instruction, the first sound control interface is called. The first global notification is transmitted through the pre-inputted dynamic library. When receiving the first global notification, the third-party application being performing the recording operation stops the recording operation. The smart terminal normally plays the system tone. Thus, it is implemented that the system prompt tone can be normally played in a recording process. Furthermore, when detecting that the process of playing the system tone finishes, the second control interface is called, the second global notification is transmitted through the dynamic library. After the third-party application which has previously stopped the recording operation receives the second global notification, the recording operation is continued. Thus, it is solved that system prompt tone cannot be normally played in a recording process. And user requirement is satisfied.
As shown in FIG. 5, a method for controlling sound is provided according to an embodiment of the present invention, which applies to a smart terminal side. The method may further include procedures as follows.
At block S201, when detecting a system tone playing instruction, a first sound controlling interface is called.
At block S202, a third-party application being performing a recording operation is notified to stop the recording operation through a pre-inputted dynamic library, wherein the dynamic library is associated with the first sound controlling interface by performing a hooking operation.
In an example, the smart terminal may be a mobile terminal such as a smart phone, a tablet computer. An operating system includes, but not limited to, one of an iOS system, an Android system and a Windows Mobile system. The iOS system is taken as an example in the embodiment.
In the current smart terminal system, a system recording function of a three-party application running on the smart terminal cannot be compatible with an operation of playing a system prompt tone. Thus, when a user uses the recording function, a system cannot play the system prompt tone (e.g., a short message tone and a push tone of an APP) , and user experience becomes bad.
In order to implement playing a system prompt tone in a recording process in a smart terminal, a dynamic library is per-generated. Logic codes related with the dynamic library is inputted into a desktop management process SpringBoard of a system process.
Two hooked sound controlling interfaces compatible with a system tone are configured in the system, i.e., a first sound controlling interface and a second sound controlling interface. In the embodiment, two interfaces (BOOL) _play System Sound: (id) argl and (void) _sound Did Finish Playing: (id) argl of a class SB Sound Controller are taken as an example. Another hooked interface that is compatible with the system tone may be adopted, which is not limited.
The two sound controlling hook interfaces are respectively hooked with the pre-inputted dynamic library.
When detecting that the system is to play the system tone, the smart terminal calls the first sound controlling interface. A global notification (i.e., the first global notification in the embodiment) is transmitted from the inputted dynamic library to notify the third-party application being performing the recording operation that there is a prompt tone to be played.
At block S203, after detecting that the third-application stops the recording operation, the system tone is played.
The application being performing the recording operation may receive the first global notification. After the first global notification is received by the application being performing the recording operation, the recording operation is stopped. Thus, the system tone may be normally played.
After a process of playing the system tone finishes, according to a requirement or selection of the user, the APP is notified or is not notified that the process of playing the system tone finishes.
In the technical solution according to the embodiment of the present invention, when detecting a system tone playing instruction, the first sound control interface is called, and the first global notification is transmitted through a pre-inputted dynamic library. When the first global notification is received by the third-party application being performing the recording operation, the recording operation is stopped, and the smart phone plays the system tone. Thus, it is implemented that the system prompt tone can be normally played in a recording process. And user requirement is satisfied.
As shown in FIG. 6, a method for control sound is provided according to an embodiment of the present invention, which applies to a smart terminal side. On basis of the embodiment as shown in FIG. 5, after performing a procedure at block S203, the method may further include procedures as follows.
At block S204, when detecting that a process of playing the system tone finishes, the second controlling interface is called.
At block S205, the third-party application that has stopped the recording operation is notified to continue the recording operation through the dynamic library, wherein the dynamic library is associated with the second sound controlling interface by performing the hooking operation.
The difference from the embodiment as shown in FIG. 5 is in that the method according to the embodiment of the present invention as shown in FIG. 6 further includes a technical solution of indicating that the third-party application to continue to perform the recording operation after a process of playing the system tone finishes.
In particular, after the process of playing the system tone finishes, the system may calls the second sound controlling interface. The dynamic library transmits another global notification (i.e., the second global notification in the embodiment) to notify the APP that has previously stopped the recording operation. After receiving  the second notification, the APP re-starts the recording operation to ensure that the recording operation is continued at the background.
According the technical solution above, when detecting a system tone playing instruction, the first sound control interface is called, and the first global notification is transmitted through a pre-inputted dynamic library. When receiving the first global notification, the third-party application being performing the recording operation stops the recording operation. The smart terminal normally plays the system tone. Thus, it is implemented that the system prompt tone can be normally played in a recording process. Furthermore, when detecting that a process of playing the system tone finishes, the second control interface is called, the second global notification is transmitted through the dynamic library. After the third-party application which has previously stopped the recording operation receives the second global notification, the recording operation is continued. Thus, it is solved that system prompt tone cannot be normally played in a recording process. And user requirement is satisfied.
As shown in FIG. 7, a method for controlling sound is provided according to a embodiment of the present invention, which applies to a smart terminal side. On basis of an embodiment as shown in FIG. 6, before performing a procedure at block S201, the method may further include procedures as follows.
At block 200, logic codes of a pre-generated dynamic library is inputted into the system running on the smart terminal to hook and the pre-configured first sound control interface and the pre-configured second control interface in the system.
The difference from the embodiment as shown in FIG. 6 is in that the method according to the embodiment of the present invention as shown in FIG. 7 further includes a technical solution of inputting the pre-generated dynamic library into the system running on the smart terminal.
In an example, the iOS system is taken as an example. The logic codes of the pre-generated dynamic library are inputted into the desktop management process Spring Board of the system process.
Two hooked sound controlling interfaces compatible with the system tone are configured in the system, i.e., the first sound controlling interface and the second sound controlling interface. In the embodiment, the two interfaces (BOOL) _play System Sound: (id) argl and (void) sound Did Finish Playing: (id) argl of  the class SB Sound Controller are taken as an example. Another hook interface compatible with the system tone may be adopted, which is not limited.
The inputted dynamic library hooks two sound controlling interfaces. Thus, when the system tone is to be played in the system, the first sound controlling interface is called, and the third-party application being performing the recording operation is notified to stop the recording operation through the inputted dynamic library. After the process of playing the system tone finishes, the second sound controlling interface is called, and the third-party application is notified to continue the recording operation through the inputted dynamic library. Thus, the problem that the system tone cannot be played in the recording process, and user requirements are satisfied.
As shown in FIG. 8, a method for controlling a sound is provided according to an embodiment of the present invention, which applies to a smart terminal side. On basis of the embodiment as shown in FIG. 7, before performing the procedure at block 200, the method may further include procedures as follows.
At block S 190, the dynamic library is generated.
The difference from the embodiment as shown in FIG. 7 is in that the method according to the embodiment of the present invention as shown in FIG. 8 further includes a technical solution of generating the dynamic library. The dynamic library is used to hook the two sound controlling interfaces that are configured by the system and are compatible with the system tone after the dynamic library is inputted into the smart terminal system and to notify the third-party application to stop or continue the recording operation when the system calls at least one of the two sound controlling interfaces.
According the technical solution above, the dynamic library is generated. The generated dynamic library is inputted into the smart terminal system. When detecting the system tone playing instruction, the first sound control interface is called. The first global notification is transmitted through the pre-inputted dynamic library. When receiving the first global notification, the third-party application being performing the recording operation stops the recording operation. The smart terminal normally plays the system tone. Thus, it is implemented that the system prompt tone can be normally played in a recording process. Furthermore, when detecting that the process of playing  the system tone finishes, the second control interface is called, the second global notification is transmitted through the dynamic library. After the third-party application which has previously stopped the recording operation receives the second global notification, the recording operation is continued. Thus, it is solved that system prompt tone cannot be normally played in a recording process. And user requirement is satisfied.
FIG. 9 is a schematic diagram illustrating a structure of a system for controlling sound in a smart phone according to an embodiment of the present invention. The system includes a smart terminal 301 and a three-party application 302 running on the smart terminal 301.
The smart phone 301 is to call a first sound controlling interface when detecting a system tone playing instruction, transmit a first global notification via a pre-inputted dynamic library.
The three-party application 302 is to stop a recording operation being performed when receiving the first global notification.
The smart phone 301 is further to play a system tone.
In an example, the smart terminal 301 may be a mobile terminal such as a smart phone, a tablet computer. An operating system includes, but not limited to, one of an iOS system, an Android system and a Windows Mobile system. The iOS system is taken as an example in the embodiment.
In the current system of the smart terminal 301, a system recording function of a three-party application 302 running on the smart terminal 301 cannot be compatible with an operation of playing a system prompt tone. Thus, when a user uses the recording function, a system cannot play the system prompt tone (e.g., a short message tone and a push tone of an APP) , and user experience becomes bad.
In order to implement playing a system prompt tone in a recording process in the smart terminal 301, a dynamic library is per-generated. Logic codes related with the dynamic library is inputted into a desktop management process Spring Board of a system process.
Two hooked sound controlling interfaces compatible with a system tone are configured in the system, i.e., a first sound controlling interface and a second sound  controlling interface. In the embodiment, two interfaces (BOOL) _play System Sound: (id) argl and (void) _sound Did Finish Playing: (id) argl of a class SB Sound Controller are taken as an example. Another hooked interface that is compatible with the system tone may be adopted, which is not limited.
The two sound controlling hook interfaces are respectively hooked with the pre-inputted dynamic library.
When detecting that the system is to play the system tone, the smart terminal 301 calls the first sound controlling interface. A global notification (i.e., the first global notification in the embodiment) is transmitted from the inputted dynamic library to notify the third-party application 302 being performing the recording operation that there is a prompt tone to be played.
The application being performing the recording operation may receive the first global notification. After the first global notification is received by the application being performing the recording operation, the recording operation is stopped. The system tone may be normally played.
After a process of playing the system tone finishes, according to a requirement or selection of the user, the APP is notified or is not notified that the process of playing the system tone finishes.
In the technical solution according to the embodiment of the present invention, when detecting a system tone playing instruction, the first sound control interface is called, and the first global notification is transmitted through a pre-inputted dynamic library. When the first global notification is received by the third-party application 302 being performing the recording operation, the recording operation is stopped, and the smart phone 301 plays the system tone. Thus, it is implemented that the system prompt tone can be normally played in a recording process. And user requirement is satisfied.
Furthermore, the smart phone 301 is further to call a second sound controlling interface after detecting that a process of playing the system tone finishes, transmit a second global notification through the dynamic library.
The three-party application 302 is further to continue the recording operation after receiving the second global notification.
In particular, after the process of playing the system tone finishes, the system may calls the second sound controlling interface. The dynamic library transmits another global notification (i.e., the second global notification in the embodiment) to notify the APP that has previously stopped the recording operation. After receiving the second notification, the APP re-starts the recording operation to ensure that the recording operation is continued at the background.
According the technical solution above, when detecting a system tone playing instruction, the first sound control interface is called, and the first global notification is transmitted through a pre-inputted dynamic library. When receiving the first global notification, the third-party application 302 being performing the recording operation stops the recording operation. The smart terminal 301 normally plays the system tone. Thus, it is implemented that the system prompt tone can be normally played in a recording process. Furthermore, when detecting that a process of playing the system tone finishes, the second control interface is called, the second global notification is transmitted through the dynamic library. After the third-party application 302 which has previously stopped the recording operation receives the second global notification, the recording operation is continued. Thus, it is solved that system prompt tone cannot be normally played in a recording process. And user requirement is satisfied.
Furthermore, the smart phone 301 is further to add logic codes of the dynamic library pre-generated into a system of the smart phone 301 to perform the hooking operation between the first sound controlling interface and the dynamic library and between the second sound controlling interface and the dynamic library.
Furthermore, the smart phone 301 is further to generate the dynamic library. The dynamic library is used to hook the two sound controlling interfaces that are configured by the system and are compatible with the system tone after the dynamic library is inputted into the smart terminal system and to notify the third-party application 302 to stop or continue the recording operation when the system calls at least one of the two sound controlling interfaces.
According the technical solution above, the dynamic library is generated. The generated dynamic library is inputted into the smart terminal system. When detecting the system tone playing instruction, the first sound control interface is called. The first global notification is transmitted through the pre-inputted dynamic library. When  receiving the first global notification, the third-party application 302 being performing the recording operation stops the recording operation. The smart terminal 301 normally plays the system tone. Thus, it is implemented that the system prompt tone can be normally played in a recording process. Furthermore, when detecting that the process of playing the system tone finishes, the second control interface is called, the second global notification is transmitted through the dynamic library. After the third-party application 302 which has previously stopped the recording operation receives the second global notification, the recording operation is continued. Thus, it is solved that system prompt tone cannot be normally played in a recording process. And user requirement is satisfied.
FIG. 10 is a schematic diagram illustrating a structure of a smart phone for controlling sound in a smart phone according to an embodiment of the present invention. The smart terminal includes an interface calling module 401, a notification module 402, and an operation module 403.
The interface calling module 401 is to call a first sound controlling interface when a system tone playing instruction is detected.
The notification module 402 is to notify a three-party application being performing a recording operation to stop the recording operation via a pre-inputted dynamic library, wherein the dynamic library is associated with the first sound controlling interface through a hooking operation.
The operation module 403 is to play a system tone when detecting that the three-party application stops the recording operation.
In an example, the smart terminal may be a mobile terminal such as a smart phone, a tablet computer. An operating system includes, but not limited to, one of an iOS system, an Android system and a Windows Mobile system. The iOS system is taken as an example in the embodiment.
In the current system of the smart terminal, a system recording function of a three-party application running on the smart terminal cannot be compatible with an operation of playing a system prompt tone. Thus, when a user uses the recording function, a system cannot play the system prompt tone (e.g., a short message tone and a push tone of an APP) , and user experience becomes bad.
In order to implement playing a system prompt tone in a recording process in the smart terminal, a dynamic library is per-generated. Logic codes related with the dynamic library is inputted into a desktop management process SpringBoard of a system process.
Two hooked sound controlling interfaces compatible with a system tone are configured in the system, i.e., a first sound controlling interface and a second sound controlling interface. In the embodiment, two interfaces (BOOL) _play System Sound: (id) argl and (void) _sound Did Finish Playing: (id) argl of a class SB Sound Controller are taken as an example. Another hooked interface that is compatible with the system tone may be adopted, which is not limited.
The two sound controlling hook interfaces are respectively hooked with the pre-inputted dynamic library.
When detecting that the system is to play the system tone, the smart terminal calls the first sound controlling interface. A global notification (i.e., the first global notification in the embodiment) is transmitted from the inputted dynamic library to notify the third-party application being performing the recording operation that there is a prompt tone to be played.
The application being performing the recording operation may receive the first global notification. After the first global notification is received by the application being performing the recording operation, the recording operation is stopped. The system tone may be normally played.
After a process of playing the system tone finishes, according to a requirement or selection of the user, the APP is notified or is not notified that the process of playing the system tone finishes.
In the technical solution according to the embodiment of the present invention, when detecting a system tone playing instruction, the first sound control interface is called, and the first global notification is transmitted through a pre-inputted dynamic library. When the first global notification is received by the third-party application being performing the recording operation, the recording operation is stopped, and the smart phone plays the system tone. Thus, it is implemented that the system prompt tone can be normally played in a recording process. And user requirement is satisfied. 
Furthermore, the interface calling module 401 is further to call a second sound controlling interface after detecting that a process of playing the system tone finishes.
The notification module 402 is further to notify the three-party application stopping the recording operation to continue the recording operation through the dynamic library, wherein the dynamic library is associated with the second sound controlling interface through the hooking operation.
In particular, after the process of playing the system tone finishes, the system may calls the second sound controlling interface. The dynamic library transmits another global notification (i.e., the second global notification in the embodiment) to notify the APP that has previously stopped the recording operation. After receiving the second notification, the APP re-starts the recording operation to ensure that the recording operation is continued at the background.
According the technical solution above, when detecting that a process of playing the system tone finishes, the second control interface is called, the second global notification is transmitted through the dynamic library. After the third-party application which has previously stopped the recording operation receives the second global notification, the recording operation is continued. Thus, it is solved that system prompt tone cannot be normally played in a recording process. And user requirement is satisfied.
FIG. 11 is a schematic diagram illustrating a structure of a smart phone for controlling sound in a smart phone according to an embodiment of the present invention. Based on the embodiment as shown in FIG. 10, the smart terminal further includes an inputting module 400.
The inputting module 400 to input logic codes of the dynamic library pre-generated into a system of the smart terminal to perform the hooking operation between the first sound controlling interface and the dynamic library and to perform the hooking operation between the second sound controlling interface and the dynamic library.
In an example, the iOS system is taken as an example. The logic codes of the pre-generated dynamic library are inputted into the desktop management process SpringBoard of the system process.
Two hooked sound controlling interfaces compatible with the system tone are configured in the system, i.e., the first sound controlling interface and the second sound controlling interface. In the embodiment, the two interfaces (BOOL) _play System Sound: (id) argl and (void) _sound Did Finish Playing: (id) argl of the class SB Sound Controller are taken as an example. Another hook interface compatible with the system tone may be adopted, which is not limited.
The two sound controlling interfaces are hooked through the inputted dynamic library. Thus, when the system tone is to be played in the system, the first sound controlling interface is called, and the third-party application being performing the recording operation is notified to stop the recording operation through the inputted dynamic library. After the process of playing the system tone finishes, the second sound controlling interface is called, and the third-party application is notified to continue the recording operation through the inputted dynamic library. Thus, the problem that the system tone cannot be played in the recording process, and user requirements are satisfied.
FIG. 12 is a schematic diagram illustrating a structure of a smart phone for controlling sound in a smart phone according to an embodiment of the present invention. Based on the embodiment as shown in FIG. 11, the smart terminal further includes a generation module 390.
The generation module 390 is to generate the dynamic library.
The difference from the embodiment as shown in FIG. 11 is in that the method according to the embodiment of the present invention as shown in FIG. 12 further includes a technical solution of generating the dynamic library. The dynamic library is used to hook the two sound controlling interfaces that are configured by the system and are compatible with the system tone after the dynamic library is inputted into the smart terminal system and to notify the third-party application to stop or continue the recording operation when the system calls at least one of the two sound controlling interfaces.
According the technical solution above, the dynamic library is generated. The generated dynamic library is inputted into the smart terminal system. When detecting the system tone playing instruction, the first sound control interface is called. The first global notification is transmitted through the pre-inputted dynamic library. When  receiving the first global notification, the third-party application being performing the recording operation stops the recording operation. The smart terminal normally plays the system tone. Thus, it is implemented that the system prompt tone can be normally played in a recording process. Furthermore, when detecting that the process of playing the system tone finishes, the second control interface is called, the second global notification is transmitted through the dynamic library. After the third-party application which has previously stopped the recording operation receives the second global notification, the recording operation is continued. Thus, it is solved that system prompt tone cannot be normally played in a recording process. And user requirement is satisfied.
It should be noted that, the term “includes” means includes but not limited to, the term “including” means including but not limited to. The term “based on” means based at least in part on so that a process, method or device may not only include those elements, but may also include another element that has not be directly listed, or may include elements that is inherently included in the process, method or device. In a condition that there is not more limitation, it is not excluded that in the process, method or device, an element limited by “including a. . . ” may include another same element.
Those skilled in the art can understand that all or part of steps in the method provided by the examples of the present invention can be implemented by instructing related hardware by a program, the program may be stored in a readable memory of a computer, and above method steps are included when the program is operated. The memory includes a ROM/RAM, a disk, a Compact Disc (CD) and so on.
FIG. 13 is a schematic diagram illustrating a structure of an apparatus for controlling sound according to an embodiment of the present invention. As shown in FIG. 13, the apparatus includes a processor 51 for executing instructions stored in a memory 52. The instructions include an interface calling instruction 501, a notification instruction 502, an operation instruction 503.
The interface calling instruction 501 is to call a first sound controlling interface when a system tone playing instruction is detected.
The notification instruction 502 is to notify a three-party application being performing a recording operation to stop the recording operation via a pre-inputted  dynamic library, wherein the dynamic library is associated with the first sound controlling interface through a hooking operation.
The operation instruction 503 is to play a system tone when detecting that the three-party application stops the recording operation.
In an example, the interface calling instruction 501 is further to call a second sound controlling interface after detecting that a process of playing the system tone finishes.
The notification instruction 502 is further to notify the three-party application stopping the recording operation to continue the recording operation through the dynamic library, wherein the dynamic library is associated with the second sound controlling interface through the hooking operation.
In an example, the apparatus further includes an inputting instruction 504. The inputting instruction 504 is to input logic codes of the dynamic library pre-generated into a system of the smart terminal to perform the hooking operation between the first sound controlling interface and the dynamic library and to perform the hooking operation between the second sound controlling interface and the dynamic library.
In an example, the apparatus further includes a generation module instruction 505. The generation instruction 505 is to generate the dynamic library.
The foregoing is only preferred examples of the present invention and is not used to limit the protection scope of the present invention. Any modification, equivalent substitution and improvement without departing from the spirit and principle of the present invention are within the protection scope of the present invention.

Claims (16)

  1. A method for controlling sound, comprising:
    calling, by a smart terminal, a first sound controlling interface when detecting a system tone playing instruction;
    transmitting, by the smart terminal, a first global notification to a three-party application being performing a recording operation via a pre-inputted dynamic library so that the three-party application stops the recording operation when receiving the first global notification, wherein the dynamic library is associated with the first sound controlling interface through a hooking operation;
    playing, by the smart terminal, a system tone.
  2. The method of claim 1, further comprising:
    calling a second sound controlling interface after detecting that a process of playing the system tone finishes;
    transmitting a second global notification through the dynamic library so that the three-party application stopping the recording operation continues the recording operation after receiving the second global notification, wherein the dynamic library is associated with the second sound controlling interface through the hooking operation.
  3. The method of claim 2, further comprising:
    before the smart terminal calls the first sound controlling interface when detecting the system tone playing instruction, inputting logic codes of the dynamic library pre-generated into a system of the smart phone to perform the hooking operation between the first sound controlling interface and the dynamic library and to perform the hooking operation between the second sound controlling interface and the dynamic library.
  4. The method of any of claims 1-3, further comprising:
    before the smart terminal calls the first sound controlling interface when detecting the system tone playing instruction, generating the dynamic library for performing the hooking operation between the first sound controlling interface and the  dynamic library and performing the hooking operation between the second sound controlling interface and the dynamic library.
  5. A method for controlling sound, comprising:
    calling a first sound controlling interface when a system tone playing instruction is detected;
    notifying a three-party application being performing a recording operation to stop the recording operation via a pre-inputted dynamic library, wherein the dynamic library is associated with the first sound controlling interface through a hooking operation;
    playing a system tone when detecting that the three-party application stops the recording operation.
  6. The method of claim 5, further comprising:
    calling a second sound controlling interface after detecting that a process of playing the system tone finishes;
    notifying the three-party application stopping the recording operation to continue the recording operation through the dynamic library, wherein the dynamic library is associated with the second sound controlling interface through the hooking operation.
  7. The method of claim 6, further comprising:
    before calling the first sound controlling interface when detecting the system tone playing instruction, performing the hooking operation between the first sound controlling interface and the dynamic library;
    performing the hooking operation between the second sound controlling interface and the dynamic library.
  8. The method of any of claims 5-7, further comprising:
    before calling the first sound controlling interface when detecting the system tone playing instruction, generating the dynamic library for performing the hooking operation between the first sound controlling interface and the dynamic library and performing the hooking operation between the second sound controlling interface and the dynamic library.
  9. A smart terminal for controlling sound, comprising:
    an interface calling module, to call a first sound controlling interface when a system tone playing instruction is detected;
    a notification module, to notify a three-party application being performing a recording operation to stop the recording operation via a pre-inputted dynamic library, wherein the dynamic library is associated with the first sound controlling interface through a hooking operation;
    an operation module, to play a system tone when detecting that the three-party application stops the recording operation.
  10. The smart terminal of claim 9, wherein
    the interface calling module is further to call a second sound controlling interface after detecting that a process of playing the system tone finishes;
    the notification module is further to notify the three-party application stopping the recording operation to continue the recording operation through the dynamic library, wherein the dynamic library is associated with the second sound controlling interface through the hooking operation.
  11. The smart terminal of claim 10, further comprising:
    an inputting module, to input logic codes of the dynamic library pre-generated into a system of the smart terminal to perform the hooking operation between the first sound controlling interface and the dynamic library and to perform the hooking operation between the second sound controlling interface and the dynamic library.
  12. The smart terminal of any of claims 9-11, further comprising:
    a generation module, to generate the dynamic library for performing the hooking operation between the first sound controlling interface and the dynamic library and performing the hooking operation between the second sound controlling interface and the dynamic library.
  13. An apparatus for controlling sound, comprising:
    a processor for executing instructions stored in a memory, the instructions comprise:
    an interface calling instruction, to call a first sound controlling interface when a system tone playing instruction is detected;
    a notification instruction, to notify a three-party application being performing a recording operation to stop the recording operation via a pre-inputted dynamic library, wherein the dynamic library is associated with the first sound controlling interface through a hooking operation;
    an operation instruction, to play a system tone when detecting that the three-party application stops the recording operation.
  14. The apparatus of claim 13, wherein the interface calling instruction is further to call a second sound controlling interface after detecting that a process of playing the system tone finishes;
    the notification module is further to notify the three-party application stopping the recording operation to continue the recording operation through the dynamic library, wherein the dynamic library is associated with the second sound controlling interface through the hooking operation.
  15. The apparatus of claim 14, further comprising:
    an inputting instruction, to input logic codes of the dynamic library pre-generated into a system of the smart terminal to perform the hooking operation between the first sound controlling interface and the dynamic library and to perform the hooking operation between the second sound controlling interface and the dynamic library.
  16. The apparatus of any of claims 13-15, further comprising:
    a generation instruction, to generate the dynamic library for performing the hooking operation between the first sound controlling interface and the dynamic library and performing the hooking operation between the second sound controlling interface and the dynamic library.
PCT/CN2014/090865 2013-11-21 2014-11-12 Method and smart terminal for controlling sound WO2015074504A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310594307.4A CN104660793A (en) 2013-11-21 2013-11-21 Sound control method and system for intelligent terminal and intelligent terminal
CN201310594307.4 2013-11-21

Publications (1)

Publication Number Publication Date
WO2015074504A1 true WO2015074504A1 (en) 2015-05-28

Family

ID=53178922

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/090865 WO2015074504A1 (en) 2013-11-21 2014-11-12 Method and smart terminal for controlling sound

Country Status (3)

Country Link
CN (1) CN104660793A (en)
TW (1) TW201520899A (en)
WO (1) WO2015074504A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102651920A (en) * 2011-02-24 2012-08-29 腾讯科技(深圳)有限公司 Mobile communication terminal and operation prompt method based thereon
US8527959B2 (en) * 2007-12-07 2013-09-03 International Business Machines Corporation Binary programmable method for application performance data collection
CN103856634A (en) * 2014-03-10 2014-06-11 宇龙计算机通信科技(深圳)有限公司 Multitask incoming call suspension prompting method and system based on mobile terminal
CN103873798A (en) * 2014-02-27 2014-06-18 小米科技有限责任公司 Sound playing method and device for intelligent television

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101378426B (en) * 2008-09-02 2011-05-11 华为终端有限公司 Method and terminal for preventing disturb
KR101875743B1 (en) * 2012-01-10 2018-07-06 엘지전자 주식회사 Mobile terminal and control method therof
CN103034695A (en) * 2012-12-03 2013-04-10 北京奇虎科技有限公司 Method and device for sound control in browser
CN103019710B (en) * 2012-12-03 2016-08-03 北京奇虎科技有限公司 Audio control method and device for browser
CN103227851B (en) * 2013-03-05 2014-10-15 广东欧珀移动通信有限公司 Method and device for communication terminal recording

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8527959B2 (en) * 2007-12-07 2013-09-03 International Business Machines Corporation Binary programmable method for application performance data collection
CN102651920A (en) * 2011-02-24 2012-08-29 腾讯科技(深圳)有限公司 Mobile communication terminal and operation prompt method based thereon
CN103873798A (en) * 2014-02-27 2014-06-18 小米科技有限责任公司 Sound playing method and device for intelligent television
CN103856634A (en) * 2014-03-10 2014-06-11 宇龙计算机通信科技(深圳)有限公司 Multitask incoming call suspension prompting method and system based on mobile terminal

Also Published As

Publication number Publication date
TW201520899A (en) 2015-06-01
CN104660793A (en) 2015-05-27

Similar Documents

Publication Publication Date Title
EP3432140B1 (en) Android-based pop-up prompt method and device
EP2849025A1 (en) An error operation preventing method, apparatus and device
US20170126423A1 (en) Method, apparatus and system for setting operating mode of device
KR102504164B1 (en) Apparatus and method for controlling the apparatus by a user
CN107678782B (en) Process protection method, device, equipment and computer readable storage medium
CN113990354B (en) Audio control method, device, equipment and storage medium based on Linux
EP3472699B1 (en) Method and electronic device for managing functionality of applications
JP2017524212A (en) Application installation package processing method, apparatus, program, and recording medium
US8320973B2 (en) Call disconnect system and method for a mobile device
WO2015106727A1 (en) Method and apparatus for switching audio output device
WO2018103217A1 (en) Method for upgrading application, and server and user equipment
US20160259525A1 (en) Method and apparatus for acquiring and processing an operation instruction
CN105468504B (en) Program testing method and device
CN113841118A (en) Activation management of multiple voice assistants
WO2017166685A1 (en) Method and apparatus for switching to external loudspeaker
US20140304706A1 (en) Method and device for setting status of application
CN108132832B (en) Application program starting method and device
CN110868347A (en) Message prompting method, device and system
WO2015074504A1 (en) Method and smart terminal for controlling sound
CN106886721B (en) Method and device for realizing auxiliary function in application
US20170142583A1 (en) Methods and devices for controlling authorization to communication information
US20170110146A1 (en) Voice segment detection system, voice starting end detection apparatus, and voice terminal end detection apparatus
US20180081711A1 (en) Method and apparatus for operating system level of application
CN106776057B (en) Event processing method and device
KR20180014640A (en) Apparatus And Method For Performing Preset Functions in User Terminal

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14864739

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 10.10.2016)

122 Ep: pct application non-entry in european phase

Ref document number: 14864739

Country of ref document: EP

Kind code of ref document: A1