CN107526634A - The method for supporting multiple sound pick-up outfits simultaneously in Android device - Google Patents

The method for supporting multiple sound pick-up outfits simultaneously in Android device Download PDF

Info

Publication number
CN107526634A
CN107526634A CN201710772036.5A CN201710772036A CN107526634A CN 107526634 A CN107526634 A CN 107526634A CN 201710772036 A CN201710772036 A CN 201710772036A CN 107526634 A CN107526634 A CN 107526634A
Authority
CN
China
Prior art keywords
sound pick
outfit
audio
virtual sound
recording
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.)
Pending
Application number
CN201710772036.5A
Other languages
Chinese (zh)
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.)
Sichuan Changhong Electric Co Ltd
Original Assignee
Sichuan Changhong Electric 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 Sichuan Changhong Electric Co Ltd filed Critical Sichuan Changhong Electric Co Ltd
Priority to CN201710772036.5A priority Critical patent/CN107526634A/en
Publication of CN107526634A publication Critical patent/CN107526634A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/10Program control for peripheral devices
    • G06F13/102Program control for peripheral devices where the programme performs an interfacing function, e.g. device driver
    • 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/162Interface to dedicated audio devices, e.g. audio drivers, interface to CODECs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • G06F9/4451User profiles; Roaming

Abstract

The present invention relates to Android device technology.The problem of not supporting the present invention is to solve existing Android device while being recorded using multiple sound pick-up outfits, there is provided a kind of method for supporting multiple sound pick-up outfits simultaneously in Android device, can be summarized as:It is a virtual sound pick-up outfit that each sound pick-up outfit, which is corresponded, each virtual sound pick-up outfit taken out can be used for the application program on upper strata, it is added to firstly the need of each virtual sound pick-up outfit taken out in the sound configuration file of start, then system is according to the information configured, actively each sound pick-up outfit taken out is added in the Audioflinger of system, finally increase selects the function of the virtual sound pick-up outfit taken out in Audioflinger records flow, to realize Android device while support the function of multiple sound pick-up outfits recording.The invention has the advantages that facilitate user, suitable for Android device.

Description

The method for supporting multiple sound pick-up outfits simultaneously in Android device
Technical field
The present invention relates to Android device technology, the technology of sound pick-up outfit more particularly in Android device.
Background technology
With the rapid development based on Android operation system and the Android device such as the propulsion of the integration of three networks, intelligent television should Increasingly abundanter with scene, the user of the Android device such as intelligent television is also equipped with various peripheral hardwares for it, wherein sound pick-up outfit because Enriched for application scenarios, so frequency of use more and more higher, but the Android device such as current intelligent television is only capable of supporting simultaneously One sound pick-up outfit is recorded, such as accesses the camera with sound-recording function and the remote control with sound-recording function or Mike simultaneously During wind, this several equipment can not just use simultaneously, substantially reduce the experience sense of these Android devices.
If desired current Android device operating system Frame Design uses only to support a sound pick-up outfit recording simultaneously The sound pick-up outfit of other accesses, then need user's actively selection switching.The frame of Android operation system in current Android device Rack-layer is realized to the processing of recording by Audioflinger, but only supports to open a record based on present recording strategy Sound equipment, therefore can not support to open multiple sound pick-up outfits simultaneously, its workflow to recording processing is:Application program passes through The method for calling Android AudioRecord and MediaRecorder (system recording API) to provide starts to record, then Android AudioRecord and MediaRecorder is by way of JNI (Java Native Interface), readjustment Android AudioRecord and MediaRecorder local service start the interface of recording, then call Corresponding preparation before Audioflinger and AudioPolicyServiec (system recording strategy) is recorded, such as select Sound pick-up outfit and the related recording parameter of setting etc. are selected, after the completion of preparation, then passes through Audioflinger and calls and recording is set The driving of equipment starts to gather sound.Wherein AudioRecord is mainly realized and recorded while playing (AudioRecord+ AudioTrack) and the real-time processing to audio, the encapsulation of various audios can be realized with code, but its output is PCM speech datas, it is impossible to be played device and directly play, it is necessary to first write code and realize data encoding and compression.Current Recording, coding and compression etc. have been integrated with MediaRecorder, and has supported a small amount of recorded audio form, as MP3, AAC, WAV and OGG etc., relevant interface is directly invoked, size of code is small, but it can not be handled in real time.
The content of the invention
The invention aims to solve current Android device not support while recorded using multiple sound pick-up outfits Problem, there is provided a kind of method for supporting multiple sound pick-up outfits simultaneously in Android device.
The present invention solves its technical problem, and the technical scheme of use is to support multiple sound pick-up outfits simultaneously in Android device Method, it is characterised in that comprise the following steps:
Step 1, by each sound pick-up outfit correspond be a virtual sound pick-up outfit, access at least one sound pick-up outfit One-to-one sound pick-up outfit node is created in Linux, and makes it to enter in Android HAL layers by multithreading to it Row read-write, and it is encapsulated as library file;
Step 2, each virtual recording is added in the configuration file of audio_policy.conf (system sounds configuration strategy) Audio_hw_modules corresponding to equipment (sound pick-up outfit abstract structure body), so as to be loaded in AudioPolicyManager The relevant information of the configuration file;
Step 3, increase newly-increased each virtual sound pick-up outfit interface in Audioflinger audio_interfaces, So that openInput can select newly-increased interface;
Step 4, newly-increased each sound pick-up outfit is added in audio.h, so that application program passes through in recording GetInput can select corresponding virtual sound pick-up outfit;
Step 5, in use, system starts, each virtual sound pick-up outfit can be loaded into according to audio_policy;
When step 6, application program need recording, AudioRecord is called to start thread of recording, in Audiopolicy Read each sound pick-up outfit node in real time by library file, read the pid and vid of the sound pick-up outfit currently connected, according to being read Information select corresponding to virtual sound pick-up outfit, SO corresponding to calling is in Android HAL layers from corresponding virtual recording Data are read in equipment.
The invention has the advantages that in the present invention program, by supporting multiple recording simultaneously in above-mentioned Android device The method of equipment, Android device can be made while use multiple sound pick-up outfits, and be independent of each other, facilitate user, improve user's body Test sense.
Embodiment
With reference to embodiment, technical scheme is described in detail.
The method for supporting multiple sound pick-up outfits simultaneously in Android device of the present invention, it is:By each sound pick-up outfit one One corresponds to a virtual sound pick-up outfit, accesses at least one sound pick-up outfit and creates one-to-one sound pick-up outfit section in Linux Point, and make it to be written and read in Android HAL layers by multithreading to it, and it is encapsulated as library file;Then exist Audio_hw_modules corresponding to each virtual sound pick-up outfit is added in audio_policy.conf configuration file, so that The relevant information of the configuration file is loaded in AudioPolicyManager;Again in Audioflinger audio_ Increase newly-increased each virtual sound pick-up outfit interface in interfaces, so as to openInput can select it is newly-increased interface;Then newly-increased each sound pick-up outfit is added in audio.h, so that application program passes through in recording GetInput can select corresponding virtual sound pick-up outfit;When in use, system starts, and can be loaded into according to audio_policy Each virtual sound pick-up outfit, then when application program needs recording, AudioRecord is called to start thread of recording, Read each sound pick-up outfit node in Audiopolicy in real time by library file, read the sound pick-up outfit currently connected pid and Vid, the virtual sound pick-up outfit according to corresponding to being selected the information read, SO corresponding to calling in Android HAL layers from Data are read in corresponding virtual sound pick-up outfit.
Embodiment
The method for supporting multiple sound pick-up outfits simultaneously in the Android device of the embodiment of the present invention, its specific processing step is such as Under:
Step 1, by each sound pick-up outfit correspond be a virtual sound pick-up outfit, access at least one sound pick-up outfit One-to-one sound pick-up outfit node is created in Linux, and makes it to enter in Android HAL layers by multithreading to it Row read-write, and it is encapsulated as library file;
Step 2, each virtual recording is added in the configuration file of audio_policy.conf (system sounds configuration strategy) Audio_hw_modules corresponding to equipment (sound pick-up outfit abstract structure body), so as to be loaded in AudioPolicyManager The relevant information of the configuration file;
Step 3, increase newly-increased each virtual sound pick-up outfit interface in Audioflinger audio_interfaces, So that openInput can select newly-increased interface;
Step 4, newly-increased each sound pick-up outfit is added in audio.h, so that application program passes through in recording GetInput can select corresponding virtual sound pick-up outfit;
Step 5, in use, system starts, each virtual sound pick-up outfit can be loaded into according to audio_policy;
When step 6, application program need recording, AudioRecord is called to start thread of recording, in Audiopolicy Read each sound pick-up outfit node in real time by library file, read the pid and vid of the sound pick-up outfit currently connected, according to being read Information select corresponding to virtual sound pick-up outfit, SO corresponding to calling is in Android HAL layers from corresponding virtual recording Data are read in equipment.
Here, each virtual sound pick-up outfit taken out can be used for the application program on upper strata, it is necessary first to abstract Each virtual sound pick-up outfit gone out is added in the sound configuration file (audio_policy.conf) of start, then system according to The information configured, actively each sound pick-up outfit taken out is added in the Audioflinger of system, finally existed The function for the virtual sound pick-up outfit that increase selection takes out, is so having already turned on a record in Audioflinger recording flows After sound equipment, the virtual sound pick-up outfit that opening system takes out can also be further continued for, to realize Android device while support multiple The function of sound pick-up outfit recording.

Claims (1)

1. the method for supporting multiple sound pick-up outfits simultaneously in Android device, it is characterised in that comprise the following steps:
Step 1, by each sound pick-up outfit correspond be a virtual sound pick-up outfit, access at least one sound pick-up outfit and exist Linux creates one-to-one sound pick-up outfit node, and makes it to be carried out in Android HAL layers by multithreading to it Read-write, and it is encapsulated as library file;
Step 2, audio_hw_ corresponding to each virtual sound pick-up outfit is added in audio_policy.conf configuration file Modules, so as to load the relevant information of the configuration file in AudioPolicyManager;
Step 3, increase newly-increased each virtual sound pick-up outfit interface in Audioflinger audio_interfaces, so as to OpenInput can select newly-increased interface;
Step 4, newly-increased each sound pick-up outfit is added in audio.h, so that application program passes through getInput in recording Virtual sound pick-up outfit corresponding to can selecting;
Step 5, in use, system starts, each virtual sound pick-up outfit can be loaded into according to audio_policy;
When step 6, application program need recording, call AudioRecord to start thread of recording, pass through in Audiopolicy Library file reads each sound pick-up outfit node in real time, the pid and vid of the sound pick-up outfit currently connected is read, according to the letter read Breath selects corresponding virtual sound pick-up outfit, and SO corresponding to calling is in Android HAL layers from corresponding virtual sound pick-up outfit Middle reading data.
CN201710772036.5A 2017-08-31 2017-08-31 The method for supporting multiple sound pick-up outfits simultaneously in Android device Pending CN107526634A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710772036.5A CN107526634A (en) 2017-08-31 2017-08-31 The method for supporting multiple sound pick-up outfits simultaneously in Android device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710772036.5A CN107526634A (en) 2017-08-31 2017-08-31 The method for supporting multiple sound pick-up outfits simultaneously in Android device

Publications (1)

Publication Number Publication Date
CN107526634A true CN107526634A (en) 2017-12-29

Family

ID=60683182

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710772036.5A Pending CN107526634A (en) 2017-08-31 2017-08-31 The method for supporting multiple sound pick-up outfits simultaneously in Android device

Country Status (1)

Country Link
CN (1) CN107526634A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109471606A (en) * 2018-10-12 2019-03-15 深圳市小畅科技有限公司 A kind of method of Android platform real-time recording concurrent processing
CN109830248A (en) * 2018-12-14 2019-05-31 维沃移动通信有限公司 A kind of audio recording method and terminal device
CN110113494A (en) * 2019-05-05 2019-08-09 Oppo广东移动通信有限公司 The way of recording and relevant apparatus
CN110767234A (en) * 2019-10-31 2020-02-07 北京字节跳动网络技术有限公司 Audio information processing method and device, electronic equipment and storage medium
CN111209121A (en) * 2018-11-22 2020-05-29 深圳市优必选科技有限公司 Recording method of application program, terminal device and medium
CN112423211A (en) * 2020-10-26 2021-02-26 努比亚技术有限公司 Multi-audio transmission control method, equipment and computer readable storage medium
CN112579038A (en) * 2020-12-24 2021-03-30 上海商米科技集团股份有限公司 Built-in recording method and device, electronic equipment and storage medium
CN114466231A (en) * 2021-12-15 2022-05-10 瑞芯微电子股份有限公司 Method for receiving and playing hardware source, electronic equipment and display device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103235736A (en) * 2013-03-27 2013-08-07 四川长虹电器股份有限公司 Android-platform-based method and system for supporting virtual audio equipment
US20160132318A1 (en) * 2014-11-07 2016-05-12 Oracle International Corporation Notifications framework for distributed software upgrades
CN106648921A (en) * 2016-09-30 2017-05-10 北京奇虎科技有限公司 Method for achieving recording data share in Android system and electronic device
CN106790940A (en) * 2015-11-25 2017-05-31 华为技术有限公司 The way of recording, record playing method, device and terminal
CN107105083A (en) * 2016-02-22 2017-08-29 中兴通讯股份有限公司 A kind of way of recording, master terminal, sub- terminal and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103235736A (en) * 2013-03-27 2013-08-07 四川长虹电器股份有限公司 Android-platform-based method and system for supporting virtual audio equipment
US20160132318A1 (en) * 2014-11-07 2016-05-12 Oracle International Corporation Notifications framework for distributed software upgrades
CN106790940A (en) * 2015-11-25 2017-05-31 华为技术有限公司 The way of recording, record playing method, device and terminal
CN107105083A (en) * 2016-02-22 2017-08-29 中兴通讯股份有限公司 A kind of way of recording, master terminal, sub- terminal and system
CN106648921A (en) * 2016-09-30 2017-05-10 北京奇虎科技有限公司 Method for achieving recording data share in Android system and electronic device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
MAXIONGYING: "《https://www.cnblogs.com/senior-engineer/p/4976716.html》", 19 November 2015 *

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109471606A (en) * 2018-10-12 2019-03-15 深圳市小畅科技有限公司 A kind of method of Android platform real-time recording concurrent processing
CN109471606B (en) * 2018-10-12 2021-10-08 深圳市小畅科技有限公司 Method for concurrently processing real-time recording of android platform
CN111209121A (en) * 2018-11-22 2020-05-29 深圳市优必选科技有限公司 Recording method of application program, terminal device and medium
CN111209121B (en) * 2018-11-22 2023-05-23 深圳市优必选科技有限公司 Recording method of application program, terminal equipment and medium
CN109830248A (en) * 2018-12-14 2019-05-31 维沃移动通信有限公司 A kind of audio recording method and terminal device
CN110113494A (en) * 2019-05-05 2019-08-09 Oppo广东移动通信有限公司 The way of recording and relevant apparatus
CN110113494B (en) * 2019-05-05 2021-01-29 Oppo广东移动通信有限公司 Recording method and related device
CN110767234A (en) * 2019-10-31 2020-02-07 北京字节跳动网络技术有限公司 Audio information processing method and device, electronic equipment and storage medium
CN112423211A (en) * 2020-10-26 2021-02-26 努比亚技术有限公司 Multi-audio transmission control method, equipment and computer readable storage medium
CN112579038A (en) * 2020-12-24 2021-03-30 上海商米科技集团股份有限公司 Built-in recording method and device, electronic equipment and storage medium
CN114466231A (en) * 2021-12-15 2022-05-10 瑞芯微电子股份有限公司 Method for receiving and playing hardware source, electronic equipment and display device
CN114466231B (en) * 2021-12-15 2024-01-23 瑞芯微电子股份有限公司 Method for receiving and playing hardware source, electronic equipment and display device

Similar Documents

Publication Publication Date Title
CN107526634A (en) The method for supporting multiple sound pick-up outfits simultaneously in Android device
TW200602945A (en) Reproducer, program, and reproducing method
KR101235466B1 (en) Reproducing apparatus, reproducing method, reproducing program, recording medium, and data structure
WO2002082810A1 (en) Video reproduction apparatus for digital video content, video reproduction method, video reproduction program, and package medium
KR101143252B1 (en) Reproducing apparatus, reproducing method, and recording medium
JP2006519453A5 (en)
KR101237160B1 (en) Reproduction device and recording medium
KR20070005591A (en) Recording medium having a data structure for managing sound data and recording and reproducing methods and apparatuses
CN101006505B (en) Reproducing apparatus
KR20070053270A (en) Reproduction device, reproduction method, reproduction program, recording medium, and data structure
CA2473257A1 (en) Information recording medium, information recording apparatus and method, information reproducing apparatus and method, information recording/reproducing apparatus and method, recording or reproduction control computer program, and data structure containing control signal
CN104199633B (en) Multimedia play equipment, player automatic identification equipment and method
CN110175081B (en) Optimization system and method for Android audio playing
KR101518294B1 (en) Media Recorded with Multi-Track Media File, Method and Apparatus for Editing Multi-Track Media File
CN106790940A (en) The way of recording, record playing method, device and terminal
WO2006018933A1 (en) Video producing device and method, recording medium, and video reproducing program
CN101365044B (en) Program information storage and management method for multimedia device and multimedia device
JP2009506479A5 (en)
CN104200824A (en) Audio recording method and device
CN105654932B (en) System and method for realizing karaoke application
CN101110929A (en) Digital multimedia document playing control method
TWI285811B (en) Storage medium storing multimedia data for providing moving image reproduction function and programming function, and apparatus and method for reproducing moving image
CN112053699A (en) Method and device for processing game card voice change
RU2391719C2 (en) Recording medium, and method, and device of data reproduction from recording medium
CN103975582A (en) Information processing apparatus, information processing method, and program

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20171229

RJ01 Rejection of invention patent application after publication