CN110113494B - Recording method and related device - Google Patents

Recording method and related device Download PDF

Info

Publication number
CN110113494B
CN110113494B CN201910374658.1A CN201910374658A CN110113494B CN 110113494 B CN110113494 B CN 110113494B CN 201910374658 A CN201910374658 A CN 201910374658A CN 110113494 B CN110113494 B CN 110113494B
Authority
CN
China
Prior art keywords
recording
audio data
interface
shared memory
thread
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN201910374658.1A
Other languages
Chinese (zh)
Other versions
CN110113494A (en
Inventor
方攀
陈岩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201910374658.1A priority Critical patent/CN110113494B/en
Publication of CN110113494A publication Critical patent/CN110113494A/en
Application granted granted Critical
Publication of CN110113494B publication Critical patent/CN110113494B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C7/00Arrangements for writing information into, or reading information out from, a digital store
    • G11C7/16Storage of analogue signals in digital stores using an arrangement comprising analogue/digital [A/D] converters, digital memories and digital/analogue [D/A] converters 
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/7243User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality with interactive means for internal management of messages
    • H04M1/72433User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality with interactive means for internal management of messages for voice messaging, e.g. dictaphones
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • H04M1/72454User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to context-related or environment-related conditions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M2250/00Details of telephonic subscriber devices
    • H04M2250/68Details of telephonic subscriber devices with means for recording information, e.g. telephone number during a conversation

Abstract

The embodiment of the application discloses a recording method and a related device, wherein the method is applied to electronic equipment comprising a Bluetooth telephone recording module, a system recording module, a standard recording interface and an independent recording interface, and comprises the following steps: when the system recording module and the Bluetooth telephone recording module are detected to be started simultaneously and the recording thread is not started, starting the recording thread through a standard recording interface, and acquiring first audio data; performing first preset processing on the first audio data through a standard recording interface to obtain second audio data and storing the second audio data to a first shared memory; the system recording module is used for acquiring second audio data from the first shared memory; performing second preset processing on the first audio data through the independent recording interface to obtain third audio data and storing the third audio data to a second shared memory; the Bluetooth telephone recording module is used for acquiring third audio data from the second share. The embodiment of the application is beneficial to improving the flexibility of recording.

Description

Recording method and related device
Technical Field
The application relates to the technical field of computers, in particular to a recording method and a related device.
Background
In the life, electronic equipment often can have the scene that needs carry out the recording, in the prior art, the native system of android, when third party uses standard recording interface to record, can establish a recording thread, establish a corresponding shared memory for the recording equipment of third party's application inside the recording thread, a standard recording interface correspondence of third party's application can establish a recording thread, a plurality of recording threads are possible in addition on equipment, but only can have a recording thread to be in operation at a moment, consequently, only can have a third party to use at the same moment in the recording.
Disclosure of Invention
The embodiment of the application provides a recording method and a related device, so that the implementation mode of recording is expected to be expanded, and the intelligence and flexibility of recording are improved.
In a first aspect, an embodiment of the present application provides a recording method, which is applied to an electronic device, where the electronic device includes a bluetooth telephone recording module and a system recording module, and the method includes:
creating a recording thread, a first shared memory and a second shared memory;
when the system recording module and the Bluetooth telephone recording module are detected to be started simultaneously, if the recording thread is detected not to be started, the recording thread is started through the standard recording interface, and first audio data are collected;
performing first preset processing on the first audio data through the standard recording interface to obtain second audio data, and storing the second audio data to the first shared memory;
the system recording module is used for acquiring the second audio data from the first shared memory;
performing second preset processing on the first audio data through the independent recording interface to obtain third audio data, and storing the third audio data to the second shared memory;
the Bluetooth telephone recording module is used for acquiring the third audio data from the second share.
In a second aspect, the embodiments of the present application provide a control device, which is applied to an electronic device, the electronic device includes a bluetooth telephone recording module, a system recording module, a standard recording interface, and an independent recording interface, the application control device includes a processing unit and a communication unit, wherein,
the processing unit is used for creating a recording thread, a first shared memory and a second shared memory; the Bluetooth telephone recording module is used for starting the recording thread through the standard recording interface and acquiring first audio data if the recording thread is not started when the system recording module and the Bluetooth telephone recording module are detected to be started simultaneously; the standard recording interface is used for carrying out first preset processing on the first audio data to obtain second audio data, and the second audio data is stored in the first shared memory; the system recording module is used for acquiring the second audio data from the first shared memory; the independent recording interface is used for carrying out first preset processing on the first audio data to obtain first audio data, and the first audio data is stored in the first shared memory; the Bluetooth telephone recording module is used for acquiring the third audio data from the second share.
In a third aspect, an embodiment of the present application provides an electronic device, including a processor, a memory, a communication interface, and one or more programs, where the one or more programs are stored in the memory and configured to be executed by the processor, and the program includes instructions for executing steps in any method of the first aspect of the embodiment of the present application.
In a fourth aspect, the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program for electronic data exchange, where the computer program makes a computer perform part or all of the steps described in any one of the methods of the first aspect of the present application.
In a fifth aspect, the present application provides a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to perform some or all of the steps as described in any one of the methods of the first aspect of the embodiments of the present application. The computer program product may be a software installation package.
It can be seen that, in the embodiment of the present application, after a recording thread, a first shared memory, and a second shared memory are created, when it is detected that a system recording module and a bluetooth telephone recording module are simultaneously started, if it is detected that the recording thread is not started, the electronic device starts the recording thread through the standard recording interface, acquires first audio data, and then performs a first preset process on the first audio data through the standard recording interface to obtain second audio data, and stores the second audio data in the first shared memory; the system recording module is used for obtaining the second audio data from the first shared memory, finally, performing second preset processing on the first audio data through the independent recording interface to obtain third audio data, and storing the third audio data to the second shared memory, and the Bluetooth telephone recording module is used for obtaining the third audio data from the second shared memory. It is thus clear that the electronic equipment of this application embodiment has add independent recording interface, detects the system recording module when bluetooth telephone recording module starts simultaneously, starts the recording thread to make independent recording interface and standard recording interface use this recording thread jointly, reach the purpose of recording simultaneously, expanded the processing mechanism of electronic equipment to carrying out the recording, improve flexibility, the intellectuality that electronic equipment carried out the recording.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure;
fig. 2 is a schematic flowchart of a recording method according to an embodiment of the present application;
FIG. 3 is a schematic flow chart of another recording method provided in the embodiments of the present application;
FIG. 4 is a schematic flowchart of another recording method according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device provided in an embodiment of the present application;
fig. 6 is a block diagram illustrating functional units of a recording apparatus according to an embodiment of the present disclosure.
Detailed Description
The following describes embodiments of the present application in detail.
Referring to fig. 1, fig. 1 is a schematic structural diagram of an electronic device provided in an embodiment of the present application, as shown in fig. 1, an electronic device 10 includes an HAL layer 100, the HAL layer 100 includes two sets of interfaces, one set of interface is a standard audio recording interface AudioRecord101, and the other set of interface is an independent audio recording interface record interface 102, in a scenario where the two sets of interfaces support simultaneous audio recording, a path of audio recording may be obtained through the independent audio recording interface 102 and returned to a specific scenario (for example, a bluetooth phone) for use, and a path of audio recording may be obtained through the standard audio recording interface 101 and returned to data recorded as an audio recording system applied by a third party.
The embodiment of the present application provides a recording method, and is described in detail below with reference to the accompanying drawings.
Referring to fig. 2, fig. 2 is a schematic flowchart of a recording method provided in an embodiment of the present application, and the recording method is applied to an electronic device, where the electronic device includes a bluetooth telephone recording module, a system recording module, a standard recording interface, and an independent recording interface, and as shown in fig. 2, the recording method includes:
s201, the electronic device creates a recording thread, a first shared memory and a second shared memory.
The electronic device according to the embodiment of the present application may be an electronic device with fingerprint identification capability, and the electronic device may include various handheld devices, vehicle-mounted devices, wearable devices, computing devices, or other processing devices connected to a wireless modem, and various forms of User Equipment (UE), Mobile Stations (MS), electronic devices (terminal device), and the like.
Here, the first shared memory is used for the standard recording interface to access data and transmitting data to the recording device and the standard recording interface in the third party application, and the second shared memory is used for the independent recording interface to access data and transmitting data to the bluetooth telephone recording module and the standard recording interface. The recording thread can simultaneously transmit the recording data of a plurality of third-party applications and store the recording data to the corresponding first shared memories, wherein one third-party application corresponds to one first shared memory.
The implementation manner of creating the recording thread, the first shared memory, and the second shared memory by the electronic device may be: when the electronic equipment detects that third-party application and/or Bluetooth telephone needs to record, judging whether the corresponding input channel has the recording thread; if the shared memory does not exist, a recording thread is created, and then the shared memory corresponding to the third-party application and/or the Bluetooth telephone is created in the created recording thread; and if the shared memory exists, directly returning to the recording thread, and creating the shared memory corresponding to the third-party application and/or the Bluetooth telephone in the recording thread. For example, when a user starts the recording of qq, WeChat, Bluetooth phone, first, an enabling signal of the qq recording function is obtained, whether the recording thread exists is judged, if not, creating a recording thread and creating a first shared memory corresponding to qq in the recording thread, then, obtaining the starting signal of the WeChat recording function, judging whether the recording thread exists, at the moment, judging that the recording thread exists, then directly returning to the existing recording thread, and creating a first shared memory corresponding to the WeChat in the recording thread, and finally, obtaining the starting signal of the Bluetooth telephone voice function, then judging whether the recording thread exists or not, at the moment, judging that the recording thread exists, and directly returning to the existing recording thread, and creating a second shared memory corresponding to the Bluetooth telephone in the recording thread.
Therefore, in this example, the electronic device only creates one recording thread, so that a plurality of third parties and bluetooth phones can share the recording thread at the same time, and simultaneous recording is realized.
S202, when the electronic equipment detects that the system recording module and the Bluetooth telephone recording module are started simultaneously, if the electronic equipment detects that the recording thread is not started, the electronic equipment starts the recording thread through the standard recording interface and collects first audio data.
The standard recording interface comprises three main interfaces, and a first standard recording interface start _ input _ stream is used for starting recording; the second standard sound recording interface in _ read is used for reading sound recording data; and the third standard recording interface stop _ input _ stream is used for stopping recording. The implementation manner of starting the recording thread through the standard recording interface may be: and the standard recording interface calls the start _ input _ stream to start recording.
It should be noted that if it is detected that the recording thread is not started, starting the recording thread through the standard recording interface is only a recording thread starting mode when it is detected that the system recording module and the bluetooth telephone recording module are simultaneously started, and in addition, if it is detected that the recording thread is not started, the recording thread may also be started through the independent recording interface, where the independent recording interface includes three main interfaces, and the first independent recording interface Record _ start is used to start recording; the second independent recording interface Record _ read is used for reading the recording data; and the third independent recording interface Record _ stop is used for stopping recording. The implementation manner of starting the recording thread through the standard recording interface may be: and the standard recording interface calls the start _ input _ stream to start recording.
It can be seen that, in this example, when the electronic device detects that the system recording module and the bluetooth telephone recording module are simultaneously started and the recording thread is not started, the recording thread is started to transmit the recording data.
And S203, the electronic equipment performs first preset processing on the first audio data through the standard recording interface to obtain second audio data, and stores the second audio data in the first shared memory.
The first preset processing may be processing performed by the electronic device by adopting a corresponding processing policy on the first audio data according to a requirement of a third-party application on an audio data format. The first preset processing may also be processing the first audio data according to a preset parameter.
As can be seen, in this example, the electronic device subjects the acquired original audio to a preset process to meet the requirements of the corresponding third-party application.
And S204, the system recording module is used for acquiring the second audio data from the first shared memory.
The system recording module is used for acquiring the second audio data from the first shared memory through the standard recording interface.
S205, the electronic device performs second preset processing on the first audio data through the independent recording interface to obtain third audio data, and stores the third audio data in the second shared memory.
The second preset processing may be processing performed by the electronic device by adopting a corresponding processing policy for the second audio data according to requirements of other scene applications such as bluetooth phones on audio data formats. The second preset processing may also be processing the first audio data according to preset parameters.
As can be seen, in this example, the electronic device performs preset processing on the acquired original audio to meet the requirements of other applications such as bluetooth phones.
S206, the Bluetooth telephone recording module is used for obtaining the third audio data from the second share.
The bluetooth telephone recording module is configured to obtain the third audio data from the second shared memory through the standard recording interface, where the bluetooth telephone recording module is configured to obtain the third audio data from the second shared memory through the standard recording interface.
Therefore, in this example, the electronic device can record simultaneously for different applications through one recording thread and two sets of recording interfaces.
It can be seen that, in the embodiment of the present application, after a recording thread, a first shared memory, and a second shared memory are created, when it is detected that a system recording module and a bluetooth telephone recording module are simultaneously started, if it is detected that the recording thread is not started, the electronic device starts the recording thread through the standard recording interface, acquires first audio data, and then performs a first preset process on the first audio data through the standard recording interface to obtain second audio data, and stores the second audio data in the first shared memory; the system recording module is used for obtaining the second audio data from the first shared memory, finally, performing second preset processing on the first audio data through the independent recording interface to obtain third audio data, and storing the third audio data to the second shared memory, and the Bluetooth telephone recording module is used for obtaining the third audio data from the second shared memory. It is thus clear that the electronic equipment of this application embodiment has add independent recording interface, detects the system recording module when bluetooth telephone recording module starts simultaneously, starts the recording thread to make independent recording interface and standard recording interface use this recording thread jointly, reach the purpose of recording simultaneously, expanded the processing mechanism of electronic equipment to carrying out the recording, improve flexibility, the intellectuality that electronic equipment carried out the recording.
In one possible example, the electronic device performs a first preset process on the first audio data through the standard sound recording interface to obtain second audio data, including: the electronic equipment performs first resampling on the first audio data through the standard recording interface to obtain the second audio data, wherein the first resampling comprises resampling according to a first configuration parameter, and the first configuration parameter comprises at least one of an audio data sampling rate, an information number and a channel number.
The resampling (SRC) refers to converting an original sampling frequency into a new sampling frequency to meet the requirement of different sampling rates. To meet the requirements for different sampling rates, it is often necessary to resample the speech.
For example, the sampling rate that the recording thread obtained is the pcm audio frequency of C, Bit C, electronic equipment passes through the standard recording interface carries out first resampling, turns into the pcm audio frequency that the sampling rate is C, Bit C and obtains sampling rate A, Bit A's pcm audio data.
As can be seen, in this example, the electronic device performs a predetermined resampling process on the original recorded audio through the standard recording interface to obtain audio data meeting the requirement.
In one possible example, the electronic device performs a second preset process on the first audio data through the independent recording interface to obtain third audio data, including: and the electronic equipment performs second resampling on the first audio data through the independent recording interface to obtain third audio data, wherein the first resampling comprises resampling according to a second configuration parameter, and the configuration parameters of the first resampling and the second resampling are different.
In this possible embodiment, the sampling rate that the recording thread acquireed is C, Bit C's pcm audio frequency, electronic equipment passes through standard recording interface carries out first resampling processing, turns into the pcm audio frequency that the sampling rate is C, Bit C and acquires sampling rate A, Bit A's pcm audio data, simultaneously, electronic equipment passes through independent recording interface carries out first resampling processing, turns into the pcm audio frequency that the sampling rate is C, Bit C and acquires sampling rate b, Bit b's pcm audio data.
Electronic equipment can be through using different parameter configuration to independent recording interface and system recording interface, through carrying out different processing to audio data to independent recording interface and system recording interface, obtains the recording data of different recording configuration demands, improves the flexibility that electronic equipment carried out the recording.
In one possible example, the system recording module is configured to obtain the second audio data from the first shared memory, and includes: acquiring the second audio data from the first shared memory through the standard recording interface; performing noise reduction optimization processing on the second audio data through the standard recording interface; and sending the processed second audio data to the system recording module.
The performing of the noise reduction optimization processing on the second audio data through the standard recording interface may be performing adaptive filter noise reduction optimization processing on the second audio data through the standard recording interface; the performing, by the standard recording interface, the noise reduction optimization processing on the second audio data may be performing, by the standard recording interface, the noise reduction optimization processing on the second audio data by using a spectral subtraction method; the performing of the noise reduction optimization processing on the second audio data through the standard recording interface may be performing the noise reduction optimization processing on the second audio data through the standard recording interface by using a wiener filtering method. The method used for performing the noise reduction optimization process is not particularly limited.
As can be seen, in this example, the electronic device can perform noise reduction processing on the second audio data to eliminate audio noise, thereby improving user experience.
In one possible example, the bluetooth voice recording module is configured to obtain the third audio data from within the second share, and includes: obtaining the third audio data from the second share through the independent recording interface; performing noise reduction optimization processing on the third audio data through the independent recording interface; and sending the processed third audio data to the Bluetooth telephone recording module.
As can be seen, in this example, the electronic device can perform noise reduction processing on the third audio data to eliminate audio noise, thereby improving user experience.
In one possible example, the method further comprises: when the electronic equipment detects that the Bluetooth telephone recording module is started, if the electronic equipment detects that the recording thread is not started, the electronic equipment starts the recording thread through the independent recording interface and collects the first audio data.
In this possible embodiment, when the electronic device detects that the bluetooth telephone recording module and the recording thread are not started, the electronic device calls the start _ input _ stream through the independent recording interface to start recording.
Therefore, in this example, the electronic device may start the recording thread through the independent recording interface, collect the original audio, and improve the intelligence of the recording of the electronic device.
In one possible example, the method further comprises: the method further comprises the following steps: and the electronic equipment exits the recording thread when detecting that the Bluetooth telephone recording module and the system recording module are both closed.
The electronic equipment detects that bluetooth telephone recording module and system Record module all close the time, withdraw from the recording thread can call stop _ input _ stream through standard recording interface, stops the recording, withdraws from the recording thread can also call Record _ stop through independent recording interface, stops the recording.
It can be seen that, in this example, when the electronic equipment detects that both the bluetooth telephone recording module and the system recording module are closed again, the recording thread is exited, and the intelligence of the electronic equipment recording is improved.
Referring to fig. 3, fig. 3 is a schematic flowchart of a recording method provided in an embodiment of the present application, applied to the electronic device shown in fig. 1, and as shown in fig. 3, the recording method includes:
s301, the electronic equipment creates a recording thread, a first shared memory and a second shared memory;
s302, when the electronic equipment detects that the system recording module and the Bluetooth telephone recording module are started simultaneously, if the electronic equipment detects that the recording thread is not started, the electronic equipment starts the recording thread through the standard recording interface and collects first audio data;
s303, the electronic equipment performs first preset processing on the first audio data through the standard recording interface to obtain second audio data, and stores the second audio data in the first shared memory;
s304, the system recording module of the electronic device is configured to obtain the second audio data from the first shared memory;
s305, the electronic equipment performs second preset processing on the first audio data through the independent recording interface to obtain third audio data, and stores the third audio data in the second shared memory;
s306, the Bluetooth telephone recording module of the electronic device is used for acquiring the third audio data from the second share;
s307, the electronic equipment exits the recording thread when detecting that the Bluetooth telephone recording module and the system recording module are both closed.
It can be seen that, in the embodiment of the present application, after a recording thread, a first shared memory, and a second shared memory are created, when it is detected that a system recording module and a bluetooth telephone recording module are simultaneously started, if it is detected that the recording thread is not started, the electronic device starts the recording thread through the standard recording interface, acquires first audio data, and then performs a first preset process on the first audio data through the standard recording interface to obtain second audio data, and stores the second audio data in the first shared memory; the system recording module is used for obtaining the second audio data from the first shared memory, finally, performing second preset processing on the first audio data through the independent recording interface to obtain third audio data, and storing the third audio data to the second shared memory, and the Bluetooth telephone recording module is used for obtaining the third audio data from the second shared memory. It is thus clear that the electronic equipment of this application embodiment has add independent recording interface, detects the system recording module when bluetooth telephone recording module starts simultaneously, starts the recording thread to make independent recording interface and standard recording interface use this recording thread jointly, reach the purpose of recording simultaneously, expanded the processing mechanism of electronic equipment to carrying out the recording, improve flexibility, the intellectuality that electronic equipment carried out the recording.
Referring to fig. 4, fig. 4 is a schematic flowchart of a recording method provided in an embodiment of the present application, applied to the electronic device shown in fig. 1, and as shown in fig. 4, the recording method includes:
s401, the electronic device creates a recording thread, a first shared memory and a second shared memory.
S402, when the electronic equipment detects that the system recording module and the Bluetooth telephone recording module are started simultaneously, if the electronic equipment detects that the recording thread is not started, the electronic equipment starts the recording thread through the standard recording interface and collects first audio data.
S403, the electronic device performs a first resampling on the first audio data through the standard audio recording interface to obtain second audio data, and stores the second audio data in the first shared memory, where the first resampling includes resampling according to a first configuration parameter, and the first configuration parameter includes at least one of an audio data sampling rate, an information number, and a channel number.
S404, the system recording module is configured to obtain the second audio data from the first shared memory.
S405, the electronic device performs second resampling on the first audio data through the independent recording interface to obtain third audio data, and stores the second audio data in the second shared memory.
S406, the Bluetooth telephone recording module is used for acquiring the third audio data from the second share.
It can be seen that, in the embodiment of the present application, after a recording thread, a first shared memory, and a second shared memory are created, when it is detected that a system recording module and a bluetooth telephone recording module are simultaneously started, if it is detected that the recording thread is not started, the electronic device starts the recording thread through the standard recording interface, acquires first audio data, and then performs a first preset process on the first audio data through the standard recording interface to obtain second audio data, and stores the second audio data in the first shared memory; the system recording module is used for obtaining the second audio data from the first shared memory, finally, performing second preset processing on the first audio data through the independent recording interface to obtain third audio data, and storing the third audio data to the second shared memory, and the Bluetooth telephone recording module is used for obtaining the third audio data from the second shared memory. It is thus clear that the electronic equipment of this application embodiment has add independent recording interface, detects the system recording module when bluetooth telephone recording module starts simultaneously, starts the recording thread to make independent recording interface and standard recording interface use this recording thread jointly, reach the purpose of recording simultaneously, expanded the processing mechanism of electronic equipment to carrying out the recording, improve flexibility, the intellectuality that electronic equipment carried out the recording.
In addition, the electronic equipment can use different parameter configurations through the independent recording interface and the system recording interface, and different processing is carried out on the audio data through the independent recording interface and the system recording interface, so that recording data with different recording configuration requirements are obtained, and the flexibility of recording of the electronic equipment is improved.
In accordance with the embodiments shown in fig. 2, fig. 3, and fig. 4, please refer to fig. 5, and fig. 5 is a schematic structural diagram of an electronic device 500 according to an embodiment of the present application, as shown in the figure, the electronic device 500 includes an application processor 510, a memory 520, a communication interface 530, and one or more programs 521, where the one or more programs 521 are stored in the memory 520 and configured to be executed by the application processor 510, and the one or more programs 521 include instructions for performing the following steps;
creating a recording thread, a first shared memory and a second shared memory;
when the system recording module and the Bluetooth telephone recording module are detected to be started simultaneously, if the recording thread is detected not to be started, the recording thread is started through the standard recording interface, and first audio data are collected;
performing first preset processing on the first audio data through the standard recording interface to obtain second audio data, and storing the second audio data to the first shared memory;
the system recording module is used for acquiring the second audio data from the first shared memory;
performing second preset processing on the first audio data through the independent recording interface to obtain third audio data, and storing the third audio data to the second shared memory;
the Bluetooth telephone recording module is used for acquiring the third audio data from the second share.
It can be seen that, in the embodiment of the present application, after a recording thread, a first shared memory, and a second shared memory are created, when it is detected that a system recording module and a bluetooth telephone recording module are simultaneously started, if it is detected that the recording thread is not started, the electronic device starts the recording thread through the standard recording interface, acquires first audio data, and then performs a first preset process on the first audio data through the standard recording interface to obtain second audio data, and stores the second audio data in the first shared memory; the system recording module is used for obtaining the second audio data from the first shared memory, finally, performing second preset processing on the first audio data through the independent recording interface to obtain third audio data, and storing the third audio data to the second shared memory, and the Bluetooth telephone recording module is used for obtaining the third audio data from the second shared memory. It is thus clear that the electronic equipment of this application embodiment has add independent recording interface, detects the system recording module when bluetooth telephone recording module starts simultaneously, starts the recording thread to make independent recording interface and standard recording interface use this recording thread jointly, reach the purpose of recording simultaneously, expanded the processing mechanism of electronic equipment to carrying out the recording, improve flexibility, the intellectuality that electronic equipment carried out the recording.
In one possible example, in terms of obtaining the second audio data by performing the first preset processing on the first audio data through the standard sound recording interface, the instructions in the program are specifically configured to perform the following operations: and performing first resampling on the first audio data through the standard recording interface to obtain the second audio data, wherein the first resampling comprises resampling according to a first configuration parameter, and the first configuration parameter comprises at least one of an audio data sampling rate, an information number and a channel number.
In a possible example, in terms of obtaining third audio data by performing second preset processing on the first audio data through the independent recording interface, the instructions in the program are specifically configured to perform the following operations: and performing second resampling on the first audio data through the independent recording interface to obtain the third audio data, wherein the first resampling comprises resampling according to a second configuration parameter, and the configuration parameters of the first resampling and the second resampling are different.
In one possible example, in an aspect that the system recording module is configured to obtain the second audio data from the first shared memory, the instructions in the program are specifically configured to: acquiring the second audio data from the first shared memory through the standard recording interface; performing noise reduction optimization processing on the second audio data through the standard recording interface; and sending the processed second audio data to the system recording module.
In one possible example, in an aspect in which the bluetooth voice recording module is configured to obtain the third audio data from the second share, the instructions in the program are specifically configured to: obtaining the third audio data from the second share through the independent recording interface; performing noise reduction optimization processing on the third audio data through the independent recording interface; and sending the processed third audio data to the Bluetooth telephone recording module.
In one possible example, the program further includes instructions for, when it is detected that the bluetooth telephone recording module is started, starting the recording thread through the independent recording interface if it is detected that the recording thread is not started, and acquiring the first audio data.
In one possible example, the program further includes instructions for exiting the recording thread upon detecting that both the bluetooth telephony recording module and the system recording module are turned off.
The above description has introduced the solution of the embodiment of the present application mainly from the perspective of the method-side implementation process. It is understood that the electronic device comprises corresponding hardware structures and/or software modules for performing the respective functions in order to realize the above-mentioned functions. Those of skill in the art will readily appreciate that the present application is capable of hardware or a combination of hardware and computer software implementing the various illustrative elements and algorithm steps described in connection with the embodiments provided herein. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiment of the present application, the electronic device may be divided into the functional units according to the method example, for example, each functional unit may be divided corresponding to each function, or two or more functions may be integrated into one processing unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit. It should be noted that the division of the unit in the embodiment of the present application is schematic, and is only a logic function division, and there may be another division manner in actual implementation.
Fig. 6 is a block diagram showing functional units of a sound recording apparatus 600 according to an embodiment of the present application. The sound recording apparatus 600 is applied to an electronic device, and includes a processing unit 601 and a communication unit 602, wherein,
the processing unit 601 is configured to create a recording thread, a first shared memory, and a second shared memory; and is used for transmitting a simultaneous start signal through the communication unit 602 when detecting that the system recording module and the bluetooth telephone recording module are simultaneously started, and starting the recording thread through the standard recording interface to acquire first audio data if detecting that the recording thread is not started; performing first preset processing on the first audio data through the standard recording interface to obtain second audio data, and storing the second audio data to the first shared memory; the system recording module is used for acquiring the second audio data from the first shared memory; performing second preset processing on the first audio data through the independent recording interface to obtain third audio data, and storing the third audio data to the second shared memory; the Bluetooth telephone recording module is used for acquiring the third audio data from the second share.
The sound recording apparatus 600 may further include a storage unit 603 for storing program codes and data of the electronic device. The processing unit 601 may be a processor, the communication unit 602 may be a touch display screen or a transceiver, and the storage unit 603 may be a memory.
It can be seen that, in the embodiment of the present application, after a recording thread, a first shared memory, and a second shared memory are created, when it is detected that a system recording module and a bluetooth telephone recording module are simultaneously started, if it is detected that the recording thread is not started, the electronic device starts the recording thread through the standard recording interface, acquires first audio data, and then performs a first preset process on the first audio data through the standard recording interface to obtain second audio data, and stores the second audio data in the first shared memory; the system recording module is used for obtaining the second audio data from the first shared memory, finally, performing second preset processing on the first audio data through the independent recording interface to obtain third audio data, and storing the third audio data to the second shared memory, and the Bluetooth telephone recording module is used for obtaining the third audio data from the second shared memory. It is thus clear that the electronic equipment of this application embodiment has add independent recording interface, detects the system recording module when bluetooth telephone recording module starts simultaneously, starts the recording thread to make independent recording interface and standard recording interface use this recording thread jointly, reach the purpose of recording simultaneously, expanded the processing mechanism of electronic equipment to carrying out the recording, improve flexibility, the intellectuality that electronic equipment carried out the recording.
In a possible example, in terms of obtaining second audio data by performing a first preset process on the first audio data through the standard sound recording interface, the processing unit 601 is specifically configured to: and performing first resampling on the first audio data through the standard recording interface to obtain the second audio data, wherein the first resampling comprises resampling according to a first configuration parameter, and the first configuration parameter comprises at least one of an audio data sampling rate, an information number and a channel number.
In a possible example, in terms of performing a second preset process on the first audio data through the independent recording interface to obtain third audio data, the processing unit 601 is specifically configured to: and performing second resampling on the first audio data through the independent recording interface to obtain the third audio data, wherein the first resampling comprises resampling according to a second configuration parameter, and the configuration parameters of the first resampling and the second resampling are different.
In a possible example, in an aspect that the system sound recording module is configured to obtain the second audio data from the first shared memory, the processing unit 601 is specifically configured to: acquiring the second audio data from the first shared memory through the standard recording interface; performing noise reduction optimization processing on the second audio data through the standard recording interface; and sending the processed second audio data to the system recording module.
In a possible example, in terms that the bluetooth voice recording module is configured to obtain the third audio data from the second share, the processing unit 601 is specifically configured to: obtaining the third audio data from the second share through the independent recording interface; performing noise reduction optimization processing on the third audio data through the independent recording interface; and sending the processed third audio data to the Bluetooth telephone recording module.
In one possible example, the processing unit 601 is further configured to: when detecting that the Bluetooth telephone recording module is started, if detecting that the recording thread is not started, starting the recording thread through the independent recording interface, and collecting the first audio data.
In one possible example, the processing unit 601 is further configured to: and when the Bluetooth telephone recording module and the system recording module are detected to be closed, the recording thread is exited.
Embodiments of the present application also provide a computer storage medium, where the computer storage medium stores a computer program for electronic data exchange, the computer program enabling a computer to execute part or all of the steps of any one of the methods described in the above method embodiments, and the computer includes an electronic device.
Embodiments of the present application also provide a computer program product comprising a non-transitory computer readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps of any of the methods as described in the above method embodiments. The computer program product may be a software installation package, the computer comprising an electronic device.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the above-described division of the units is only one type of division of logical functions, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of some interfaces, devices or units, and may be an electric or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit may be stored in a computer readable memory if it is implemented in the form of a software functional unit and sold or used as a stand-alone product. Based on such understanding, the technical solution of the present application may be substantially implemented or a part of or all or part of the technical solution contributing to the prior art may be embodied in the form of a software product stored in a memory, and including several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the above-mentioned method of the embodiments of the present application. And the aforementioned memory comprises: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable memory, which may include: flash Memory disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
The foregoing detailed description of the embodiments of the present application has been presented to illustrate the principles and implementations of the present application, and the above description of the embodiments is only provided to help understand the method and the core concept of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (9)

1. The utility model provides a recording method, its characterized in that is applied to electronic equipment, electronic equipment includes bluetooth telephone recording module, system's recording module, standard recording interface and independent recording interface all include at the hardware abstraction layer, the method includes:
creating a recording thread, a first shared memory and a second shared memory;
when the system recording module and the Bluetooth telephone recording module are detected to be started simultaneously, if the recording thread is detected not to be started, the recording thread is started through the standard recording interface, and first audio data are collected; when the Bluetooth telephone recording module is detected to be started, if the recording thread is detected not to be started, the recording thread is started through the independent recording interface, and the first audio data are collected;
performing first preset processing on the first audio data through the standard recording interface to obtain second audio data, and storing the second audio data to the first shared memory;
the system recording module is used for acquiring the second audio data from the first shared memory;
performing second preset processing on the first audio data through the independent recording interface to obtain third audio data, and storing the third audio data to the second shared memory;
the Bluetooth telephone recording module is used for acquiring the third audio data from the second shared memory.
2. The method of claim 1, wherein the performing a first predetermined process on the first audio data through the standard recording interface to obtain second audio data comprises: and performing first resampling on the first audio data through the standard recording interface to obtain the second audio data, wherein the first resampling comprises resampling according to a first configuration parameter, and the first configuration parameter comprises at least one of an audio data sampling rate, an information number and a channel number.
3. The method of claim 2, wherein the second pre-processing the first audio data through the independent recording interface to obtain third audio data comprises: and performing second resampling on the first audio data through the independent recording interface to obtain the third audio data, wherein the first resampling comprises resampling according to a second configuration parameter, and the configuration parameters of the first resampling and the second resampling are different.
4. The method according to any of claims 1-3, wherein the system recording module is configured to obtain the second audio data from the first shared memory, and comprises:
acquiring the second audio data from the first shared memory through the standard recording interface;
performing noise reduction optimization processing on the second audio data through the standard recording interface;
and sending the processed second audio data to the system recording module.
5. The method of any of claims 1-3, wherein the Bluetooth voice recording module is configured to obtain the third audio data from the second shared memory, and comprises:
acquiring the third audio data from the second shared memory through the independent recording interface;
performing noise reduction optimization processing on the third audio data through the independent recording interface;
and sending the processed third audio data to the Bluetooth telephone recording module.
6. The method of claim 1, further comprising:
and when the Bluetooth telephone recording module and the system recording module are detected to be closed, the recording thread is exited.
7. A recording device is characterized in that the recording device is applied to electronic equipment, the electronic equipment comprises a Bluetooth telephone recording module, a system recording module, a standard recording interface and an independent recording interface, the application control device comprises a processing unit and a communication unit, the standard recording interface and the independent recording interface are both included in a hardware abstraction layer, wherein,
the processing unit is used for creating a recording thread, a first shared memory and a second shared memory; the Bluetooth telephone recording module is used for starting the recording thread through the standard recording interface and acquiring first audio data if the recording thread is not started when the system recording module and the Bluetooth telephone recording module are detected to be started simultaneously; when the Bluetooth telephone recording module is detected to be started, if the recording thread is detected not to be started, the recording thread is started through the independent recording interface, and the first audio data are collected; the standard recording interface is used for carrying out first preset processing on the first audio data to obtain second audio data, and the second audio data is stored in the first shared memory; the system recording module is used for acquiring the second audio data from the first shared memory; the independent recording interface is used for carrying out first preset processing on the first audio data to obtain first audio data, and the first audio data is stored in the first shared memory; the Bluetooth telephone recording module is used for acquiring the third audio data from the second shared memory.
8. An electronic device comprising a processor, a memory, a communication interface, and one or more programs stored in the memory and configured to be executed by the processor, the programs comprising instructions for performing the steps in the method of any of claims 1-6.
9. A computer-readable storage medium, characterized in that a computer program for electronic data exchange is stored, wherein the computer program causes a computer to perform the method according to any one of claims 1-6.
CN201910374658.1A 2019-05-05 2019-05-05 Recording method and related device Expired - Fee Related CN110113494B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910374658.1A CN110113494B (en) 2019-05-05 2019-05-05 Recording method and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910374658.1A CN110113494B (en) 2019-05-05 2019-05-05 Recording method and related device

Publications (2)

Publication Number Publication Date
CN110113494A CN110113494A (en) 2019-08-09
CN110113494B true CN110113494B (en) 2021-01-29

Family

ID=67488503

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910374658.1A Expired - Fee Related CN110113494B (en) 2019-05-05 2019-05-05 Recording method and related device

Country Status (1)

Country Link
CN (1) CN110113494B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111583941B (en) * 2020-05-07 2024-01-16 珠海格力电器股份有限公司 Household appliance recording method and device, storage medium and household appliance

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101115011A (en) * 2007-06-28 2008-01-30 恒生电子股份有限公司 Stream media playback method, device and system
CN106708612A (en) * 2015-11-18 2017-05-24 中兴通讯股份有限公司 Audio recording realization method and terminal
CN107526634A (en) * 2017-08-31 2017-12-29 四川长虹电器股份有限公司 The method for supporting multiple sound pick-up outfits simultaneously in Android device
CN107734431A (en) * 2017-11-15 2018-02-23 郭思明 The shared recording control system of one kind and implementation method
CN108052312A (en) * 2017-12-06 2018-05-18 晶晨半导体(上海)股份有限公司 A kind of method and audio system that multitrack recording is realized based on Android system
CN109032559A (en) * 2018-07-25 2018-12-18 南京创维信息技术研究院有限公司 A kind of configuration method and system of the same sound pick-up outfit of more Application shares

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10083159B1 (en) * 2016-07-13 2018-09-25 Screen Share Technology Ltd. Method for recording, editing and reproduction of web browser session
CN106504777B (en) * 2016-11-25 2019-05-17 维沃移动通信有限公司 A kind of processing method and mobile terminal of recording data
CN106911831B (en) * 2017-02-09 2019-09-20 青岛海信移动通信技术股份有限公司 A kind of data processing method of the microphone of terminal and terminal with microphone
CN109471680A (en) * 2018-11-29 2019-03-15 深圳市车联天下信息科技有限公司 The multimode way of recording, device and vehicle-mounted ancillary equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101115011A (en) * 2007-06-28 2008-01-30 恒生电子股份有限公司 Stream media playback method, device and system
CN106708612A (en) * 2015-11-18 2017-05-24 中兴通讯股份有限公司 Audio recording realization method and terminal
CN107526634A (en) * 2017-08-31 2017-12-29 四川长虹电器股份有限公司 The method for supporting multiple sound pick-up outfits simultaneously in Android device
CN107734431A (en) * 2017-11-15 2018-02-23 郭思明 The shared recording control system of one kind and implementation method
CN108052312A (en) * 2017-12-06 2018-05-18 晶晨半导体(上海)股份有限公司 A kind of method and audio system that multitrack recording is realized based on Android system
CN109032559A (en) * 2018-07-25 2018-12-18 南京创维信息技术研究院有限公司 A kind of configuration method and system of the same sound pick-up outfit of more Application shares

Also Published As

Publication number Publication date
CN110113494A (en) 2019-08-09

Similar Documents

Publication Publication Date Title
JP6596173B1 (en) Incoming call management method and apparatus
US20200219503A1 (en) Method and apparatus for filtering out voice instruction
CN110704202B (en) Multimedia recording data sharing method and terminal equipment
CN103220392B (en) A kind of method of automatic recording, device and mobile terminal
WO2016000569A1 (en) Voice communication method and system in game applications
CN103002421B (en) Anti-processing method, system and mobile communication terminal of bothering in a kind of call
CN105574426A (en) Terminal projection output method and terminal
CN110035167B (en) Recording method and related device
CN107872555A (en) Call recording method, device, terminal device and computer-readable recording medium
CN109842712A (en) Method, apparatus, computer equipment and the storage medium that message registration generates
CN107979790A (en) One kind call noise-reduction method, device, equipment and medium
CN112995422A (en) Call control method and device, electronic equipment and storage medium
CN104333641B (en) Call method and device
CN106953962B (en) A kind of call recording method and device
CN110113494B (en) Recording method and related device
CN110381215B (en) Audio distribution method and device, storage medium and computer equipment
CN105551491A (en) Voice recognition method and device
CN109194998A (en) Data transmission method, device, electronic equipment and computer-readable medium
CN107959720A (en) The method and system of calling record cloud storage
CN110225213B (en) Recognition method of voice call scene and audio policy server
CN116665692A (en) Voice noise reduction method and terminal equipment
CN110445934A (en) Call-information processing method, system, terminal and readable storage medium storing program for executing
CN105162998B (en) The denoising method and device of touch-tone signal
KR101748039B1 (en) Sampling rate conversion method and system for efficient voice call
CN108377298A (en) A kind of method, apparatus and computer readable storage medium of switching answer mode

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20210129