CN104484152B - High sampling rate based on Android leads directly to audio-frequency inputting method and equipment - Google Patents
High sampling rate based on Android leads directly to audio-frequency inputting method and equipment Download PDFInfo
- Publication number
- CN104484152B CN104484152B CN201410856812.6A CN201410856812A CN104484152B CN 104484152 B CN104484152 B CN 104484152B CN 201410856812 A CN201410856812 A CN 201410856812A CN 104484152 B CN104484152 B CN 104484152B
- Authority
- CN
- China
- Prior art keywords
- audio
- sampling rate
- straight
- high sampling
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/16—Sound input; Sound output
- G06F3/165—Management of the audio stream, e.g. setting of volume, audio stream path
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/466—Transaction processing
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Audiology, Speech & Language Pathology (AREA)
- General Health & Medical Sciences (AREA)
- Human Computer Interaction (AREA)
- Health & Medical Sciences (AREA)
- Multimedia (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
- Transmission Systems Not Characterized By The Medium Used For Transmission (AREA)
Abstract
Audio-frequency inputting method and equipment are led directly to the invention discloses a kind of high sampling rate based on Android, methods described is while audio stream broadcasting, create audiotrack threads corresponding with audio stream, audiotrack threads detect whether the audio stream supports the straight-through output of high sampling rate, if not supporting the straight-through output of high sampling rate, audio stream output is then carried out using original audio mixing resampling mode, if supporting the straight-through output of high sampling rate, then enable straight-through thread, carry out audiotrack and audio hw data stream transmitting, audio is streamed in audio hw, audio driven is opened in audio hw and carries out audio broadcasting.The apparatus and method for correspondence.The present invention carries out the broadcasting of high sampling rate by way of straight-through, it is to avoid the problem of dtmf distortion DTMF that resampling is brought.
Description
Technical field
The present invention relates to field of audio play, particularly a kind of high sampling rate based on Android leads directly to audio output side
Method and equipment.
Background technology
Android system is when carrying out audio broadcasting, and Android audio system can one sample rate of default setting(Than
Such as 44.1k), other sample rates be required for resampling to setting sample rate(44.1k)Play out, this inevitably results in audio
There is distortion phenomenon.The technical scheme of existing application compares when solving problem of dtmf distortion DTMF and focuses on improving weight from the angle of algorithm
The audio distortion problem that sample strip comes, such as, using a cube interpolation algorithm, limited rank algorithm filter etc., these algorithms are being solved
Although the problem of audio distortion, is above greatly improved, due to have passed through sampling rate converter src(Sample Rate
Convertor), the problem of dtmf distortion DTMF that inevitable SRC is brought, such as high frequency attenuation and intermodulation distortion etc..Therefore, prior art
The algorithm of use can only mitigate the audio distortion problem that resampling is brought, and can not fundamentally solve problem of dtmf distortion DTMF.
The content of the invention
To solve the above problems, leading directly to audio it is an object of the invention to provide a kind of high sampling rate based on Android
Output intent and equipment, carry out the broadcasting of high sampling rate by way of straight-through, it is to avoid broadcasting high sampling rate is, it is necessary to resampling
The problem of dtmf distortion DTMF brought.
The present invention solves the technical scheme that is used of its problem:
A kind of high sampling rate based on Android leads directly to audio-frequency inputting method, while being included in audio stream broadcasting, creates
Audiotrack threads corresponding with audio stream, audiotrack threads detect whether the audio stream supports high sampling rate is led directly to defeated
Go out, if not supporting the straight-through output of high sampling rate, audio stream output is carried out using original audio mixing resampling mode, if supported
The straight-through output of high sampling rate, then enable straight-through thread, audiotrack and audio hw data stream transmitting carried out, by audio stream
It is sent in audio hw, audio driven is opened in audio hw and carries out audio broadcasting.
It is preferred that, the audiotrack threads are by detecting the audio sample rate of audio stream and Android audio system
The size of the sample rate of system default setting judges whether the audio stream supports the straight-through output of high sampling rate.
A kind of high sampling rate based on Android leads directly to audio output apparatus, including:
Creation module, for while audio stream broadcasting, creating audiotrack threads corresponding with audio stream;
Detection module, for detecting whether the audio stream supports the straight-through output of high sampling rate by audiotrack threads;
Playing module, for when audio stream does not support straight-through output, audio to be carried out using original audio mixing resampling mode
Stream output, when audio stream supports that high sampling rate leads directly to output, then enables straight-through thread, carries out audiotrack and audio hw
Data stream transmitting, audio is streamed in audio hw, in audio hw open audio driven carry out audio broadcasting.
It is preferred that, in the detection module, audiotrack threads by detect the audio sample rate of audio stream with
The size of the sample rate of Android audio system default setting judges whether the audio stream supports the straight-through output of high sampling rate.
The beneficial effects of the invention are as follows:
The present invention leads directly to audio-frequency inputting method and equipment using a kind of high sampling rate based on Android, is played in audio
When, no longer using resampling mechanism primary android, but the broadcasting of high sampling rate is carried out by way of straight-through,
Avoid the problem of dtmf distortion DTMF that resampling is brought.
Brief description of the drawings
The invention will be further described with example below in conjunction with the accompanying drawings.
Fig. 1 is the schematic flow sheet of the method for the invention.
Embodiment
Shown in reference picture 1, a kind of high sampling rate based on Android of the invention leads directly to audio-frequency inputting method, is included in
While audio stream broadcasting, audiotrack threads corresponding with audio stream are created, audiotrack threads detect the audio stream
Whether high sampling rate straight-through output is supported, if the straight-through output of high sampling rate is not supported, using original audio mixing resampling mode
Audio stream output is carried out, if supporting the straight-through output of high sampling rate, straight-through thread is enabled, carries out audiotrack and audio
Hw data stream transmitting, audio is streamed in audio hw, and audio driven is opened in audio hw and carries out audio broadcasting.
Specifically, the audiotrack threads are by detecting the audio sample rate of audio stream and Android audio system
The size of the sample rate of system default setting judges whether the audio stream supports straight-through output.When directly leading directly to output, reference picture 1
Shown in, by audio stream directly by mCblk handle after enter mDirBuffer, subsequently into audio hw, by Audio alsa
Driver drivings are played;If not supporting straight-through output, by mCblk handle after enter mMixBuffer, subsequently into audio
Hw, is driven by Audio alsa driver and played.
When audio is played, no longer using resampling mechanism primary android, but entered by way of straight-through
The broadcasting of row high sampling rate, it is to avoid the problem of dtmf distortion DTMF that resampling is brought.
The present invention is may be used on hifi sound equipments of the a10s based on Android platform through actual verification, detection display,
, being capable of normal table operation when playing 96k, 192k audio.
Audio output apparatus is led directly to present invention also offers a kind of high sampling rate based on Android, including:
Creation module, for while audio stream broadcasting, creating audiotrack threads corresponding with audio stream;
Detection module, for detecting whether the audio stream supports the straight-through output of high sampling rate by audiotrack threads;
Playing module, for when audio stream does not support that high sampling rate leads directly to output, using original audio mixing resampling mode
Carry out audio stream output, when audio stream supports the straight-through output of high sampling rate, then enable straight-through thread, carry out audiotrack and
Audio hw data stream transmitting, audio is streamed in audio hw, and audio driven is opened in audio hw and carries out sound
Frequency is played.
Wherein, in the detection module, audiotrack threads are by detecting the audio sample rate and Android of audio stream
The size of sample rate of audio system default setting judge whether the audio stream supports the straight-through output of high sampling rate.
It is described above, simply presently preferred embodiments of the present invention, the invention is not limited in above-mentioned embodiment, as long as
It reaches the technique effect of the present invention with identical means, should all belong to protection scope of the present invention.
Claims (2)
1. a kind of high sampling rate based on Android leads directly to audio-frequency inputting method, it is characterised in that be included in audio stream broadcasting
Meanwhile, audiotrack threads corresponding with audio stream are created, audiotrack threads detect whether the audio stream supports height to adopt
The straight-through output of sample rate, if not supporting the straight-through output of high sampling rate, carries out audio stream defeated using original audio mixing resampling mode
Go out, if supporting the straight-through output of high sampling rate, enable straight-through thread, the data for carrying out audiotrack and audio hw spread
It is defeated, audio is streamed in audio hw, audio driven is opened in audio hw and carries out audio broadcasting;Wherein, it is described
Audiotrack threads are by detecting the sample rate of the audio sample rate of audio stream and Android audio system default setting
Size judges whether the audio stream supports the straight-through output of high sampling rate.
2. a kind of high sampling rate based on Android leads directly to audio output apparatus, it is characterised in that including:
Creation module, for while audio stream broadcasting, creating audiotrack threads corresponding with audio stream;
Detection module, for detecting whether the audio stream supports the straight-through output of high sampling rate by audiotrack threads;
Playing module, for when audio stream does not support straight-through output, carrying out audio stream using original audio mixing resampling mode defeated
Go out, when audio stream supports that high sampling rate leads directly to output, then enable straight-through thread, carry out audiotrack and audio hw number
According to streaming, audio is streamed in audio hw, audio driven is opened in audio hw and carries out audio broadcasting;
In the detection module, audiotrack threads are by detecting the audio sample rate of audio stream and Android audio system
The size of the sample rate of system default setting judges whether the audio stream supports the straight-through output of high sampling rate.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410856812.6A CN104484152B (en) | 2014-12-31 | 2014-12-31 | High sampling rate based on Android leads directly to audio-frequency inputting method and equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410856812.6A CN104484152B (en) | 2014-12-31 | 2014-12-31 | High sampling rate based on Android leads directly to audio-frequency inputting method and equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104484152A CN104484152A (en) | 2015-04-01 |
CN104484152B true CN104484152B (en) | 2017-07-28 |
Family
ID=52758700
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410856812.6A Active CN104484152B (en) | 2014-12-31 | 2014-12-31 | High sampling rate based on Android leads directly to audio-frequency inputting method and equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104484152B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114968168B (en) * | 2022-08-02 | 2022-09-27 | 北京麟卓信息科技有限公司 | Independent control method for output volume of android application |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102610267A (en) * | 2012-03-16 | 2012-07-25 | 广东步步高电子工业有限公司 | Method for improving audio playing quality of playing system |
CN102831896A (en) * | 2012-08-07 | 2012-12-19 | 广东欧珀移动通信有限公司 | Audio processing method and intelligent terminal of android system |
CN104183251A (en) * | 2014-08-15 | 2014-12-03 | 广东欧珀移动通信有限公司 | Audio playing method and device |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101217544B1 (en) * | 2010-12-07 | 2013-01-02 | 래드손(주) | Apparatus and method for generating audio signal having sound enhancement effect |
-
2014
- 2014-12-31 CN CN201410856812.6A patent/CN104484152B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102610267A (en) * | 2012-03-16 | 2012-07-25 | 广东步步高电子工业有限公司 | Method for improving audio playing quality of playing system |
CN102831896A (en) * | 2012-08-07 | 2012-12-19 | 广东欧珀移动通信有限公司 | Audio processing method and intelligent terminal of android system |
CN104183251A (en) * | 2014-08-15 | 2014-12-03 | 广东欧珀移动通信有限公司 | Audio playing method and device |
Also Published As
Publication number | Publication date |
---|---|
CN104484152A (en) | 2015-04-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
GB2589506B (en) | Method and apparatus for selecting background music for video capture, terminal device, and medium | |
EP3787300A4 (en) | Video stream processing method and apparatus, computer device and storage medium | |
WO2012023833A3 (en) | Method and apparatus for reducing deterioration of a quality of experience of a multimedia service in a multimedia system | |
MX2012012208A (en) | Output device, source apparatus, television set, system, output method, program, and recording medium. | |
NZ604291A (en) | Method and apparatus for online rendering of game files | |
WO2012027607A3 (en) | Technique and apparatus for analyzing video and dialog to build viewing context | |
EP2503767A3 (en) | Video display apparatus, noise removing method, and video display system | |
WO2008008107A3 (en) | Methods and apparatus to distribute media content | |
JP2015520966A5 (en) | ||
FR2949916B1 (en) | DEVICE FOR DISCONNECTING AT LEAST ONE APPARATUS FROM THE ELECTRICAL NETWORK, WHICH OFFERS AT LEAST ONE OPERATING MODE IN DEROGATION, CONFIGURABLE DEVICE, SYSTEM AND CONFIGURATION METHOD. | |
EP3273657A3 (en) | Methods and systems for dynamic media content output for mobile devices | |
WO2011139622A3 (en) | Method and apparatus for insertion of advertising in a live video stream | |
MX2015006441A (en) | Method and apparatus for playing streaming media data. | |
CN103747358A (en) | Video playing method and apparatus | |
WO2014121135A3 (en) | Methods and apparatus for enabling and disabling scrambling of control symbols | |
EP4072147A4 (en) | Video stream processing method, apparatus and device, and medium | |
CN104183251A (en) | Audio playing method and device | |
JP2013509768A5 (en) | ||
WO2017113708A1 (en) | Video playback method and device | |
KR20160030517A (en) | Method, apparatus and computer-readable medium for media content streaming device setup | |
CN104484152B (en) | High sampling rate based on Android leads directly to audio-frequency inputting method and equipment | |
RU2011123652A (en) | DEVICE FOR OUTPUT OF AUDIO DATA, DEVICE FOR PLAYING VIDEO DATA AND AUDIO DATA AND METHOD OF OUTPUT OF AUDIO DATA | |
EP3909250A4 (en) | Method and apparatus for authenticating and authorizing network based media processing | |
WO2012075601A8 (en) | Method and apparatus for managing content distribution over multiple terminal devices in collaborative media system | |
EP2312826A3 (en) | Network device, information processing apparatus, stream switching method, information processing method, program, and content distribution system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |