CN110989964B - Audio playback method and device based on android system and electronic equipment - Google Patents

Audio playback method and device based on android system and electronic equipment Download PDF

Info

Publication number
CN110989964B
CN110989964B CN201911188020.5A CN201911188020A CN110989964B CN 110989964 B CN110989964 B CN 110989964B CN 201911188020 A CN201911188020 A CN 201911188020A CN 110989964 B CN110989964 B CN 110989964B
Authority
CN
China
Prior art keywords
audio
information
audio information
module
output
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911188020.5A
Other languages
Chinese (zh)
Other versions
CN110989964A (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.)
Beijing Thunderstone Technology Co ltd
Original Assignee
Beijing Thunderstone Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Thunderstone Technology Co ltd filed Critical Beijing Thunderstone Technology Co ltd
Priority to CN201911188020.5A priority Critical patent/CN110989964B/en
Publication of CN110989964A publication Critical patent/CN110989964A/en
Application granted granted Critical
Publication of CN110989964B publication Critical patent/CN110989964B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/16Sound input; Sound output
    • G06F3/165Management of the audio stream, e.g. setting of volume, audio stream path

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Telephone Function (AREA)
  • Signal Processing For Digital Recording And Reproducing (AREA)

Abstract

The invention discloses an audio playback method of an android system and electronic equipment, comprising the following steps: setting an audio playback mode control module; determining an audio information transmission path and transmitting; and determining an audio information output path and outputting, wherein when the audio playback mode control state is 1, the audio output driving module respectively receives the first audio information of the audio input driving module and the second audio information of the audio output intermediate module, takes third audio information formed by the operation of the first audio information and the second audio information as input information, and outputs the information. By setting the audio playback mode control module, the audio information playback transmission path is shortened, the audio playback delay is shortened, and the user experience is improved.

Description

Audio playback method and device based on android system and electronic equipment
Technical Field
The present application relates to the field of audio processing, and more particularly, to an audio playback method based on an android system.
Background
At present, in application scenes such as singing and recording, an audio processing method based on an android system is to record audio input and then play back the audio, the time delay between the audio playback and the audio input is over 120ms or even longer, and when a user sings or records by using the method, the longer audio playback time delay can be obviously experienced, so that the user experience is poor.
Accordingly, there is a need for an improved audio playback method.
Disclosure of Invention
Aiming at the defects and shortcomings in the prior art, the invention provides an audio playback method based on an android system, which reduces audio playback delay and improves user experience.
According to an aspect of the present invention, there is provided an audio playback method based on an android system, including:
setting an audio playback mode control module; determining an audio information transmission path and transmitting; and determining an audio information output path and outputting, wherein when the audio playback mode control state is 1, the audio output driving module respectively receives the first audio information of the audio input driving module and the second audio information of the audio output intermediate module, takes third audio information formed by the operation of the first audio information and the second audio information as input information, and outputs the information.
The audio playback method further comprises the following steps: input audio information is acquired.
The audio playback method further comprises the following steps: playback audio information is output.
Further, the method for setting the audio playback mode control module includes: a node is built under the android system root directory/sys/class.
Further, in the third audio information formed by the operation of the first audio information and the second audio information, the operation is an addition operation.
According to still another aspect of the present invention, there is provided an electronic apparatus including: a processor; and a memory having stored therein computer program instructions that, when executed by the processor, cause the processor to perform the audio playback method as described above.
According to a further aspect of the present invention there is provided a computer readable medium having stored thereon computer program instructions which, when executed by a processor, cause the processor to perform an audio playback method as described above.
According to the invention, the audio playback mode control module is arranged, so that the audio information playback transmission path is shortened, the audio playback delay is shortened, and the user experience is improved.
Drawings
Various other advantages and benefits of the present application will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the application. It is apparent that the drawings described below are only some embodiments of the present application and that other drawings may be obtained from these drawings by those of ordinary skill in the art without inventive effort. Also, like reference numerals are used to designate like parts throughout the figures.
FIG. 1 is an information flow diagram of an audio playback method based on an android system in the prior art;
FIG. 2 is a flow chart of an android system based audio playback method in accordance with one embodiment of the present invention;
FIG. 3 is an audio playback method information flow diagram based on the android system in accordance with one embodiment of the present invention;
fig. 4 is a block diagram of an electronic device according to one embodiment of the invention.
Detailed Description
Hereinafter, example embodiments according to the present application will be described in detail with reference to the accompanying drawings. It should be apparent that the described embodiments are only some of the embodiments of the present application and not all of the embodiments of the present application, and it should be understood that the present application is not limited by the example embodiments described herein.
Summary of the application
The android system provides a module for processing audio input and output: audio Capture Driver Audio input drive module, audio Capture Hal Audio input intermediate module, audio Record Audio input frame module, audio Track Audio output frame module, audio Playback Hal Audio output intermediate module, audio Playback Driver Audio output drive module. In addition, the android system also provides a storage module for storing information, wherein the information comprises audio information.
In the prior art, the APP uses the audio input and output module and the storage module to respectively complete audio input and output, so as to realize audio playback and audio information storage.
Specifically, fig. 1 shows an audio playback method information flow diagram based on the android system in the prior art.
As shown in fig. 1, the audio input module acquires audio information, and the audio information sequentially passes through the audio input driving module, the audio input middle module and the audio input frame module to reach the APP.
Through the above process, the audio information takes about 80ms to reach the APP module.
On one hand, the APP controls the storage module to store the audio information, and on the other hand, the APP transmits the audio information to the audio output framework module.
The audio information is output to the audio output module through the audio output frame module, the audio output middle module and the audio output driving module, and the audio information is output and played back.
Through the above process, the audio information takes about 40ms to output the playback audio information from the APP to the output module.
Thus, the time difference between playback of the audio information and input of the audio information is about 120ms, and when the audio information is input by a person, the human hearing feeling can be perceived with high certainty. For example, when a person inputs sound using a singing APP, the person cannot feel real-time output of the singed song, and the use experience of the person is affected.
Aiming at the technical problems, the basic idea of the application is to design an audio playback method based on an android system, and by setting an audio playback mode control module, the audio information playback transmission path is shortened, the audio playback delay is shortened, and the audio storage function which is the same as that of the prior art is included.
Having described the basic principles of the present application, various non-limiting embodiments of the present application will now be described in detail with reference to the accompanying drawings.
Exemplary method
Fig. 2 illustrates a flowchart of an audio playback method based on the android system according to one embodiment of the present invention.
As shown in fig. 2, a flowchart of an audio playback method based on an android system according to an embodiment of the present invention includes:
s21: control module for setting audio playback mode
The audio playback mode control module is used for receiving an audio playback mode control command of the APP and outputting a corresponding audio playback mode control state: when the APP control command is in a common playback mode, the audio playback mode control state is 0; when the APP control command is a fast playback mode, the audio playback mode control state is 1.
The audio playback mode control module outputs the audio playback mode control state to the audio input driving module and the audio output driving module respectively.
Correspondingly, when the audio input driving module receives that the audio playback mode control state is 0, inputting audio information to the audio input intermediate module; when the audio input driving module receives the audio playback mode control state as 1, audio information is input to the audio input intermediate module and the audio output driving module.
When the audio output driving module receives that the audio playback mode control state is 0, receiving output information of the audio output intermediate module as input information; when the audio output driving module receives the audio playback mode control state as 1, the audio output driving module respectively receives the first audio information of the audio input driving module and the second audio information of the audio output intermediate module, and takes the third audio information formed by the operation of the first audio information and the second audio information as input information.
S22: determining and transmitting audio information transmission path
Fig. 3 is an audio playback method information flow diagram based on the android system according to one embodiment of the present invention.
As shown in fig. 3, an audio playback method based information flow diagram according to one embodiment of the present invention.
When the audio playback mode control state is 1, the first transmission path of the audio information is:
the audio input information is sequentially transmitted to the audio output driving module through the audio input driving module to form first audio information.
When the audio playback mode control state is 1, the second transmission path of the audio information is:
the audio information sequentially passes through the audio input driving module, the audio input middle module, the audio input frame module, the APP and the audio output frame module to reach the audio output driving module to form second audio information.
The APP module further uses a storage module to store the audio information.
When the audio playback mode control state is 0, the transmission path of the audio information is:
the audio information sequentially passes through an audio input driving module, an audio input middle module, an audio input frame module, an APP, an audio output frame module and an audio output driving module.
The APP module further uses a storage module to store the audio information.
S23: determining an audio information output path and outputting
When the control state of the audio playback mode is 0, the audio output driving module receives the output information of the audio output intermediate module as input information and outputs the information.
When the control state of the audio playback mode is 1, the audio output driving module receives the first audio information of the audio input driving module and the second audio information of the audio output intermediate module respectively, takes the third audio information formed by the first audio information and the second audio information through operation as input information, and outputs the information.
The audio playback method further comprises the following steps: acquiring input audio information
After the audio playback mode control module is set in the S21, audio information is acquired through an audio input device, wherein the audio input device can be a microphone of a smart phone or a smart tablet computer, the audio input device converts sound signals into electric signals and forms audio information in a certain format, and the format can be PCM format.
The audio playback method further comprises the following steps: playback audio information is output.
After the audio information output path is determined and output in S23, playback audio information is output through the audio output device. The audio output device can be a loudspeaker of a smart phone or a smart tablet computer, converts an electric signal into a sound signal, forms data information with a certain format into the sound signal, and can be in a PCM format.
Further, the audio playback mode control module method includes: a node is established under the android system root directory/sys/class/for example, the node name is AudioC2P, the node can be accessed by the APP, and the value can be set by the APP.
For example, if the node has been set, the APP accesses the AudioC2P node, providing the APP user to select a normal playback mode or a fast playback mode; if the node is not set, the APP does not access the Audio C2P node, and only the APP user ordinary playback mode is provided.
When a user selects a common playback mode through the APP, the APP sets the value of the Audio C2P to 0, namely the control state of the audio playback mode is 0; when the APP user selects the fast playback mode through the APP, the APP sets the audioC2P value to 1, namely the audio playback mode control state is 1.
Further, in the third audio information formed by the operation of the first audio information and the second audio information, the operation is an addition operation.
The addition operation is to multiply the weight of the first audio information and the second audio information respectively and then add the first audio information and the second audio information.
For example:
third audio information=1/2 first audio information+1/2 second audio information
By the audio playback method, the audio information playback path is obviously shortened, the audio playback delay is shortened to about 40ms, and the user experience is improved.
Exemplary electronic device
Next, a block diagram of an electronic device according to an embodiment of the present application is described with reference to fig. 4.
As shown in fig. 4, the electronic device 40 includes one or more processors 41 and memory 42.
The processor 41 may be a Central Processing Unit (CPU) or other form of processing unit having data processing and/or instruction execution capabilities, and may control other components in the electronic device 40 to perform desired functions.
Memory 42 may include one or more computer program products that may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory. The volatile memory may include, for example, random Access Memory (RAM) and/or cache memory (cache), and the like. The non-volatile memory may include, for example, read Only Memory (ROM), hard disk, flash memory, and the like. One or more computer program instructions may be stored on the computer readable storage medium that may be executed by the processor 51 to implement the audio playback methods and/or other desired functions of the embodiments of the present application described above.
In one example, electronic device 40 may further include: an input device 43 and an output device 44, which are interconnected by a bus system and/or other forms of connection mechanisms (not shown).
For example, the input device 43 may include, for example, a keyboard, a mouse, a microphone, etc., which may be used for input to select the audio playback mode; may be used to input said audio information.
The output means 44 may output various information to the outside, and the output device 44 may include, for example, a display, a speaker, a printer, a communication network and a remote output device connected thereto, etc., may be used to output and play back the audio information.
Of course, only some of the components of the electronic device 40 that are relevant to the present application are shown in fig. 4 for simplicity, components such as buses, input/output interfaces, etc. are omitted. In addition, the electronic device 40 may include any other suitable components depending on the particular application.
Exemplary computer program product and computer readable storage Medium
In addition to the methods, apparatuses described above, embodiments of the present application may also be a computer program product comprising computer program instructions which, when executed by a processor, cause the processor to perform the steps of an audio playback method according to embodiments of the present application described in the "exemplary methods" section of the present specification.
The computer program product may write program code for performing the operations of embodiments of the present application in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device or entirely on the remote computing device or server.
Furthermore, embodiments of the present application may also be a computer-readable storage medium, on which computer program instructions are stored, which, when executed by a processor, cause the processor to perform the steps in the audio playback method of embodiments of the present application.
The computer readable storage medium may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may include, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The basic principles of the present application have been described above in connection with specific embodiments, however, it should be noted that the advantages, benefits, effects, etc. mentioned in the present application are merely examples and not limiting, and these advantages, benefits, effects, etc. are not to be considered as necessarily possessed by the various embodiments of the present application. Furthermore, the specific details disclosed herein are for purposes of illustration and understanding only, and are not intended to be limiting, as the application is not intended to be limited to the details disclosed herein as such.
The block diagrams of the devices, apparatuses, devices, systems referred to in this application are only illustrative examples and are not intended to require or imply that the connections, arrangements, configurations must be made in the manner shown in the block diagrams. As will be appreciated by one of skill in the art, the devices, apparatuses, devices, systems may be connected, arranged, configured in any manner.
Words such as "including," "comprising," "having," and the like are words of openness and mean "including but not limited to," and are used interchangeably therewith. The terms "or" and "as used herein refer to and are used interchangeably with the term" and/or "unless the context clearly indicates otherwise. The term "such as" as used herein refers to, and is used interchangeably with, the phrase "such as, but not limited to.
It is also noted that in the methods, apparatus and devices of the present application, the components or steps may be disassembled and/or assembled. Such decomposition and/or recombination should be considered as equivalent to the present application.
The previous description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present application. Various modifications to these aspects will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other aspects without departing from the scope of the application. Thus, the present application is not intended to be limited to the aspects shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
The foregoing description has been presented for purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of the application to the form disclosed herein. Although a number of example aspects and embodiments have been discussed above, a person of ordinary skill in the art will recognize certain variations, modifications, alterations, additions, and subcombinations thereof.

Claims (7)

1. An audio playback method based on an android system is characterized by comprising the following steps:
setting an audio playback mode control module;
determining an audio information transmission path and transmitting; when the control state of the audio playback mode is 1, the transmission path of the audio information comprises a first transmission path and a second transmission path; the first transmission path is: the audio input information is sequentially transmitted to an audio output driving module through an audio input driving module to form first audio information; the second transmission path is: the audio information reaches the audio output driving module through the audio input driving module, the APP and the audio output intermediate module to form second audio information;
and determining an audio information output path and outputting, wherein when the audio playback mode control state is 1, the audio output driving module respectively receives the first audio information of the audio input driving module and the second audio information of the audio output intermediate module, takes third audio information formed by the operation of the first audio information and the second audio information as input information, and outputs the information.
2. The audio playback method as recited in claim 1, further comprising: input audio information is acquired.
3. The audio playback method of claim 1, further comprising: playback audio information is output.
4. The audio playback method as recited in claim 1, wherein the method of setting the audio playback mode control module comprises: a node is built under the android system root directory/sys/class.
5. The audio playback method of claim 1, wherein the operation is an addition operation in the third audio information formed by the operation of the first audio information and the second audio information.
6. An electronic device, comprising: a processor;
and a memory having stored therein computer program instructions that, when executed by the processor, cause the processor to perform the android system based audio playback method of any one of claims 1-5.
7. A computer readable storage medium storing a computer program for executing the android system based audio playback method of any one of claims 1-5.
CN201911188020.5A 2019-11-28 2019-11-28 Audio playback method and device based on android system and electronic equipment Active CN110989964B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911188020.5A CN110989964B (en) 2019-11-28 2019-11-28 Audio playback method and device based on android system and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911188020.5A CN110989964B (en) 2019-11-28 2019-11-28 Audio playback method and device based on android system and electronic equipment

Publications (2)

Publication Number Publication Date
CN110989964A CN110989964A (en) 2020-04-10
CN110989964B true CN110989964B (en) 2023-07-04

Family

ID=70087634

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911188020.5A Active CN110989964B (en) 2019-11-28 2019-11-28 Audio playback method and device based on android system and electronic equipment

Country Status (1)

Country Link
CN (1) CN110989964B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9319792B1 (en) * 2014-03-17 2016-04-19 Amazon Technologies, Inc. Audio capture and remote output

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9774747B2 (en) * 2011-04-29 2017-09-26 Nexidia Inc. Transcription system
US9159313B2 (en) * 2012-04-03 2015-10-13 Sony Corporation Playback control apparatus, playback control method, and medium for playing a program including segments generated using speech synthesis and segments not generated using speech synthesis
CN103475979A (en) * 2013-09-16 2013-12-25 无敌科技(西安)有限公司 Vocal accompaniment system reducing playback audio delay and method for reducing playback audio delay
CN106557305B (en) * 2015-09-25 2020-02-21 株式会社理光 Method and system for automatically playing back Android program
CN106653074A (en) * 2015-11-02 2017-05-10 深圳富泰宏精密工业有限公司 Electronic equipment and real-time sound playback method through electronic equipment
US10191715B2 (en) * 2016-03-25 2019-01-29 Semiconductor Components Industries, Llc Systems and methods for audio playback
US10459684B2 (en) * 2016-08-05 2019-10-29 Sonos, Inc. Calibration of a playback device based on an estimated frequency response
US9904508B1 (en) * 2016-09-27 2018-02-27 Bose Corporation Method for changing type of streamed content for an audio system
CN107329726B (en) * 2017-06-09 2020-09-01 海信视像科技股份有限公司 Method and device for processing input audio data in Android system
US10064021B1 (en) * 2017-10-12 2018-08-28 Motorola Solutions, Inc. Device and method for lower latency digital audio sample playback
US10783929B2 (en) * 2018-03-30 2020-09-22 Apple Inc. Managing playback groups
CN109144464A (en) * 2018-08-27 2019-01-04 歌尔科技有限公司 A kind of method, apparatus and Android device of audio output

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9319792B1 (en) * 2014-03-17 2016-04-19 Amazon Technologies, Inc. Audio capture and remote output

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
基于LabVIEW的声卡音频信号处理器设计;李鹏超;韩云东;马海瑞;陈鹏;;电脑编程技巧与维护(第17期);全文 *
基于多缓冲区实时音频采集和传输实现;张兵;;计算机工程(第12期);全文 *
数字视频音频实时同步传输探索与实现;郑阿奇;南京师范大学学报(工程技术版)(第03期);全文 *

Also Published As

Publication number Publication date
CN110989964A (en) 2020-04-10

Similar Documents

Publication Publication Date Title
CN107423364B (en) Method, device and storage medium for answering operation broadcasting based on artificial intelligence
JP2020016875A (en) Voice interaction method, device, equipment, computer storage medium, and computer program
JP2019040603A (en) Music recommendation method, device, equipment and program
CN104572042A (en) Cross-platform middleware device of mobile terminal equipment and implementation method of cross-platform middleware device of mobile terminal equipment
KR20060034144A (en) Mobile communication terminal capable of reproducing and updating multimedia content, and method for reproducing the same
CN112579038B (en) Built-in recording method and device, electronic equipment and storage medium
JP6850321B2 (en) Methods and devices for generating information
US8340797B2 (en) Method and system for generating and processing digital content based on text-to-speech conversion
US20200265843A1 (en) Speech broadcast method, device and terminal
JP2019015951A (en) Wake up method for electronic device, apparatus, device and computer readable storage medium
CN105210364A (en) Dynamic audio perspective change during video playback
CN106067310A (en) Recording data processing method and processing device
CN112687286A (en) Method and device for adjusting noise reduction model of audio equipment
CN105654932B (en) System and method for realizing karaoke application
CN110989964B (en) Audio playback method and device based on android system and electronic equipment
KR102110515B1 (en) Hearing aid device of playing audible advertisement or audible data
CN111918174B (en) Method and device for balancing volume gain, electronic device and vehicle
US20190152061A1 (en) Motion control method and device, and robot with enhanced motion control
JP5929879B2 (en) Audio output device, program, and audio output method
CN106331356B (en) Volume control method and terminal
CN114420158A (en) Model training method and device, and target frequency response information determining method and device
CN113157245A (en) Electronic book presentation information playing interaction method, computing device and storage medium
JP6752046B2 (en) Electronic devices, their control methods and control programs
CN110516043A (en) Answer generation method and device for question answering system
JP7178537B2 (en) Playback update method, device and storage medium

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